submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s145944953
p00239
Java
import java.util.*; public class Program2{ void run(){ Scanner sc = new Scanner(System.in); for(;;){ int n = sc.nextInt(); if(n==0)break; int[] id = new int[n], p = new int[n], q = new int[n], r = new int[n]; for(int i=0;i<n;i++){ i...
Main.java:3: error: class Program2 is public, should be declared in a file named Program2.java public class Program2{ ^ 1 error
s097507003
p00239
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; //Calorie Counting public class Program2{ void run(){ Scanner sc = new Scanner(System.in); for(;;){ int n = sc.nextInt(); if(n==0)break; int[] id = new int[n], p = new int[n], q = new...
Main.java:6: error: class Program2 is public, should be declared in a file named Program2.java public class Program2{ ^ 1 error
s270860427
p00239
Java
import java.util.Scanner; public class Main_0239{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n,i,P,Q,R,C,han; int[] p = new int[1000]; int[] q = new int[1000]; int[] r = new int[1000]; int[] kei = new int[1000]; ...
Main.java:2: error: class Main_0239 is public, should be declared in a file named Main_0239.java public class Main_0239{ ^ 1 error
s213093269
p00239
C
#include <stdio.h> struct candy { int i, p, q, r; }; int main(void) { int n; while (scanf("%d", &n), n != 0){ candy c[1024]; candy maxi; int sum; int i; for (i = 0; i < n; i++) scanf("%d %d %d %d", &c[i].i, &c[i].p, &c[i].q, &c[i].r); scanf("%d %d %d %d", &max...
main.c: In function 'main': main.c:10:9: error: unknown type name 'candy'; use 'struct' keyword to refer to the type 10 | candy c[1024]; | ^~~~~ | struct main.c:11:9: error: unknown type name 'candy'; use 'struct' keyword to refer to the type 11 | candy maxi; | ...
s913946352
p00239
C
/* ?????????????????????????????????????¨???? ?????????4 ?????? ???????????¬??\???????§?????????????????£??????????????????????????????£?????§??????????????????????????? ??????????????¬?????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????¢???????????????§???...
main.c: In function 'main': main.c:104:36: error: expected expression before '>' token 104 | if ( ( pp => t[ i ][ P ] ) && | ^ main.c:105:40: error: expected expression before '>' token 105 | ( qq => t[ i ][ Q ] ) && ...
s464760290
p00239
C
#include <stdio.h> int main(){ int n,j,i; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3]); x[j+1][0]=x[j+1][1]*4 + x[j+1][2]*9 + [j+1][3]*4; } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ int sum; if(x[j+1][1]<...
main.c: In function 'main': main.c:9:39: error: expected expression before '[' token 9 | x[j+1][0]=x[j+1][1]*4 + x[j+1][2]*9 + [j+1][3]*4; | ^
s638793273
p00239
C++
include <iostream> using namespace std; int main(){ int n; while(cin >> n, n){ int id[1001], p[1001], q[1001], r[1001]; int P, Q, R, C; for(int i = 0; i < n; i++) cin >> id[i] >> p[i] >> q[i] >> r[i]; cin >> P >> Q >> R >> C; bool judge = true; for(int i = 0; i < n; i++){ if(p...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | while(cin >> n, n){ | ^~~ a.cc:16:9: error: 'cout' was not declared in this scope 16 | cout << id[i] << endl...
s097013365
p00239
C++
include <iostream> using namespace std; int main() { for (;;) { int n; cin >> n; if (n == 0) return 0; int p[n], q[n], r[n], c[n]; for (int x = 0; x < n; x++) { int _; cin >> _ >> p[x] >> q[x] >> r[x]; c[x] = p[x] * 4 + q[x] * 9 + r[x] * 4; } int P, Q, R, C; cin >> P >> Q >> R >> C; ...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:17: error: 'cin' was not declared in this scope 8 | cin >> n; | ^~~ a.cc:26:33: error: 'cout' was not declared in this scope 26 | ...
s341155120
p00239
C++
#include<iostream> using namespace std; int main(){ int x[1000],n,i,p[100],q[100],r[100],c[1700],P,Q,R,C,w; while(cin>>n){ if(n==0){ // nに0個になると停止 return 0; } for(i=0;i<n;i++){ //n個の箱を用意する cin>>x[i]>>p[i]>>q[i]>>r[i]; //お菓子の情報入力 c[i]=p[i]*4+q[i]*9+r[i]*4; ...
a.cc:33:6: error: expected unqualified-id before 'return' 33 | return 0; | ^~~~~~ a.cc:34:1: error: expected declaration before '}' token 34 | } | ^
s747552875
p00239
C++
#include<stdio.h> int main(void) { int a,s[10001],d[10001],f[10001],g[10001]; int h,j,k,z,i,flg; scanf("%d",&a); while(a!=0){ flg=0; for(i=1;i<=a;i++){ scanf("%d %d %d %d",&s[i],&d[i],&f[i],&g[i]); } scanf("%d %d %d %d",&h,&j,&k,&z); for(i=1;i<=a;i++){ if(h>d[i]&&j>f[i]&&k>g[i]&&z>d[i]+f[i]+g[i]){ ...
a.cc: In function 'int main()': a.cc:19:17: error: 'else' without a previous 'if' 19 | else if(flg==0){ | ^~~~
s639350581
p00239
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int n,P,Q,R,C,flag; struct DATA{ int name,p,f,c,cal,sum,flag; } DATA data[1001]; int main(){ while(1){ flag=0; for(int i=0;i<n;i++){data[i].flag=0;} cin>>n; if(n==0){break;} for(int i=0;i<n;i++){ cin>>data[i].n...
a.cc:11:6: error: expected initializer before 'data' 11 | DATA data[1001]; | ^~~~ a.cc: In function 'int main()': a.cc:16:42: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 16 | for(int i=0;i<n;i++){data[i].flag=0;} | ...
s154612919
p00239
C++
#include<stdio.h> int main(void) { int n,j,i[1000],p[100],q[100],r[100],p2,q2,r2,c,flg,x[1000]; while(1){ cnt=0; flg=0; scanf("%d",&n); if(n==0)break; for(j=0;j<n;j++){ scanf("%d %d %d %d",&i[j],&p[j],&q[j],&r[j]); } scanf("%d %d %d %d",&p2,&q2,&r2,&c); for(j=0;j<n;j++){ if(p[j]<=p2&&q[j]<=q2&&r...
a.cc: In function 'int main()': a.cc:6:17: error: 'cnt' was not declared in this scope; did you mean 'int'? 6 | cnt=0; | ^~~ | int
s791060901
p00239
C++
#include<stdio.h> int main(void) { int n,i,a[1000],s[1000],d[1000],f[10000],g,h,j,k,w[1000],flg; while(1){ scanf("%d",&n); if(n==0) break; for(i=0;i<n;i++){ scanf("%d %d %d %d",&a[i],&s[i],&d[i],&f[i]); w[i]=4*s[i]+9*d[i]+4*f[i]; } scanf("%d %d %d %d",&g,&h,&j,&k); flg=0; for(i=0;i<n;i++){ if(g=>s[i]&&h=>d...
a.cc: In function 'int main()': a.cc:15:14: error: expected primary-expression before '>' token 15 | if(g=>s[i]&&h=>d[i]&&j=>f[i]&&k=>w[i]){ | ^ a.cc:15:23: error: expected primary-expression before '>' token 15 | if(g=>s[i]&&h=>d[i]&&j=>f[i]&&k=>w[i]){ | ...
s119599043
p00239
C++
#include<stdio.h> int main(void) { int n,i,a[1000],s[1000],d[1000],f[10000],g,h,j,k,w[1000],flg; while(1){ scanf("%d",&n); if(n==0) break; for(i=0;i<n;i++){ scanf("%d %d %d %d",&a[i],&s[i],&d[i],&f[i]); w[i]=4*s[i]+9*d[i]+4*f[i]; } scanf("%d %d %d %d",&g,&h,&j,&k); flg=0; for(i=0;i<n;i++){ if(g=>s[i]&&h=>d...
a.cc: In function 'int main()': a.cc:15:14: error: expected primary-expression before '>' token 15 | if(g=>s[i]&&h=>d[i]&&j=>f[i]&&k=>w[i]){ | ^ a.cc:15:23: error: expected primary-expression before '>' token 15 | if(g=>s[i]&&h=>d[i]&&j=>f[i]&&k=>w[i]){ | ...
s051228687
p00239
C++
#include<stdio.h> int main(main) { int n,a,i[1010]; int p[1010],q[1010],r[1010],c[1010]; int pc[1010],qc[1010],rc[1010],cc[1010]; int f; while (scanf("%d",&n),n!=0){ for (a=0;a<n;a++){ scanf("%d %d %d %d",&i[a],&p[a],&q[a],&r[a]); c[a]=4*p[a]+9*q[a]+4*r[a]; } scanf("%d %d %d %d",&pc,&qc,&rc...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s447162283
p00239
C++
#include<stdio.h> int main(main) { int n,a,i[1010]; int p[1010],q[1010],r[1010],c[1010]; int pc,qc,rc,cc; int f; while (scanf("%d",&n),n!=0){ for (a=0;a<n;a++){ scanf("%d %d %d %d",&i[a],&p[a],&q[a],&r[a]); c[a]=4*p[a]+9*q[a]+4*r[a]; } scanf("%d %d %d %d",&pc,&qc,&rc,&cc); f=0; for (a=0...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s350332866
p00239
C++
#include<stdio.h> int main(void) { int n,a,i[1010]; int p[1010],q[1010],r[1010],c[1010]; int pc,qc,rc,cc; int f; while (scanf("%d",&n),n!=0){ for (a=0;a<n;a++){ scanf("%d %d %d %d",&i[a],&p[a],&q[a],&r[a]); c[a]=4*p[a]+9*q[a]+4*r[a]; } scanf("%d %d %d %d",&pc,&qc,&rc,&cc); f=0; for (a=0...
a.cc: In function 'int main()': a.cc:16:27: error: invalid types 'int[int]' for array subscript 16 | if (pc[a]>=p[a]&&qc[a]>=q[a]&&rc[a]>=r[a]&&cc[a]>=c[a]){ | ^ a.cc:16:40: error: invalid types 'int[int]' for array subscript 16 | if (pc[a]>=...
s338565660
p00239
C++
#include <stdio.h> #include<iostream> using namespace std; int main() { int pp = 4, qq = 9, rr = 4; while (1) { int n, P, Q, R, C, cou = 0; int okasi[1000][4]; bool b; scanf_s("%d", &n); if (n == 0) break; for (int i = 0; i<n; ++i) { scanf_s("%d %d %d %d", &okasi[i][0], &okasi[i][1], &okasi[i][2], &oka...
a.cc: In function 'int main()': a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s055526512
p00239
C++
4 1 7 14 47 2 5 35 55 3 6 3 59 4 6 5 15 10 15 50 400 2 1 8 10 78 2 4 18 33 10 10 50 300 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s282162805
p00239
C++
#include <iostream> #include <vector> #define calc(a, b, c) (4*a+8*b+4*c) using namespace std; class St { public: int id, p, q, r; St() {} St(int _id, int _p, int _q, int _r): id(_id), p(_p), q(_q), r(_r) {} void print(){ cout << id << endl; } bool check(int s, int t, int u, int v){ if(s < p ||...
a.cc:24:2: error: expected ';' after class definition 24 | } | ^ | ;
s757744449
p00239
C++
#include <iostream> #include <vector> #define calc(a, b, c) (4*a+8*b+4*c) using namespace std; class St { public: int id, p, q, r; St() {} St(int _id, int _p, int _q, int _r): id(_id), p(_p), q(_q), r(_r) {} void print(){ cout << id << endl; } bool check(int s, int t, int u, int v){ if(s <= p |...
a.cc: In member function 'bool St::check(int, int, int, int)': a.cc:21:23: error: expected primary-expression before '>' token 21 | if(calc(p, q, r) => v) return false; | ^
s376395896
p00239
C++
#include<iostream> using namespace std; struct cal{ int i; int p; int q; int r; int c; }; int main() { int n, P, Q, R, C; struct cal *ans; bool flg; while(cin >> n && n!=0){ ans = new struct cal[n]; for(int i=0; i<n; i++){ cin >> ans[i].i >> ans[i].p >> ans[i].q >> ans[i].r; ans[i].c = ans[i].p*4 +...
a.cc: In function 'int main()': a.cc:37:17: error: 'else' without a previous 'if' 37 | else if(!flg){ | ^~~~
s263436911
p00239
C++
#include <stdio.h> int main(){ int n,j; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3],&x[j+1][0); } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ if(x[j+1][1]<=p && x[j+1][2]<=q && x[j+1][3]<=r && x[j+1][0]<=c)...
a.cc: In function 'int main()': a.cc:8:28: error: 'i' was not declared in this scope 8 | scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3],&x[j+1][0); | ^ a.cc:8:72: error: expected ']' before ')' token 8 | scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3...
s236461226
p00239
C++
#include <stdio.h> int main(){ int n,j; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3],&x[j+1][0]); } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ if(x[j+1][1]<=p && x[j+1][2]<=q && x[j+1][3]<=r && x[j+1][0]<=c...
a.cc: In function 'int main()': a.cc:8:28: error: 'i' was not declared in this scope 8 | scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3],&x[j+1][0]); | ^
s020480577
p00239
C++
#include <stdio.h> int main(){ int n,j,i; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3],&x[j+1][0]); } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ int sum; if(x[j+1][1]<=p && x[j+1][2]<=q && x[j+1][3]<=r && x...
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:2:13: note: to match this '{' 2 | int main(){ | ^
s716573007
p00239
C++
#include <stdio.h> int main(){ int n,j,i; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3],&x[j+1][0]); } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ int sum; if(x[j+1][1]<=p && x[j+1][2]<=q && x[j+1][3]<=r && x...
a.cc: In function 'int main()': a.cc:23:2: error: expected '}' at end of input 23 | } | ^ a.cc:2:13: note: to match this '{' 2 | int main(){ | ^
s294415880
p00239
C++
#include <stdio.h> int main(){ int n,j,i; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3]); x[j+1][0]=4*x[j+1][1]+9*x[j+1][2]+4*[j+1][3]; } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ int sum; if(x[j+1][1]<=p &...
a.cc: In function 'int main()': a.cc:9:39: error: expected ',' before '+' token 9 | x[j+1][0]=4*x[j+1][1]+9*x[j+1][2]+4*[j+1][3]; | ^ | , a.cc:9:39: error: expected identifier before '+' token a.cc: In lambda function: a.cc:9:42...
s103909430
p00239
C++
#include <stdio.h> int main(){ int n,j,i; int x[1001][4]; int p,q,r,c; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3]); x[j+1][0]=x[j+1][1]*4+x[j+1][2]*9+[j+1][3]*4; } printf("%d %d %d %d",&p,&q,&r,&c); for(j=0;j<n;j++){ int sum; if(x[j+1][1]<=p &...
a.cc: In function 'int main()': a.cc:9:37: error: expected ',' before '+' token 9 | x[j+1][0]=x[j+1][1]*4+x[j+1][2]*9+[j+1][3]*4; | ^ | , a.cc:9:37: error: expected identifier before '+' token a.cc: In lambda function: a.cc:9:40: er...
s501631597
p00239
C++
#include <stdio.h> int main(){ while(1){ int n; int j,i; int p,q,r,c; int x[1001][4]; int sum=0; scanf("%d",&n); if(n==0){ goto a; } for(j=0;j<n;j++){ scanf("%d %d %d %d",&i,&x[j+1][1],&x[j+1][2],&x[j+1][3]); x[i][0]=x[i][1]*4+x[i...
a.cc:1:22: warning: extra tokens at end of #include directive 1 | #include <stdio.h> int main(){ while(1){ int n; int j,i; int p,q,r,c; int x[1001][4]; int sum=0; scanf("%d",&n); if(n==0){ goto a; } for(j=0;j<n;j++){ scanf("%d...
s590408250
p00239
C++
#include<stdio.h> int main() { int n,i,P,Q,R,C,x,y=0; int a[1000][5]={0}; while(scanf("%d",&n) && n!=0){ for(x=0; x<n; x++){ scanf("%d %d %d %d",&i,&p,&q,&r); a[x][1]=p; a[x][2]=q; a[x][3]=r; a[x][4]=a[x][1]*4+a[x][2]*9+a[x][3]*4; } scanf("%d ...
a.cc: In function 'int main()': a.cc:7:37: error: 'p' was not declared in this scope 7 | scanf("%d %d %d %d",&i,&p,&q,&r); | ^ a.cc:7:40: error: 'q' was not declared in this scope 7 | scanf("%d %d %d %d",&i,&p,&q,&r); | ...
s445162186
p00239
C++
#include<cstdio> using namespace std; int main(){ int n; while(scanf("%d",&n),n){ int a[1024],b[1024],c[1024],d[1024],cal[1024]; for(int i = 0;i < n; i++){ scanf("%d%d%d%d",&a[i],&b[i],&c[i],&d[i]); cal[i] = (4*b[i]) + (7*c[i]) + (4*d[i]); } int P,Q,R,C; ...
a.cc:28:5: error: redefinition of 'int main()' 28 | int main(){ | ^~~~ a.cc:3:5: note: 'int main()' previously defined here 3 | int main(){ | ^~~~ a.cc:53:5: error: redefinition of 'int main()' 53 | int main(){ | ^~~~ a.cc:3:5: note: 'int main()' previously defined here 3 | i...
s970110430
p00239
C++
#include <iostream> #include <vector> using namespace std; int n; class State { public: int i, p, q, r, c; State(int i, int p, int q, int r):i(i),p(p),q(q),r(r){} }; vector<State> states; int main() { while (cin >> n && n) { states.resize(n); for (int j = 0; j < n; j++) { int i, p, q, r; cin >> stat...
In file included from /usr/include/c++/14/bits/alloc_traits.h:33, from /usr/include/c++/14/ext/alloc_traits.h:34, from /usr/include/c++/14/bits/basic_string.h:39, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s628143232
p00239
C++
#include<iostream> #include<vector> #include<set> using namespace std; int main(){ int n; while(cin>>n&&n){ int P,Q,R,C; set<vector<int> > s; set<vector<int> >::iterator it; while(n--){ vector<int> v(4); cin>>v[0]>>v[1]>>v[2]>>v[3]; s.insert(v); } bool f=false; cin>>P>>Q>>R>>C; for(it=s.begi...
a.cc: In function 'int main()': a.cc:20:40: error: binding reference of type 'std::vector<int>&' to 'const std::vector<int>' discards qualifiers 20 | vector<int> &v=*it; | ^~~
s868507681
p00240
C
#include <vector> #include <algorithm> #include <cstdio> using namespace std; int main(){ int n,y,b,r,t,j; for(;scanf("%d%d",&n,&y),n;){ vector<pair<double,int> >v; for(;n--;){ scanf("%d%d%d",&b,&r,&t); if(t==1)v.push_back(make_pair(1+y*r/100.0,b)); else{ double d=1; for(j=0;j<y;j++)d*=1+r/100.0;...
main.c:1:10: fatal error: vector: No such file or directory 1 | #include <vector> | ^~~~~~~~ compilation terminated.
s415937766
p00240
C++
#include<iostream> #include<vector> using namespace std; class Bank{ public: int id, r, t; Bank(int id, int r, int t) :id(id), r(r), t(t){} }; int main(){ while (true){ int n; cin >> n; int y; cin >> y; vector<Bank> vb; for (int i = 0; i < n; ++i) { int b, r, t; cin >> b >> r >> t; vb.push_...
a.cc: In function 'int main()': a.cc:36:41: error: 'pow' was not declared in this scope 36 | double r2 = g * pow(1 + vb[i].r / 100., y); | ^~~
s418592972
p00240
C++
#include <iostream> #include <cstdio> #include <cmath> using namespace std; typedef pair<double, int> P; int main(void) { int kosu, year; while(cin >> kosu, kosu != 0){ cin >> year; P max = P((double)INT_MIN, 0); for(int r = 0; r < kosu; r++) { int number, kind, nennri; cin ...
a.cc: In function 'int main()': a.cc:11:27: error: 'INT_MIN' was not declared in this scope 11 | P max = P((double)INT_MIN, 0); | ^~~~~~~ a.cc:4:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <cmath...
s383831542
p00240
C++
#include<iostream> #include<string> #include<algorithm> #include<sstream> #include <functional> using namespace std; int main(){ int n; while(cin>>n&&n){ double now=10000,y,r,t,ans,iti=0; int b; cin>>y; for(int i=0;i<n;i++){ cin>>b>>r>>t; now=10000; if(t==1){ now=now*(1+y*(r/100)); } ...
a.cc: In function 'int main()': a.cc:22:49: error: 'pow' was not declared in this scope; did you mean 'now'? 22 | now=now*pow((1+r/100),y); | ^~~ | now
s334798027
p00240
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, y; while (cin >> n, n) { cin >> y; int b, r, t, res; double mx = 0; for (int i=0; i<n; ++i) { cin >> b >> r >> t; if (t == 1) { double interes...
a.cc: In function 'int main()': a.cc:21:45: error: 'pow' was not declared in this scope 21 | double interest = 10000.0 * pow(1 + r / 100.0, y); | ^~~
s116634152
p00240
C++
#include<stdio.h> #include<iostream> using namespace std; int main(){ int n; while(1){ scanf("%d",&n);if(n==0)break; int y,t,b,r; double s=0; int max=0,MM=0; scanf("%d",&y); for(int i=0;i<n;i++){ scanf("%d %d %d",&b,&r,&t) if(t==1){ s=1+y*r/100; } else{ double s1=1+r/100???s=s1; for(int j=0;j<y;j++) s*=s1; } if(s...
a.cc: In function 'int main()': a.cc:17:27: error: expected ';' before 'if' 17 | scanf("%d %d %d",&b,&r,&t) | ^ | ; 18 | 19 | if(t==1){ | ~~ a.cc:22:1: error: 'else' without a previous 'if' 22 | else{ | ^~~...
s677979199
p00240
C++
#include<bits/stdc++.h> using namespace std; int main() { int N; while(cin >> N, N) { int Y; int b, r, t; int ans; double ma = 0; cin >> Y; for(int i = 0; i < N; i++) { cin >> b >> r >> t; double latte = (t == 1) ? (1 + Y * (r...
a.cc: In function 'int main()': a.cc:18:66: error: no matching function for call to 'pow(double)' 18 | double latte = (t == 1) ? (1 + Y * (r / 100.0)) : pow(1 + r / 100.0)); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/...
s358093812
p00240
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int n,y; struct DATA{ int name,r,t; double money; }; DATA data[1001]; int main(){ while(1){ cin>>n; if(n==0){break;} cin>>y; for(int i=0;i<n;i++){ cin>>data[i].name>>data[i].r>>data[i].t; if(data[i].t==1){data...
a.cc: In function 'int main()': a.cc:20:30: error: reference to 'data' is ambiguous 20 | cin>>data[i].name>>data[i].r>>data[i].t; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s247043772
p00240
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int n,y; struct DATA{ int name,r,t; double money; }; DATA data[1001]; int main(){ while(1){ cin>>n; if(n==0){break;} cin>>y; for(int i=0;i<n;i++){ cin>>data[i].name>>data[i].r>>data[i].t; if(data[i].t==1){data...
a.cc: In function 'int main()': a.cc:20:30: error: reference to 'data' is ambiguous 20 | cin>>data[i].name>>data[i].r>>data[i].t; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s075105972
p00240
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int n,y; struct DATA{ int name,r,t; double money; }; DATA data[1001]; int main(){ while(1){ cin>>n; if(n==0){break;} cin>>y; for(int i=0;i<n;i++){ cin>>data[i].name>>data[i].r>>data[i].t; if(data[i].t==1){data...
a.cc: In function 'int main()': a.cc:20:30: error: reference to 'data' is ambiguous 20 | cin>>data[i].name>>data[i].r>>data[i].t; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s925918778
p00240
C++
#include<stdio.h> int main(void){ int n,y,b[50],x,r,t,sum[50],max,i; while(1){ max=-1; scanf("%d",&n); scanf("%d",&y); for(i=0;i<n;i++){ scanf("%d %d %d",&b[i],&r.&t); if(t==1){ sum[j]=100*(1+y*(r/100)); } if(t==2){ sum[j]=100*((1+r/100)^y); } } for(i=0;i<n;i++){ if(max<sum[j]){ ...
a.cc: In function 'int main()': a.cc:9:51: error: expected unqualified-id before '&' token 9 | scanf("%d %d %d",&b[i],&r.&t); | ^ a.cc:11:37: error: 'j' was not declared in this scope 11 | sum[j]=100*(...
s783019030
p00240
C++
#include<iostream> using namespace std; int main(){ int n,y,b,r,t,ma=0,c,ni; while(1){ cin>>n; if(n=0) break; cin>>y; for(i=1;i<=n;i++){ cin>>b>>r>>t; if(t==1){ if(ma<10000*(1+y*r/100)){ ma=10000*(1+y*r/100); c=b; } } if(t==2){ ni=10000; for(i=1;i<=y;i++){ ni=ni*(1+r/100); } ...
a.cc: In function 'int main()': a.cc:10:13: error: 'i' was not declared in this scope; did you mean 'ni'? 10 | for(i=1;i<=n;i++){ | ^ | ni
s318992830
p00240
C++
#include<iostream> using namespace std; int main(){ int n,y,b,r,t,ma=0,c,ni; while(1){ cin>>n; if(n=0) break; cin>>y; for(i=1;i<=n;i++){ cin>>b>>r>>t; if(t==1){ ni=10000*(1+y*r/100); if(ma<ni){ ma=ni c=b; } } if(t==2){ ni=10000; for(i=1;i<=y;i++){ ni=ni*(1+r/100); } if(ma...
a.cc: In function 'int main()': a.cc:10:13: error: 'i' was not declared in this scope; did you mean 'ni'? 10 | for(i=1;i<=n;i++){ | ^ | ni a.cc:15:38: error: expected ';' before 'c' 15 | ma=ni | ...
s780312797
p00240
C++
#include<stdio.h> int main() { int n, y, b, r, t; float many1[100] = { 0 }, many2[100] = { 0 }; int i, j, k, l, cnt = 0, max = 0; while (1) { many1[100] = { 0 }; many2[100] = { 0 }; scanf("%d", &n); if (n == 0) { break; } scanf("%d", &y); for (i = 0; i < n; i++) { scanf("%d %d %d", &b, &r, &t); ...
a.cc: In function 'int main()': a.cc:35:2: error: expected '}' at end of input 35 | } | ^ a.cc:7:19: note: to match this '{' 7 | while (1) { | ^ a.cc:35:2: error: expected '}' at end of input 35 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s202044698
p00240
C++
#include<iostream> using namespace std; int main(){ int n,y,b,r,t,ma=0,c,ni; while(1){ cin>>n; if(n==0) break; cin>>y; for(i=1;i<=n;i++){ cin>>b>>r>>t; if(t==1){ ni=10000*(1+y*r/100); if(ma<ni){ ma=ni c=b; } } if(t==2){ ni=10000; for(i=1;i<=y;i++){ ni=ni*(1+r/100); } if(m...
a.cc: In function 'int main()': a.cc:10:13: error: 'i' was not declared in this scope; did you mean 'ni'? 10 | for(i=1;i<=n;i++){ | ^ | ni a.cc:15:38: error: expected ';' before 'c' 15 | ma=ni | ...
s491702876
p00240
C++
#include<stdio.h> int man() { int i, j, n, b, t, y, cnt = 0; float many[52] = { 0 }, r, suu, max=0; while (1) { scanf("%d", &n); if (n == 0) { break; } scanf("%d", &y); scanf("%d %f %d", &b, &r, &t); if (t == 1) { many[b] = 100.0*(1 + y*(float)r / 100); } else { many[b] = 100.0*(1 + (float)y...
a.cc: In function 'int man()': a.cc:31:1: warning: no return statement in function returning non-void [-Wreturn-type] 31 | } | ^ /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...
s451665327
p00240
C++
#include<iostream> using namespace std; int main(){ int n,y,b,r,t,c; float ni,ma=0; while(1){ cin>>n; if(n==0) break; cin>>y; for(i=1;i<=n;i++){ cin>>b>>r>>t; if(t==1){ ni=10000*(1+y*r*0.01); if(ma<ni){ ma=ni c=b; } } if(t==2){ ni=10000; for(i=1;i<=y;i++){ ni=ni*(1+r*0.01); ...
a.cc: In function 'int main()': a.cc:11:13: error: 'i' was not declared in this scope; did you mean 'ni'? 11 | for(i=1;i<=n;i++){ | ^ | ni a.cc:16:38: error: expected ';' before 'c' 16 | ma=ni | ...
s662824951
p00240
C++
#include<iostream> using namespace std;
/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
s732038049
p00240
C++
#include<cstdio> #include<iostream> #include<math.h> using namespace std; int main(void){ int n,gin,kinri,i,m,maxgin,cpy; double y,nenri,ganri,max,d; while(1){ m=10000; cin>>n; if(n==0) break; cin>>y; max=-1; for(i=0;i<n;i++){ cin>>gin>>nenri>>kinri; if(kinri==1) ganri=m*(1+y*(nenri/100)); if(ki...
a.cc: In function 'int main()': a.cc:20:47: error: expected primary-expression before ')' token 20 | for(i=0;i<y;i+) d=d*cpy; | ^
s482333488
p00240
C++
#include <iostream> #include <cstdio> #include <vector> #include <cmath> using namespace std; int main(){ int n; while(cin >> n && n){ int y; cin >> y; vector< pair<double,int> > S; for(int i = 0 ; i < n ; i++){ double b,r,t; cin >> b >> r >> t; if( t == 1 ){ S.push_back(make_pair(1+y*r/100....
a.cc: In function 'int main()': a.cc:23:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 23 | sort(S.rbegin(),S.rend()); | ^~~~ | sqrt
s505204082
p00240
C++
int main() { while(true){ int n; cin >> n; if(n==0) break; int y; double sum; int num=0; double max=0.0; cin >> y; for(int i=0 ;i<n ;i++){ int b,r,t; cin >> b >> r >> t; if(t==1){ sum = 1.0+(double)y*(double)r/100.0; sum *= 10.0; } else{ sum = 1.0; for(int j=0 ;j...
a.cc: In function 'int main()': a.cc:5:17: error: 'cin' was not declared in this scope 5 | cin >> n; | ^~~ a.cc:37:17: error: 'cout' was not declared in this scope 37 | cout << num << endl; | ^~~~ a.cc:37:32: error: 'endl' was not declar...
s499942924
p00240
C++
#include<algorithm> #include<cstdio> using namespace std; int main(){ int i; int n; while(scanf("%d",&n),n){ int y; scanf("%d",&y); double mx=0; int my; for(i=0;i<n;++i){ int p,q,r; scanf("%d%d%d",&p,&q,&r); if((r==1?y*q/100.+1:pow(q/100.+1,y))>mx){ mx=r==1?y*q/100.+1:pow(q/100.+1,y); my=p...
a.cc: In function 'int main()': a.cc:15:45: error: 'pow' was not declared in this scope 15 | if((r==1?y*q/100.+1:pow(q/100.+1,y))>mx){ | ^~~
s675873259
p00240
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int main(){ int n while( cin >> n,n){ double money = 10000; double b,r,t,ansi,year; double moto = 0; cin >> year; for(int i = 1 ; i <= n ; i++ ){ cin >> b >> r >> t; if(t == 1){ if(moto < money*(1+year*(...
a.cc: In function 'int main()': a.cc:8:3: error: expected initializer before 'while' 8 | while( cin >> n,n){ | ^~~~~
s194887353
p00241
Java
import java.util.*; class Main{ public static void main(String args[]){ Solve s = new Solve(); s.solve(); } } class Solve{ Scanner in = new Scanner(System.in); void solve(){ int[][] s = {{1,2,3,4},{2,-1,4,-3},{3,-4,-1,2},{4,3,-2,-1}}; int n = in.nextInt(); for(int k = 0; k < n; k++){ int[] a = new i...
Main.java:19: error: incompatible types: int[] cannot be converted to long[] long[] ans = new int[4]; ^ 1 error
s947225078
p00241
C++
int main(){ int n; cin>>n; for(int i=0;i<n;i++){ int a,b,c,d,e,f,g,h; cin>>a>>b>>c>>d>>e>>f>>g>>h; int w=0,x=0,y=0,z=0; w=(a*e)-(b*f)-(c*g)-(d*h); x=b*e+a*f+c*h-d*g; y=a*g+c*e+d*f-b*h; z=a*h+d*e+b*g-c*f; cout<<w<<" "<<x<<" "<<y<<" "<<z<<endl; if(i==n-1){ int tmp; cin>>tmp; if(tmp==0)break; } } }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin>>n; | ^~~ a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout<<w<<" "<<x<<" "<<y<<" "<<z<<endl; | ^~~~ a.cc:12:42: error: 'endl' was not declared in this scope ...
s173421056
p00241
C++
// AOJ 0241 #include <iostream> #include <cmath> using namespace std; int data[4][4] = {{1, 2, 3, 4}, {2, -1, 4, -3}, {3, -4, -1, 2}, {4, 3, -2, -1}}; int main() { int n; while (cin >> n, n){ while (n--){ int num1[4][2], num2[4][2]; for (int i = 0; i < 4; i++){ cin >> num1[i][0]; ...
a.cc: In function 'int main()': a.cc:29:49: error: reference to 'data' is ambiguous 29 | int t = data[num1[i][1]][num2[j][1]]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c...
s159113512
p00241
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int x1,y1,z1,w1,x2,y2,z2,w2; int main(){ while(1){ cin>>n; if(n==0){break;} for(int i=0;i<n;i++){ cin>>x1>>y1>>z1>>w1>>x2>>y2>>z2>>w2; cout<<x1*x2-y1*y2-z1*z2-w1*w2; cout<<" "; cout<<x2*y1+x1*y2+z1*w2-w1*z2...
a.cc:7:8: error: 'int y1' redeclared as different kind of entity 7 | int x1,y1,z1,w1,x2,y2,z2,w2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++c...
s129875314
p00241
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int x1,y1,z1,w1,x2,y2,z2,w2; int main(){ while(1){ cin>>n; if(n==0){break;} for(int i=0;i<n;i++){ cin>>x1>>y1>>z1>>w1>>x2>>y2>>z2>>w2; cout<<x1*x2-y1*y2-z1*z2-w1*w2; cout<<" "; cout<<x2*y1+x1*y2+z1*w2-w1*z2...
a.cc:7:8: error: 'int y1' redeclared as different kind of entity 7 | int x1,y1,z1,w1,x2,y2,z2,w2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++c...
s295783876
p00241
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int x1,y1,z1,w1,x2,y2,z2,w2,n; int main(){ while(1){ cin>>n; if(n==0){break;} for(int i=0;i<n;i++){ cin>>x1>>y1>>z1>>w1>>x2>>y2>>z2>>w2; cout<<x1*x2-y1*y2-z1*z2-w1*w2; cout<<" "; cout<<x2*y1+x1*y2+z1*w2-w1*...
a.cc:7:8: error: 'int y1' redeclared as different kind of entity 7 | int x1,y1,z1,w1,x2,y2,z2,w2,n; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c+...
s412094531
p00241
C++
#include<iostream> #include<algorithm> #include<string> #include<cmath> #include<iostream> #include<vector> using namespace std ; template <typename T> T Out(vector < T > v,int n) { if(n == 1) { for(int i = 0; i < v.size(); i++) { cout << v[i] << endl ; } } else if(n == 2) { for(int ...
a.cc: In function 'int main()': a.cc:113:17: error: 'v' was not declared in this scope 113 | cout << v[i]; | ^
s610319705
p00241
C++
#include<stdio.h> int main(void) { int n,a,b,c,d,e,f,g,h,X[1000],Z[1000],W[1000],P[1000]; while(1){ scnaf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h); X[i]=(a*e)+(-1*f*b)+(-1*g*c)+(-1*h*d); Z[i]=(a*f)+(e*b)+(h*c)+(-1*g*d); W[i]=(a*g)+(-1*h*b)+(e*c)+(f*...
a.cc: In function 'int main()': a.cc:6:9: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 6 | scnaf("%d",&n); | ^~~~~ | scanf a.cc:8:13: error: 'i' was not declared in this scope 8 | for(i=0;i<n;i++){ | ^ a.cc:15:13: error: 'i' w...
s377447293
p00241
C++
#include<stdio.h> int main(void) { int n,a,b,c,d,e,f,g,h,X[1000],Z[1000],W[1000],P[1000]; while(1){ scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h); X[i]=(a*e)+(-1*f*b)+(-1*g*c)+(-1*h*d); Z[i]=(a*f)+(e*b)+(h*c)+(-1*g*d); W[i]=(a*g)+(-1*h*b)+(e*c)+(f*...
a.cc: In function 'int main()': a.cc:8:13: error: 'i' was not declared in this scope 8 | for(i=0;i<n;i++){ | ^ a.cc:15:13: error: 'i' was not declared in this scope 15 | for(i=0;i<n;i++){ | ^
s715468347
p00241
C++
#include <iostream> using namespace std; int main(){ int n; while(cin>>n,n){ int a,b,c,d,e,f,g,h; while(n--){ cin>>a>>b>>c>>d; cin>>e>>f>>g>>h;???? cout<<a*e-b*f-c*g-d*h<< " " << a*f+b*e+c*h-d*g<< " " << a*g-b*h+c*e+d*f<< " " << a*h+b*g-c*f+d*e<< endl; } } }
a.cc: In function 'int main()': a.cc:9:23: error: expected primary-expression before '?' token 9 | cin>>e>>f>>g>>h;???? | ^ a.cc:9:24: error: expected primary-expression before '?' token 9 | cin>>e>>f>>g>>h;???? | ^ a.cc:9:25: error: expected ...
s010875108
p00241
C++
#include<iostream> using namespace std; int main() { &#160; int n; &#160; int x1,x2,y1,y2,z1,z2,w1,w2; &#160; int x,y,z,w; &#160; while(cin>>n,n){ &#160; &#160; for(int i=0;i<n;i++){ &#160; &#160; &#160; cin>>x1>>y1>>z1>>w1>>x2>>y2>>z2>>w2; &#160; &#160; &#160; x = x1*x2 - y1*y2 - z1*z2 - w1*w2; &#160; &#160; &#160...
a.cc:9:2: error: stray '#' in program 9 | &#160; int n; | ^ a.cc:10:2: error: stray '#' in program 10 | &#160; int x1,x2,y1,y2,z1,z2,w1,w2; | ^ a.cc:11:2: error: stray '#' in program 11 | &#160; int x,y,z,w; | ^ a.cc:12:2: error: stray '#' in program 12 | &#160; while(cin>>n,n){ ...
s449983255
p00242
Java
package nofill_nosubmit; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class AOJ2_42 { public static void main(String arg[]) { Scanner in=new Scanner(System.in); for(;;) { int n=in.nextInt(); String t=in.nextLine(); ArrayList<String> AL=new ArrayList<String...
Main.java:5: error: class AOJ2_42 is public, should be declared in a file named AOJ2_42.java public class AOJ2_42 ^ 1 error
s986634332
p00242
C
/* ??????????????????????????\???????£? ??????????????? ?????? ???????????±??????????????????????????????????????????????????\????????????????????\???????£??????¨?????? ????????????????????????????????????????????????????????????????????????????????????????¨??????????????????? ??\?????????????????????????????????????...
main.c: In function 'main': main.c:56:30: error: 'd' undeclared (first use in this function) 56 | scanf( "%s", d ); // ???????????\??? | ^ main.c:56:30: note: each undeclared identifier is reported only once for each function it appears in main.c:71:40: error:...
s942618901
p00242
C
/* ??????????????????????????\???????£? ??????????????? ?????? ???????????±??????????????????????????????????????????????????\????????????????????\???????£??????¨?????? ????????????????????????????????????????????????????????????????????????????????????????¨??????????????????? ??\?????????????????????????????????????...
main.c: In function 'main': main.c:62:30: error: 'd' undeclared (first use in this function) 62 | scanf( "%s", d ); // ??????????????\??? | ^ main.c:62:30: note: each undeclared identifier is reported only once for each function it appears in main.c:71:40: err...
s212656282
p00242
C
/* ??????????????????????????\???????£? ??????????????? ?????? ???????????±??????????????????????????????????????????????????\????????????????????\???????£??????¨?????? ????????????????????????????????????????????????????????????????????????????????????????¨??????????????????? ??\?????????????????????????????????????...
main.c: In function 'main': main.c:62:30: error: 'c' undeclared (first use in this function) 62 | scanf( "%s", c ); // ??????????????\??? | ^ main.c:62:30: note: each undeclared identifier is reported only once for each function it appears in main.c:81:33: err...
s846420165
p00242
C
/* ??????????????????????????\???????£? ??????????????? ?????? ???????????±??????????????????????????????????????????????????\????????????????????\???????£??????¨?????? ????????????????????????????????????????????????????????????????????????????????????????¨??????????????????? ??\?????????????????????????????????????...
main.c: In function 'main': main.c:71:40: error: 'c' undeclared (first use in this function) 71 | if ( b[ i ] != c ) { // ???????????¨?????°?????? | ^ main.c:71:40: note: each undeclared identifier is reported only once for each ...
s671098343
p00242
C
#include<cstdio> #include<cstdlib> #include<cstring> #include<sstream> using namespace std; #define Min(x,y) ((x<y)?x:y) typedef struct word{ int n; char s[25]; }WORD; WORD x[30][1000]; int comp(const void *p,const void *q){ WORD *a=(WORD*)p,*b=(WORD*)q; if(a->n==b->n)return strcmp(a->s,b->s); else return b->n - a...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s372613503
p00242
C++
#include<iostream> #include<sstream> #include<vector> #include<map> using namespace std; typedef pair<int,string> P; vector<string> t; vector<P> u; int n,c; string str,tmp; int main(){ while(cin>>n&&n){ t.clear(); u.clear(); cin.ignore(); for(int i=0;i<n;i++){ getline(cin,str); stringstre...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(t.begin(),t.end()); | ^~~~ | short
s609361456
p00242
C++
include <iostream> #include <vector> #include <string> #include <cstdio> #include <map> using namespace std; int main(){ int n; while(cin >> n, n){ char c; vector <string> v; map<string, int> d; for(int i = 0; i < n; i++){ bool first = false; while(true){ string s; if(first && getc...
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...
s920436048
p00242
C++
#include <iostream> #include <vector> #include <string> #include <cstdio> #include <map> using namespace std; int main(){ int n; while(cin >> n, n){ char c; vector <string> v; map<string, int> d; for(int i = 0; i < n; i++){ bool first = false; while(true){ string s; if(first && get...
a.cc: In function 'int main()': a.cc:33:5: error: 'sort' was not declared in this scope; did you mean 'short'? 33 | sort(ans.begin(), ans.end()); | ^~~~ | short
s078965657
p00242
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef tuple<int, string> duo; #define TT template<typename T> #define TTF template<typename T, typename F> #define ET(T) typename T::value_type TT inline T sq(T x){return x*x;} TT inline T In(){T x;cin>>x;return x;} TT inli...
a.cc: In function 'int main()': a.cc:59:30: error: no matching function for call to 'get<1>(std::vector<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)' 59 | printf("%s%c", get<1>(out).c_str(), " \n"[i == (int)out.size() - 1]); | ...
s128891111
p00242
C++
#include<iostream> #include<string> #include<map> #include<vector> #include<functional> #include<cmath> #include<algorithm> using namespace std; int main(){ int n; char k; vector< pair<string,int> >m;//stringを出てきた回数順に並べるための連想配列 vector<string>words;//まずは出てきた単語をすべて格納 while(cin>>n,n){//13と入力された場合、13がnに入り、次の改行は、getlin...
a.cc: In function 'int main()': a.cc:59:39: error: no matching function for call to 'min(std::vector<std::pair<std::__cxx11::basic_string<char>, int> >::size_type, unsigned int&)' 59 | for(int i=0;i<std::min(m.size(),x);i++){ | ~~~~~~~~^~~~~~~~~~~~ In file included...
s322416827
p00242
C++
#include<iostream> #include<string> #include<map> #include<vector> #include<functional> #include<cmath> #include<algorithm> using namespace std; int main(){ int n; char k; vector< pair<string,int> >m;//stringを出てきた回数順に並べるための連想配列 vector<string>words;//まずは出てきた単語をすべて格納 while(cin>>n,n){//13と入力された場合、13がnに入り、次の改行は、getlin...
a.cc: In function 'int main()': a.cc:59:39: error: no matching function for call to 'min(std::vector<std::pair<std::__cxx11::basic_string<char>, int> >::size_type, unsigned int&)' 59 | for(int i=0;i<std::min(m.size(),x);i++){ | ~~~~~~~~^~~~~~~~~~~~ In file included...
s767733412
p00242
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<utility> using namespace std; typedef pair<int, string> PIS; typedef vector<PIS> VP; typedef VP::iterator VPI; void bsort(VP word){ VPI p1, p2; for (p1 = word.begin(); p1 != word.end(); p1++){ for (p2 = word.begin(); p2 != word.end()...
a.cc: In function 'void bsort(VP)': a.cc:15:62: error: no matching function for call to 'swap(VPI&, __gnu_cxx::__normal_iterator<std::pair<int, std::__cxx11::basic_string<char> >*, std::vector<std::pair<int, std::__cxx11::basic_string<char> > > >)' 15 | if (p2->first < (p2 + 1)->first) swap(p...
s984932277
p00242
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int, string> PIS; typedef vector<PIS> VP; typedef VP::iterator VPI; void bsort(VP word){ VPI p1, p2; for (p1 = word.begin(); p1 != word.end(); p1++){ for (p2 = word.begin(); p2 != word.end() - 1; p2++){ if (p2->first < (p2 + 1)->first) swap(p2, p2 + 1); ...
a.cc: In function 'void bsort(VP)': a.cc:11:62: error: no matching function for call to 'swap(VPI&, __gnu_cxx::__normal_iterator<std::pair<int, std::__cxx11::basic_string<char> >*, std::vector<std::pair<int, std::__cxx11::basic_string<char> > > >)' 11 | if (p2->first < (p2 + 1)->first) swap(p...
s088900924
p00242
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int, string> PIS; typedef vector<PIS> VP; typedef VP::iterator VPI; void swap(PIS *d1, PIS *d2) { PIS hoge; hoge = d1; d1 = d2; d2 = hoge; return; } void bsort(VP word) { VPI p1, p2; for (p1 = word.begin(); p1 != word.end(); p1++){ for (p2 = word.beg...
a.cc: In function 'void swap(PIS*, PIS*)': a.cc:11:16: error: no match for 'operator=' (operand types are 'PIS' {aka 'std::pair<int, std::__cxx11::basic_string<char> >'} and 'PIS*' {aka 'std::pair<int, std::__cxx11::basic_string<char> >*'}) 11 | hoge = d1; | ^~ In file included from /usr...
s100808736
p00242
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int, string> PIS; typedef vector<PIS> VP; typedef VP::iterator VPI; void swap(PIS *d1, PIS *d2) { PIS hoge; hoge = *d1; *d1 = *d2; *d2 = hoge; return; } void bsort(VP word) { VPI p1, p2; for (p1 = word.begin(); p1 != word.end(); p1++){ for (p2 = word...
a.cc: In function 'void bsort(VP)': a.cc:22:62: error: no matching function for call to 'swap(VPI&, __gnu_cxx::__normal_iterator<std::pair<int, std::__cxx11::basic_string<char> >*, std::vector<std::pair<int, std::__cxx11::basic_string<char> > > >)' 22 | if (p2->first < (p2 + 1)->first) swap(p...
s233698978
p00242
C++
#include<iostream> #include<string> #include<sstream> #include<map> #include<vector> using namespace std; typedef pair<int,string> P; int main(){ int n; while(1){ cin >> n; if(n == 0) break; string word[1025]; int cou = 0; for(int i=0;i<n;i++){ string str; cin.ignore(); getline(cin,str); stri...
a.cc: In function 'int main()': a.cc:47:17: error: 'sort' was not declared in this scope; did you mean 'short'? 47 | sort(ans,ans+num); | ^~~~ | short
s671664407
p00242
C++
#include <iostream> #include <cstdio> #include <vector> #include <string> #include <map> #include <algorithm> using namespace std; typedef pair<int, string> P; void solve() { int n; while (scanf_s("%d\n", &n), n) { string str; map<string, int> Map; while (n--) { getline(cin, str); str += " "; str...
a.cc: In function 'void solve()': a.cc:15:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 15 | while (scanf_s("%d\n", &n), n) | ^~~~~~~ | scanf
s972240411
p00242
C++
#include <iostream> #include <cstdio> #include <vector> #include <string> #include <map> #include <algorithm> #include <functional> using namespace std; typedef pair<int, string> P; void solve() { int n; while (scanf_s("%d\n", &n), n) { string str; map<string, int> Map; while (n--) { getline(cin, str);...
a.cc: In function 'void solve()': a.cc:16:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 16 | while (scanf_s("%d\n", &n), n) | ^~~~~~~ | scanf
s076100615
p00242
C++
#include <string> #include <vector> #include <iostream> using namespace std; int n; string s; char c; vector<string> parse(string str) { vector<string> ret = 0; string t; for(int i = 0; i < str.size(); i++) { if(str[i] == ' ') ret.push_back(t), t = ""; else t += str[i]; } return ret; } int main() { while(cin >...
a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > parse(std::string)': a.cc:7:30: error: conversion from 'int' to non-scalar type 'std::vector<std::__cxx11::basic_string<char> >' requested 7 | vector<string> ret = 0; string t; | ^ a.cc: In function 'int mai...
s756301767
p00242
C++
#include<bits/stdc++.h> using namespace std; string S; int main(){ int n; while(true){ cin>>n;vector<string>vec,w; for(int i=0;i<n;i++){ S=""; while(S=""){ getline(cin,S); } S+=" ";string T; for(int i=0;i<S.size();i++){ if(S[i]==' '){vec.push_back(T);T="";} else{T+=S[i];} } } cha...
a.cc: In function 'int main()': a.cc:10:32: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)""))' from 'std::__cxx11::basic_string<char>' to 'bool' 10 | while(S=""){ | ~^~~ | | ...
s618204259
p00242
C++
#include<bits/stdc++.h> using namespace std; string S; int main(){ int n; while(true){ cin>>n;vector<string>vec; vector<pair<int,string> >w; if(n==0){break;} for(int i=0;i<n;i++){ S=""; while(S==""){ getline(cin,S); } S+=" ";string T; for(int i=0;i<S.size();i++){ if(S[i]==' '){vec.push_...
a.cc: In function 'int main()': a.cc:25:72: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'first' 25 | if(vec[i]==vec[i-1]){vec[vec...
s804678043
p00242
C++
nclude<bits/stdc++.h> using namespace std; main(){ int n; while(cin>>n,n){ string s[n+1]; getline(cin,s[0]); for(int i=0;i<n;i++)getline(cin,s[i]); cin>>s[n]; int pp=0; map<string,int>m; for(int i=0;i<n;i++){ string t; for(int j=0;j<s[i].size();j++){ if(s[i][j]!=' ')t...
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<bits/stdc++.h> | ^~~~~~ a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | while(cin>>n,n){ ...
s416818364
p00242
C++
import std.stdio; import std.array; import std.conv; import std.algorithm; import std.range; import std.string; import std.typecons; alias Tuple!(int, string) P; void main() { for(int n; (n = to!int(chomp(readln()))) != 0; ){ int[string] hash; foreach(i; 0..n){ foreach(word; split(chomp(readln()))){...
a.cc:17:16: error: too many decimal points in number 17 | foreach(i; 0..n){ | ^~~~ a.cc:37:16: error: too many decimal points in number 37 | foreach(i; 0..up){ | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1...
s796588552
p00242
C++
#include <iostream> #include <sstream> #include <string> #include <map> using namespace std; typedef struct { string s; int n; } S; int main(void) { int n, m, f; string s; char d; while (cin >> n && n) { map<string, int> w; getline(cin, s); for (int i = m = 0; i < n; ++i) { getline(cin, s); istri...
a.cc: In function 'int main()': a.cc:54:17: error: 'else' without a previous 'if' 54 | else cout << "NA"; | ^~~~
s525705939
p00242
C++
#include <iostream> #include <sstream> #include <algorithm> #include <set> #include <map> using namespace std; #define foreach(i,c) for(__typeof__((c).begin()) i=(c).begin();i!=(c).end();++i) int main() { for(int n;cin>>n,n;){ cin.ignore(); vector<string> words; while(n--){ string line; getline(cin,line); ...
a.cc: In function 'int main()': a.cc:15:17: error: 'vector' was not declared in this scope 15 | vector<string> words; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <map> +++ |+#in...
s759926374
p00242
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <pair> using namespace std; pair<string, int> str[30]; vector<pair<string, int>> v; int maxarray; void f(string in)//入力関数 { for(int i=0;i<20;++i) { if(str[i].first == in) { ++str[i].second; return; } if(str[i].first....
a.cc:5:10: fatal error: pair: No such file or directory 5 | #include <pair> | ^~~~~~ compilation terminated.
s495906330
p00242
C++
#include<iostream> #include<sstream> #include<map> #include<vector> #include<algorithm> using namespace std; int main() { &#160; int n; &#160; string s; &#160; char k; &#160; while(cin>>n,n){ &#160; &#160; map<string,int>used; &#160; &#160; for(int i=0;i<n;i++){ &#160; &#160; &#160; cin.ignore(); &#160; &#160; ...
a.cc:17:2: error: stray '#' in program 17 | &#160; int n; | ^ a.cc:18:2: error: stray '#' in program 18 | &#160; string s; | ^ a.cc:19:2: error: stray '#' in program 19 | &#160; char k; | ^ a.cc:20:2: error: stray '#' in program 20 | &#160; while(cin>>n,n){ | ^ a.cc:21:2: error: ...
s811585455
p00242
C++
#include<iostream> #include<sstream> #include<map> #include<vector> #include<algorithm> using namespace std; int main() { &#160; int n; &#160; string s; &#160; char k; &#160; while(cin>>n,n){ &#160; &#160; map<string,int>used; &#160; &#160; for(int i=0;i<n;i++){ &#160; &#160; &#160; cin.ignore(); &#160; &#160; &#16...
a.cc:13:2: error: stray '#' in program 13 | &#160; int n; | ^ a.cc:14:2: error: stray '#' in program 14 | &#160; string s; | ^ a.cc:15:2: error: stray '#' in program 15 | &#160; char k; | ^ a.cc:16:2: error: stray '#' in program 16 | &#160; while(cin>>n,n){ | ^ a.cc:17:2: error: ...
s427988987
p00242
C++
#include<iostream> #include<vector> #include<map> #include<sstream> #include<algorithm> using namespace std; typedef pair<int,string> P; bool compare(P a, P b){ &#160; if(a.first==b.first)return a.second<b.second; &#160; return a.first>b.first; } int main() { &#160; int n; &#160; string line; &#160; char k;...
a.cc:17:2: error: stray '#' in program 17 | &#160; if(a.first==b.first)return a.second<b.second; | ^ a.cc:18:2: error: stray '#' in program 18 | &#160; return a.first>b.first; | ^ a.cc:26:2: error: stray '#' in program 26 | &#160; int n; | ^ a.cc:27:2: error: stray '#' in program 27 | &...
s151647354
p00242
C++
#include<map> #include<vector> #include<algorithm> #include<string> #include<cstdio> using namespace std; bool pr(const pair<string,int>& p,const pair<string,int>& q){ if(false){ }else if(p.second>q.second){ return true; }else if(p.second<q.second){ return false; }else{ return p.first<q.first; } } int main()...
a.cc: In function 'int main()': a.cc:25:27: error: 'strlen' was not declared in this scope 25 | s[strlen(s)-1]='\0'; | ^~~~~~ a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<cst...
s117556773
p00242
C++
#include<iostream> #include<string> #include<map> #include<vector> #include<algorithm> using namespace std; vector<string> Split(const string &s) { vector<string> v; int i=0, j; while((j=s.find_first_of(' ',i)) !=string::npos) { v.push_back(s.substr(i,j-i)); i=j+1; } if(i!=s.size()-1) v.push_back(s.substr(i...
a.cc: In function 'int main()': a.cc:50:36: error: no matching function for call to 'min(unsigned int, std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::size_type)' 50 | int end=min(5U,vp.size()); | ~~~^~~~~~~~~~~~~~ In file included from /...
s203203572
p00242
C++
#include<iostream> #include<string> #include<map> #include<vector> #include<algorithm> using namespace std; vector<string> Split(const string &s) { vector<string> v; int i=0, j; while((j=s.find_first_of(' ',i)) !=string::npos) { v.push_back(s.substr(i,j-i)); i=j+1; } if(i!=s.size()-1) v.push_back(s.substr(i...
a.cc: In function 'int main()': a.cc:50:36: error: no matching function for call to 'min(unsigned int, std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::size_type)' 50 | int end=min(5U,vp.size()); | ~~~^~~~~~~~~~~~~~ In file included from /...