submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s584557582
p00423
C++
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; int main(){ while(true){ int pa = 0, pb = 0; int a, b scanf("%d", &n); if(!n) break; for(i = 0; i < n; i++){ scanf("%d%d", &a,...
a.cc: In function 'int main()': a.cc:11:17: error: expected initializer before 'scanf' 11 | scanf("%d", &n); | ^~~~~ a.cc:12:21: error: 'n' was not declared in this scope 12 | if(!n) break; | ^ a.cc:13:21: error: 'i' was not declared ...
s404163274
p00423
C++
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; int main(){ while(true){ int pa = 0, pb = 0; int a, b, n, i scanf("%d", &n); if(!n) break; for(i = 0; i < n; i++){ scanf("%d%d...
a.cc: In function 'int main()': a.cc:11:17: error: expected initializer before 'scanf' 11 | scanf("%d", &n); | ^~~~~ a.cc:13:21: error: 'i' was not declared in this scope 13 | for(i = 0; i < n; i++){ | ^
s915585808
p00423
C++
#include<iostream> using namespace std; int main() { int a,b,n; while(cin>>n, n) { int x=0, y=0; while(n--) { cin>>a>>b; if(a<b) {y+=a+b;} else if(a>b) {x+=a+b;} else {x+=a; y+=b;} } cout<<x<<" "<<y<<endl; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s234451836
p00423
C++
#include<iostream> using namespace std; int main() { int a,b,n; while(cin>>n, n) { int x=0, y=0; while(n--) { cin>>a>>b; if(a<b) {y+=a+b;} else if(a>b) {x+=a+b;} else {x+=a; y+=b;} } } cout<<x<<" "<<y<<endl; }
a.cc: In function 'int main()': a.cc:18:8: error: 'x' was not declared in this scope 18 | cout<<x<<" "<<y<<endl; | ^ a.cc:18:16: error: 'y' was not declared in this scope 18 | cout<<x<<" "<<y<<endl; | ^
s794221190
p00423
C++
#include<iostream> using namespace std; int main() { int x,y,n; while(cin>>n, n) { int a=0, b=0; while(n--) { cin>>x>>y; if(x<y) { b+=x+y;} else if(x>y) { a+=x+y;} else if(x==y) {a+=a; b+=b;} } } cout<<a<<b<<endl; return 0; }
a.cc: In function 'int main()': a.cc:18:23: error: 'a' was not declared in this scope 18 | cout<<a<<b<<endl; | ^ a.cc:18:26: error: 'b' was not declared in this scope 18 | cout<<a<<b<<endl; | ^
s335105471
p00423
C++
#include <stdio.h> main() { int A,B,a,b,i,n; while(1) while(scanf("%d",&n)){ if(n==0) break; A=0; B=0; for(i=1;i<n+1;i++){ scanf("%d %d",&a,&b); if(a>b) A+=a+b; else if(a<b) B+=a+b; else A+=a,B+=b;} } printf("%d %d\n",A,B);} }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s203091684
p00423
C++
#include <stdio.h> main() { int A,B,a,b,i,n; while(1) while(scanf("%d",&n)){ if(n==0) break; A=0; B=0; for(i=1;i<n+1;i++){ scanf("%d %d",&a,&b); if(a>b) A+=a+b; else if(a<b) B+=a+b; else A+=a,B+=b;} } printf("%d %d\n",A,B);} } }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s274056867
p00423
C++
#include <stdio.h> main() { int A,B,a,b,i,n; while(scanf("%d",&n),n==0){ if(n==0) break; A=0; B=0; for(,,){ for(i=1;i<n+1;i++){ scanf("%d %d",&a,&b); if(a>b) A+=a+b; else if(a<b) B+=a+b; else A+=a,B+=b;} printf("%d %d\n",A,B);} } }
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:10:13: error: expected primary-expression before ',' token 10 | for(,,){ | ^ a.cc:10:14: error: expected primary-expression before ',' token...
s012999286
p00423
C++
#include <iostream> using namespace std; #define rep(i, n) for(int i = 0; i < (int)n; ++i) int main(void){ int n; int a = 0, b = 0; while(true){ cin >> n; if(c == 0) break; rep(i, n){ int x, y; cin >> x >> y; if(x > y){ a += x + y; } if(y > x){ b += x + y; } if(y == x){ a +=...
a.cc: In function 'int main()': a.cc:12:20: error: 'c' was not declared in this scope 12 | if(c == 0) break; | ^
s305741910
p00423
C++
#include <stdio.h> int main(){ int n,i; int a,b,f,t; while(1){ scanf("%d",&n); if(n==0)break; a=0; b=0; f=0; t=0; for(i=0;i<n;i++){ scanf("%d %d",&a,&b); if(a==b){ f+=a; t+=b; } else if(a>b){ f+=a+b; } else if(a<b){ t+=a+b; } } ptintf("%d %d\n",f,t); } return 0; }
a.cc: In function 'int main()': a.cc:27:1: error: 'ptintf' was not declared in this scope; did you mean 'printf'? 27 | ptintf("%d %d\n",f,t); | ^~~~~~ | printf
s189509593
p00423
C++
#include <iostream> using namespace std; int n, a, b, sa, sb; int main(){ for(;;){ cin >> n; if(n == 0){ break; }else{ for(int i = 0; i < n; i++){ cin >> a >> b; if(a < b){ sb += a + b; }else if(a > b){ sa += b + a; ...
a.cc:27:3: error: expected unqualified-id before 'return' 27 | return 0; | ^~~~~~ a.cc:28:1: error: expected declaration before '}' token 28 | } | ^
s079410965
p00423
C++
#include <iostream> #include <cstdlib> using namespace std; struct player{ int point ; int card[10000]; private: void player(){point =0;} }; int main() { int loop; player a, b; cin >> loop; for(int c = 0; c < loop; c++) { cin >> a.card[c]; cin >> b.card[c]; } for...
a.cc:9:3: error: return type specification for constructor invalid 9 | void player(){point =0;} | ^~~~ a.cc: In function 'int main()': a.cc:15:12: error: 'player::player()' is private within this context 15 | player a, b; | ^ a.cc:9:8: note: declared private here 9 | void pla...
s939752286
p00423
C++
// cardgame.cpp #include <iostream> using namespace std; void main(){ int n; int i,j; int a[10000], b[10000]; int a_point=0, b_point=0; cin >> n; for(i=0;i<n;++i){ cin >> a[i]; cin >> b[i]; } for(j=0;j<n;++j){ if(a[j]>b[j]) a_point+=(a[j]+b[j]); else if(a[j]<b[j]) b_point+=(a[j]+b[j]); ...
a.cc:5:1: error: '::main' must return 'int' 5 | void main(){ | ^~~~
s471984992
p00423
C++
#include<iostream> #include<vector> int main(){ int a,b,c,m=0; while(m==0){ std::cin>>c; if(c==0)break; for(int i=0;i<c;i++){ int ap=0,bp=0; std::cin>>a>>b; if(a>b)ap+=a,ap+=b; else if(b>a){ bp+=a;bp+=b; }else{ ap+=a,bp+=b; } } std::cout<<ap<<" "<<bp<<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:19:28: error: 'ap' was not declared in this scope; did you mean 'a'? 19 | std::cout<<ap<<" "<<bp<<std::endl; | ^~ | a a.cc:19:37: error: 'bp' was not declared in this scope; did you mean 'b'? 19 ...
s071297817
p00423
C++
#include <iostream> using namespace std; int main(){ int n; cin>>n; while(n!=0) int point[2]; enum { A, B, }; int sum[2] = {}; for (int i = 0; i < n; i++) { cin>>point[A]>>point[B]; if (point[A]>point[B]) { for (auto j : point) { sum[A]+=j; } } else if(point[A] == point[B]) { ...
a.cc: In function 'int main()': a.cc:14:30: error: 'point' was not declared in this scope 14 | cin>>point[A]>>point[B]; | ^~~~~ a.cc: At global scope: a.cc:32:9: error: expected unqualified-id before 'return' 32 | return 0; | ^~~~~~ ...
s540976185
p00423
C++
#include <iostream> using namespace std; int main(void) { int i, n, a, b, as = 0, bs = 0; cin >> n; for(i=0 ; i<n ; i++) { cin >> a >> b; if(a > b) { as += a + b; } else if(a < b) { bs += a + b; } else { as += a; bs += b; } } cout.form("%d %d\n", as, bs); return 0; }
a.cc: In function 'int main()': a.cc:14:14: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 'form' 14 | cout.form("%d %d\n", as, bs); | ^~~~
s730860414
p00423
C++
#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; void main(){ int n; int a,b; while(cin >> n, n){ int asum = 0; int bsum = 0; for(int i=0; i<n; i++){ cin >> a >> b; if(a > b) asum += a+b; else if(a < b) bsum += a+b; else{ asum += a; ...
a.cc:7:1: error: '::main' must return 'int' 7 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:24:3: error: return-statement with no value, in function returning 'int' [-fpermissive] 24 | return; | ^~~~~~
s875921593
p00423
C++
#include<stdio.h> int main(void){ int a_point,b_point,i,a_card,b_card,n; while(1){ scanf("%d",&n); if(n==0) break; a_point=0,b_point=0; for(i=0;i<n;n++){ scanf("%d %d",&a_card,&b_card); if(a_card>b_card) a_point+=a_card+b_card; else if(a_card<b_card) b_point+=a_card+b_card; else { a_point+=a_...
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s300219896
p00424
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.HashMap; import java.util.InputMismatchException; import java.util.Map; public class Main0501 { MyScanner sc; PrintWriter writer; public void solve() { int n = sc.nextInt(); if (n == 0) { return; } Map...
Main.java:8: error: class Main0501 is public, should be declared in a file named Main0501.java public class Main0501 { ^ 1 error
s694493269
p00424
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.HashMap; import java.util.InputMismatchException; import java.util.Map; public class Main0501 { MyScanner sc; PrintWriter writer; public void solve() { int n = sc.nextInt(); if (n == 0) { return; } Map...
Main.java:8: error: class Main0501 is public, should be declared in a file named Main0501.java public class Main0501 { ^ 1 error
s554314170
p00424
Java
import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import java.util.InputMismatchException; ...
Main.java:29: error: non-static variable n cannot be referenced from a static context n=ir.nextInt(); ^ Main.java:30: error: non-static variable n cannot be referenced from a static context if(n==0) break; ^ Main.java:31: error: non-static variable n cannot be referenced from a static context while(n-->0){ ^ M...
s849513919
p00424
Java
import java.io.PrintWriter; import java.util.Scanner; public class Mian{ public static void main(String[] args) { Scanner sc = new Scanner (System.in); PrintWriter out = new PrintWriter(System.out); while(sc.hasNext()){ int m = sc.nextInt(); if(m == 0)break; String temp [][] = new String[2][m]; for (...
Main.java:3: error: class Mian is public, should be declared in a file named Mian.java public class Mian{ ^ 1 error
s587613753
p00424
Java
import java.io.PrintWriter; import java.util.Scanner; public class Mian{ public static void main(String[] args) { Scanner sc = new Scanner (System.in); PrintWriter out = new PrintWriter(System.out); while(sc.hasNext()){ int m = sc.nextInt(); if(m == 0)break; String temp [][] = new String[2][m]; for (...
Main.java:3: error: class Mian is public, should be declared in a file named Mian.java public class Mian{ ^ 1 error
s544389177
p00424
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:20: error: cannot find symbol HashMap<String,String> map=new HashMap<String,String>(); ^ symbol: class HashMap location: class Main Main.java:20: error: cannot find symbol HashMap<String,String> map=new HashMap<String,String>(); ^ symbol: class HashMap locati...
s125578026
p00424
Java
import java.util.Scanner; public class Converse{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); StringBuilder[] ans = new StringBuilder[1000]; int index = 0; while( n != 0 ){ String[][] data = new String[n][2]; for(int i = 0; i < n; i++){ ...
Main.java:3: error: class Converse is public, should be declared in a file named Converse.java public class Converse{ ^ 1 error
s907606432
p00424
Java
import java.util.*; public class DataConversion0501 { static Scanner kbd = new Scanner(System.in); public static void main(String[] args){ while(kbd.hasNext()){ int n = kbd.nextInt(); if(n!=0){ String[] in = new String[n]; String[] out = new String[n]; String s = ""; int i; for(i=0; i<n; i...
Main.java:2: error: class DataConversion0501 is public, should be declared in a file named DataConversion0501.java public class DataConversion0501 { ^ 1 error
s674233941
p00424
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; public class Main { public static void main(String[] args) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); HashMap<String,String> c = new HashMap<String,String>(); while(true)...
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown int tn = Integer.parseInt(in.readLine()); ^ Main.java:16: error: unreported exception IOException; must be caught or declared to be thrown String[] tl = in.readLine().split...
s390895561
p00424
C
#include <cstdio> #include <map> using namespace std; int main() { int n, m; char before, after; map<char, char> conversion; int i; while (scanf("%d", &n) * n != 0){ conversion.clear(); for (i = 0; i < n; i++){ scanf(" %c %c", &before, &after); conver...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s903885806
p00424
C
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include <stdio.h> char c[256]; void clear() { int i; for (i = 0; i < 256; i++) c[i] = 0; } int main() { int n; char f, t; while (1) { scanf("%d\n", &n); if (!n) break; clear(); while (n--) { scanf("%c %c...
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 7 | ^ In file included from /usr/include/stdio.h:47, from main.c:27: /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t' 28 | ...
s016723013
p00424
C
#include<stdio.h> #include<stdlib.h> int main() { int n; int m; int i,j; char before[100]; char after[100]; char str[100]; while(1) { scanf("%d",&n); if(n==0)break; for(i<0;i<n;i++) { scanf("\n%c %c",&before[i],&after[i]); } scanf("\n%d",&m); for(i=0;i<m;i++) { scanf("\n%c",&st...
main.c: In function 'main': main.c:40:13: error: 'strnum' undeclared (first use in this function) 40 | for(i=0;i<strnum;i++) | ^~~~~~ main.c:40:13: note: each undeclared identifier is reported only once for each function it appears in
s814330527
p00424
C
#include<stdio.h> int main(void){ int n,m,i,j,flag; char a,b; int sb[62]={0},sa[62]={0}; while(scanf("%d%*c",&n),n!=0){ for(i=0;i<n;i++){ for(scanf("%c",&b);c!=' ';scanf("%c",&b)); scanf("%c %c",&sb[i],&sa[i]); getchar(); for(scanf("%c",&b);c!='...
main.c: In function 'main': main.c:10:32: error: 'c' undeclared (first use in this function) 10 | for(scanf("%c",&b);c!=' ';scanf("%c",&b)); | ^ main.c:10:32: note: each undeclared identifier is reported only once for each function it appears in
s022514599
p00424
C
#include<stdio.h> int main(void){ int n,m,flag; int i,j; char ah[70],bh[70],jo; while(1){ scanf("%d ",&n); if(!n) break; for(i=0;i<n;i++){ scanf("%c %c ",&ah[i],&bh[i]); } scanf("%d ",&m); for(i=0;i<m;i++){ scanf("%c ",&jo); flag=0; for(j=0;j<n;j++){ if(jo==ah[j]){ printf("%c",bh[...
main.c: In function 'main': main.c:29:9: error: expected declaration or statement at end of input 29 | return 0; | ^~~~~~
s935121120
p00424
C
#include <stdio.h> int main() { int n, m, i; char change[10000]={0}, ans[100000004]; char a,b, data; scanf("%d", &n); if(n==0) return 0; for(i=0; i<n; i++){ scanf("%c%c", &a, &b); change[a] = b; } scanf("%d", &m); for(i=0; i<m; i++){ scanf("%c", &data); if(change[data] != 0){ ans[i] = change[d...
main.c: In function 'main': main.c:27:9: error: expected declaration or statement at end of input 27 | main(); | ^~~~
s015850211
p00424
C
#include<stdio.h> #include<String.h> int main(){ char **conv; char *str; char c1,c2,c; int i,j,n,l; scanf("%d",&n);//convert data num while(n!=0){ conv = (char**)malloc(sizeof(char*)*n); for(i=0;i<n;i++) conv[i]=(char*)malloc(sizeof(char)*2); i = 0; while(1){ c = getchar(); if(c...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s867180478
p00424
C
#include<stdio.h> #include<stdlib.h> #include<String.h> int main(){ char **conv; char *str; char c1,c2,c; int i,j,n,l; scanf("%d",&n);//convert data num while(1){ if(n==0)break; conv = (char**)malloc(sizeof(char*)*n); for(i=0;i<n;i++) conv[i]=(char*)malloc(sizeof(char)*2); i = 0; while...
main.c:3:9: fatal error: String.h: No such file or directory 3 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s702401456
p00424
C
#include <stdio.h> int main() { int n, m, i; char change[1000][2], c; while (1) { scanf("%d", &n); if (n == 0) break; for (i = 0;i < n;i++) { scanf("%c %c", &change[i][0], &change[i][1]); } scanf("%d", &m); while (m--) { scanf("%c", &c); for (i = 0;i < n;i++) { if (c == change[i][0]) { ...
main.c: In function 'main': main.c:29:9: error: expected declaration or statement at end of input 29 | } | ^
s305166552
p00424
C
#include<stdio.h> #include<string.h> int n,m,i,j; char s[1000][9],x[9]; int main(){ scanf("%d",&n); while(n!=0){ for(i=0;i<=n;i++)gets(s[i]); //printf("\nAKB%d\n",n); scanf("%d",&m); for(i=0;i<m;i++){ scanf("%s",&x); for(j=0;j<n;j++){ if(x[0]==s[j][0]){ //strcpy(x,s[i]); x[0]=s[j][2]; ...
main.c: In function 'main': main.c:10:34: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 10 | for(i=0;i<=n;i++)gets(s[i]); | ^~~~ | fgets
s333990712
p00424
C
#include <stdio.h> #include <string.h> int main(void) { int n; char conv[100][3]; int m; char c, t; int i, j; while (1){ scanf("%d", &n); getchar(); if (n == 0){ break; } for (i = 0; i < 26; i++){ conv[i][0] = 'a' + i; conv[i][1] = 'a' + i; } for (i = 30; i < 56; i++){ conv[i][0...
main.c:68:9: error: expected identifier or '(' before 'return' 68 | return (0); | ^~~~~~ main.c:69:1: error: expected identifier or '(' before '}' token 69 | } | ^
s510631214
p00424
C
#include <iostream> using namespace std; int main(){ int n,i,tail; char s; char dic[256]; while(cin>>n,n){ for(i=0;i<256;i++) dic[i]=i; while(n--){ cin>>s; cin>>dic[(int)s]; } cin>>n; while(n--){ cin>>s; cout<<dic[(int)s]; } cout<<endl; } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s392168882
p00424
C
n,t[999];int main(i){for(;n*=scanf("%d",&n);puts("")){bzero(t,999);for(;n--;t[i]=*t)scanf(" %c %c",&i,t);for(scanf("%d",&n);n--;putchar(!t[i]*i+t[i]))scanf(" %c",&i);}return0;}
main.c:1:1: warning: data definition has no type or storage class 1 | n,t[999];int main(i){for(;n*=scanf("%d",&n);puts("")){bzero(t,999);for(;n--;t[i]=*t)scanf(" %c %c",&i,t);for(scanf("%d",&n);n--;putchar(!t[i]*i+t[i]))scanf(" %c",&i);}return0;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of...
s762353302
p00424
C
//#include <stdio.h> // int main(){ // int n,m,i,j; // char x[62][2]; // char z,l; //while(1){ // scanf("%d",&n); // if(n==0){break;} // for(i=0;i<n;i++){ // scanf("%s",&x[i]); // } //scanf("%d",&m); //for(i=0;i<m;i++){ //scanf("%c",&l); //for(j=0;j<n;j++){ //if(l==x[j][0]){ //l=x[j][1]; //bre...
main.c: In function 'main': main.c:45:17: error: subscripted value is neither array nor pointer nor vector 45 | printf("%c",x[0]); | ^
s266335446
p00424
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef DEBUG #define LOG(...) fprintf(stderr, __VA_ARGS__) #elif #define LOG(...) #endif // DEBUG struct convert_list { char from; char to; struct convert_list *next; }; typedef struct convert_list CONVERT_LIST; CONVERT_LIST* insert_list(CONVER...
main.c:7:6: error: #elif with no expression 7 | #elif | ^ main.c: In function 'main': main.c:33:9: error: implicit declaration of function 'LOG' [-Wimplicit-function-declaration] 33 | LOG("num = %d\n", num); | ^~~
s399499016
p00424
C
#include <cstdio> #include <vector> using namespace std; struct CODE { char before; char after; }; int main(void) { int n; while (scanf("%d", &n) * n != 0){ vector<CODE> code; vector<char> str; while (n-- > 0){ CODE c; scanf(" %c %c", &c.before, &c.after); code.push_back(c); } int m; ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s799654065
p00424
C++
use std::io; use std::str::FromStr; use std::collections::HashMap; fn read() -> i32 { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let x: i32 = s.trim().parse().unwrap(); x } fn read_char() -> String { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwr...
a.cc:26:18: error: too many decimal points in number 26 | for i in 0..n{ | ^~~~ a.cc:37:18: error: too many decimal points in number 37 | for i in 0..m{ | ^~~~ a.cc:1:1: error: 'use' does not name a type 1 | use std::io; | ^~~ a.cc:2:1: error...
s141050624
p00424
C++
#include<iostream> using namespace std; int main() { int n, m; char c[200], a, b, p; while( cin >> n ) { if( n == 0 ) break; for( int i = 0; i < 200; i++ ) c[i] = '.'; for( int i = 0; i < n; i++ ) { cin >> a >> b; c[a]...
a.cc: In function 'int main()': a.cc:25:21: error: invalid types 'char[int]' for array subscript 25 | cin >> p[i]; | ^
s509789709
p00424
C++
#include <cstdio> #include <map> using namespace std; int main() { int n, m; char before, after; map<char, char> conversion; int i; while (scanf("%d", &n) * n != 0){ conversion.clear(); for (i = 0; i < n; i++){ scanf(" %c %c", &before, &after); conver...
a.cc:31:15: error: stray '`' in program 31 | }<`0`> | ^ a.cc:31:17: error: stray '`' in program 31 | }<`0`> | ^ a.cc: In function 'int main()': a.cc:31:14: error: expected primary-expression before '<' token 31 | }<`0`> | ...
s023458654
p00424
C++
#include<iostream> using namespace std; int main () { int n,i.m; char s[100000000]; char list[100][100]; while(cin >> n,n) { for(i=0;i<n;i++) { for(j=0;j<2;j++) cin >> list[i][j]; } cin >> m; for(i=0;i<m;i++) { cin >> s[i]; for(j=0;j<n;j++) { if(s[i] == list[...
a.cc: In function 'int main()': a.cc:5:8: error: expected initializer before '.' token 5 | int n,i.m; | ^ a.cc:9:9: error: 'i' was not declared in this scope 9 | for(i=0;i<n;i++) { | ^ a.cc:10:13: error: 'j' was not declared in this scope 10 | for(j=0;j<2;j++) | ...
s883343709
p00424
C++
#include<iostream> using namespace std; int main () { int n,i.m; char s[100000000]; char list[100][100]; while(cin >> n,n) { for(i=0;i<n;i++) { for(j=0;j<2;j++) cin >> list[i][j]; } cin >> m; for(i=0;i<m;i++) { cin >> s[i]; for(j=0;j<n;j++) { if(s[i] == list[...
a.cc: In function 'int main()': a.cc:5:8: error: expected initializer before '.' token 5 | int n,i.m; | ^ a.cc:9:9: error: 'i' was not declared in this scope 9 | for(i=0;i<n;i++) { | ^ a.cc:10:13: error: 'j' was not declared in this scope 10 | for(j=0;j<2;j++) | ...
s849953511
p00424
C++
#include<iostream> using namespace std; int main () { int n,i,j,m; char s[100000000]; char list[100][100]; while(cin >> n,n) { for(i=0;i<n;i++) { for(j=0;j<2;j++) cin >> list[i][j]; } cin >> m; for(i=0;i<m;i++) { cin >> s[i]; for(j=0;j<n;j++) { if(s[i] == lis...
a.cc: In function 'int main()': a.cc:23:13: error: expected unqualified-id before 'sizeof' 23 | for(i=0;i<s.sizeof();i++) | ^~~~~~ a.cc:23:13: error: expected ';' before 'sizeof' 23 | for(i=0;i<s.sizeof();i++) | ^~~~~~ | ; a.cc:23:20: error: expected primary-e...
s402953182
p00424
C++
#include<cstdio> #include<iostream> #include<vector> using namespace std; int main(void){ while (1){ int n; scanf_s("%d", &n); if (n == 0)return 0; vector<char> code1; vector<char> code2; for (int i = 0; i < n; i++){ char a, b; scanf_s(" %c", &a); scanf_s(" %c", &b); code1.push_back(a); co...
a.cc: In function 'int main()': a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s864358903
p00424
C++
#include <iostream> #include <vector> #include <fstream> using namespace std; int main() { //ifstream cin("INPUT.txt"); //ofstream cout("OUTPUT.txt"); vector<char> before; vector<char> after; vector<char> str; int n, m, i, j; char c; while(cin >> n, n) { str.clear(); before.resize(n); after.resize(n);...
a.cc: In function 'int main()': a.cc:36:22: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>') 36 | cout << str << endl; | ~~~~ ^~ ~~~ | | | | | std:...
s618222043
p00424
C++
#include <iostream> #include <vector> #include <fstream> using namespace std; int main() { //ifstream cin("INPUT.txt"); //ofstream cout("OUTPUT.txt"); vector<char> before; vector<char> after; vector<char> str; int n, m, i, j; char c; while(cin >> n, n) { str.clear(); before.resize(n); after.resize(n);...
a.cc: In function 'int main()': a.cc:36:22: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>') 36 | cout << str << endl; | ~~~~ ^~ ~~~ | | | | | std:...
s990331358
p00424
C++
#include <iostream> #include <vector> #include <fstream> using namespace std; int main() { //ifstream cin("INPUT.txt"); //ofstream cout("OUTPUT.txt"); vector<char> before; vector<char> after; vector<char> str; int n, m, i, j; char c; while(cin >> n, n) { str.clear(); before.resize(n); after.resize(n);...
a.cc: In function 'int main()': a.cc:36:22: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>') 36 | cout << str << endl; | ~~~~ ^~ ~~~ | | | | | std:...
s184195054
p00424
C++
#include <iostream> #include <string> using namespace std; int main(){ string answers=""; // string tables=""; int number=0; while(1){ cin >> number; if(number==0){break;} string table=""; string answer=""; for (int i=0;i<number;i++){ string a,b; cin >> a >> b; table+=a+b; } tables+=table+ ...
a.cc: In function 'int main()': a.cc:21:17: error: 'tables' was not declared in this scope; did you mean 'table'? 21 | tables+=table+ "\n"; | ^~~~~~ | table
s549988436
p00424
C++
3 A a 0 5 5 4 10 A B C 0 1 4 5 a b A 3 A a 0 5 5 4 10 A B C 0 1 4 5 a b A 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s456306609
p00424
C++
#include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> using namespace std; int main(void){ int n,m; char c[256],a,b; while(1){ scanf("%d",&n); if(n==0){break;} for(int i=0;i<256;i++){ c[i]=0; } for(int i=0;i<n;i++){ scanf("%c%c",&a,&b); c[a]=b; } scanf("%d",&m); for(int i=0;i<m;i++){ scanf("%c",...
a.cc: In function 'int main()': a.cc:24:24: error: expected ';' before '}' token 24 | if(c[a]){printf("%c",a)} | ^ | ; a.cc:25:19: error: 'f' was not declared in this scope 25 | else{ printf("%c",f) } | ^
s149364457
p00424
C++
#include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> using namespace std; int main(void){ int n,m; char c[256],a,b; while(1){ scanf("%d",&n); if(n==0){break;} for(int i=0;i<256;i++){ c[i]=0; } for(int i=0;i<n;i++){ scanf("%c%c",&a,&b); c[a]=b; } scanf("%d",&m); for(int i=0;i<m;i++){ scanf("%c",...
a.cc: In function 'int main()': a.cc:25:19: error: 'f' was not declared in this scope 25 | else{ printf("%c",f) ; } | ^
s174117601
p00424
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int n,m; string str; char c[256]; struct DATA{ string b,a; }; DATA data[256]; int main(){ while(1){ str=0; cin>>n; if(n==0){break;} for(int i=0;i<n;i++){ cin>>data[i].b>>data[i].a; } cin>>m; for(int i=0;i<...
a.cc: In function 'int main()': a.cc:17:21: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 17 | str=0; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/...
s104210382
p00424
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int n,m; string str; string c; struct DATA{ string b,a; }; DATA data[256]; int main(){ while(1){ str=0; cin>>n; if(n==0){break;} for(int i=0;i<n;i++){ cin>>data[i].b>>data[i].a; } cin>>m; for(int i=0;i<m;i...
a.cc: In function 'int main()': a.cc:17:21: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 17 | str=0; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/...
s277159487
p00424
C++
#include <iostream> #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++) int main() { int n, m; while(cin>>n,n){ char ts[256] = {}; rep(i, n) { char f, t; cin>>f>>t; ts[f]=t; } cin>>m; rep(i, m) { char w; cin>>w; ...
a.cc:14:25: error: macro "for" requires 3 arguments, but only 1 given 14 | rep(i, n) { | ^ a.cc:5:9: note: macro "for" defined here 5 | #define for(i,a,b) for(int i=(a);i<(b);i++) | ^~~ a.cc:20:25: error: macro "for" requires 3 arguments, but only 1 giv...
s419734453
p00424
C++
#include <iostream> #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++) int main() { int n, m; while(cin>>n,n){ char ts[256] = {}; rep(i, n) { char f, t; cin>>f>>t; ts[f+0]=t; } cin>>m; rep(i, m) { char w; cin>>w;...
a.cc:14:25: error: macro "for" requires 3 arguments, but only 1 given 14 | rep(i, n) { | ^ a.cc:5:9: note: macro "for" defined here 5 | #define for(i,a,b) for(int i=(a);i<(b);i++) | ^~~ a.cc:20:25: error: macro "for" requires 3 arguments, but only 1 giv...
s198851930
p00424
C++
#include<iostream> #include<stdio.h> using namespace std; int ushi; int shika; char uma; int hiru; long char a[100000000]; long char b[100000000]; int main(){ cin >> ushi; for (int i = 0; i < ushi; i++){ cin >> a[i] >> b[i]; } cin >> shika; for (int j = 0; j < shika; j++){ cin >> uma; hiru = 0; for (int k...
a.cc:9:1: error: 'long' specified with 'char' 9 | long char a[100000000]; | ^~~~ a.cc:10:1: error: 'long' specified with 'char' 10 | long char b[100000000]; | ^~~~
s116897406
p00424
C++
#include<iostream> using namespace std; int main(){ int n=0; int m; int word; while(true){ cin>>n; if(n==0){ break; }else{ int transition[n*2]; for(int i=0;i<n*2;i++){ cin>>transition[i]>>transition>>[i+1]; } cin>>m; for(int i=0;i<m;i++){ cin>>word; for(int j=0;j<n*2;j+=2){ ...
a.cc: In function 'int main()': a.cc:15:23: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int [(n * 2)]') 15 | cin>>transition[i]>>transition>>[i+1]; | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ | | |...
s848608394
p00424
C++
#include<iostream> using namespace std; int main(){ int n=0; int m; int word; while(true){ cin>>n; if(n==0){ break; }else{ int transition[n*2]; for(int i=0;i<n*2;i++){ cin>>transition[i]>>transition>>[i+1]; } cin>>m; for(int i=0;i<m;i++){ cin>>word; for(int j=0;j<n*2;j+=2){ ...
a.cc: In function 'int main()': a.cc:15:23: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int [(n * 2)]') 15 | cin>>transition[i]>>transition>>[i+1]; | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ | | |...
s013600789
p00424
C++
#include<iostream> using namespace std; int main(){ long int n=0; long int m; char word; while(true){ cin>>n; if(n==0){ break; }else{ int transition[n*2]; for(int i=0;i<n*2;i++){ cin>>transition[i]>>transition>>[i+1]; } cin>>m; for(int i=0;i<m;i++){ cin>>word; for(int j=0;j<n*2;...
a.cc: In function 'int main()': a.cc:15:23: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int [(n * 2)]') 15 | cin>>transition[i]>>transition>>[i+1]; | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ | | |...
s796275266
p00424
C++
#include,iostream> using namespace std; char T[25000][2]; char S; int main(){ int n,m; while(true){ cin>>n; if(n==0){ break; } for(int i-0;i<n;i++){ cin>>T[i][0]>>T[i][1]; } cin>>m; for(int i=0;i<m;i++){ cin>>S; for(int j=0;j<n;j++){ if(T[j][0]==S){ cout<<T[j][1]; goto Exit; } } cout<<S; Exit:; } cout<<endl; } }
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include,iostream> | ^ a.cc: In function 'int main()': a.cc:9:1: error: 'cin' was not declared in this scope 9 | cin>>n; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#inc...
s198786352
p00424
C++
#include<iostream> using namespace std; int main(){ int a, mozi; cin >> a ; int wrong[a], right[a]; for(int i=0; i < a; i++){ cin >> wrong[i] >> right[i]; } cin >> mozi; int mozire[mozi]; for(int j=0; j < mozi; j++){ cin >> mozire[j]; for(int f=0; f < a; f++) if(mozire[j] == wrong[f]) mozire[j] = rig...
a.cc: In function 'int main()': a.cc:24:10: error: 'stdl' was not declared in this scope; did you mean 'std'? 24 | cout << stdl; | ^~~~ | std
s127979814
p00424
C++
#include <cstdio> int main(){ char key,val,table[256]; int n,m,i,d; scanf("%d",&n); while(n>0){ for(i=0;i<256;i++) table[i]=i; for(i=0;i<n;k++){ scanf("%c %c",&key,&val); table[key]=val; }; scanf("%d",&m); for(i=0;i<m;i++){ scanf("%c",&d); printf("%c",table[d]); } printf("\n"); scanf("%d...
a.cc: In function 'int main()': a.cc:8:15: error: 'k' was not declared in this scope 8 | for(i=0;i<n;k++){ | ^ a.cc: At global scope: a.cc:21:2: error: expected unqualified-id before ':' token 21 | }: | ^
s415516930
p00424
C++
#include <cstdio> int main(){ char key,val,table[256]; int n,m,i; char d; scanf("%d",&n); while(n>0){ for(i=0;i<256;i++) table[i]=i; for(i=0;i<n;k++){ scanf("%c %c",&key,&val); table[key]=val; }; scanf("%d",&m); for(i=0;i<m;i++){ scanf("%c",&d); printf("%c",table[d]); } printf("\n"); sc...
a.cc: In function 'int main()': a.cc:9:15: error: 'k' was not declared in this scope 9 | for(i=0;i<n;k++){ | ^ a.cc: At global scope: a.cc:22:2: error: expected unqualified-id before ':' token 22 | }: | ^
s383812352
p00424
C++
Can't find usable .clang-format, using LLVM style Can't find usable .clang-format, using LLVM style #include <bits/stdc++.h> using namespace std; char n1[100001], m[100001]; char n2[100001]; int main() { int N, M; while (1) { scanf("%d", &N); if (N == 0) break; for (int i = 0; i < N; i++) {...
a.cc:1:4: warning: missing terminating ' character 1 | Can't find usable .clang-format, using LLVM style | ^ a.cc:1:4: error: missing terminating ' character 1 | Can't find usable .clang-format, using LLVM style | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:2:4: warning: missing termin...
s534709790
p00424
C++
#include <unordered_map> #include <iostream> using namespace std; int main() { unordered_map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { ...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy_s' was not declared in this scope 29 | strcpy_s(d, x.c_str()); | ...
s790377654
p00424
C++
#include <unordered_map> #include <iostream> using namespace std; int main() { unordered_map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { ...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy_s' was not declared in this scope 29 | strcpy_s(d, x.c_str()); | ...
s109283921
p00424
C++
#include <map> #include <iostream> using namespace std; int main() { map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { x += c; } } whi...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy_s' was not declared in this scope 29 | strcpy_s(d, x.c_str()); | ...
s783779625
p00424
C++
#include <map> #include <iostream> using namespace std; int main() { map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { x += c; } } whi...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy_s' was not declared in this scope 29 | strcpy_s(d, x.c_str()); | ...
s775985643
p00424
C++
#include <map> #include <iostream> using namespace std; int main() { map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { x += c; } } whi...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy' was not declared in this scope 29 | strcpy(d, x.c_str()); | ...
s345473890
p00424
C++
#include <map> #include <iostream> #include <cstdlib> using namespace std; int main() { map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { x ...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy' was not declared in this scope 29 | strcpy(d, x.c_str()); | ...
s951612569
p00424
C++
#include <map> #include <iostream> #include <string> using namespace std; int main() { map<char, char> mp; char a,b,c,d[100000]; string x; int n; do{ cin >> n; do{ cin >> a >> b; mp[a] = b; } while (--n); cin >> n; do{ cin >> c; if (mp[c] != NULL) { x += mp[c]; } else { x +...
a.cc: In function 'int main()': a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith] 22 | if (mp[c] != NULL) { | ^~~~ a.cc:29:17: error: 'strcpy' was not declared in this scope 29 | strcpy(d, x.c_str()); | ...
s949663354
p00424
C++
#include <iostream> using namespace std; int main(){ int n = 0 while(cin >> n && n){ int m = 0, henkan[10000] = {}; char in, iin; for(int i = 0; i < n; i++){ cin >> in >> iin; int ctoi = in, ctoii = iin; henkan[ctoi] = ctoii; } cin >> m; for(int i = 0; i < m; i++){ cin >> in; int ctoi = in...
a.cc: In function 'int main()': a.cc:6:9: error: expected ',' or ';' before 'while' 6 | while(cin >> n && n){ | ^~~~~
s876020049
p00424
C++
include <bits/stdc++.h> #define REP(i, max) for(int i = 0, iMax = max; i < iMax; i ++) using namespace std; int main(int args, char **ppArgs) { map<char, char> conversionMap; // Input conversion tables int numTables; while(::scanf("%d", &numTables), numTables) { char from, to; REP(i, numTables) cin >> from...
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main(int, char**)': a.cc:8:9: error: 'map' was not declared in this scope 8 | map<char, char> conversionMap; | ^~~ a.cc:8:13: error: expected primary-expression before 'char' ...
s282653019
p00424
C++
//#include <bits/stdc++.h> #include <cstdio> #include <iostream> #include <map> #include <string> using namespace std; #define REP(i, max) for(int i = 0, iMax = max; i < iMax; i ++) #define MAX_TEXT_LEN 1e+5 int main(int args, char **ppArgs) { int numTables; while(::scanf("%d", &numTables), numTables) { // In...
a.cc: In function 'int main(int, char**)': a.cc:10:25: error: conversion from 'double' to 'long unsigned int' in a converted constant expression 10 | #define MAX_TEXT_LEN 1e+5 | ^~~~ a.cc:26:27: note: in expansion of macro 'MAX_TEXT_LEN' 26 | char text[MAX_TEXT_LEN...
s254291934
p00424
C++
#include<iostream> #include<vector> int main() { int n,N; std::cin >> n; std::vector<char>a(n),b(n); for (int i = 0; i < n; i += 1) std::cin >> a[i] >> b[i]; std::cin >> N; std::vector<char>c(N); for (int i = 0; i < N; i += 1) { std::cin >> c[i]; for (int j = 0; j < n; j += 1) { if (c[i] == a[j]) c...
a.cc: In function 'int main()': a.cc:21:18: error: expected '}' at end of input 21 | return 0; | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s458918444
p00424
C++
int main(){ int c[256]; int a; while(1){ scanf("%d",&a); if(a==0)return 0; for(int i=0;i<256;i++)c[i]=i; getchar(); getchar(); for(int i=0;i<a;i++){ char b,d; b=getchar(); getchar(); d=getchar(); getc...
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf' was not declared in this scope 5 | scanf("%d",&a); | ^~~~~ a.cc:8:9: error: 'getchar' was not declared in this scope 8 | getchar(); | ^~~~~~~ a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is pr...
s823420942
p00424
C++
#include <map> using namespace std; int main(){ for(;;){ map<char, char>m; int n, i, j; char ca, cb; scanf("%d", &n); if(n==0) break; for(i=0; i<n; i++){ scanf("%c %c", &ca, &cb); m[ca] = cb; } scanf("%d", &j); for(i=0; ...
a.cc: In function 'int main()': a.cc:8:9: error: 'scanf' was not declared in this scope 8 | scanf("%d", &n); | ^~~~~ a.cc:19:32: error: 'printf' was not declared in this scope 19 | if(itr != m.end()) printf("%c", m[c]); | ^~~~~~ a.cc:2:1: not...
s245682706
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc: In function 'int main()': a.cc:51:13: error: 'purchar' was not declared in this scope; did you mean 'putchar'? 51 | purchar(m[a]); | ^~~~~~~ | putchar
s324838143
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc: In function 'int main()': a.cc:51:13: error: 'purchar' was not declared in this scope; did you mean 'putchar'? 51 | purchar(m[a]); | ^~~~~~~ | putchar
s718253771
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc: In function 'int main()': a.cc:51:13: error: 'purchar' was not declared in this scope; did you mean 'putchar'? 51 | purchar(m[a]); | ^~~~~~~ | putchar
s431708999
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc: In function 'int main()': a.cc:51:13: error: 'purchar' was not declared in this scope; did you mean 'putchar'? 51 | purchar(m[a]); | ^~~~~~~ | putchar
s136422021
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc:43:14: error: macro "REP" requires 3 arguments, but only 2 given 43 | REP(i,128) m[i] = i; | ^ a.cc:25:9: note: macro "REP" defined here 25 | #define REP(i, x, n) for(int i = x; i < n; i++) | ^~~ a.cc:44:12: error: macro "REP" requires 3 arguments, but only 2 given 44 ...
s889442466
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc:43:14: error: macro "REP" requires 3 arguments, but only 2 given 43 | REP(i,128) m[i] = i; | ^ a.cc:25:9: note: macro "REP" defined here 25 | #define REP(i, x, n) for(int i = x; i < n; i++) | ^~~ a.cc:44:12: error: macro "REP" requires 3 arguments, but only 2 given 44 ...
s398881672
p00424
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<mem...
a.cc:43:14: error: macro "REP" requires 3 arguments, but only 2 given 43 | REP(i,128) m[i] = i; | ^ a.cc:25:9: note: macro "REP" defined here 25 | #define REP(i, x, n) for(int i = x; i < n; i++) | ^~~ a.cc:44:12: error: macro "REP" requires 3 arguments, but only 2 given 44 ...
s766523410
p00424
C++
def main(): aaa = {} str = "" while 1: n = int(input()) if not n: break for _ in range(n): INPUT = input().split() aaa[INPUT[0]] = INPUT[1] n = int(input()) if not n: break for _ in range(n): a = inpu...
a.cc:1:1: error: 'def' does not name a type 1 | def main(): | ^~~ a.cc:3:5: error: 'str' does not name a type 3 | str = "" | ^~~ a.cc:19:9: error: 'str' does not name a type 19 | str = "" | ^~~
s959736962
p00424
C++
#include<iostream> #include<map> using namespace std; int main(){ while(true){ int n = 0; n << cin; if(n == 0){ break; } for(int i = 0; i < n; i++){ map<char, char> convert; char key, value; key << cin; value << cin; map[key] = value; } int m = 0; m << ci...
a.cc: In function 'int main()': a.cc:8:7: error: no match for 'operator<<' (operand types are 'int' and 'std::istream' {aka 'std::basic_istream<char>'}) 8 | n << cin; | ~ ^~ ~~~ | | | | int std::istream {aka std::basic_istream<char>} a.cc:8:7: note: candidate: 'operator<<(int, ...
s297728604
p00424
C++
#include<iostream> #include<map> using namespace std; int main(){ while(true){ int n = 0; cin >> n; if(n == 0){ break; } for(int i = 0; i < n; i++){ map<char, char> convert; char key, value; cin >> key; cin >> value; map[key] = value; } int m = 0; cin >>...
a.cc: In function 'int main()': a.cc:16:11: error: conflicting declaration 'auto key' 16 | map[key] = value; | ^~~ a.cc:14:12: note: previous declaration as 'char key' 14 | char key, value; | ^~~ a.cc:22:17: error: expected ';' before 'if' 22 | cin >> val ...
s343165665
p00424
C++
#include<iostream> #include<map> using namespace std; int main(){ while(true){ int n = 0; cin >> n; if(n == 0){ break; } for(int i = 0; i < n; i++){ map<char, char> convert; char key, value; cin >> key; cin >> value; convert[key] = value; } int m = 0; c...
a.cc: In function 'int main()': a.cc:23:10: error: 'convert' was not declared in this scope; did you mean 'const'? 23 | if(convert.find(val) == convert.end()){ | ^~~~~~~ | const
s645730602
p00424
C++
#include <iostream> #include <vector> using namespace std; int main() { int n, m; //n??????????????????????´???°???m?????????????±??????° char temp; while(cin >> n, n != 0){ vector<char> before, after; //???????????????????????¨????????????????????? for(int i=0; i<n; ++i){ cin >> temp; befo...
a.cc: In function 'int main()': a.cc:21:15: error: 'befor' was not declared in this scope; did you mean 'before'? 21 | if(find(befor.begin(), before.end(), temp) == before.end()){ //??????????????? | ^~~~~ | before a.cc:25:27: error: no matching function for call to 'fin...
s577293028
p00424
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; //n??????????????????????´???°???m?????????????±??????° char temp; while(cin >> n, n != 0){ vector<char> before, after; //???????????????????????¨????????????????????? for(int i=0; i<n; ++i){ ci...
a.cc: In function 'int main()': a.cc:26:22: error: no match for 'operator[]' (operand types are 'std::vector<char>' and '__gnu_cxx::__normal_iterator<char*, std::vector<char> >') 26 | cout << after[find(before.begin(), before.end(), temp)]; | ^ In file included from /usr/include/c+...
s366082658
p00424
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; //n??????????????????????´???°???m?????????????±??????° char temp; while(cin >> n, n != 0){ vector<char> before, after; //???????????????????????¨????????????????????? for(int i=0; i<n; ++i){ ci...
a.cc: In function 'int main()': a.cc:26:32: error: 'class std::vector<char>' has no member named 'befin'; did you mean 'begin'? 26 | int outi = find(before.befin(), before.end(), temp); | ^~~~~ | begin
s139678042
p00424
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; //n??????????????????????´???°???m?????????????±??????° char temp; while(cin >> n, n != 0){ vector<char> before, after; //???????????????????????¨????????????????????? for(int i=0; i<n; ++i){ ci...
a.cc: In function 'int main()': a.cc:26:24: error: cannot convert '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' to 'int' in initialization 26 | int outi = find(before.begin(), before.end(), temp); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |...
s318103370
p00424
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; //n??????????????????????´???°???m?????????????±??????° char temp; while(cin >> n, n != 0){ vector<char> before, after; //???????????????????????¨????????????????????? for(int i=0; i<n; ++i){ ci...
a.cc: In function 'int main()': a.cc:26:20: error: invalid cast from type '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' to type 'int' 26 | int outi = (int)find(before.begin(), before.end(), temp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s131987298
p00424
C++
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=...
a.cc: In function 'int dfs(int, int, int)': a.cc:15:33: error: expected '}' at end of input 15 | int dfs(int n, int max, int s) { | ~^ a.cc:15:33: warning: no return statement in function returning non-void [-Wreturn-type]