submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s217981224
p01143
C
#include<iostream> using namespace std; int main() { int n; int m; int p; int answer=0; int x[1000]; while (1) { cin >> n; cin >> m; cin >> p; if (n == 0 && m == p && p == 0) { break; } for (int i = 0; i < n; i++) { cin >> x[i]; answer += x[i]; } if (x[m - 1 ]!= 0) { answer = (answ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s693895803
p01143
C
#include<iostream> using namespace std; int main() { int n; int m; int p; int answer=0; int x[1000]; while (1) { cin >> n; cin >> m; cin >> p; if (n == 0 && m == p && p == 0) { break; } for (int i = 0; i < n; i++) { cin >> x[i]; answer += x[i]; } if (x[m - 1 ]!= 0) { answer = (answ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s096082962
p01143
C
#include<iostream> using namespace std; int main() { int n; int m; int p; int answer=0; int x[1000]; while (1) { cin >> n; cin >> m; cin >> p; if (n == 0 && m == p && p == 0) { break; } for (int i = 0; i < n; i++) { cin >> x[i]; answer += x[i]; } if (x[m - 1 ]!= 0) { answer = (answ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s081752665
p01143
C
int main() { int n,m,p,i,x,sum,win; for(;scanf("%d%d%d",&n,&m,&p),n;) { sum=0; h=0; for(i=1;i<=n;i++) { scanf("%d",&x); sum+=(x*100); if(i==m) win=x; } if(win==0) puts("0"); else printf("%.f\n",(sum*((100-p)/(double)100))/win); } exit(0); }
main.c: In function 'main': main.c:4:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | for(;scanf("%d%d%d",&n,&m,&p),n;) | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main() main.c:4:8: w...
s445674062
p01143
C++
#include<iostream> using namespace std; int main(){ int n,m,p; while(cin>>n>>m>>p){ if(n==0)break; double G=0; int num[n]; for(int i=0;i<n;i++){ cin>>num[i]; G+=100*num[i]; } G*=(100-p.0)/100.0; cout << G << endl; if(num[m-1]!=0){ cout << (int)G/num[m-1] << endl; ...
a.cc: In function 'int main()': a.cc:14:14: error: expected ')' before numeric constant 14 | G*=(100-p.0)/100.0; | ~ ^~ | )
s825743783
p01143
C++
#include<iostream> #include<vector> #include<map> #define P pair<int,int> using namespace std; int main(){ int n,m ,p; while(cin>>n>>m>>p,n||m||p){ int maisu=0,tmp,atari; int ans=0; for(int i=0;i<n;i++){ cin>>tmp; maisu+=tmp*100; if(i+1==m)atari=tmp; } if(atari==0)ans=0; ans=maisu/atari; else ans-=maisu/a...
a.cc: In function 'int main()': a.cc:18:9: error: 'else' without a previous 'if' 18 | else ans-=maisu/atari*(p/100); | ^~~~
s616299989
p01143
C++
#include<stdio.h> int main(){ int N,M,P; while(1){ scanf("%d %d %d",&N,&M,&P); if(N==0&&M==0&&P==0)break; int x,s=0,y=0; for(int i=0;i<N;i++){ scanf("%d",&x)s+=x; if(M==i-1)y=x; } printf("%d\n",(y/s*(100-P)/100)); } return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: expected ';' before 's' 13 | scanf("%d",&x)s+=x; | ^ | ;
s212871206
p01143
C++
#include<iostream> #include<vector> #include<string> #include<cstdlib> #include<cstring> #include<queue> #include<cmath> #include<functional> #include<numeric> //#include<> using namespace std; #define REP(i, n) for(int i=0;i<(int)(n);i++) #define REPS(i, n) for(int i=1;i<=(int)(n);i++) #define RREP(i, n) for(int i=(i...
a.cc: In function 'int main()': a.cc:30:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)' 30 | cin.tie(false); cout.tie(false); | ~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/ostream:40, ...
s281511601
p01143
C++
include <iostream> #include <vector> using namespace std; int main(void){ int n, m, p, total, ans; while(true){ cin >> n >> m >> p; if(n == 0 && m == 0 && p == 0){ break; } vector<int> x(n, 0); for(int i = 0; i < n; i++){ cin >> x[i]; } total = 0; for(int i = 0; i < n; i++){ total = total ...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu...
s902581046
p01143
C++
#include<iostream> using namespace std; int main(){ int a,b,c,i,d,sum; while(1){ sum=0; cin>>a>>b>>c; if(a==0&&a==b&&c==0)break; for(i=0;i<a;i++){ cin>>d; sum+=d; if(i==b-1)b=d; } if(b==0)cout<<b<<endl; if(c==100)cout<<0<<endlel; else if(c==0)cout<<sum*100/b<<endl; else cout<<(sum*100-sum*c)/b<<endl; } return 0; ...
a.cc: In function 'int main()': a.cc:15:20: error: 'endlel' was not declared in this scope 15 | if(c==100)cout<<0<<endlel; | ^~~~~~
s578691766
p01143
C++
#include<iostream> using namespace std; int main(){ int a,b,c,i,d,sum; while(1){ sum=0; cin>>a>>b>>c; if(a==0&&a==b&&c==0)break; for(i=0;i<a;i++){ cin>>d; sum+=d; if(i==b-1)b=d; } if(b==0)cout<<b<<endl; if(c==100)cout<<0<<endlel; else if(c==0)cout<<sum*100/b<<endl; else cout<<(sum*100-sum*c)/b<<endl; } return 0; ...
a.cc: In function 'int main()': a.cc:15:20: error: 'endlel' was not declared in this scope 15 | if(c==100)cout<<0<<endlel; | ^~~~~~
s689544923
p01143
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m,p; while(cin>>n>>m>>p,n,m,p){ int sum=0,num[101]; for(int i=1;i<=n;i++){ cin>>num[i]; sum+=num[i]; } sum*=100-p; sum/=num; if(num[m])cout<<max(sum,100)<<endl; else cout<<0<<endl; } }
a.cc: In function 'int main()': a.cc:12:20: error: invalid operands of types 'int' and 'int*' to binary 'operator/' 12 | sum/=num; | ~~~^~~~~ a.cc:12:20: note: in evaluation of 'operator/=(int, int*)'
s678416178
p01143
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ while(1){ int N, M, P; cin>> N>> M>> P; if(!(N||M||P)) break; int X[N]; for(int i=0; i<N; i++) cin>> X[i]; int s=100*accumulate(X, X+N, 0); int haito=s/100*(100-P); cout<< (X[M...
a.cc: In function 'int main()': a.cc:14:19: error: 'accumulate' was not declared in this scope 14 | int s=100*accumulate(X, X+N, 0); | ^~~~~~~~~~
s009208504
p01143
C++
#include<bits/stdc++.h> using namespace std; #define int long long int main() { int N, M, P; while( cin >> N >> M >> P, N && M && P ) { int X[100]; int sum = 0; for(int i=0; i<N; i++) cin >> X[i], sum += X[i]; if( X[M-1] == 0 || P == 100 ) cout << 0 << endl; else cout << sum*100 * (100-P) / X[M...
cc1plus: error: '::main' must return 'int'
s110027676
p01143
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define bye return 0 int main(){ int N,M,P; while(cin>>N>>M>>P,N&&M&&P){ int X[1000],sum=0; rep(i,N){ cin>>X[i]; sum+=100*X[i]; } sum=sum-sum*P/100; rep(i,N+1){ if(M==i){ if(X[i-1]!=0){ ...
a.cc: In function 'int main()': a.cc:20:10: error: expected '}' before 'else' 20 | else { | ^~~~ a.cc:17:22: note: to match this '{' 17 | if(X[i-1]!=0){ | ^
s261978430
p01143
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; int main() { int n, m, p; while (cin >> n >> m >> (p or n or m or p)) { int sum=0, hit=0; rep(i, n) { int t; cin >> t; sum += 100*t; if (i == m-1) hit += t; } if (...
a.cc: In function 'int main()': a.cc:9:26: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'bool') 9 | while (cin >> n >> m >> (p or n or m or p)) { | ~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~ | ...
s766816675
p01143
C++
#include<iostream> using namespace std; int main(){ int n, m, p, x[101]; while(cin >> n >> m >> p && n && m && p){ int sum=0; for(int i=1; i<=n; i++){ cin >> x[i]; sum+=x[i]; } if(x[m]==0){ cout << 0 << endl; } else { cout << sum * (100-p) / x[m] << endl; } }
a.cc: In function 'int main()': a.cc:19:4: error: expected '}' at end of input 19 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s901467403
p01143
C++
#include<iostream> using namespace std; int main(){ int n, m, p, x[101], ans; while(cin >> n >> m >> p && n){ for(int i=1; i<=n; i++){ int sum=0; cin >> x[i]; sum+=x[i]; } if(x[m]!=0){ ans = sum * (100-p) / x[m]; cout << ans << endl; } else { cout << 0 << endl; ...
a.cc: In function 'int main()': a.cc:14:13: error: 'sum' was not declared in this scope 14 | ans = sum * (100-p) / x[m]; | ^~~
s422594088
p01143
C++
#include <iostream> #include <vector> using namespace std; int Sum(const int* X, int size) { int sum = 0; for(int i = 0; i < size; i++) { sum += X[i]; } return sum; } int Devide(int d, const int *X, int M) { if(X[M] != 0) return (int)(d / X[M]); else return 0; } int main() { int N; //競技者の数...
a.cc:30:15: error: stray '\23' in program 30 | break;<U+0013><U+0003> | ^~~~~~~~ a.cc:30:16: error: stray '\3' in program 30 | break;<U+0013><U+0003> | ^~~~~~~~
s401711558
p01143
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s708971368
p01143
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s577414953
p01143
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s850924308
p01143
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,p; while(cin>>n>>m>>p,n||m||p){ vector<int> x(n+1); int total=0; for(int i=1;i<=n;++i){ cin>>x[i]; total+=x[i]; } total=total*(100-p) if(x[m]==0) cout<<0<<endl; else{ double tmp = total/x[m]; cout<<(int)total<<endl; }...
a.cc: In function 'int main()': a.cc:19:28: error: expected ';' before 'if' 19 | total=total*(100-p) | ^ | ; 20 | 21 | if(x[m]==0) | ~~ a.cc:23:9: error: 'else' without a previous 'if' 23 | ...
s232471865
p01143
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s270096059
p01143
C++
#include <bits/stdc++.h> using namespace std; #include <iostream> /*cout <<"Debug" cout <<x-30<<' '<<y-30<<endl;*/ typedef pair<pair<int ,int>, int> P; vector<pair<pair<int ,int>, int> > v_ans; vector<int>v_; vector<long int>v_ansl; /*taro tenn,hanako_ten,sum*/ bool cmp(P h, P r){ return h.second < r.second; } int v...
a.cc: In function 'int main()': a.cc:37:7: error: request for member 'clear' in 'v', which is of non-class type 'int [101]' 37 | v.clear(); | ^~~~~
s172180259
p01143
C++
ansli=[] while 1: a=input().split() if a[0]=="0" and a[1]=="0" and a[2]=="0": break for i in range(len(a)): a[i]=int(a[i]) x=[] for i in range(a[0]): x.append(int(input())) sum0=0 for i in x: sum0+=i sum=sum0*100*((100-a[2])/100) hit=x[a[1]-1] if...
a.cc:1:1: error: 'ansli' does not name a type 1 | ansli=[] | ^~~~~
s324029596
p01143
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s396380277
p01143
C++
#include <iostream> #include <vector> using namespace std; int main(){ int N, M, P; while( 1 ){ //cout << "N M P" <<endl; cin >> N >> M >> P; int money = 0; vector<int> X(N); if( N == 0 && M == 0 && P == 0 ) break; for( int i = 0; i < N; i++ ){ cin >> X[i]; money += X[i]; } if( X[M-1] == 0 ){ ...
a.cc:24:2: error: stray '#' in program 24 | }#include <iostream> | ^ a.cc:24:3: error: 'include' does not name a type 24 | }#include <iostream> | ^~~~~~~ a.cc:27:5: error: redefinition of 'int main()' 27 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | ...
s229237931
p01144
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:34: error: not a statement tot+r[i][0]*r[i][1]; ^ 1 error
s640257501
p01144
Java
import java.util.Scanner; public class Princess { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)){ while(sc.hasNext()) { int N=sc.nextInt(); int M=sc.nextInt(); if(N+M==0) break; int[] ds = new ...
Main.java:3: error: class Princess is public, should be declared in a file named Princess.java public class Princess { ^ 1 error
s422379513
p01144
Java
import java.util.Scanner; public class Princess { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)){ while(sc.hasNext()) { int N=sc.nextInt(); int M=sc.nextInt(); if(N+M==0) break; int[] ds = new ...
Main.java:3: error: class Princess is public, should be declared in a file named Princess.java public class Princess { ^ 1 error
s428915451
p01144
Java
import java.util.Scanner; public class Princess { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)){ while(sc.hasNext()) { int N=sc.nextInt(); int M=sc.nextInt(); if(N+M==0) break; int[] ds = new int[...
Main.java:3: error: class Princess is public, should be declared in a file named Princess.java public class Princess { ^ 1 error
s622052848
p01144
Java
import java.util.Scanner; public class Princess { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)){ while(sc.hasNext()) { int N=sc.nextInt(); int M=sc.nextInt(); if(N+M==0) break; int[] ds = new ...
Main.java:3: error: class Princess is public, should be declared in a file named Princess.java public class Princess { ^ 1 error
s772786024
p01144
Java
import java.util.Arrays; import java.util.Scanner; //Princess's Marriage public class Main{ class P implements Comparable<P>{ int d, p; public P(int d, int p) { this.d = d; this.p = p; } public int compareTo(P o) { return o.p-p; } } int n, m; P[] p; void run(){ Scanner sc = new Scanner(Sys...
Main.java:47: error: cannot find symbol new Main.run(); ^ symbol: class run location: class Main 1 error
s411392376
p01144
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt();// ‹æŠÔ int m = sc.nextInt();// •P‚Ì‚¨‚©‚Ë if (n == 0 && m == 0) { break; } int c = 0; int dp[][] = new int[n][2]; for (int i = 0; i < n; i++) { dp[i][0...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s889948508
p01144
C
#include <stdio.h> int n, m, i, d, p, r[11]; int main() { while(true) { scanf("%d", &n); scanf("%d", &m); if(n == 0 && m == 0) { break; } for(i = 0; i < 11; i++) { r[i] = 0; } for(i = 0; i < n; i++) { ...
main.c: In function 'main': main.c:7:11: error: 'true' undeclared (first use in this function) 7 | while(true) | ^~~~ main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include <stdio.h> +++ |+#include <stdbool.h> ...
s038680025
p01144
C++
#include<iostream> #include<vector> using namespace std; bool compare(int a,int b) { return a>b; } int main() { int N,M,P=0; //vector<int> d,p; while(cin>>N>>M&&N) { //d.resize(N); int d,p,sum=0; pair<int,int> pd; dp.resize(N); int i; for(i=0;i<N;i++) { cin>>d>>p; ...
a.cc: In function 'int main()': a.cc:17:5: error: 'dp' was not declared in this scope; did you mean 'pd'? 17 | dp.resize(N); | ^~ | pd a.cc:24:15: error: no match for 'operator+' (operand types are 'std::pair<int, int>' and 'int') 24 | sort(pd,pd+N,compare); | ~~^~ ...
s963019187
p01144
C++
#include<iostream> #include<vector> using namespace std; bool compare(int a,int b) { return a>b; } int main() { int N,M,P=0; //vector<int> d,p; while(cin>>N>>M&&N) { //d.resize(N); int d,p,sum=0; pair<int,int> pd; pd.resize(N); int i; for(i=0;i<N;i++) { cin>>d>>p; ...
a.cc: In function 'int main()': a.cc:17:8: error: 'struct std::pair<int, int>' has no member named 'resize' 17 | pd.resize(N); | ^~~~~~ a.cc:24:15: error: no match for 'operator+' (operand types are 'std::pair<int, int>' and 'int') 24 | sort(pd,pd+N,compare); | ~~^~ | ...
s317378347
p01144
C++
#include<iostream> #include<vector> #define MAX 10000 using namespace std; bool compare(int a,int b) { return a>b; } int main() { int N,M,P=0; //vector<int> d,p; while(cin>>N>>M&&N) { //d.resize(N); int d,p,sum=0; pair<int,int> pd[MAX]; int i; for(i=0;i<N;i++) { cin>>d>...
a.cc: In function 'int main()': a.cc:22:11: error: incompatible types in assignment of 'std::pair<int, int>' to 'std::pair<int, int> [10000]' 22 | pd=make_pair(p,d); | ~~^~~~~~~~~~~~~~~ a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(pd,pd+N,compa...
s377859809
p01144
C++
#include<iostream> #include<vector> #include<algorithm> #define MAX 10000 using namespace std; bool compare(int a,int b) { return a>b; } int main() { int N,M,P=0; //vector<int> d,p; while(cin>>N>>M&&N) { //d.resize(N); int d,p,sum=0; pair<int,int> pd[MAX]; int i; for(i=0;i<N;i++) ...
a.cc: In function 'int main()': a.cc:23:11: error: incompatible types in assignment of 'std::pair<int, int>' to 'std::pair<int, int> [10000]' 23 | pd=make_pair(p,d); | ~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/s...
s572332270
p01144
C++
#include<iostream> #include<vector> #include<algorithm> #include<utility> #define MAX 10000 using namespace std; bool compare(int a,int b) { return a>b; } int main() { int N,M,P=0; //vector<int> d,p; while(cin>>N>>M&&N) { //d.resize(N); int d,p,sum=0; pair<int,int> pd[MAX]; int i; ...
a.cc: In function 'int main()': a.cc:24:11: error: incompatible types in assignment of 'std::pair<int, int>' to 'std::pair<int, int> [10000]' 24 | pd=make_pair(p,d); | ~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/s...
s823669582
p01144
C++
using namespace std; int main(void) { int N; long M; while(cin >> N >> M, N > 0){ long D[MAX_P + 1]; long result = 0; //配列Dを初期化 rep(i, MAX_P + 1){ D[i] = 0; } //配列Dを構成 rep(i, N){ int d, p; cin >> d >> p; D[p] += d; } rep(i, MAX_P + 1){ if (M >= D[MAX_P - i]){ M -= D[MAX_P - i]; ...
a.cc: In function 'int main()': a.cc:7:15: error: 'cin' was not declared in this scope 7 | while(cin >> N >> M, N > 0){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using n...
s957655168
p01144
C++
bool cmp(pair<int, int> &x, pair<int, int> &y) { return x.second > y.second; } int main(void) { int n, m; while(cin >> n >> m, n > 0){ int j = 0, ans = 0; vector<pair<int, int>> dp(n); rep(i, n){ int d, p; cin >> d >> p; dp[i] = make_pair(d, p); } sort(dp.begin(), dp.end(), cmp); while(m > 0){ ...
a.cc:1:10: error: 'pair' was not declared in this scope 1 | bool cmp(pair<int, int> &x, pair<int, int> &y) | ^~~~ a.cc:1:15: error: expected primary-expression before 'int' 1 | bool cmp(pair<int, int> &x, pair<int, int> &y) | ^~~ a.cc:1:20: error: expected primary-expression b...
s355476947
p01144
C++
#include <iostream> #include <algorithm> using namespace std; void main() { int number_of_interval, money, expectation, distance[number_of_interval], probability[number_of_interval], index; while (cin >> number_of_interval >> money) { for (int i {}; i < number_of_interval; i++) { cin >> distance[i] >> pr...
a.cc:5:1: error: '::main' must return 'int' 5 | void main() { | ^~~~ a.cc: In function 'int main()': a.cc:19:7: error: 'expactation' was not declared in this scope; did you mean 'expectation'? 19 | expactation += probability[index] * (distance[index] - money); | ^~~~~~~~~~~ | ...
s263155919
p01144
C++
#include <iostream> #include <algorithm> using namespace std; void main() { int number_of_interval, money, expectation; while (cin >> number_of_interval >> money) { int distance[number_of_interval], probability[number_of_interval], index; for (int i {}; i < number_of_interval; i++) { cin >> distance[...
a.cc:5:1: error: '::main' must return 'int' 5 | void main() { | ^~~~ a.cc: In function 'int main()': a.cc:20:7: error: 'expactation' was not declared in this scope; did you mean 'expectation'? 20 | expactation += probability[index] * (distance[index] - money); | ^~~~~~~~~~~ | ...
s449707124
p01144
C++
include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N, M; while (cin >> N >> M && N > 0) { vector<pair<int, int>> A; A.reserve(N); for (int i = 0; i < N; i++) { int d, p; cin >> d >> p; pair<int, int> a = make_pair(p, d); A.push_back(a...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu...
s689739538
p01144
C++
import java.util.Arrays; import java.util.Scanner; public class Main { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); final int MOD = 1000000007; int[] dx = { 1, 0, 0, -1 }; int[] dy = { 0, 1, -1, 0 }; void run() { for (;;) { int N = sc.nextInt(); int M = sc.nextInt(); if ((N |...
a.cc:55:17: error: stray '@' in program 55 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | impo...
s819644053
p01144
C++
#include <iostream> #include <utility> #include <algorithm> using namespace std; int main() { long long n, m; while(1){ cin >> n; cin >> m; if(n == 0 && m ==0){ break; } vector<pair <long long, long long>> data(n); long long total_encounter = 0; ...
a.cc: In function 'int main()': a.cc:17:9: error: 'vector' was not declared in this scope 17 | vector<pair <long long, long long>> data(n); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <algorithm>...
s240619725
p01144
C++
#include<iostream> using namespace std; struct P { int d = 0; int p = 0; }; int main() { long N, M; while (cin >> N >> M && N != 0 && M != 0) { P dp[100000] = {}; for (int i = 0; i < N; i++) { int d, p; cin >>d >> p; dp[i].d = d; dp[i].p = p; } for (int i = 0; i < N - 1; i++) { for (int...
a.cc: In function 'int main()': a.cc:64:18: error: expected '}' at end of input 64 | return 0; | ^ a.cc:9:1: note: to match this '{' 9 | { | ^
s050175910
p01144
C++
// Princess's Marriage #include <iostream> #include <utility> #include <algorithm> using namespace std; int N, M; pair<int,int> PD[10010]; pair<int,int> PD2[10010]; int main() { while (cin >> N >> M && N) { int d, p; for (int i=0; i<N; ++i) { cin >> d >> p; PD[i] = make_pair(p, d); // PD[i...
a.cc: In function 'int main()': a.cc:21:16: error: expected ';' before 'for' 21 | int S = 0;p | ^ | ; 22 | for (int i=0; i<N; ++i) | ~~~ a.cc:22:19: error: 'i' was not declared in this scope 22 | for (int i=0; i<N; ++i) | ...
s002448286
p01144
C++
// Princess's Marriage #include <iostream> #include <utility> #include <algorithm> using namespace std; int N, M; pair<int,int> PD[10010]; pair<int,int> PD2[10010]; int main() { while (cin >> N >> M && N) { int d, p; for (int i=0; i<N; ++i) { cin >> d >> p; PD[i] = make_pair(p, d); // PD[i...
a.cc: In function 'int main()': a.cc:21:16: error: expected ';' before 'for' 21 | int S = 0;p | ^ | ; 22 | for (int i=0; i<N; ++i) | ~~~ a.cc:22:19: error: 'i' was not declared in this scope 22 | for (int i=0; i<N; ++i) | ...
s823271309
p01144
C++
// Princess's Marriage #include <iostream> #include <utility> #include <algorithm> using namespace std; int N, M; pair<int,int> PD[10010]; pair<int,int> PD2[10010]; int main() { while (cin >> N >> M && N) { int d, p; for (int i=0; i<N; ++i) { cin >> d >> p; PD[i] = make_pair(p, d); // PD[i...
a.cc: In function 'int main()': a.cc:21:16: error: expected ';' before 'for' 21 | int S = 0;p | ^ | ; 22 | for (int i=0; i<N; ++i) | ~~~ a.cc:22:19: error: 'i' was not declared in this scope 22 | for (int i=0; i<N; ++i) | ...
s305990744
p01144
C++
#include <iostream> #include <utility> using namespace std; int n,m; int kitaichi(pair<int,int>* pd, int size){ int sum = 0; for(int i=0;i<n;i++){ sum += pd[i].first*pd[i].second; } return sum; } int solve(){ pair<int,int> pd[n]; for(int i=0;i<n;i++){ int d,p; cin >> d >> p; ...
a.cc: In function 'int solve()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(pd,pd+n); | ^~~~ | short a.cc:22:5: error: 'reverse' was not declared in this scope 22 | reverse(pd,pd+n); | ^~~~~~~
s541224503
p01144
C++
#include <iostream> #include <utility> using namespace std; int n,m; int kitaichi(pair<int,int>* pd, int size){ int sum = 0; for(int i=0;i<n;i++){ sum += pd[i].first*pd[i].second; } return sum; } int solve(){ pair<int,int> pd[10000]; for(int i=0;i<n;i++){ int d,p; cin >> d >> ...
a.cc: In function 'int solve()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(pd,pd+n); | ^~~~ | short a.cc:22:5: error: 'reverse' was not declared in this scope 22 | reverse(pd,pd+n); | ^~~~~~~
s039994640
p01144
C++
#include <iostream> #include <utility> using namespace std; int n,m; int kitaichi(pair<int,int>* pd, int size){ int sum = 0; for(int i=0;i<n;i++){ sum += pd[i].first*pd[i].second; } return sum; } int solve(){ pair<int,int> pd[10000]; for(int i=0;i<n;i++){ int d,p; cin >> d >> ...
a.cc: In function 'int solve()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(pd,pd+n); | ^~~~ | short a.cc:22:5: error: 'reverse' was not declared in this scope 22 | reverse(pd,pd+n); | ^~~~~~~
s075283599
p01144
C++
#include<bits/stdc++.h> int d[11],n,m,i,a,b,s,e; int main(){ while(true) { memset(d,0,sizeof(d));s=0; std::cin>>n>>m;if(!n){break;} for(i=0;i<n;i++){std::cin>>a>>b;d[b]+=a;} for(i=10;i>=0;i--){e=min(d[i],m);m-=e;s+=i*(d[i]-e);} printf("%d\n",s);} }
a.cc: In function 'int main()': a.cc:8:22: error: 'min' was not declared in this scope; did you mean 'std::min'? 8 | for(i=10;i>=0;i--){e=min(d[i],m);m-=e;s+=i*(d[i]-e);} | ^~~ | std::min In file included from /usr/include/c++/14/algorithm:61, f...
s064301210
p01144
C++
#include <cstdio> #include <vetcor> int n, m, d, p; int main() { while(true) { scanf("%d", &n); scanf("%d", &m); if(n == 0 && m == 0) { break; } vector<int> r(11); for(int i = 0; i < n; i++) { scanf("%d", &d); s...
a.cc:2:10: fatal error: vetcor: No such file or directory 2 | #include <vetcor> | ^~~~~~~~ compilation terminated.
s377043390
p01144
C++
#include <cstdio> #include <vector> int n, m, d, p; int main() { while(true) { scanf("%d", &n); scanf("%d", &m); if(n == 0 && m == 0) { break; } vector<int> r(11); for(int i = 0; i < n; i++) { scanf("%d", &d); s...
a.cc: In function 'int main()': a.cc:15:9: error: 'vector' was not declared in this scope 15 | vector<int> r(11); | ^~~~~~ a.cc:15:9: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:428:11: no...
s636763118
p01144
C++
#include <iostream> #include <vector> using namespace std; int main() { for(int N, M; cin >> N >> M && N; ) { vector<pair<int, int>> roads; int danger = 0; for(int i = 0; i < N; i++) { int d, p; cin >> d >> p; roads.push_back(make_pair(p, d)); danger += d * p; } sort(roads.begin(),...
a.cc: In function 'int main()': a.cc:19:17: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(roads.begin(), roads.end(), greater<pair<int, int>>()); | ^~~~ | short
s607240390
p01144
C++
#include<iostream> using namespace std; int N,M; pair<int,int> PD[10010]; int main() { while(cin>>N>>M&&N){ int d,p,S=0; for(int i=0;i<N;i++){ cin>>d>>p; PD[i]=make_pair(p,d); S+=d*p; } sort(PD,PD+N); reverse(PD,PD+N); for(int...
a.cc: In function 'int main()': a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(PD,PD+N); | ^~~~ | short a.cc:17:9: error: 'reverse' was not declared in this scope 17 | reverse(PD,PD+N); | ^~~~~~~
s919256104
p01144
C++
#include <utility> #include <algorithm> #include <iostream> using namespace std; int main() { while (1) { int n, m; cin >> n >> m; if ( n == 0 && m == 0 ) break; int pd[10000]; int d, p; for ( int i = 0; i < n; i++ ) { cin >> d >> p; pd[i] = make_pair( p, d ); } sort( pd, pd + n ); int ans = 0...
a.cc: In function 'int main()': a.cc:15:42: error: cannot convert 'std::pair<int, int>' to 'int' in assignment 15 | pd[i] = make_pair( p, d ); | ~~~~~~~~~^~~~~~~~ | | | ...
s368007269
p01144
C++
#include <iostream> #include <vector> #include <map> using namespace std; int main(){ int n,m,d,p,o; typedef pair<int,int> ma; int i,j,k; cin >> n >> m; while(n!=0&&m!=0){ vector <ma> map; ma b; for(i=0;i<n;i++) { cin >> d >> p; b.first=p;b.second=d; map.push_back(b); } ...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(map.begin(),map.end(),greater<ma>()); | ^~~~ | short
s917948353
p01144
C++
#include <iostream> #include <iomanip> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <string> #include <algorithm> #include <string> #include <climits> #include <utility> #define REP(i, n) for (int ...
a.cc: In function 'int main()': a.cc:43:43: error: expected ';' before 'if' 43 | javascript:void(0)if(m-load[i].second>=0){//second????????¢ | ^~ | ; a.cc:46:26: error: 'else' without a previous 'i...
s156750383
p01144
C++
#include <iostream> #include <algorithm> using namespace std; pair<int, int> pd[10000]; int main(){ int n=0,m=0,i,j,tmp,secure=0, ans=0; int d[10000]; int p[10000]; int idx[10000]; while(1){ memset(d,0,sizeof(d)); memset(p,0,sizeof(d)); cin >> n >> m; if(n == 0 && m == 0){ break; } for(...
a.cc: In function 'int main()': a.cc:14:17: error: 'memset' was not declared in this scope 14 | memset(d,0,sizeof(d)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |...
s796414808
p01144
C++
#include<iostream> #include<vector> #include<map> #include<algorithm> #define MAX 200000000 #define ll long long using namespace std; struct Data{ int D; ll P; }; struct Data D_P[MAX]; struct Data L[MAX/2+2],R[MAX/2+2]; void merge(int n,int left,int mid,int right){ int n1=mid-left; int n2=right-mid; for(i...
/tmp/ccml4diL.o: in function `merge(int, int, int, int)': a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `L' defined in .bss section in /tmp/ccml4diL.o a.cc:(.text+0x97): relocation truncated to fit: R_X86_64_PC32 against symbol `R' defined in .bss section in /tmp/ccml4diL.o a.cc:(.text+0x...
s108677942
p01144
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int long long #define FOR(i,a,b) for(int i=(a);i<(int)(b);i++) #define rep(i,n) FOR(i,0,n) #define RALL(x) (x).rbegin(),(x).rend() #define F first #define S second void solve(int n, int m) { vector<pair<int,int>> data(n); for(auto& i ...
a.cc: In function 'int main()': a.cc:32:14: error: expected '}' at end of input 32 | return 0; | ^ a.cc:29:15: note: to match this '{' 29 | signed main() { | ^
s232355791
p01144
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define Rep(i, N) for(int i = 0; i < N; i++) typedef pair<int, int> Pi; #define fi first #define se second int main() { int N, M; Pi data[10005]; int sum = 0; cin >> N >> M; Rep(i, N) { cin >> data[i].se >> data[i].fi; } ...
cc1plus: error: '::main' must return 'int'
s607257241
p01144
C++
#include<bits/stdc++.h> using namespace std; const long long INF = 1e7+1; const long long MOD = 1000000007; const long double PI = 3.1415926; #define FOR(i,r,n) for(ll i = (ll)(r); i < (ll)(n); i++) #define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define ALL(x)...
a.cc: In function 'int main()': a.cc:54:30: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::clear() [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 54 | vans.clear; | ~~~~~^~~~~ In file included from /usr/inclu...
s783256192
p01144
C++
#include<iostream> #include<utility> using namespace std; void calc_danger(int res,int i,pair<int,int> b[],int n){ int danger=0; danger+=res*(-1)*b[i].first; for(int j=0;j<i;j++){ danger+=b[j].first*b[j].second; } cout<<danger<<endl; return; } int main(){ int n,m; int danger; while(cin>>n>>m){ ...
a.cc: In function 'int main()': a.cc:26:5: error: 'sort' was not declared in this scope; did you mean 'short'? 26 | sort(b,b+n); | ^~~~ | short
s585389575
p01144
C++
#include<iostream> #include<utility> #include<algorithm> using namespace std; void calc_danger(int res,int i,pair<int,int> b[],int n){ int danger=0; danger+=res*(-1)*b[i].first; for(int j=0;j<i;j++){ danger+=b[j].first*b[j].second; } cout<<danger<<endl; return; } int main(){ int n,m; int danger; ...
a.cc: In function 'int main()': a.cc:34:16: error: 'I' was not declared in this scope 34 | }else if(I==0){ | ^
s274778405
p01144
C++
#include<iostream> #include<vector> #include<stdio.h> #include<algorithm> using namespace std; int main(){ int N,M; while(1){ cin>>N>>M; if(N==0&&M==0) break; vector<pair<int,int> > PD(N); unsigned long long prob; for(int i=0; i<N;i++) { cin>>PD[i].second>>PD[i].first; } so...
a.cc: In function 'int main()': a.cc:38:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 38 | int main(){ | ^~ a.cc:38:9: note: remove parentheses to default-initialize a variable 38 | int main(){ | ^~ | -- a.cc:38:9: note: or re...
s979872634
p01144
C++
#include<utility> #include<algorithm> #include<iostream> #include<functional> using namespace std; #if 0 ????????????30????????????sort???greater??????????????§'>>'??§?????????'> >'??§????????¨?????????????????????????????????????????? ??????N,??????M???????????????N??????pair????????£??\???N??????????´???????????????...
a.cc:8:55: error: extended character § is not valid in an identifier 8 | ????????????30????????????sort???greater??????????????§'>>'??§?????????'> >'??§????????¨?????????????????????????????????????????? | ^ a.cc:8:62: error: extended character § is not va...
s500509248
p01144
C++
#include<bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define ALL(v) (v).begin(),(v).end() #define pb push_back typedef long long ll; typedef pair<int,int> P; //----------------------------------------------------------------------- int main() { cin.tie(0); ios::sync_with_stdi...
a.cc: In function 'int main()': a.cc:38:2: error: expected '}' at end of input 38 | } | ^ a.cc:14:1: note: to match this '{' 14 | { | ^
s639932350
p01144
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n,m; ll ds[11]; int main(){ while(true){ scanf("%d%d", &n, &m); if(n+m==0)return 0; while(n--){ ll d; int x; scanf("%lld%d",&d,&x); ds[x] += d; } ll ans = 0; for(int i=10;i>=0;i--){ ll use = min(m, ds[i]); ds[i] -= use; m -= use; ans += i * ds[i];...
a.cc: In function 'int main()': a.cc:19:13: error: no matching function for call to 'min(int&, ll&)' 19 | ll use = min(m, ds[i]); | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a...
s853466768
p01144
C++
//#define DEBUG int N; long M; typedef struct{ int D,P; }Area; Area area[10000]; void debug(){ int i; for(i = 0; i < N; i++){ printf("D: %d; P:%d\n", area[i].D, area[i].P); } } int cmp(const int *a, const int *b){ return *b-*a; } int main(){ int i; long result; while(1){ scanf("%d%d", &N, &M); if(N == 0 ...
a.cc: In function 'void debug()': a.cc:11:17: error: 'printf' was not declared in this scope 11 | printf("D: %d; P:%d\n", area[i].D, area[i].P); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#inc...
s326964266
p01144
C++
#include<stdio.h> int main(){ int n,m,d,p,a,i; for( ; scanf("%d%d",&n,&m) , n|m ; printf("%d\n",a) ){ a=0; int f[12]={0}; for( i=n ; i-- ; f[p] += d ) scanf("%d%d",&d,&p); for( i=10 ; i >= 0 ; a += f[i]*i , i-- ) for( ; f[i] && m ; ){ m--,f[i]--; } }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s064389802
p01144
C++
#include<cstdio> #include<algorithm> #include<string> #include<cstring> #include<iostream> #include<vector> #include<map> using namespace std; typedef pair<int,int> P; #define F first #define S second int N,M; P p[10003]; int main(){ while(1){ scanf("%d %d",&N,&M); if(!N && !M) break; for(int i=0;i<N;i++)...
a.cc: In function 'int main()': a.cc:20:22: error: 'd' was not declared in this scope; did you mean 'da'? 20 | scanf("%d %d",&d,&pa); | ^ | da
s482519025
p01144
C++
#include<iostream> using namespace std; int main(){ int N,M; while(cin>>N>>M,N||M){ int Expected[11]={0}; int sum=0; int p,d; for(int i=0;i<N;i++){ cin>>d>>p; Expected[p]+=d; } for(int i=10;i>=0 && M>=0;i--){ if(Expected[i]<=M){ M-=Expected[i]; Expected[i]=0; } else{ ...
a.cc: In function 'int main()': a.cc:34:26: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 34 | cout<<sum<endl; | ~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/string:48, from...
s267107644
p01144
C++
#include <iostream> #include <utility> #include <algorithm> int main() { int flag = true; while (flag) { // 入力 int N, M; std::cin >> N >> M; int D, P; pair<int, int> PD[10000]; for (int i = 0; i < N; i++) { std::cin >> D >> P; PD[i] = make_pair(P, D); } // 演算 sort(PD, PD + N); int answer = ...
a.cc: In function 'int main()': a.cc:12:17: error: 'pair' was not declared in this scope; did you mean 'std::pair'? 12 | pair<int, int> PD[10000]; | ^~~~ | std::pair In file included from /usr/include/c++/14/string:48, from /usr/include/c++...
s836742661
p01144
C++
#include<map> #include<set> #include<list> #include<cmath> #include<queue> #include<stack> #include<cstdio> #include<string> #include<vector> #include<complex> #include<cstdlib> #include<cstring> #include<numeric> #include<sstream> #include<iostream> #include<algorithm> #include<functional> #define mp make_pair ...
a.cc: In function 'int main()': a.cc:64:39: error: 'g' was not declared in this scope 64 | m = 0;g | ^
s873641502
p01145
C
#include <iostream> #include <sstream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> using namespace std; #define FOR(i,k,n) for(int i=(k); i<(int)n; +...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s406448821
p01146
Java
import java.awt.font.GraphicAttribute; import java.io.*; import java.util.*; import javax.swing.undo.StateEdit; import org.omg.PortableServer.POAManagerPackage.State; public class Main { FastScanner in = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); class Edge { int to; int cost...
Main.java:8: error: package org.omg.PortableServer.POAManagerPackage does not exist import org.omg.PortableServer.POAManagerPackage.State; ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s489247806
p01146
Java
import java.util.*; public class Main{ int n,m,l,k,a,h; int[] x,y,t; int[][] time; int min; List<String> f; public static void main(String[] args){ new Main2().solve(); } void solve(){ Scanner sc = new Scanner(System.in); n = sc.nextInt(); while(n!=0){ m = sc.nextInt(); ...
Main.java:11: error: cannot find symbol new Main2().solve(); ^ symbol: class Main2 location: class Main 1 error
s809413569
p01146
Java
import java.util.*; public class Main_dij{ int N,M,L,K,A,H; int[] d; List<Edge>[] adj; int INF = 1000000000; List<String> f; public static void main(String[] args){ new Main_dij().solve(); } class Edge{ int t, c; public Edge(int t, int c) { this.t = t; this.c = c; } ...
Main.java:3: error: class Main_dij is public, should be declared in a file named Main_dij.java public class Main_dij{ ^ 1 error
s416004840
p01146
Java
import java.util.*; public class Main{ int N,M,L,K,A,H; int[] d; List<Edge>[] adj; int INF = 1000000000; List<String> f; public static void main(String[] args){ new Main().solve(); } class Edge{ int t, c; public Edge(int t, int c) { this.t = t; this.c = ...
Main.java:96: error: reached end of file while parsing } ^ 1 error
s868326025
p01146
Java
package nofill_nosubmit; import java.util.Arrays; import java.util.Scanner; public class AOJ_2021 { public static void main(String[] args) { Scanner in=new Scanner(System.in); int INF=1000001; for(;;) { int N=in.nextInt();//町の数 int M=in.nextInt();//制限時間 int L=in.nextInt();//冷凍施設の数 int K=in.nextI...
Main.java:4: error: class AOJ_2021 is public, should be declared in a file named AOJ_2021.java public class AOJ_2021 ^ 1 error
s419071148
p01146
Java
import static java.lang.System.in; import static java.lang.System.out; import static java.lang.Math.*; import java.util.*; public class Aizu2021 { public static Scanner sc=new Scanner(in); static class Node{ int id; int fp; boolean isC; List<Edge> link=new ArrayList<Edge>(); Node(int _id,int _fp,boo...
Main.java:7: error: class Aizu2021 is public, should be declared in a file named Aizu2021.java public class Aizu2021 { ^ 1 error
s933974205
p01146
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; #define loop(i,a,b) for(int i=(a);i<int(b);i++) #define rep(i,b) loop(i,0,b) #define all(c) (c).begin(), (c).end() int const inf = 1 << 29; struct Edge { Edge(int dst, int weight) : dst(dst), weight(weight){}...
a.cc: In function 'int main()': a.cc:72:9: error: 'memset' was not declared in this scope 72 | memset(isL, 0, sizeof(isL)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |+#include <cstr...
s812103548
p01146
C++
#include <iostream> #include <vector> #include <queue> #include <set> #include <functional> #include <algorithm> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);++i) #define REP(i,n) for (int i=0;i<(n);++i) struct Edge { int to; int cost; }; struct Node { int city_index; int total_cost; int curren...
a.cc: In function 'int main()': a.cc:55:81: error: 'INT_MAX' was not declared in this scope 55 | vector<vector<int>> d(city_count, vector<int>(initial_life + 1, INT_MAX)); // [city_index][current_life] => total_cost | ...
s894694965
p01146
C++
#include <iostream> #include <algorithm> #include <queue> #include <map> using namespace std; const int INF = 1<<28; int memo[110][110]; bool refr[110]; int G[110][110]; int n,m,l; struct V{ int id,fr; V(int id,int fr):id(id),fr(fr){} }; bool operator < (const V& a,const V& b){ return memo[a.id][a.fr] > memo[b....
a.cc: In function 'int main()': a.cc:57:5: error: 'memset' was not declared in this scope 57 | memset(refr,0,sizeof(refr)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <map> +++ |+#include <cstring> 5...
s187831171
p01146
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool reitou[100]; int time[100][100]; int main(void) { for (;;) { int n, m, l, k, a, h; cin >> n >> m >> l >> k >> a >> h; if (!n)return 0; fill(&reitou[0], &reitou[99], false); fill(&time[0][0], &time[99][99], INT_MAX >> 1); r...
a.cc:6:18: error: 'int time [100][100]' redeclared as different kind of entity 6 | int time[100][100]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s441701532
p01146
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> #include<queue> #include<set> #include<stack> #include<functional> #include<list> #include<unordered_map> #include<map> #define p pair<int,int> #define P pair<int,p> using namespace std; bool g[100]; vector<p>rinsetu[100]; int mi...
a.cc: In function 'int main()': a.cc:23:17: error: 'memset' was not declared in this scope 23 | memset(g, false, sizeof(g)); | ^~~~~~ a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<map> +++ |...
s907898597
p01146
C++
//#define __USE_MINGW_ANSI_STDIO 0 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<int, int> PII; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #defi...
a.cc: In function 'int main()': a.cc:66:40: warning: narrowing conversion of '(j - ((ll)e.edge::cost))' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing] 66 | que.push({j-e.cost, d[j-e.cost][e.to], e.to}); | ~^~~~~~~ a.cc:66:40: warning: na...
s390009915
p01146
C++
int main(){ ll ans = 0; while(1){ ans++; } cout << ans << endl; //TLE return 0; }
a.cc: In function 'int main()': a.cc:2:2: error: 'll' was not declared in this scope 2 | ll ans = 0; | ^~ a.cc:4:2: error: 'ans' was not declared in this scope 4 | ans++; | ^~~ a.cc:6:1: error: 'cout' was not declared in this scope 6 | cout << ans << endl; | ^~~~ a.cc:6:9: error: 'ans'...
s313925686
p01146
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstdio> #define F(i,n) for(int i=0;i<(int)(n);i++) #define INF 100000000 #define ll long long using namespace std; typedef pair<int, int> P; bool x[110],z[110],w[110]; int y[110][110]; int n, m, l,...
a.cc:17:22: error: 'int time' redeclared as different kind of entity 17 | int n, m, l, k, a, h,time,ans; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linu...
s246002283
p01146
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstdio> #define F(i,n) for(int i=0;i<(int)(n);i++) #define INF 100000000 #define ll long long using namespace std; typedef pair<int, int> P; bool x[110],z[110],w[110]; int y[110][110]; int n, m, l,...
a.cc:17:22: error: 'int time' redeclared as different kind of entity 17 | int n, m, l, k, a, h,time,ans; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linu...
s744032437
p01146
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstdio> #define F(i,n) for(int i=0;i<(int)(n);i++) #define INF 100000000 #define ll long long using namespace std; typedef pair<int, int> P; bool x[110],z[110],w[110]; int y[110][110]; int n, m, l,...
a.cc:17:22: error: 'int time' redeclared as different kind of entity 17 | int n, m, l, k, a, h,time,ans; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linu...
s679754348
p01146
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstdio> #define F(i,n) for(int i=0;i<(int)(n);i++) #define INF 100000000 #define ll long long using namespace std; typedef pair<int, int> P; bool x[110],z[110],w[110]; int y[110][110]; int n, m, l,...
a.cc:17:22: error: 'int time' redeclared as different kind of entity 17 | int n, m, l, k, a, h,time,ans; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linu...
s530128419
p01146
C++
#include<iostream> #include <vector> #include <queue> #define N_NODE 100 #define INF (1 << 29) using namespace std; struct Edge { int to, cost; }; class Path { public: Path(int _num, int _cost, int _M) { num = _num; cost = _cost; limit_time = _M; } int num; int cost; int limit_time; bool operator < ...
a.cc: In function 'bool find_freeze(std::vector<int>&, int&)': a.cc:43:9: error: 'for_each' was not declared in this scope 43 | for_each(vec.begin(), vec.end(), | ^~~~~~~~
s777083480
p01146
C++
#include <algorithm> #include <iostream> using namespace std; int main() { for( int N,M,L,K,A,H; cin>>N>>M>>L>>K>>A>>H, N|M|L|K|A|H; ) { bool freez[100]; bool visit[100][101]; int time[100][101]; int length[100][100]; const int INF = INT_MAX / 2; for( int i = 0; i < N; ++i ) { freez[i] = false;...
a.cc: In function 'int main()': a.cc:15:33: error: 'INT_MAX' was not declared in this scope 15 | const int INF = INT_MAX / 2; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #in...