submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s303703874
p00086
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int n, m, s, t = 0; int d[110][110], used[110]; /*v????????¨??°???t????¨?????????????????????°*/ bool solve(int v,int count) { if (used[v] == 0) { used[v] == 1; count++; } if (d[2][v] > 0 || d[v][2] > 0 && count == t - 1)return true; for ...
a.cc: In function 'int main()': a.cc:32:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | while (scanf_s("%d %d", &n, &m)) { | ^~~~~~~ | scanf
s627252343
p00086
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int n, m, s, t = 0; int d[110][110], used[110]; /*v????????¨??°???t????¨?????????????????????°*/ bool solve(int v,int count) { if (used[v] == 0) { used[v] = 1; count++; } if (d[2][v] > 0 || d[v][2] > 0 && count == t - 1)return true; for (...
a.cc: In function 'int main()': a.cc:32:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | while (scanf_s("%d %d", &n, &m)) { | ^~~~~~~ | scanf
s655801413
p00086
C++
#include<stdio.h> int way[200]; int a,b; int cou=0; int main() { while(scanf("%d%d",&a,&b)!=-1) { for(int i=0;i<200;i++) { way[i]=0; } cou=0; way[a]++; way[b]++; while(1) { scanf("%d%d",&a,&b); if(a==0&&b==0)brea...
a.cc: In function 'int main()': a.cc:23:9: error: 'else' without a previous 'if' 23 | else if(way[1]%2==1&&way[2]%2==1) | ^~~~
s219735835
p00086
C++
#include "stdafx.h" #include <algorithm> // sort ????????? #include <string> // string (?????????) ????????? #include<iostream> using namespace std; int N[256] = { 0 },a,b; bool ok() { if (N[1] % 2 == 0)return false; if (N[2] % 2 == 0)return false; for (int i = 3; i < 256; i++) { if (N[i] % 2 == 1)return false; }...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s984016043
p00086
C++
#include <iostream> #include <string> using namespace std; int main(){ while (true) { int x[200] = {}; int a; cin >> a; if (cin.eof()) { break; } while (true) { x[a]++; x[a] = x[a] % 2; cin >> a; if (a == 0) { brea...
a.cc: In function 'int main()': a.cc:30:14: error: expected '}' at end of input 30 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s385263158
p00086
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<vector> #include<queue> using namespace std; int c[100]; int main() { int a, b; while (cin >> a >> b) { if (a == 0 && b == 0) { bool k = (c[0] % 2 == c[1] % 2); for (int i = 2; i < 100; i++) { if (c[i] & 1)k = false; } ...
a.cc: In function 'int main()': a.cc:20:25: error: 'memset' was not declared in this scope 20 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<q...
s186919808
p00086
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<vector> #include<queue> using namespace std; int c[100]; int main() { int a, b; while (cin >> a >> b) { if (a == 0 && b == 0) { bool k = true; for (int i = 2; i < 100; i++) { if (c[i] & 1)k = false; } if (k)puts("OK")...
a.cc: In function 'int main()': a.cc:20:25: error: 'memset' was not declared in this scope 20 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<q...
s374132475
p00086
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<vector> #include<queue> using namespace std; int c[100]; int main() { int a, b; while (cin >> a >> b) { if (a == 0 && b == 0) { bool k = c[0] % 2 == 1 && c[1] % 2 == 1; for (int i = 2; i < 100; i++) { if (c[i] & 1)k = false...
a.cc: In function 'int main()': a.cc:20:25: error: 'memset' was not declared in this scope 20 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<q...
s680335660
p00086
C++
#include<iostream> using namespace std; int map[110]; bool solve() { if (map[1] % 2 = 1 && map[2] % 2 == 1) { for (int i = 3; i <= 100; i++){ if (map[i] % 2 == 1) return false; } return true; } else return false; } int main() { int a, b; while (cin >> a >> b) { if (!a && !b) { if (solve()) cout <...
a.cc: In function 'bool solve()': a.cc:5:20: error: lvalue required as left operand of assignment 5 | if (map[1] % 2 = 1 && map[2] % 2 == 1) { | ~~~~~~~^~~ a.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type] 13 | } | ^
s223689363
p00086
C++
node = {} readlines.map(&:chomp).each{|line| s, t = line.split.map(&:to_i) if s == 0 && t == 0 if node[1] % 2 != node[2] % 2 puts "NG" else node.delete(1) node.delete(2) cnt = 0 node.each{|h, k| cnt += 1 if k % 2 == 1 } if cnt == 0 puts "OK" e...
a.cc:1:1: error: 'node' does not name a type 1 | node = {} | ^~~~ a.cc:2:1: error: 'readlines' does not name a type 2 | readlines.map(&:chomp).each{|line| | ^~~~~~~~~
s119621081
p00086
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s071242914
p00086
C++
#include <iostream> #include <string> using namespace std; int main(void){ int i,a,b,flg,s[104]; while(1){ memset(s,0,sizeof(s)); while(1){ if(!(cin>>a>>b)) return 0; if(!a && !b) break; s[a]++; s[b]++; } flg = 0; if(s[1] % 2 == 1 && s[2] % 2 == 1){ flg = 1; ...
a.cc: In function 'int main()': a.cc:9:5: error: 'memset' was not declared in this scope 9 | memset(s,0,sizeof(s)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 |...
s139362447
p00086
C++
d[100],z[100]={1,1};main(a){for(;~scanf("%d 0",&a);)a--?(d[a]^=1):memset(d,0,400,puts(memcmp(d,z,400)?"NG":"OK"));}
a.cc:1:1: error: 'd' does not name a type 1 | d[100],z[100]={1,1};main(a){for(;~scanf("%d 0",&a);)a--?(d[a]^=1):memset(d,0,400,puts(memcmp(d,z,400)?"NG":"OK"));} | ^ a.cc:1:25: error: expected constructor, destructor, or type conversion before '(' token 1 | d[100],z[100]={1,1};main(a){for(;~scanf("%d 0",&...
s979734031
p00086
C++
#include <iostream> #include <map> using namespace std; const int size = 101; int G[size][size]; int C[size]; map <int, int> M; int M_index; bool flag; void set_index( int a ) { if ( M.find( a ) != M.end() ) return; M[a] = M_index; M_index++; } void init() { memset( G, 0, sizeof(G) ); memset( C, 0, sizeo...
a.cc:6:7: error: reference to 'size' is ambiguous 6 | int G[size][size]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14...
s420109935
p00086
C++
#include<iostream>#include<cstdio>using namespace std;int main(){ for(;;){ int a,b,x = 0; int field[100] = {0}; for(;;){ if(scanf("%d %d",&a,&b) == EOF){goto jump;} if(!a && !b){break;} field[a]++; field[b]++; } for(int i=0; i<100; i++){ ...
a.cc:1:19: warning: extra tokens at end of #include directive 1 | #include<iostream>#include<cstdio>using namespace std;int main(){ for(;;){ int a,b,x = 0; int field[100] = {0}; for(;;){ if(scanf("%d %d",&a,&b) == EOF){goto jump;} if(!a && !b){break;} field[a...
s869450268
p00086
C++
#include <iostream> #include <vector> using namespace std; int v[101]; int main(){ int a, b; bool ng = false; while(cin >> a >> b){ v[a]++, v[b]++; if(a == 0){ if(v[1] + v[2] % 2 == 1){ ng = true; } for(int i=3; i<101; ++i){ if(v[i] % 2 == 1){ ng = true; } } if(ng){ ...
a.cc: In function 'int main()': a.cc:26:7: error: 'memset' was not declared in this scope 26 | memset(v, 0, sizeof(v)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#include <cstring> ...
s046572725
p00086
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int a, b; int degree[5000] = {0}; while (cin >> a, cin >> b) { if (a == -1 && b == -1) break; degree[a]++; degree[b]++; if (a == 0) { int flg = 0; for (int i = 0; i < 5000; i++) if (degree[i]%2 && i != 1 ...
a.cc: In function 'int main()': a.cc:19:7: error: 'memset' was not declared in this scope 19 | memset(degree, 0, sizeof(degree)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <c...
s999447197
p00086
C++
#include <cstring> #include <iostream> using namespace std; const int MAX_NODE = 100; int main() { int nodes[MAX_NODE + 1]; int last = 0, from, to; memset(nodes, 0, sizeof(nodes)); while (cin >> from >> to) { if (from == 0 && to == 0) { if ((nodes[1] & 1) && (nodes[2] & 1) && all_of(nodes + 3, nodes +...
a.cc: In function 'int main()': a.cc:15:44: error: 'all_of' was not declared in this scope 15 | && all_of(nodes + 3, nodes + last + 1, | ^~~~~~
s987580338
p00086
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ while(!feof(stdin)){ int G[1000]={0}; int a,b; int mx = 0; while( cin >> a >> b , a+b ){ G[b]++,G[a]++; mx = max(mx,max(a,b)); } bool flag = true; for(int i = 3 ; i <= mx ; i++ ){ if(G[i]%2 == 1...
a.cc:30:3: error: expected unqualified-id before 'return' 30 | return 0; | ^~~~~~ a.cc:31:1: error: expected declaration before '}' token 31 | } | ^
s462818446
p00086
C++
int main(){ int x[101]={0},i,j; while(std::cin>>i>>j){ x[1]++; x[2]++; while(i!=0&&j!=0){ x[i]^=1; x[j]^=1; std::cin>>i>>j; } for(i=0;i<101;i++)if(x[i])break; std::cout<<(i==101?"OK\n":"NG\n"); for(i=0;i<101;i++)x[i]=0; } }
a.cc: In function 'int main()': a.cc:3:20: error: 'cin' is not a member of 'std' 3 | while(std::cin>>i>>j){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | int main(){ a....
s079610019
p00086
C++
//include //------------------------------------------ #include <bits/stdc++.h> // only for GCC using namespace std; //typedef //------------------------------------------ typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<string> vs; typedef vector<bool> vb; typedef vector<vb> vvb; typedef pair<int, in...
a.cc: In function 'int main()': a.cc:59:24: error: expected primary-expression before ')' token 59 | if(a[1]%2==0||) cout << "OK" << endl; | ^
s613753077
p00086
C++
#include <iostream> #include <cstdio> using namespace std; int dim[e+10]; void init() { fill(dim, dim+110, 0); } bool hitofude() { if ((dim[1]+dim[2])%2) { return false; } for (int i=3; i<e+10; i++) { if (dim[i]%2) { return false; } } return true; } int main() { int a,b; init(); ...
a.cc:5:9: error: 'e' was not declared in this scope 5 | int dim[e+10]; | ^ a.cc: In function 'void init()': a.cc:8:8: error: 'dim' was not declared in this scope; did you mean 'div'? 8 | fill(dim, dim+110, 0); | ^~~ | div a.cc: In function 'bool hitofude()': a.cc:12:8: ...
s748856466
p00087
Java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc; static final int INF=1<<28; static final double EPS=1e-9; void run(){ sc=new Scanner(System.in); for(; sc.hasNext();){ Scanner c=...
Main.java:47: error: illegal start of expression println(ans+"");*/ ^ Main.java:47: error: illegal start of expression println(ans+"");*/ ^ 2 errors
s820823665
p00087
Java
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNextLine()){ Stack<Double> stack = new Stack<Double>(); for(String s : sc.nextLine().split(" ");){...
Main.java:12: error: ')' expected for(String s : sc.nextLine().split(" ");){ ^ Main.java:12: error: illegal start of expression for(String s : sc.nextLine().split(" ");){ ^ 2 errors
s193053098
p00087
C
#define _CRT_SECURE_NO_WARNINGS ////#define _USE_MATH_DEFINES #include<stdio.h> #include<stdlib.h> //#include<math.h> #include<string.h> //#include<time.h> #define P(type,x) fprintf(stdout,"%"#type"\n",x) void push(double, int, double[]); double pop(int, double[]); int main() { char array[1000000]; char *pt = array,...
main.c: In function 'main': main.c:17:39: warning: comparison between pointer and integer 17 | while (~scanf("%[^\n]*s", pt) != NULL) { | ^~ /usr/bin/ld: /tmp/ccfhJUNv.o: in function `main': main.c:(.text+0x7e): undefined reference to `pop' /usr/bin/ld: main.c:(.te...
s466093010
p00087
C
#include<stdio.h> #include<string.h> #include<ctype.h> #include<stdlib.h> void push(double S[],int *top,double x){ S[(*top)]=x; (*top)++; return; } double pop(double S[],int *top){ (*top)--; return S[(*top)]; } int main(){ char str[81]; int i,j; int R,top; char temp[10]; double S[80]; double x1,x2; w...
main.c: In function 'main': main.c:58:1: error: stray '\343' in program 58 | <U+3000><U+3000><U+3000> i++; | ^~~~~~~~ main.c:58:3: error: stray '\343' in program 58 | <U+3000><U+3000><U+3000> i++; | ^~~~~~~~ main.c:58:5: error: stray '\343' in program 58 | <U+3000><U+3000><U+3000> i++; ...
s493765576
p00087
C
#include <stdio.h> #include <stdlib.h> int main(void) { double stack[200]; char temp[100]; int stackptr=0; while(1) { if(scanf("%s",temp)==-1)break; assert(stackptr >= 2); if(temp[0]=='+') { if(stackptr<2)return 1; stack[stackptr-2]+=stack[stackptr-1]; stackptr--; } else if(temp[0]=='-') { if(s...
main.c: In function 'main': main.c:10:17: error: implicit declaration of function 'assert' [-Wimplicit-function-declaration] 10 | assert(stackptr >= 2); | ^~~~~~ main.c:3:1: note: 'assert' is defined in header '<assert.h>'; this is probably fixable by adding '#include <assert.h>...
s075655033
p00087
C
#include <stdio.h> #include <string.h> #include <stdlib.h> double plus( double a, double b ) { return a + b; } double minus( double a, double b ) { return a - b; } double product( double a, double b ) { return a * b; } double divide( double a, double b ) { return a / b; } double (*calculation[4])() = {plus, minus, ...
main.c: In function 'main': main.c:39:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 39 | gets( str ); | ^~~~ | fgets
s631243722
p00087
C
char s[];main(){double*q,b;for(q=a+9;~scanf("%s",s);getchar()<14&&printf("%f\n",*q)){!sscanf(s,"%lf",q+1)?b=*q--,*q=*s-47?*s-42?*s-45?*q+b:*q-b:*q*b:*q/b:*++q;}}
main.c:1:10: error: return type defaults to 'int' [-Wimplicit-int] 1 | char s[];main(){double*q,b;for(q=a+9;~scanf("%s",s);getchar()<14&&printf("%f\n",*q)){!sscanf(s,"%lf",q+1)?b=*q--,*q=*s-47?*s-42?*s-45?*q+b:*q-b:*q*b:*q/b:*++q;}} | ^~~~ main.c: In function 'main': main.c:1:34: error: 'a' undeclare...
s349368159
p00087
C
char s[];main(){double*q=s,b;for(;~scanf("%s",s);getchar()<14&&printf("%f\n",*q))!sscanf(s,"%lf",q+1)?b=*q--,*q=*s&1?*q*b:*s>46?*q/b:*s>44?*q-b:*q+b;}
main.c:1:10: error: return type defaults to 'int' [-Wimplicit-int] 1 | char s[];main(){double*q=s,b;for(;~scanf("%s",s);getchar()<14&&printf("%f\n",*q))!sscanf(s,"%lf",q+1)?b=*q--,*q=*s&1?*q*b:*s>46?*q/b:*s>44?*q-b:*q+b;} | ^~~~ main.c: In function 'main': main.c:1:26: error: initialization of 'doubl...
s593809632
p00087
C
a,s[];main(c){double*q=s,b;for(;~scanf("%s%c",s,&c);c&2&&printf("%f\n",*q))sscanf(s,"%lf",q+1)-1?a=*s&7,b=*q--,*q=a-7?a-2?*q+=a-5?b:-b:*a*b:*q/b:*++q;}
main.c:1:1: warning: data definition has no type or storage class 1 | a,s[];main(c){double*q=s,b;for(;~scanf("%s%c",s,&c);c&2&&printf("%f\n",*q))sscanf(s,"%lf",q+1)-1?a=*s&7,b=*q--,*q=a-7?a-2?*q+=a-5?b:-b:*a*b:*q/b:*++q;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] mai...
s355800132
p00087
C
s;main(c){for(double*q=&s,b;~scanf("%s%c",&s,&c);c&2&&printf("%f\n",*q))sscanf(&s,"%lf",q+1)-1?b=*q--,*q=s&1?s&2?s&4?*q/b:*q+b:*q-b:*q*b:*++q;}
main.c:1:1: warning: data definition has no type or storage class 1 | s;main(c){for(double*q=&s,b;~scanf("%s%c",&s,&c);c&2&&printf("%f\n",*q))sscanf(&s,"%lf",q+1)-1?b=*q--,*q=s&1?s&2?s&4?*q/b:*q+b:*q-b:*q*b:*++q;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:3:...
s606382351
p00087
C
#include<stdio.h> #include<stdlib.h> #include<string> int main() { char c,d[11]; double s[80]; int p=-1,q=0,t; while(scanf("%c",&c)!=EOF) { switch(c) { case '+': t=s[p-1]+s[p]; goto j; case '-': scanf("%c",&c); if('1'>c||'0'<c) { t=s[p-1]-s[p]; goto j; } if(c=='\n') goto k;...
main.c:3:9: fatal error: string: No such file or directory 3 | #include<string> | ^~~~~~~~ compilation terminated.
s631584817
p00087
C++
#include <cstdio> #include <stack> #include <cctype> #include <cstring> using namespace std; double eval(double a, double b, char oper){ if( oper == '+' ) return a+b; if( oper == '-' ) return a-b; if( oper == '*' ) return a*b; if( oper == '/' ) return a/b; return 0; } int main(){ char expr[100...
a.cc: In function 'int main()': a.cc:22:19: error: 'atoi' was not declared in this scope 22 | stk.push( atoi(it) ); | ^~~~
s776515331
p00087
C++
#include <cstdio> #include <stack> #include <cctype> #include <cstring> using namespace std; double eval(double a, double b, char oper){ if( oper == '+' ) return a+b; if( oper == '-' ) return a-b; if( oper == '*' ) return a*b; if( oper == '/' ) return a/b; return 0; } int main(){ char expr[100...
a.cc: In function 'int main()': a.cc:22:19: error: 'atoi' was not declared in this scope 22 | stk.push( atoi(it) ); | ^~~~
s586511944
p00087
C++
#include <cstdio> #include <stack> #include <cctype> #include <cstring> using namespace std; double eval(double a, double b, char oper){ if( oper == '+' ) return a+b; if( oper == '-' ) return a-b; if( oper == '*' ) return a*b; if( oper == '/' ) return a/b; return 0; } int main(){ char expr[100...
a.cc: In function 'int main()': a.cc:21:19: error: 'atoi' was not declared in this scope 21 | stk.push( atoi(it) ); | ^~~~
s471538350
p00087
C++
#include <cstdio> #include <stack> #include <cctype> #include <cstring> using namespace std; double eval(double a, double b, char oper){ if( oper == '+' ) return a+b; if( oper == '-' ) return a-b; if( oper == '*' ) return a*b; if( oper == '/' ) return a/b; return 0; } int main(){ char expr[100...
a.cc: In function 'int main()': a.cc:21:27: error: 'atoi' was not declared in this scope 21 | stk.push( (double)atoi(it) ); | ^~~~
s545371509
p00087
C++
#include <cstdio> #include <cctype> #include <stdlib> #include <cstring> #include <stack> using namespace std; double eval(double a, double b, char oper){ if( oper == '+' ) return a + b; if( oper == '-' ) return a - b; if( oper == '*' ) return a * b; if( oper == '/' ) return a / b; return 0.0; } i...
a.cc:3:10: fatal error: stdlib: No such file or directory 3 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s139255035
p00087
C++
#include<iostream> #include<cstdio> #include<string> #include<stack> using namespace std; double s_d(string a){ double b=0; double zy=0.1; bool hu=false; bool dot=false; for(int i=0;i<a.size();i++){ if(dot){ b+=zy*(a[i]-'0'); zy*=0.1; } else if(a[i]=='-') hu=true; else if(a[i]=='.'){ dot=true; ...
a.cc: In function 'int main()': a.cc:85:10: error: expected '}' at end of input 85 | } | ^ a.cc:32:11: note: to match this '{' 32 | int main(){ | ^
s580135934
p00087
C++
#include <iostream> #include <sstream> #include <string> #include <stack> #include <stdlib.h> using namespace std; int main() { string s; while(getline(cin, s)) { stringstream ss; ss << s; stack<double> st; while(ss >> s) { if((s[0] >= '0' && s[0] <= '9')...
a.cc: In function 'int main()': a.cc:29:20: error: 'strcmp' was not declared in this scope 29 | if(strcmp(s.c_str(), "+") == 0) | ^~~~~~ a.cc:6:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <stdlib...
s022300082
p00087
C++
#include <bits/stdc++.h> using namespace std; vector<string> data; vector<string> split(string& str, char delim) { stringstream ss(str); vector<string> res; string tmp; while(getline(ss, tmp, delim)) res.push_back(tmp); return(res); } double calc(double a, double b, char opr) { switch(opr) { ...
a.cc: In function 'double solve()': a.cc:25:24: error: reference to 'data' is ambiguous 25 | for(int r = 0; r < data.size(); r++) { | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_...
s210708954
p00087
C++
#include <bits/stdc++.h> #include <string> #include <typeinfo> using namespace std; vector<string> data; vector<string> split(string& str, char delim) { stringstream ss(str); vector<string> res; string tmp; while(getline(ss, tmp, delim)) res.push_back(tmp); return(res); } double calc(double a, dou...
a.cc: In function 'double solve()': a.cc:27:24: error: reference to 'data' is ambiguous 27 | for(int r = 0; r < data.size(); r++) { | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_...
s725007851
p00087
C++
#include<iostream> #include<cstdlib> #include<stack> #include<string> #include<cctype> #include<sstream> using namespace std; int main(){ string str; while(getline(cin,s)){ stack<double>S; stringstream ss ss<<s; while(ss>>s){ if(isdigit(str[0])){ doubl...
a.cc: In function 'int main()': a.cc:10:23: error: 's' was not declared in this scope 10 | while(getline(cin,s)){ | ^ a.cc:13:9: error: expected initializer before 'ss' 13 | ss<<s; | ^~ a.cc:14:15: error: 'ss' was not declared in this scope 14 | whi...
s457631906
p00087
C++
#include <iostream> #include <cstdio> #include <stack> #include <string> #include <cstdlib> using namespace std; #define rep2(x,from,to) for(int x=(from);x<(to);++(x)) #define rep(x,to) rep2(x,0,to) int main() { char str[80+4]; while(gets(str) != NULL) { stack<double> s; string t; int len = strlen(str); rep(i...
a.cc: In function 'int main()': a.cc:11:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | while(gets(str) != NULL) { | ^~~~ | getw a.cc:14:27: error: 'strlen' was not declared in this scope 14 | int len = strlen(str); ...
s063334093
p00087
C++
#include <iostream> #include <cstdio> #include <stack> #include <string> #include <cstdlib> using namespace std; #define rep2(x,from,to) for(int x=(from);x<(to);++(x)) #define rep(x,to) rep2(x,0,to) int main() { char str[80+4]; while(gets(str) != NULL) { stack<double> s; string t; int len = strlen(str); if(le...
a.cc: In function 'int main()': a.cc:11:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | while(gets(str) != NULL) { | ^~~~ | getw a.cc:14:27: error: 'strlen' was not declared in this scope 14 | int len = strlen(str); ...
s031186272
p00087
C++
#include <iostream> #include <cstdio> #include <stack> #include <string> #include <cstring> #include <sstream> #include <cstdlib> using namespace std; #define rep2(x,from,to) for(int x=(from);x<(to);++(x)) #define rep(x,to) rep2(x,0,to) int main() { string str; while(getline(cin, str)) { stack<double> s; stringst...
a.cc: In function 'int main()': a.cc:18:29: error: no match for 'operator[]' (operand types are 'std::stack<double>' and 'int') 18 | if(s[0] >= '0' && s[0] <= '9' || s.size() > 1) { | ^ a.cc:18:44: error: no match for 'operator[]' (operand types are 'std::sta...
s233212451
p00087
C++
//Strange Mathematical Expression #include<bits/stdc++.h> using namespace std; stack<double> st; double stoi(string s){ double ret=0; bool flag=true; int n; for(int i=0; i<s.length(); i++) if(s[i]=='.'){flag=false; n=i; while(true); continue;} if(flag){ret=ret*10+(s[i]-'0');} else{ret+=(s[i]-'0')*...
a.cc: In function 'double stoi(std::string)': a.cc:13:28: error: 'i' was not declared in this scope 13 | if(flag){ret=ret*10+(s[i]-'0');} | ^ a.cc:14:18: error: 'i' was not declared in this scope 14 | else{ret+=(s[i]-'0')*pow(10.0, -(n-i));} | ^ a.cc...
s634857931
p00087
C++
10 2 12 - / 3 4 - 7 2 3 * + * 1 5 + 2 3 + * 2 3 / 6 0 /
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 2 12 - / | ^~
s368271128
p00087
C++
while s=gets a=s.chomp.split ' ' ls = [] for i in 0...a.length c = a[i] if c=="+" || c=="-" || c=="*" || c=="/" x=ls.pop y=ls.pop if c=="+" ls.push y+x elsif c=="-" ls.push y-x elsif c=="*" ls.push y*x elsif c=="/" ls.push y/x end ...
a.cc:4:12: error: too many decimal points in number 4 | for i in 0...a.length | ^~~~~~~~~~~~ a.cc:1:1: error: expected unqualified-id before 'while' 1 | while s=gets | ^~~~~
s329425014
p00087
C++
#include<bits/stdc++.h> using namespace std; int main() { string str; while(getline(cin,str)){ stack<double> st; for(int i=0,point=0;;i++){ if(str[i]==' '||str[i]=='\0'){ int num[2]={}; if(i-point==1){ if(str[point]-'0'>9||str[point...
a.cc: In function 'int main()': a.cc:28:68: error: expected ';' before 'if' 28 | else st.push(-1*((str[i-2]-'0')*10+(str[i-1]-'0'))) | ^ | ; 29 | ...
s712625798
p00087
C++
define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> using namespace std; typedef long long ll; queue<string> split(string delim,str...
a.cc:1:1: error: 'define' does not name a type 1 | define _USE_MATH_DEFINES | ^~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, ...
s864379365
p00087
C++
define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> using namespace std; typedef long long ll; queue<string> split(string delim,str...
a.cc:1:1: error: 'define' does not name a type 1 | define _USE_MATH_DEFINES | ^~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, ...
s858182986
p00087
C++
#include<iostream> #include<sstream> #include<algorithm> #include<climits> #include<cmath> #include<cstdio> #include<cstdlib> #include<ctime> #include<cfloat> #include<functional> #include<map> #include<string> #include<cstring> #include<vector> #include<queue> #include<stack> #include<deque> #include<set> #include<bit...
a.cc: In function 'int main()': a.cc:70:24: error: no match for 'operator==' (operand types are 'std::basic_istream<char>' and 'int') 70 | if(getline(cin, s) == EOF)break; | ~~~~~~~~~~~~~~~ ^~ | | | std::basic_istream<char> a.cc:70:24: note: candidate: 'operat...
s444715974
p00087
C++
#include <iostream> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <iomanip> using namespace std; double S[1000]; int f=0; void push(double num){ S[f]=num; f++; } double pop(){ f--; double a=S[f]; return a; } int main(){ double num1,num2; char a[100],str[100]; while(gets(a)!=EOF){...
a.cc: In function 'int main()': a.cc:25:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 25 | while(gets(a)!=EOF){ | ^~~~ | getw
s493227577
p00087
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; double a, b; string str; vector<double> st; while (cin >> str) { if (str == "+") { b = st.back(); st.pop_back(); a = st.back(); st.pop_back(); st.push_back(a + b); } else if (str == "-") { b = st.back(); st.pop_back(); a = st.b...
a.cc: In function 'int main()': a.cc:35:50: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'void') 35 | cout << fixed << setprecision(6) << st.pop_back()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~ | ...
s687111069
p00087
C++
import sys def line():return sys.stdin.readline().strip() ops = {"+":lambda a,b:b + a, "-":lambda a,b:b - a, "*":lambda a,b:b * a, "/":lambda a,b:b / a} while True: try: stack = [] for s in line().split(): if s in ops: stack.append(ops[s](stack.pop(),stack...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: expected unqualified-id before 'while' 8 | while True: | ^~~~~
s473712643
p00087
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;i++) using namespace std; typedef long long ll; typedef pair<int, int>P; char s[100]; char buf[100]; int main() { while (gets_s(buf)) { stack<double>st; char*S = buf; while (S < buf + strlen(buf)) { sscanf(S, "%s", s); if (s[0] == '+') { double a...
a.cc: In function 'int main()': a.cc:10:16: error: 'gets_s' was not declared in this scope; did you mean 'getsid'? 10 | while (gets_s(buf)) { | ^~~~~~ | getsid
s828263936
p00087
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;i++) using namespace std; typedef long long ll; typedef pair<int, int>P; char s[100]; char buf[100]; int main() { while (gets(buf)) { stack<double>st; char*S = buf; while (S < buf + strlen(buf)) { sscanf(S, "%s", s); if (s[0] == '+') { double a =...
a.cc: In function 'int main()': a.cc:10:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | while (gets(buf)) { | ^~~~ | getw
s291555458
p00087
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;i++) using namespace std; typedef long long ll; typedef pair<int, int>P; char s[100]; char buf[100]; int main() { while (gets_s(buf)) { stack<double>st; char*S = buf; while (S < buf + strlen(buf)) { sscanf(S, "%s", s); if (s[0] == '+') { double a...
a.cc: In function 'int main()': a.cc:10:16: error: 'gets_s' was not declared in this scope; did you mean 'getsid'? 10 | while (gets_s(buf)) { | ^~~~~~ | getsid
s762976205
p00087
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<stack> #include<cstring> #include<string> #include<sstream> using namespace std; int main() { string s; while (getline(cin, s)) { if (cin.eof())break;//if(s=="")break; stack<double> st; stringstream ss(s); string tmp; while ...
a.cc: In function 'int main()': a.cc:34:46: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 34 | st.push(atof(tmp));//double?????????????????????????????\?????? | ^~~ | ...
s085314561
p00087
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> #include<queue> #include<deque> #include<functional> #include<utility> #includ...
a.cc: In function 'int main()': a.cc:47:24: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'int') 47 | while(getline(cin,s)!=EOF) | ~~~~~~~~~~~~~~^~ | | | std::basic_istream<char> a.cc:47:24: note: candidate: 'operator!...
s174648417
p00087
C++
#include <cstdlib> #include <iostream> #include <string> #include <typeinfo> #include <stdio.h> #include <string.h>#include <stack> #include <sstream> using namespace std; void q87() { string inputs; for (; getline(cin,inputs);) { istringstream ss(inputs); stack<double> stk; string input; for (; getline(ss, ...
a.cc:6:20: warning: extra tokens at end of #include directive 6 | #include <string.h>#include <stack> | ^ a.cc: In function 'void q87()': a.cc:14:17: error: 'stack' was not declared in this scope 14 | stack<double> stk; | ^~~~~ a.cc:8:1: note: 'std::...
s976633896
p00087
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ string s; while(getline(cin,s)){ s+=' '; stack<double>st; double p=0; int t=0; r(i,s.size()){ if(s[i]==' '&&isdigit(s[i-1])){ if(p!=0){ if(!t)st.push(p),p=0; else st.pus...
a.cc: In function 'int main()': a.cc:34:32: error: expected primary-expression before ';' token 34 | if(isdigit(s[i+1]))t=++; | ^ a.cc: At global scope: a.cc:48:1: error: expected declaration before '}' token 48 | } | ^
s253750502
p00087
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ string s; while(getline(cin,s)){ s+=' '; stack<double>st; double p=0; int t=0; r(i,s.size()){ if(s[i]==' '&&isdigit(s[i-1])){ if(p!=0){ if(!t)st.push(p),p=0; else st.pus...
a.cc:48:1: error: expected declaration before '}' token 48 | } | ^
s197929997
p00087
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<cassert> #include<iostream> #include<sstream> #include<string> #include<vector> #include<queue> #include<set> #include<map> #include<utility> #include<numeric> #include<algorithm> #include<bitset> #include<complex> #include<stack> using name...
a.cc: In function 'int main()': a.cc:36:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 36 | while(gets(s)){ | ^~~~ | getw
s965251560
p00087
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<cassert> #include<iostream> #include<sstream> #include<string> #include<vector> #include<queue> #include<set> #include<map> #include<utility> #include<numeric> #include<algorithm> #include<bitset> #include<complex> using namespace std; type...
a.cc: In function 'int main()': a.cc:35:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 35 | while(gets(s)){ | ^~~~ | getw
s985805584
p00087
C++
#include <cstdio> #include <stdlib.h> #include <stack> #include <iostream> using namespace std; int main(int argc, char const* argv[]) { char str[81]; stack<double> data; double a,b; while( 1 ){ gets( str ); char *t; while( data.empty() == false ) data.pop(); t = strtok( str, " " ); if( t[0] < '0' ||...
a.cc: In function 'int main(int, const char**)': a.cc:15:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 15 | gets( str ); | ^~~~ | getw a.cc:20:21: error: 'strtok' was not declared in this scope; did you mean 'strtoq'? 20 | ...
s987955846
p00087
C++
#include <cstdio> #include <stdlib.h> #include <stack> #include <iostream> #include <string.h> using namespace std; int main(int argc, char const* argv[]) { char str[81]; stack<double> data; double a,b; while( 1 ){ gets( str ); char *t; while( data.empty() == false ) data.pop(); t = strtok( str, " " );...
a.cc: In function 'int main(int, const char**)': a.cc:16:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 16 | gets( str ); | ^~~~ | getw
s559027785
p00087
C++
#include<iostream> #include<cstdio> #include<cmath> #include<stack> using namespace std; bool digit(char c){ return (c>='0') && (c<='9'); } double stoi(string s){ double k = 1.0,res = 0.0; for(int i = (int)s.size()-1;i>=0;i--){ res += (s[i]-'0') * k; k *= 10; } return res; } double cal(double x, do...
a.cc: In function 'int main()': a.cc:44:20: error: call of overloaded 'stoi(std::string&)' is ambiguous 44 | a.push(stoi(tmp)); | ~~~~^~~~~ a.cc:11:8: note: candidate: 'double stoi(std::string)' 11 | double stoi(string s){ | ^~~~ In file included from /usr/include/c++/14/...
s357566072
p00087
C++
#include <iostream> #include <stack> #include <cstdio> #include <cstdlib> using namespace std; int main() { stack<double> s; double a, b; char c[80]; while (cin >> c) { if (c == EOF) return 0; if (c[0] == '+') { b = s.top(), s.pop(); a = s.top(), s.pop(); s.push(a + b); } else if (c[0] == '-') ...
a.cc: In function 'int main()': a.cc:13:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (c == EOF) return 0; | ^
s061438277
p00087
C++
#include <iostream> #include <stack> #include <cstdio> #include <cstdlib> int main() { stack<double> s; double a, b; char c[80], bf; while (std::cin >> c) { if (c[0] == '+') { b = s.top(), s.pop(); a = s.top(), s.pop(); s.push(a+b); } else if (c[0] == '-' && c[1] == 0) { b = s.top(), s.pop();...
a.cc: In function 'int main()': a.cc:7:9: error: 'stack' was not declared in this scope; did you mean 'std::stack'? 7 | stack<double> s; | ^~~~~ | std::stack In file included from /usr/include/c++/14/stack:63, from a.cc:2: /usr/include/c++/14/bits/stl_stack.h:99:...
s789724230
p00087
C++
#include <iostream> #include <stack> #include <cstdio> #include <cstring> using namespace std; int main(){ char in[100] = {}; while(cin.getline(in,99)&&in[0]){ stack<double> s; for(int i = 0; i < 100; i++){ while(c[i] == '.'); } char* c = in; do{ if('0' <= *c && *c <= '9'){ int a = 0; while('...
a.cc: In function 'int main()': a.cc:12:31: error: 'c' was not declared in this scope 12 | while(c[i] == '.'); | ^
s958557812
p00087
C++
#include <stdio.h> #include <string.h> double RB[1005];double ans;int last;char T[99]; void divid() {int i,j=strlen(T);double k=0;T[j]='=';last=0;for (i=0;i<=j;i++) {if (T[i]>='0' && T[i]<='9') k=k*10+(T[i]-'0'); else {if (k) {RB[last++]=k,k=0;continue;} if (T[i]=='-') last--,RB[last-1]-=RB[last]; else if (T[i]=='+') l...
a.cc: In function 'int main()': a.cc:5:20: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | int main() {while (gets(T)!=NULL) {last=0;ans=0.000000;divid();printf("%.6lf\n",ans);} return 0;} | ^~~~ | getw
s147870152
p00087
C++
#include <iostream> #include <vector> #include <string> #include <stack> #include <queue> #include <deque> #include <set> #include <map> #include <algorithm> // require sort next_permutation count __gcd reverse etc. #include <cstdlib> // require abs exit atof atoi #include <cstdio> // require scanf printf #include <f...
a.cc: In function 'double Reverse_Polish_Natation(std::string)': a.cc:48:39: error: call of overloaded 'stod(std::string&)' is ambiguous 48 | st.push (stod (s ) ); | ~~~~~^~~~ a.cc:32:8: note: candidate: 'double stod(std::string)' 32 | double stod (st...
s103877847
p00087
C++
#include<iostream> #include<stack> #include<string> #include<cstdio> using namespace std; int main(){ string s; double x,y; while(getline(cin,s)){ double k = 0; bool p = false; stack < double > a for(int i=0;i<s.size();i++){ if(s[i] == '+' || s[i] == '-' || s[i] == '*' || s[i] == '/'){ ...
a.cc: In function 'int main()': a.cc:17:7: error: expected initializer before 'for' 17 | for(int i=0;i<s.size();i++){ | ^~~ a.cc:17:19: error: 'i' was not declared in this scope 17 | for(int i=0;i<s.size();i++){ | ^ a.cc:46:21: error: 'a' was not declared in this sc...
s210281033
p00087
C++
include <iostream> #include <stack> #include <string> #include <sstream> #include <cstdio> int main() { std::string s; while(std::getline(std::cin,s)){ std::stack<double> stack; std::stringstream ss(s); while(ss >> s){ if('0' <= s[0] && s[0] <= '9'){ stack.push(std::stoi(s)); } else { auto x1 = s...
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/deque:62, from /usr/include/c++/14/stack:62, from a.cc:2: /usr/include/c++/14/ext/type_...
s750069743
p00087
C++
include <iostream> #include <stack> #include <string> #include <sstream> #include <cstdio> int main() { std::string temp,s; while(std::getline(std::cin,temp)){ std::stack<double> stack; std::stringstream ss(temp); while(ss >> s){ if('0' <= s[0] && s[0] <= '9'){ stack.push(std::stoi(s)); } else { ...
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/deque:62, from /usr/include/c++/14/stack:62, from a.cc:2: /usr/include/c++/14/ext/type_...
s768116542
p00087
C++
#include<iostream> #include<cstdio> #include<cstdlib> using namespace std; int main(){ long i,j,k; string s; double a[80]; for(;;){ getline(cin,s); if(s=="")break; i=j=0; for(;;){ while(s[j]==' ')j++; if(s[j]==0)break; else if(s[j]=='+'){i--;a[i]+=a[i+1];j++;} else if(s[j]=='-'&&(s[j+1]==' '||s[j+1]==0){i--;a[i]-=a[i+1...
a.cc: In function 'int main()': a.cc:17:44: error: expected ')' before '{' token 17 | else if(s[j]=='-'&&(s[j+1]==' '||s[j+1]==0){i--;a[i]-=a[i+1];j++;} | ~ ^ | ) a.cc:25:1: error: expected primary-expression before '}' t...
s440966444
p00087
C++
#include<stdio.h> #include<stdlib.h> double ds[100]; int dsp=sizeof(ds)/sizeof(ds[0]); void dpush(double v) { if(dsp>0) ds[--dsp]=v; } double dpop(void) { return (dsp<sizeof(ds)/sizeof(ds[0])?ds[dsp++]:0.0); } double RPN( const char * f ) { double v; for(;*f;f++) { swi...
a.cc: In function 'double RPN(const char*)': a.cc:20:35: error: 'i' was not declared in this scope 20 | for(;*f>='0'&&*f<='9';i++); | ^ a.cc:21:13: error: 'i' was not declared in this scope 21 | i--; | ^ a.cc:24:9: error: 'i' was no...
s488969134
p00087
C++
#include<iostream> #include<stack> #include<algorithm> #include<string> #include<cstdio> using namespace std; int main(){ stack<double> st; double a, b; char s[105]; char w; while(~scanf("%s%c", s, &w)){ switch(s[0]){ case '+': a = st.top();st.pop(); b = st.top();st.pop(); st.push(b...
a.cc: In function 'int main()': a.cc:36:4: error: expected ';' before 'sscanf' 36 | a=0 | ^ | ; 37 | sscanf(s, "%lf", &a); | ~~~~~~
s051827022
p00088
Java
import java.util.*; import java.io.*; import static java.lang.Math.*; class Main { public static void main( final String[] args ) { final char[] inFromLst = { ' ', '\'', ',', '-', '.', '?', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y...
Main.java:27: error: cannot find symbol while ( stdin.hasNextLine() ) { ^ symbol: variable stdin location: class Main 1 error
s719998106
p00088
C
#include<stdio.h> #include<string.h> #define SIGN_LENGTH 9 #define CIPHER_NUM 32 #define CODE_MAX 801 #define NUL 0x00 #define INITIALIZE 0 #define TEXT_MAX 100 #define FIVE 5 typedef struct cipher { char charcter_change_sign[SIGN_LENGTH]; char sign_change_charcter[SIGN_LENGTH]; char charcter; }CIPHER; int main(v...
main.c: In function 'main': main.c:61:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 61 | while(gets(input_text) != NULL) | ^~~~ | fgets main.c:61:32: warning: comparison between pointer and integer 61 | ...
s655542251
p00088
C
#include<stdio.h> #include<string.h> #define SIGN_LENGTH 9 #define CIPHER_NUM 32 #define CODE_MAX 801 #define NUL 0x00 #define INITIALIZE 0 #define TEXT_MAX 100 #define FIVE 5 typedef struct cipher { char charcter_change_sign[SIGN_LENGTH]; char sign_change_charcter[SIGN_LENGTH]; char charcter; }CIPHER; int main(v...
main.c: In function 'main': main.c:61:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 61 | while(gets(input_text) != NULL) | ^~~~ | fgets main.c:61:32: warning: comparison between pointer and integer 61 | ...
s931379867
p00088
C
#include<stdio.h> #include<string.h> #define SIGN_LENGTH 9 #define CIPHER_NUM 32 #define CODE_MAX 801 #define NUL 0x00 #define INITIALIZE 0 #define TEXT_MAX 101 #define FIVE 5 typedef struct cipher { char charcter_change_sign[SIGN_LENGTH]; char sign_change_charcter[SIGN_LENGTH]; char charcter; }CIPHER; int main(v...
main.c: In function 'main': main.c:73:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 73 | while(gets(input_text) != NULL) | ^~~~ | fgets main.c:73:32: warning: comparison between pointer and integer 73 | ...
s177346324
p00088
C
#include<stdio.h> #include<string.h> #define SIGN_LENGTH 9 #define CIPHER_NUM 32 #define CODE_MAX 801 #define NUL 0x00 #define INITIALIZE 0 #define TEXT_MAX 101 #define FIVE 5 typedef struct cipher { char charcter_change_sign[SIGN_LENGTH]; char sign_change_charcter[SIGN_LENGTH]; char charcter; }CIPHER; int main(v...
main.c: In function 'main': main.c:60:13: error: 'i' undeclared (first use in this function) 60 | for(i = 0; i < TEXT_MAX; i++) | ^ main.c:60:13: note: each undeclared identifier is reported only once for each function it appears in main.c:65:15: error: implicit declaration of function 'get...
s176346427
p00088
C
char*C="ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?",*strchr();L[]={6,8,4,4,3,5,8,6,4,8,4,5,8,8,5,3,8,4,5,5,8,8,6,8,8,8,3,6,6,8,6,6};B[]={0x25,0x9a,0x05,0x01,0x06,0x09,0x9b,0x10,0x07,0x98,0x06,0x04,0x99,0x9e,0x05,0x07,0x9f,0x08,0x06,0x07,0x9c,0x9d,0x02,0x92,0x93,0x90,0x05,0x11,0x03,0x91,0x00,0x01};b,l;main(c){for(;c=getchar(),c+1...
main.c:1:53: warning: data definition has no type or storage class 1 | char*C="ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?",*strchr();L[]={6,8,4,4,3,5,8,6,4,8,4,5,8,8,5,3,8,4,5,5,8,8,6,8,8,8,3,6,6,8,6,6};B[]={0x25,0x9a,0x05,0x01,0x06,0x09,0x9b,0x10,0x07,0x98,0x06,0x04,0x99,0x9e,0x05,0x07,0x9f,0x08,0x06,0x07,0x9c,0x9d,0x02,0x9...
s400699646
p00088
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> int main() { int c[99],m[32]={6,8,4,4,3,5,8,6,4,8,4,5,8,8,5,3,8,4,5,5,8,8,6,8,8,8,3,6,6,8,6,6},d[32]={37,154,5,1,6,9,155,16,7,152,6,4,153,158,5,7,159,8,6,7,156,157,2,146,147,144,5,0,3,145,17,1}, buffer=0,t,p=0,i,w[32]={65,66,67,68,69,70,71,72,7...
main.c:4:9: fatal error: conio.h: No such file or directory 4 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s037928266
p00088
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int c[99],m[32]={6,8,4,4,3,5,8,6,4,8,4,5,8,8,5,3,8,4,5,5,8,8,6,8,8,8,3,6,6,8,6,6},d[32]={37,154,5,1,6,9,155,16,7,152,6,4,153,158,5,7,159,8,6,7,156,157,2,146,147,144,5,0,3,145,17,1}, buffer=0,t,p=0,i,w[32]={65,66,67,68,69,70,71,72,73,74,75,76,77,78,7...
main.c: In function 'main': main.c:12:17: error: implicit declaration of function 'fgetchar'; did you mean 'getchar'? [-Wimplicit-function-declaration] 12 | while(t=fgetchar()) | ^~~~~~~~ | getchar
s074564610
p00088
C
#include <stdio.h> #include <string.h> int main(void) { int i,j; char *a = " ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char *b[] = { "101","000000","000011","10010001","010001","000001","100101", "10011010","0101","0001","110","01001","10011011","010000","0111", "10011000","0110","00100","10011001","10011110"...
main.c: In function 'main': main.c:19:10: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 19 | if(!*gets(d)) break; | ^~~~ | fgets main.c:19:9: error: invalid type argument of unary '*' (have 'int') 19 | if(!*gets(d)) br...
s009569380
p00088
C
#include <stdio.h> #include <string.h> main() { int i,j,k; char *a = " ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char *b[] = { "101","000000","000011","10010001","010001","000001","100101", "10011010","0101","0001","110","01001","10011011","010000","0111", "10011000","0110","00100","10011001","10011110","0010...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:19:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 19 | gets(e); | ^~~~ | fgets main.c:20:21: error: brea...
s596588660
p00088
C
#include <stdio.h> #include <string.h> main() { int i,j,k; char *a = " ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char *b[] = { "101","000000","000011","10010001","010001","000001","100101", "10011010","0101","0001","110","01001","10011011","010000","0111", "10011000","0110","00100","10011001","10011110","0010...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:19:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 19 | gets(e); | ^~~~ | fgets main.c:20:21: error: brea...
s961014358
p00088
C
#include <stdio.h> main() { int i,j,k; unsigned char *a = "\n ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ"; unsigned char *b[] = { "101","101","000000","000011","10010001","010001","000001","100101", "10011010","0101","0001","110","01001","10011011","010000","0111", "10011000","0110","00100","10011001","10011110"...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function 'main': main.c:35:4: error: expected expression before '/' token 35 | */ | ^
s859961534
p00088
C
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> #include <string> #include <string.h> #include <queue> #include <cmath> #include <stack> #include <map> #define int64 long long int using namespace std; string encode(string, char); void decode(string); int main() { int c; string str; while(...
main.c:3:10: fatal error: iostream: No such file or directory 3 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s069259416
p00088
C++
/* 0088:The Code A Doctor Loved */ #include <iostream> #include <string> using namespace std; const string convertList[2][32] = { { "100101", "10011010", "0101", "0001", "110", "01001", "10011011", "010000", "0111", "10011000", "0110", "00100", "10011001", "10011110", "001...
a.cc:25:27: error: initializer-string for 'const char [32]' is too long [-fpermissive] 25 | const char charList[32] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s801918507
p00088
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; class Program { void Calc() { var dic = new Dictionary<char, string> { {' ', "101"}, {'\'', "000000"}, {',', "000011"}, {'-', "10010001"}, {'.', "010001"}, {'?', "000001"}, {'A', "100101"}, {'B', "10011010"}, ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s742397245
p00088
C++
#include<iostream> #include<string> #include<map> using namespace std; map<string, string> wtoi; map<string, string> itow; void make_dictonary1() { wtoi[" "] = "101"; wtoi["'"] = "000000"; wtoi[","] = "000011"; wtoi["-"] = "10010001"; wtoi["."] = "010001"; wtoi["?"] = "000001"; wtoi["A"] = "100101"; wtoi["B"] = "10...
a.cc: In function 'int main()': a.cc:43:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 43 | gets(buf); | ^~~~ | getw a.cc:44:18: error: 'strlen' was not declared in this scope 44 | buflen = strlen(buf); | ^~~~~~ a.cc:4:1: no...
s695633590
p00088
C++
#include <iostream> #include <cstring> using namespace std; int main() { char code[32][15] = { "101","000000","000011","10010001","010001","000001","100101","10011010", "0101","0001","110","01001","10011011","010000","0111","10011000", "0110","00100","10011001","10011110","00101","111","10011111","1000", "001...
a.cc: In function 'int main()': a.cc:21:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 21 | while (gets(str) != NULL) { | ^~~~ | getw
s992980637
p00088
C++
mp = {} mp[" "] = "101" mp["'"] = "000000" mp[","] = "000011" mp["-"] = "10010001" mp["."] = "010001" mp["?"] = "000001" mp["A"] = "100101" mp["B"] = "10011010" mp["C"] = "0101" mp["D"] = "0001" mp["E"]="110" mp["F"]="01001" mp["G"]="10011011" mp["H"]="010000" mp["I"]="0111" mp["J"]="10011000" mp["K"]="0110" mp["L"]="0...
a.cc:40:12: error: too many decimal points in number 40 | for i in 0...s.length | ^~~~~~~~~~~~ a.cc:47:12: error: too many decimal points in number 47 | for i in 0...(n/5) | ^~~~ a.cc:50:14: error: too many decimal points in number 50 | for j in 0...5 | ...
s800469886
p00088
C++
#include<stdio.h> #include<string.h> #define SIGN_LENGTH 8 #define CIPHER_NUM 32 #define NUL 0x00 typedef struct cipher { char charcter_change_sign[SIGN_LENGTH]; char sign_change_charcter[SIGN_LENGTH]; char charcter; }CIPHER; #define TEXT_MAX 100 int main(void) { short i = 0; short j = 0; short text_length =...
a.cc: In function 'int main()': a.cc:26:18: error: initializer-string for 'char [8]' is too long [-fpermissive] 26 | {"10011010","00001",'B'}, | ^~~~~~~~~~ a.cc:31:18: error: initializer-string for 'char [8]' is too long [-fpermissive] 31 | {"10011011","00110...
s620718638
p00088
C++
import Debug.Trace charToCode :: Char -> String charToCode c = case c of ' ' ->"101" '\''->"000000" ',' ->"000011" '-' ->"10010001" '.' ->"010001" '?' ->"000001" 'A' ->"100101" 'B' ->"10011010" 'C' ->"0101" 'D' ->"0001" 'E' ->"110" 'F' ->"01001" 'G' ->"10011011" ...
a.cc:74:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 74 | solve s = solve' code' | ^~~~~~~ a.cc:76:32: error: stray '`' in program 76 | mod5 = (length code) `mod` 5 | ^ a.cc:76:36: error: stray '`' in progr...