submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s767270239
p02263
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #define MAXOP 100 #define NUMBER '0' int getop(char []); void push(double); double pop(void); main() { int type; double op2; char s[MAXOP]; while((type = getop(s)) != EOF) { switch (type) { case NUMBER: push(atof(s)); break; case '+': push(...
main.c:12:1: error: return type defaults to 'int' [-Wimplicit-int] 12 | main() | ^~~~
s868056919
p02263
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #define MAXOP 100 #define NUMBER '0' int getop(char []); void push(double); double pop(void); main() { int type; double op2; char s[MAXOP]; while((type = getop(s)) != EOF) { switch (type) { case NUMBER: push(atof(s)); break; case '+': push(...
main.c:12:1: error: return type defaults to 'int' [-Wimplicit-int] 12 | main() | ^~~~
s420776296
p02263
C
{ int a, b, n; // 終端まで繰り返す while (*s) { // 数値なら取り出してスタックに積む if (is_digit(s)) { n = get_number(s); push(n); while (*s == '-' || *s == '+') { s++; } while (n) { n /= 10; s++; } // オペランドなら2項を計算する } else { switch (*s) { case ...
main.c:1:1: error: expected identifier or '(' before '{' token 1 | { | ^ main.c: In function 'main': main.c:57:10: error: 'MAX_LEN' undeclared (first use in this function) 57 | char s[MAX_LEN]; | ^~~~~~~ main.c:57:10: note: each undeclared identifier is reported only once for each function...
s893982831
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 1000 int S[MAX]; int top=0; void initialize(){ top = 0; } int isEmpty(){ if(top==0)return 0; return -1; } int isFull(){ if(top>=MAX)return 0; return -1; } void push(int x){ if(isFull()==0){ fprintf(stderr,"Push ERROR\n"); ...
main.c: In function 'push': main.c:28:15: error: '_' undeclared (first use in this function) 28 | S[top] = x;_ | ^ main.c:28:15: note: each undeclared identifier is reported only once for each function it appears in main.c:28:16: error: expected ';' before '}' token 28 | S[top] = x;_ ...
s210719372
p02263
C
include<stdio.h> void stack(char); int calc(char,int []); int cnt=0; int cnt2; int st[3]={0,0,0}; int main(){ char t; int value; while((t=getchar())!='\n'){ if(t!=' ')stack(t); } printf("%d\n",st[0]); return 0; } void stack(char l){ if(l<='9'&&l>='1'){ if(cnt==0){ st[0]=l-'0'; cnt=1; ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c: In function 'main': main.c:10:12: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration] 10 | while((t=getchar())!='\n'){ | ^~~~~~~ ma...
s987049414
p02263
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
s261917282
p02263
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
s763766829
p02263
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
s051002918
p02263
C
#include <stdio.h> #include <stdlib.h> #define MAX 100 void push(int); int pop(void); int change(char c); int p = 0; int stack[MAX + 1]; int main(){ int data1, data2; char c; while(1) { c = getchar(); if(c == '\n'){ printf(" %d\n",pop()); break; } else if('0' <= c && c <= '9'){ ...
main.c: In function 'main': main.c:26:16: error: implicit declaration of function 'dtoi'; did you mean 'atoi'? [-Wimplicit-function-declaration] 26 | push(dtoi(c)); | ^~~~ | atoi
s097832851
p02263
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
s993402914
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x){ S[++top] = x; } int pop(){ top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while( scanf("%s", s )!= EOF ){ if ( s[0] == '+' ){ a = pop(); b = pop(); push(a + b); }else if ( s[0] == ...
main.c: In function 'main': main.c:35:17: error: expected expression before '}' token 35 | } | ^ main.c:34:25: error: void value not ignored as it ought to be 34 | push(atoi(s))+ | ^~~~~~~~~~~~~
s079229184
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top,S[1000]; void push(int x){ S[++top]=x; } int main(){ int a,b; top=0; char s=[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ a=pop(); b=pop(); push(a+b); }else if(s[0]=='-'){ b=pop(); a=pop(); push(a-b); }else if(s[0]=='*'){...
main.c: In function 'main': main.c:14:16: error: expected expression before '[' token 14 | char s=[100]; | ^ main.c:16:21: error: subscripted value is neither array nor pointer nor vector 16 | if(s[0]=='+'){ | ^ main.c:17:27: error: implicit d...
s768695381
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top,S[1000]; void push(int x){ S[++top]=x; } int main(){ int a,b; top=0; char s=[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ a=pop(); b=pop(); push(a+b); }else if(s[0]=='-'){ b=pop(); a=pop(); push(a-b); }else if(s[0]=='*'){...
main.c: In function 'main': main.c:14:16: error: expected expression before '[' token 14 | char s=[100]; | ^ main.c:16:21: error: subscripted value is neither array nor pointer nor vector 16 | if(s[0]=='+'){ | ^ main.c:17:27: error: implicit d...
s018074159
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top,S[1000]; void push(int x){ S[++top]=x; } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top=0; char s=[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ a=pop(); b=pop(); push(a+b); }else if(s[0]=='-'){ b=pop(); a=...
main.c: In function 'main': main.c:22:16: error: expected expression before '[' token 22 | char s=[100]; | ^ main.c:24:21: error: subscripted value is neither array nor pointer nor vector 24 | if(s[0]=='+'){ | ^ main.c:28:27: error: subscripte...
s532244772
p02263
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
s351568357
p02263
C
void initialize(void); int isEmpty(void); int isFull(void); void push(int); int pop(void); int top; int S[MAX]; int main(){ int x,i,j; char s[100]; initialize(); while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ i = pop(); j = pop(); push(i+j); } else if ( s[0] == '-' ){ i = p...
main.c:8:7: error: 'MAX' undeclared here (not in a function) 8 | int S[MAX]; | ^~~ main.c: In function 'main': main.c:13:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 13 | while( scanf("%s", s) != EOF ){ | ^~~~~ main.c:1:1: note: include '<stdi...
s832414720
p02263
C
#include<stdio.h> #include<stdlib.h> #define O 100 #define E 99 #define N 1000000 int main() { int i=0,j=0,cnt = 0,a[O]={0},A[O]={0}; char Data[O]; while(scanf("%s",Data) != EOF) { if((a[i] = atoi(Data)) == 0) { if(cnt == 1) { a[0] = A[j-2]; a[1] = A[j-1]; cnt = 0; ...
main.c: In function 'main': main.c:54:16: error: expected ')' before 'A' 54 | printf("%d\n"A[j-1]); | ~ ^ | )
s119941437
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x) { S[++top] = x; } int pop() { top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while(scanf("%s", s) != EOF ) { if (s[0] == '+') { a = pop(); b = pop(); push(a + b); } else if ( s[0]...
main.c: In function 'main': main.c:39:22: error: request for member 'pop' in something not a structure or union 39 | printf("%d\n". pop()); | ^
s797456224
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x) { S[++top] = x; } int pop() { top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while(scanf("%s", s) != EOF ) { if (s[0] == '+') { a = pop(); b = pop(); push(a + b); } else if ( s[0]...
main.c: In function 'main': main.c:39:22: error: request for member 'pop' in something not a structure or union 39 | printf("%d\n". pop()); | ^
s619551272
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top,S[1000]; void push(int x){ top++; S[top] = x; } int pop(){ top--; return S[top+1]; } int main(void){ int a,b; top = 0; char s[100]; while( scanf("%s",s) != EOF ){ if(s[0] == '+'){ a = pop(); b = pop(); push(a + b); }else if(s[0] == ...
main.c: In function 'main': main.c:34:30: error: implicit declaration of function 'stoi'; did you mean 'atoi'? [-Wimplicit-function-declaration] 34 | push(stoi(s)); | ^~~~ | atoi
s493453121
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x) { S[++top] = x; } int pop() { top--; rerturn S[top+1]; } int main() { int a, b; top = 0; char s[100]; while( scanf("%s", s) != EOF ) { if ( s[0] == '+7 ) { a = pop(); b = pop(); push(a + b); }else if ( s[0] == '-7 ) { b = p...
main.c: In function 'pop': main.c:14:1: error: unknown type name 'rerturn' 14 | rerturn S[top+1]; | ^~~~~~~ main.c: In function 'main': main.c:22:14: warning: missing terminating ' character 22 | if ( s[0] == '+7 ) { | ^ main.c:22:14: error: missing terminating ' character 22 | if ( s[...
s682682256
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x) { S[++top] = x; } int pop() { top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while( scanf("%s", s) != EOF ) { if ( s[0] == '+' ) { a = pop(); b = pop(); push(a + b); } else if ( s[...
main.c: In function 'main': main.c:35:30: error: implicit declaration of function 'atio'; did you mean 'atoi'? [-Wimplicit-function-declaration] 35 | push(atio(s)); | ^~~~ | atoi
s759732260
p02263
C
string.h> int top,S[1000]; int push(int x){ S[++top]=x; //notS[top++] sがゼロの時に処理してしまうから } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top = 0; char s[100]; while(scanf("%s",s)!=EOF){ if(s[0] == '+'){ a = pop(); b = pop(); push(a+b); } else if(s[0]=='-'){ b...
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | string.h> | ^ main.c: In function 'push': main.c:5:3: error: 'S' undeclared (first use in this function) 5 | S[++top]=x; | ^ main.c:5:3: note: each undeclared identifier is reported only once for each ...
s964576668
p02263
C
void push(int x){ S[++top] = x; } int pop(){ top--; return S[top+1]; } int main(){ int a, b; top = 0; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+'){ a = pop(); b = pop(); push(a + b); }else if( s[0] == '-'){ ...
main.c: In function 'push': main.c:2:5: error: 'S' undeclared (first use in this function) 2 | S[++top] = x; | ^ main.c:2:5: note: each undeclared identifier is reported only once for each function it appears in main.c:2:9: error: 'top' undeclared (first use in this function) 2 | S[++top] = x;...
s780424716
p02263
C
void push(int x){ S[++top] = x; } int pop(){ top--; return S[top+1]; } int main(){ int a, b; top = 0; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+'){ a = pop(); b = pop(); push(a + b); }else if( s[0] == '-'){ ...
main.c: In function 'push': main.c:2:5: error: 'S' undeclared (first use in this function) 2 | S[++top] = x; | ^ main.c:2:5: note: each undeclared identifier is reported only once for each function it appears in main.c:2:9: error: 'top' undeclared (first use in this function) 2 | S[++top] = x;...
s392865054
p02263
C
#include <stdio.h> #include <stdlib.h> /* a to i(atoi)…aをiに変換する*/ /*stdlibにあるのでそれを使う*/ #include <string.h> int top, S[ 1000 ]; void push( int x ){ top ++; /*top空だと0なので最初に1増やしておいてその増やした場所にxを入れる*/ /*1増やして処理する*/ S [ top ] = x; /* S[top++]はダメ*/ /*処理をしてから1増える*/ } int pop(){ top--; return S[top+1]; }...
main.c:56:17: error: expected declaration specifiers or '...' before string constant 56 | printf( "%d\n",pop()); | ^~~~~~ main.c:56:24: error: expected declaration specifiers or '...' before 'pop' 56 | printf( "%d\n",pop()); | ^~~ main.c:57:9: err...
s487931500
p02263
C
#include <stdio.h> #include <stdlib.h> #include <string.h> int top, S[1000]; void push(int x){ top ++; S[top] = x; } int pop(){ top--; return S[top+1]; } int main (void){ int a,b; top = 0; char s [ 100 ]; while ( scanf("%s",s) != EOF ) if( s[0] == '+' ){ a = pop(); b = pop(); push ( a + b ...
main.c:39:17: error: expected declaration specifiers or '...' before string constant 39 | printf( "%d\n",pop()); | ^~~~~~ main.c:39:24: error: expected declaration specifiers or '...' before 'pop' 39 | printf( "%d\n",pop()); | ^~~ main.c:40:9: err...
s533730891
p02263
C
#include<stdio.h> #include<stdlib.h> int pop(){ return N[--i]; } int main(){ int N[100]; char s[10]; int i; while(scanf("%s",s)!=EOF){ if(a[0]=='+')N[i++]=(pop()+pop()); else if(a[0]=='-'){ n1=pop(); n2=pop(); N[i++]=n2-n1; } else if(a[0]=='*')N[i++]=(pop()*pop());...
main.c: In function 'pop': main.c:5:10: error: 'N' undeclared (first use in this function) 5 | return N[--i]; | ^ main.c:5:10: note: each undeclared identifier is reported only once for each function it appears in main.c:5:14: error: 'i' undeclared (first use in this function) 5 | return N[--...
s578181543
p02263
C
#include <stdio.h> #include <stdlib.h> /* for atof() */ #include<ctype.h> #define NUMBER '0' int getop(char []); void push(double); double pop(void); double value[100]; int sp = 0; char buf[100]; int bufp = 0; int getch(void); void ungetch(int); main() { int type; double op2; char s[100]; while ((type ...
main.c:15:1: error: return type defaults to 'int' [-Wimplicit-int] 15 | main() | ^~~~ main.c:111:1: error: expected identifier or '(' before '{' token 111 | { | ^
s841004484
p02263
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
s098392536
p02263
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
s700337146
p02263
C
#include <stdio.h> int stack[10]; int size = 0; int pop() { return stack[--size]; } int push(int a) { stack[size++] = a; } int digit(char *s) { if (*s == '+' || *s =='-') { s++; if (*s >= '0' && *s <= '9') return 1; return 0; } if (*s >= '0' && *s <= '9') return 1; return 0; } int get_number(char *s) {...
main.c: In function 'main': main.c:91:23: error: implicit declaration of function 'calc' [-Wimplicit-function-declaration] 91 | printf("%d\n",calc(s)); | ^~~~
s772913109
p02263
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
s468068543
p02263
C
#include<stdio.h> #include<stdlib.h> struct node{ int key; struct node *prev, *next; }; typedef struct node Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil...
main.c:85:5: error: redefinition of 'main' 85 | int main(void){ | ^~~~ main.c:55:5: note: previous definition of 'main' with type 'int(void)' 55 | int main(void){ | ^~~~
s161328040
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top S[1000]; void push (int x){ S[++top]=x; } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top=0; char s[100]; while(scanf("%s",s)!=EOF){ if (s[0]=='+'){ a=pop(); b=pop(); push(a+b); } else ...
main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S' 5 | int top S[1000]; | ^ main.c: In function 'push': main.c:8:3: error: 'S' undeclared (first use in this function) 8 | S[++top]=x; | ^ main.c:8:3: note: each undeclared identifier is reported only once for ea...
s957112645
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top S[1000] void push (int x){ S[++top]=x; } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top=0; char s[100]; while(scanf("%s",s)!=EOF){ if (s[0]=='+'){ a=pop(); b=pop(); push(a+b); } else i...
main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S' 5 | int top S[1000] | ^ main.c: In function 'pop': main.c:12:3: error: 'top' undeclared (first use in this function); did you mean 'pop'? 12 | top--; | ^~~ | pop main.c:12:3: note: each undeclared ident...
s290695752
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push (int x){ S[++top]=x; } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top=0; char s[100]; while(scanf("%s",s)!=EOF){ if (s[0]=='+'){ a=pop(); b=pop(); push(a+b); } else...
main.c: In function 'main': main.c:32:17: error: expected ']' before ':' token 32 | else if (s[0:=='*'){ | ^ | ]
s435128141
p02263
C
#include<stdio.h> int main(){ int val1,val2,ans; char type; switch(type){ case +: ans=val1+val2; break; case -: ans=val1-val2; break; case *: ans=val1*val2; break; } return 0; }
main.c: In function 'main': main.c:6:9: error: expected expression before ':' token 6 | case +: | ^ main.c:9:9: error: expected expression before ':' token 9 | case -: | ^ main.c:12:9: error: expected expression before ':' token 12 | case *: | ^
s659112150
p02263
C
#define MAXVAL 100 int sp = 0; double val[MAXVAL]; /* push: fを値スタックにプッシュする*/ void push(double f) { if (sp < MAXVAL) val[sp++] = f; else printf("error: stack full, can't push %g\n", f); } /* pop: スタックをポップし,一番上の値を返す*/ double pop(void) { if (sp > 0) return val[--sp]; else { printf("error: stack empty\n"); ...
main.c: In function 'push': main.c:12:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 12 | printf("error: stack full, can't push %g\n", f); | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include...
s563248153
p02263
C
#define MAXVAL 100 int sp = 0; double val[MAXVAL]; /* push: fを値スタックにプッシュする*/ void push(double f) { if (sp < MAXVAL) val[sp++] = f; else printf("error: stack full, can't push %g\n", f); } /* pop: スタックをポップし,一番上の値を返す*/ double pop(void) { if (sp > 0) return val[--sp]; else { printf("error: stack empty\n"); ...
main.c: In function 'push': main.c:12:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 12 | printf("error: stack full, can't push %g\n", f); | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include...
s453540468
p02263
C
#include<stdio.h> #include<stdlib.h> int main(){ int i=0,b[10000]; char a[10000]; while( (scanf("%s",a)) != EOF){ if(a[0] > '0' && a[0] < '9'){ b[i] = atoi(a); i++; } else if(a[0] == '+'){ b[i-2] = b[i-2] + b[i-1]; i--; } else if(a[0] == '-'){ ...
main.c: In function 'main': main.c:46:1: error: expected declaration or statement at end of input 46 | } | ^
s711217816
p02263
C
#define MAXVAL 100 int sp = 0; double val[MAXVAL]; /* push: fを値スタックにプッシュする*/ void push(double f) { if (sp < MAXVAL) val[sp++] = f; else printf("error: stack full, can't push %g\n", f); } /* pop: スタックをポップし,一番上の値を返す*/ double pop(void) { if (sp > 0) return val[--sp]; else { printf("error: stack empty\n"); ...
main.c: In function 'push': main.c:12:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 12 | printf("error: stack full, can't push %g\n", f); | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include...
s587911958
p02263
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
s214278674
p02263
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
s555125020
p02263
C
import java.io.*; class PA { public static void main(String args[]) { try { int stack[]=new int[100]; int j=0; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String str = reader.readLine(); String[] processed = str.split(" ",0); //for(int i= 0 ; i <processed.l...
main.c:1:1: error: unknown type name 'import' 1 | import java.io.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.io.*; | ^ main.c:3:1: error: unknown type name 'class' 3 | class PA | ^~~~~ main.c:4:1: error: expec...
s898718806
p02263
C
#include<stdio.h> #include<stdlib.h> int main(){ int x,i=0; char s[100]; while(scanf("%s",s) != EOF ) if ( s[i] == '+' ){ s[0] = s[0] + s[1]; } else if ( s[0] == '-' ){ } else if ( s[0] == '*' ){ } else { x[i] = atoi(s); s++; i++; } } ...
main.c: In function 'main': main.c:18:8: error: subscripted value is neither array nor pointer nor vector 18 | x[i] = atoi(s); | ^ main.c:19:8: error: lvalue required as increment operand 19 | s++; | ^~ main.c: At top level: main.c:24:3: error: expected identifier or '(' befo...
s886802459
p02263
C
#include <stdlib.h> #include <string.h> int * Include_Number(char *); #define MAX 398 int main() { char stack[MAX]; int i,j=0; int number[100] = {}; int num; int len_number=0; char type[99]; int len_stack; int result=0; int res[100]={}; int s=0,t; //一行の入力 fgets(stack,MAX,stdin); //printf("%...
main.c: In function 'main': main.c:20:3: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration] 20 | fgets(stack,MAX,stdin); | ^~~~~ main.c:20:19: error: 'stdin' undeclared (first use in this function) 20 | fgets(stack,MAX,stdin); | ^~~~~ main.c:3:1: ...
s238985028
p02263
C
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; public class RoundRobinScheduling { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputSt...
main.c:1:1: error: unknown type name 'package' 1 | package aoj; | ^~~~~~~ main.c:3:1: error: unknown type name 'import' 3 | import java.io.BufferedReader; | ^~~~~~ main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 3 | import java.io.BufferedReader; | ...
s783692782
p02263
C
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; public class RoundRobinScheduling { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputSt...
main.c:1:1: error: unknown type name 'package' 1 | package aoj; | ^~~~~~~ main.c:3:1: error: unknown type name 'import' 3 | import java.io.BufferedReader; | ^~~~~~ main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 3 | import java.io.BufferedReader; | ...
s167877406
p02263
C
import java.util.*; import java.io.*; class Main{ public static void main(String[] args) throws IOException{ Scanner S=new Scanner(System.in); int i,n,m,t=0; Queue<String>P=new LinkedList<String>(); Queue<Integer>T=new LinkedList<Integer>(); n=S.nextInt(); m=S.nextInt(); for(i=0;i<n;i++){ P.add(S.next(...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.io.*; | ^~~~~~ main.c:2:...
s381531088
p02263
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
s321829678
p02263
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pop{ char name[100]; int s; } POP; POP Q[LEN]; int head,tail,n; void enq(POP x){ Q[tail] = x; tail = (tail + 1) % LEN; } POP deq(){ POP x = Q[head]; head = (head + 1) % LEN; return x; } int min(){ int laps =...
main.c: In function 'min': main.c:34:24: error: expected ')' before ';' token 34 | scanf("%d %d",&n,&q;); | ~ ^ | ) main.c:39:19: error: expected ')' before 'Q' 39 | scanf("%d"Q[i].s); | ~ ^ | )
s532553401
p02263
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pop{ char name[100]; int s; } POP; POP Q[LEN]; int head,tail,n; void enq(POP x){ Q[tail] = x; tail = (tail + 1) % LEN; } POP deq(){ POP x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a,int b){ ...
main.c: In function 'main': main.c:43:24: error: expected ')' before ';' token 43 | scanf("%d %d",&n,&q;); | ~ ^ | ) main.c:48:19: error: expected ')' before 'Q' 48 | scanf("%d"Q[i].s); | ~ ^ | )
s737694650
p02263
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pop{ char name[100]; int s; } POP; POP Q[LEN]; int head,tail,n; void enq(POP x){ Q[tail] = x; tail = (tail + 1) % LEN; } POP deq(){ POP x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a,int b){ ...
main.c: In function 'main': main.c:48:19: error: expected ')' before 'Q' 48 | scanf("%d"Q[i].s); | ~ ^ | )
s251728678
p02263
C
import java.util.*; import java.io.*; class Main{ public static void main(String[] args) throws IOException{ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int reg = scan.nextInt(); Queue<String> method = new LinkedList<String>(); Queue<Integer> time = new LinkedList<Integer>(); int i; int t...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.io.*; | ^~~~~~ main.c:2:...
s151155615
p02263
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
s361156021
p02263
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
s391522524
p02263
C
#define N '\0' #include <stdio.h> #include <stdlib.h> #include <math.h> int getop(char []); void push(double); double pop(void); int main() { char s[100]; int w; double op; while((w = getop(s)) != EOF && w < 100) { switch (w) { case '0': push(atof(s)); break; case '+': pu...
main.c: In function 'getop': main.c:92:13: error: 'c' undeclared (first use in this function) 92 | ungetch(c); | ^ main.c:92:13: note: each undeclared identifier is reported only once for each function it appears in
s071779610
p02263
C
#define N '\0' #include <stdio.h> #include <stdlib.h> #include <math.h> int getop(char []); void push(double); double pop(void); int main() { char s[100]; int w; double op; while((w = getop(s)) != EOF && w < 100) { switch (w) { case '0': push(atof(s)); break; case '+': pu...
main.c: In function 'getop': main.c:92:13: error: 'c' undeclared (first use in this function) 92 | ungetch(c); | ^ main.c:92:13: note: each undeclared identifier is reported only once for each function it appears in
s355001535
p02263
C
#define N '\0' #include <stdio.h> #include <stdlib.h> #include <math.h> int getop(char []); void push(double); double pop(void); int main() { char s[100]; int w; double op; while((w = getop(s)) != EOF && w < 100) { switch (w) { case '0': push(atof(s)); break; case '+': pu...
main.c: In function 'getop': main.c:92:13: error: 'c' undeclared (first use in this function) 92 | ungetch(c); | ^ main.c:92:13: note: each undeclared identifier is reported only once for each function it appears in
s082272642
p02263
C
#define N '\0' #include <stdio.h> #include <stdlib.h> #include <math.h> int getop(char []); void push(double); double pop(void); int main() { char s[100]; int w; double op; while((w = getop(s)) != EOF && w < 100) { switch (w) { case '0': push(atof(s)); break; case '+': pu...
main.c: In function 'getop': main.c:92:13: error: 'c' undeclared (first use in this function) 92 | ungetch(c); | ^ main.c:92:13: note: each undeclared identifier is reported only once for each function it appears in
s578315281
p02263
C
#include<stdio.h> #include<stdli.h> #include<string.h> #include<math.h> void push(int); int pup(); int atama; int A[199]; int main(int argc, char *argv[]){ int x,y; char a[100]; atama=0; while(scanf("%s",a)!=EOF){ if(a[0]=='+'){ x=pop(); y=pop(); push(x+y); } else if(a[0]=...
main.c:2:9: fatal error: stdli.h: No such file or directory 2 | #include<stdli.h> | ^~~~~~~~~ compilation terminated.
s232012055
p02263
C
#include<stdio.h> #include<stdli.h> #include<string.h> #include<math.h> void push(int); int pup(); int atama; int A[199]; int main(int argc, char *argv[]){ int x,y; char a[100]; atama=0; while(scanf("%s",a)!=EOF){ if(a[0]=='+'){ x=pop(); y=pop(); push(x+y); } else if(a[0]=...
main.c:2:9: fatal error: stdli.h: No such file or directory 2 | #include<stdli.h> | ^~~~~~~~~ compilation terminated.
s934427167
p02263
C
#include<stdio.h> #include<stdli.h> #include<string.h> #include<math.h> void push(int); int pup(); int atama; int A[199]; int main(int argc, char *argv[]){ int x,y; char a[100]; atama=0; while(scanf("%s",a)!=EOF){ if(a[0]=='+'){ x=pop(); y=pop(); push(x+y); } else if(a[0]=...
main.c:2:9: fatal error: stdli.h: No such file or directory 2 | #include<stdli.h> | ^~~~~~~~~ compilation terminated.
s985244839
p02263
C
#include<stdio.h> #include<stdlibh> #include<string.h> #include<math.h> void push(int); int pup(); int atama; int A[199]; int main(int argc, char *argv[]){ int x,y; char a[100]; atama=0; while(scanf("%s",a)!=EOF){ if(a[0]=='+'){ x=pop(); y=pop(); push(x+y); } else if(a[0]=...
main.c:2:9: fatal error: stdlibh: No such file or directory 2 | #include<stdlibh> | ^~~~~~~~~ compilation terminated.
s110523510
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> void push(int); int pup(); int atama; int A[199]; int main(int argc, char *argv[]){ int x,y; char a[100]; atama=0; while(scanf("%s",a)!=EOF){ if(a[0]=='+'){ x=pop(); y=pop(); push(x+y); } else if(a[0]...
main.c: In function 'main': main.c:20:9: error: implicit declaration of function 'pop'; did you mean 'pup'? [-Wimplicit-function-declaration] 20 | x=pop(); | ^~~ | pup main.c:35:17: error: 's' undeclared (first use in this function) 35 | push(atoi(s)); | ...
s092011407
p02263
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
s500254674
p02263
C
#include<stdio.h> #include<stdlib.h> int pop(); void push(int); int stack[2000]; int kazu=0; void push(int j){ stack[kazu++]=j; } int pop(){ if(kazu<=0) return 0; return stack[--kazu]; } int main(){ int i,j,k=0,l,n,Ans; char s[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ l=pop(); n=pop(...
main.c: In function 'main': main.c:45:3: error: expected declaration or statement at end of input 45 | return 0; | ^~~~~~
s960448972
p02263
C
#include<stdio.h> #include<stdlib.h> int pop(); void push(int); int stack[2000]; int kazu=0; void push(int j){ stack[kazu++]=j; } int pop(){ if(kazu<=0) return 0; return stack[--kazu]; } int main(){ int i,j,k=0,l,n,Ans; char s[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ l=pop(); n=pop(...
main.c: In function 'main': main.c:45:3: error: expected declaration or statement at end of input 45 | return 0; | ^~~~~~
s137245509
p02263
C
#include<stdio.h> #include<stdlib.h> int pop(); void push(int); int stack[2000]; int kazu=0; void push(int j){ stack[kazu++]=j; } int pop(){ if(kazu<=0) return 0; return stack[--kazu]; } int main(){ int i,j,k=0,l,n,Ans; char s[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ l=pop(); n=pop(...
main.c: In function 'main': main.c:45:3: error: expected declaration or statement at end of input 45 | return 0; | ^~~~~~
s714768930
p02263
C
import java.util.*; import java.io.*; class queue{ public static void main(String[] args) throws IOException{ Scanner s=new Scanner(System.in); int i,n,m,gt=0; Queue<String>q=new LinkedList<String>(); Queue<Integer>time=new LinkedList<Integer>(); n=s.nextInt(); m=s.nextInt(); for(i=0;i<n;i++){ q.add...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.io.*; | ^~~~~~ main.c:2:...
s512669210
p02263
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { char name[10]; int time; } process_t; typedef struct { int front, rear, queue_size; process_t *elements; } queue; void SetProcess(process_t *p, char *name, int time){ strcpy(p->name, name); p->time = time; return;...
main.c:47:1: error: expected identifier or '(' before 'return' 47 | return p; | ^~~~~~ main.c:48:1: error: expected identifier or '(' before '}' token 48 | } | ^
s201048411
p02263
C
#include <bits/stdc++.h> using namespace std; stack<int> s; char op[3333]; int main(){ gets(op); int len = strlen(op); int n = 0; for(int i = 0; i < len; i++){ if(op[i] >= '0' && op[i] <= '9'){ n = n*10 + (op[i]-'0'); } else if(op[i] == ' ' && op[i-1] >= '0' && op[i-1...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s409024804
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x) { S[++top] = x; } int pop() { top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while( scanf("%s", s) ! = EOF ) { if( s[0] == '+' ) { a = pop(); b = pop(); push(a + b); } else if ( s[0] ==...
main.c: In function 'main': main.c:19:30: error: expected ')' before '!' token 19 | while( scanf("%s", s) ! = EOF ) { | ~ ^~ | )
s016759709
p02263
C
#include<stdio.h> int main(void){ int i; char A[100]; for(i=0;;i++){ if(scanf("%c ",&A[i])==EOF)break; if(A[i]=='+'){ i=i-2; if(A[i]>48){ A[i]=A[i]-48; } if(A[i+1]>48){ A[i+1]=A[i+1]-48; } A[i]=A[i+1]+A[i]; } if(A[i]=='-'){ i=i-2; if(A[i]>4...
main.c: In function 'main': main.c:33:5: error: implicit declaration of function 'f' [-Wimplicit-function-declaration] 33 | f(A[i]=='*'){ | ^ main.c:33:17: error: expected ';' before '{' token 33 | f(A[i]=='*'){ | ^ | ;
s522396634
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> void push(int); int pop(void); int count=0; int stack[100]; int main(void){ int x; int a,b; int i; char s[100]; while( scanf("%s", s) != EOF ){ for(i=0;s[i]!='\0';i++){ if ( s[i] == '+' ){ a = pop(); b = pop(); push(b + a); ...
/usr/bin/ld: /tmp/ccZI02nI.o: in function `main': main.c:(.text+0x28): undefined reference to `pop' /usr/bin/ld: main.c:(.text+0x30): undefined reference to `pop' /usr/bin/ld: main.c:(.text+0x57): undefined reference to `pop' /usr/bin/ld: main.c:(.text+0x5f): undefined reference to `pop' /usr/bin/ld: main.c:(.text+0x84...
s200700104
p02263
C
#include <iostream> #include <stack> #include <string> #include <cstdlib> using namespace std; stack<int> s; int calc(string str){ int x = s.top(); s.pop(); int y = s.top(); s.pop(); switch(str[0]){ case '+': return x+y; case '-': return y-x; ca...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s310153513
p02263
C
if(sp > 0) return value[--sp]; else { printf("error. stuck empty.\n"); return 0; } } int main(){ int x; char s[100];
main.c:2:3: error: expected identifier or '(' before 'if' 2 | if(sp > 0) return value[--sp]; | ^~ main.c:3:3: error: expected identifier or '(' before 'else' 3 | else | ^~~~ main.c:8:1: error: expected identifier or '(' before '}' token 8 | } | ^ main.c: In function 'main': main.c:...
s084607457
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x[100],i=1; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ x[i-2]=x[i-2]+ x[i-1]; i=i-2; } else if ( s[0] == '-' ){ x[i-2]=x[i-2]- x[i-1]; i=i-2; } else if ( s[0] == '*' ){ x[i-2...
main.c: In function 'main': main.c:26:3: error: expected declaration or statement at end of input 26 | return 0; | ^~~~~~
s881871149
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ number[key-1] = number[key] + number[key-1]; } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[key-1]; } else if ( ...
main.c: In function 'main': main.c:12:17: error: 'number' undeclared (first use in this function) 12 | number[key-1] = number[key] + number[key-1]; | ^~~~~~ main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
s442604252
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ number[key-1] = number[key] + number[key-1]; key--; } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[ke...
main.c: In function 'main': main.c:12:17: error: 'number' undeclared (first use in this function) 12 | number[key-1] = number[key] + number[key-1]; | ^~~~~~ main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
s010091720
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ number[key-1] = number[key] + number[key-1]; key--; } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[ke...
main.c: In function 'main': main.c:12:17: error: 'number' undeclared (first use in this function) 12 | number[key-1] = number[key] + number[key-1]; | ^~~~~~ main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
s885927300
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[key-1]; key--; } else if ( s[0] == '*' ){ numbe...
main.c: In function 'main': main.c:14:17: error: 'number' undeclared (first use in this function) 14 | number[key-1] = number[key] - number[key-1]; | ^~~~~~ main.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
s061722750
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; printf("%s\n",number[0]); return 0; }
main.c: In function 'main': main.c:11:17: error: 'number' undeclared (first use in this function) 11 | printf("%s\n",number[0]); | ^~~~~~ main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
s994319073
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ number[key-1] = number[key] + number[key-1]; key--; } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[ke...
main.c: In function 'main': main.c:12:17: error: 'number' undeclared (first use in this function) 12 | number[key-1] = number[key] + number[key-1]; | ^~~~~~ main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
s606365379
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ number[key-1] = number[key] + number[key-1]; key--; } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[key-1]; key--; } else if ( ...
main.c: In function 'main': main.c:8:22: error: 's' undeclared (first use in this function) 8 | while( scanf("%s", s) != EOF ){ | ^ main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in main.c:10:17: error: 'number' undeclared (first use in ...
s487548687
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ number[key-1] = number[key] + number[key-1]; key--; } else if ( s[0] == '-' ){ number[key-1] = number[key] - number[ke...
main.c: In function 'main': main.c:12:17: error: 'number' undeclared (first use in this function) 12 | number[key-1] = number[key] + number[key-1]; | ^~~~~~ main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
s794860344
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x, key=0; int stack[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ stack[key-1] = stack[key] + stack[key-1]; key--; } else if ( s[0] == '-' ){ stack[key-1] = stack[key] - stack[key-1]; ...
main.c: In function 'main': main.c:26:7: error: 'number' undeclared (first use in this function) 26 | number[key] = x; | ^~~~~~ main.c:26:7: note: each undeclared identifier is reported only once for each function it appears in
s185489131
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 100 int main(){ int i=0,x[N],j=0; char a[N]; while (scanf("%s",a)!=EOF){ if ( a[i] == '+' ){ j--; x[j-1]=x[j-1]+x[j]; } else if ( a[i] == '-' ){ j--; x[j-1]=x[j-1]-x[j]; } else if ( a[i] == '*' ){ j--; x[j-1]=*x[j] } else { x[j] =...
main.c: In function 'main': main.c:19:8: error: invalid type argument of unary '*' (have 'int') 19 | x[j-1]=*x[j] | ^~~~~ main.c:19:13: error: expected ';' before '}' token 19 | x[j-1]=*x[j] | ^ | ; 20 | } else { | ~ main.c:21:19: error: 's...
s435352251
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 100 int main(){ int i=0,x[N],j=0; char a[N]; while (scanf("%s",a)!=EOF){ if ( a[i] == '+' ){ j--; x[j-1]=x[j-1]+x[j]; } else if ( a[i] == '-' ){ j--; x[j-1]=x[j-1]-x[j]; } else if ( a[i] == '*' ){ j--; x[j-1]=*x[j]; } else { x[j] ...
main.c: In function 'main': main.c:19:8: error: invalid type argument of unary '*' (have 'int') 19 | x[j-1]=*x[j]; | ^~~~~ main.c:21:19: error: 's' undeclared (first use in this function) 21 | x[j] = atoi(s); | ^ main.c:21:19: note: each undeclared identifier is reported...
s360867350
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 100 int main(){ int i=0,x[N],j=0; char a[N]; while (scanf("%s",a)!=EOF){ if ( a[i] == '+' ){ j--; x[j-1]=x[j-1]+x[j]; } else if ( a[i] == '-' ){ j--; x[j-1]=x[j-1]-x[j]; } else if ( a[i] == '*' ){ j--; x[j-1]=*x[j]; } else { x[j] ...
main.c: In function 'main': main.c:19:8: error: invalid type argument of unary '*' (have 'int') 19 | x[j-1]=*x[j]; | ^~~~~
s112243723
p02263
C
#include <stdio.h> #include <stdlib.h> #define STACK_MAX 20 /* スタックサイズ */ #define STACK_OK 0x8000 /* スタック成功を表すデータ */ #define STACK_FULL STACK_OK + 1 /* スタックサイズを超えたときのデータ */ #define STACK_END STACK_OK + 2 /* スタックの終わりを表すデータ */ /* 関数のプロトタイプ宣言 */ int push(int); /* スタックにデータを積...
main.c: In function 'main': main.c:19:16: error: 'data' undeclared (first use in this function) 19 | scanf("%s",data); | ^~~~ main.c:19:16: note: each undeclared identifier is reported only once for each function it appears in main.c:20:26: error: implicit declaration of function 'res' [-Wim...
s609657705
p02263
C
#include<stdlib.h> #include<string.h> #define MAX 100 int main(){ int x=0,y=0,i=0; char s[MAX]; int sgym[MAX]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ i -= 1; x = sgym[i]; i -= 1; y = sgym[i]; i += 1; sgym[i] = x + y; } else if ( s[0] == '-' ){ i -=...
main.c: In function 'main': main.c:8:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while( scanf("%s", s) != EOF ){ | ^~~~~ main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 2 | #include<string.h> +++ |+#include <stdio.h> ...
s859921407
p02263
C
#include<stdlib.h> #include<string.h> #define MAX 100 int main(){ int x=0,y=0,i=0; char s[MAX]; int sgym[MAX]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ i -= 1; x = sgym[i]; i -= 1; y = sgym[i]; i += 1; sgym[i] = x + y; } else if ( s[0] == '-' ){ i -=...
main.c: In function 'main': main.c:8:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while( scanf("%s", s) != EOF ){ | ^~~~~ main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 2 | #include<string.h> +++ |+#include <stdio.h> ...
s797067641
p02263
C
/* stack構造を用いて逆ポーランド記法を行うプログラム */ #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 100 /* プロトタイプ宣言 */ void Push(int[], int); int Pop(int[]); /* グローバル変数宣言 */ int cnt = 0; int main(){ /* 変数宣言 */ int x, y; int val1=0, val2=0, val3=0; int i=0; /* 数字か演算子か調べる配列を宣言 */ char s[N]; /* 重要!! ...
main.c: In function 'Pop': main.c:206:6: error: redefinition of 'Push' 206 | void Push(int s_A[], int x) | ^~~~ main.c:94:6: note: previous definition of 'Push' with type 'void(int *, int)' 94 | void Push(int s_A[], int x) | ^~~~ main.c:222:5: error: redefinition of 'Pop' 222 | int Pop(int ...
s059390697
p02263
C
#include <stdio.h> #include <stdlib.h> #include <string.h> void Push(int *,int ,int *); int Pop(int *,int *); int main() { int S[100]; int i; int ans,z; char a[100]; int s1,s2; int s_top =0; for(i=0;i<100;i++) { z=scanf("%s",a); if(z==EOF) break; //if(atoi(a) != 0 ) Push(S,atoi(a), &s_top); //else //{ //s2=Pop(S,&s_top...
main.c: In function 'main': main.c:23:6: warning: comparison between pointer and integer 23 | if (a== '+' )ans= Pop(S,&s_top)+Pop(S,&s_top); | ^~ main.c:24:11: warning: comparison between pointer and integer 24 | else if (a== '-' )ans=Pop(S,&s_top) - Pop(S,&s_top); | ^~ main.c:25:11: wa...
s873458533
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ } else if ( s[0] == '-' ){ pop(1); } else if ( s[0] == '*' ){ pop(1); } else { x = atoi(s); pop(3) } } return 0; }
main.c: In function 'main': main.c:12:1: error: implicit declaration of function 'pop'; did you mean 'popen'? [-Wimplicit-function-declaration] 12 | pop(1); | ^~~ | popen main.c:17:7: error: expected ';' before '}' token 17 | pop(3) | ^ | ; 18 | } | ~
s980110814
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x; int i; int n[100]; int char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ x[i-2] = x[i-1]+x[i-2]; i--; } else if ( s[0] == '-' ){ x[i-2] = x[i-2]-x[i-1]; i--; } else if ( s[0] == '*' ){ x[i-2] ...
main.c: In function 'main': main.c:11:3: error: two or more data types in declaration specifiers 11 | char s[100]; | ^~~~ main.c:15:2: error: subscripted value is neither array nor pointer nor vector 15 | x[i-2] = x[i-1]+x[i-2]; | ^ main.c:15:11: error: subscripted value is neither array nor poin...
s298083741
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x; int i; int n[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ x[i-2] = x[i-1]+x[i-2]; i--; } else if ( s[0] == '-' ){ x[i-2] = x[i-2]-x[i-1]; i--; } else if ( s[0] == '*' ){ x[i-2] = x[i-1]*...
main.c: In function 'main': main.c:13:2: error: subscripted value is neither array nor pointer nor vector 13 | x[i-2] = x[i-1]+x[i-2]; | ^ main.c:13:11: error: subscripted value is neither array nor pointer nor vector 13 | x[i-2] = x[i-1]+x[i-2]; | ^ main.c:13:18: error: subscripted value i...
s790611706
p02263
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x; int i; int n[100]; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ x[i-2] = x[i-1]+x[i-2]; i--; } else if ( s[0] == '-' ){ x[i-2] = x[i-2]-x[i-1]; i--; } else if ( s[0] == '*' ){ x[i-2] = x[i-1]*...
main.c: In function 'main': main.c:13:2: error: subscripted value is neither array nor pointer nor vector 13 | x[i-2] = x[i-1]+x[i-2]; | ^ main.c:13:11: error: subscripted value is neither array nor pointer nor vector 13 | x[i-2] = x[i-1]+x[i-2]; | ^ main.c:13:18: error: subscripted value i...