submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s383848435
p00012
C++
#include <iostream> #include <math.h> using namespace std; int main(){ double x[3],y[3],px,py,x1,x2,y1,y2,f; int f3,i; while(scanf_s("%f%f%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&px,&py)>0){ f3=0; for(i=0;i<3;i++){ x1=x[i]; y1=y[i]; x2=x[(i+1)%3]; y2=y[(i+1)%3]; f=x1*(py-y2)+px*(y2-...
a.cc: In function 'int main()': a.cc:10:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | while(scanf_s("%f%f%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&px,&py)>0){ | ^~~~~~~ | scanf
s540843748
p00013
Java
rail = [] while line = gets car = line.to_i if car == 0 p rail.pop else rail << car end end
Main.java:1: error: class, interface, enum, or record expected rail = [] ^ 1 error
s106858718
p00013
Java
import java.util.Scanner; import java.util.Deque; import java.util.Linkedlist; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); Deque<Integer> d=new Linkedlist<Integer>(); while(sc.hasNextInt()){ int n=sc.nextInt(); if(n==0){ System.out.println(d.pollFirst()); } else{ d.offerFirst...
Main.java:3: error: cannot find symbol import java.util.Linkedlist; ^ symbol: class Linkedlist location: package java.util Main.java:8: error: cannot find symbol Deque<Integer> d=new Linkedlist<Integer>(); ^ symbol: class Linkedlist location: class Main 2 errors
s555176038
p00013
Java
import java.util.*; public class aoj0013 { static final Scanner stdin = new Scanner(System.in); public static void main(String[] args) { Stack<Integer> st = new Stack<Integer>(); while(stdin.hasNext()){ int i = stdin.nextInt(); if( i == 0 ) System.out.println( st.pop() ); else st.push(i); } } }
Main.java:2: error: class aoj0013 is public, should be declared in a file named aoj0013.java public class aoj0013 { ^ 1 error
s403606635
p00013
Java
public class aoj0013 { static final Scanner stdin = new Scanner(System.in); public static void main(String[] args) { Stack<Integer> st = new Stack<Integer>(); while(stdin.hasNext()){ int i = stdin.nextInt(); if( i == 0 ) System.out.println( st.pop() ); else st.push(i); } } }
Main.java:1: error: class aoj0013 is public, should be declared in a file named aoj0013.java public class aoj0013 { ^ Main.java:2: error: cannot find symbol static final Scanner stdin = new Scanner(System.in); ^ symbol: class Scanner location: class aoj0013 Main.java:2: error: cannot find sy...
s946067805
p00013
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; public class prog { public static void main(String[] args) { printAnswer(); } private static void printAnswer() { ...
Main.java:8: error: class prog is public, should be declared in a file named prog.java public class prog { ^ 1 error
s330368198
p00013
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); Stack<Integer> stack = new Stack<Integer>(); while(sc.hasNextInt()){ int a=sc.nextInt(); if(a==0){ System.out.println(stack.pop()); ...
Main.java:12: error: method push in class Stack<E> cannot be applied to given types; stack.push(); ^ required: Integer found: no arguments reason: actual and formal argument lists differ in length where E is a type-variable: E extends Object declared in class Stack 1 ...
s840262257
p00013
Java
import java.io.*; public class Main { public static void main(String[]args)throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String str=br.readLine(); int[] list=new list[10]; int top=0; while(str!=null){ int num=Integer.parseInt(str); if(num==0){ System.ou...
Main.java:6: error: cannot find symbol int[] list=new list[10]; ^ symbol: class list location: class Main 1 error
s680594207
p00013
Java
import java.util.*; public class Main{ private static final scan = Scanner(System.in); public static void main(String[] args){ List<Integer> list = new ArrayList<Integer>(); while(scan.hasNext()){ int in = scan.nextInt(); int size = list.size(); if(in == 0){ list.remove(size - 1); } list.add(...
Main.java:4: error: <identifier> expected private static final scan = Scanner(System.in); ^ 1 error
s248682331
p00013
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ List<Integer> list = new ArrayList<Integer>(); while(scan.hasNext()){ int in = scan.nextInt(); int size = list.size(); if(in == 0){ list.remove(size - 1); } ...
Main.java:17: error: cannot find symbol for(int i = size - 1; i >= 0; i++){ ^ symbol: variable size location: class Main 1 error
s629815576
p00013
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ List<Integer> list = new ArrayList<Integer>(); int size; while(scan.hasNext()){ int in = scan.nextInt(); size = list.size(); if(in == 0){ list.remove(size - 1...
Main.java:17: error: variable size might not have been initialized for(int i = size - 1; i >= 0; i++){ ^ 1 error
s865047378
p00013
Java
import java.util.ArrayList; import java.util.Scanner; public class main { public static void main(String[] args){ //?????°??£?¨? ArrayList<Integer> Shin = new ArrayList<Integer>(); int i = 0; Integer hyouzi; Scanner sc = new Scanner(System.in); while (sc.hasNext()){ Shin.add(sc.nextInt()); if(Shi...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s110276969
p00013
Java
import java.util.ArrayList; import java.util.Scanner; public class main { public static void main(String[] args){ //?????°??£?¨? ArrayList<Integer> Shin = new ArrayList<Integer>(); int i = 0; Integer hyouzi; Scanner sc = new Scanner(System.in); while (sc.hasNext()){ Shin.add(sc.nextInt()); if(Shi...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s948792016
p00013
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { String strLine =""; BufferedReader stdReader = new BufferedReader(new InputStreamRea...
Main.java:23: error: not a statement 8 while((strLine = stdReader.readLine()) != null) { ^ Main.java:23: error: ';' expected 8 while((strLine = stdReader.readLine()) != null) { ^ 2 errors
s597416127
p00013
Java
import java.io.*; public class Main { public static void main(String[] args)throws IOException{ InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String str; stack s = new stack(); while(true){ str = br.readLine(); int n = Integer.parseInt(str); if...
Main.java:43: error: reached end of file while parsing } ^ 1 error
s565062460
p00013
Java
import java.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); Stack<Integer> s = new Stack<Integer>(); while(sc.hasNext()){ int a = sc.nextInt(); if(a==0)System.out.println(s.pop()); else s.push(a); } } }
Main.java:1: error: package java does not exist import java.*; ^ Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner...
s406289448
p00013
Java
import java.util.Scanner; import java.util.Stack; public class AOJ0013 { public static void main(String[] args) { Scanner a = new Scanner(System.in); Stack<Integer> b = new Stack<Integer>(); while(a.hasNext()){ int c = a.nextInt(); if(c==0){ System.out.println(b.pop()); } else{ b.push(c); ...
Main.java:4: error: class AOJ0013 is public, should be declared in a file named AOJ0013.java public class AOJ0013 { ^ 1 error
s944080794
p00013
Java
import java.util.*;public class Main {public static void main(String[] args) {Scanner s = new Scanner(System.in);Stack data = new Stack();while(s.hasNext()){int in = s.nextInt();if(in != 0)data.push(in);elseSystem.out.println(data.pop());}}}
Main.java:1: error: package elseSystem does not exist import java.util.*;public class Main {public static void main(String[] args) {Scanner s = new Scanner(System.in);Stack data = new Stack();while(s.hasNext()){int in = s.nextInt();if(in != 0)data.push(in);elseSystem.out.println(data.pop());}}} ...
s036113667
p00013
Java
import java.util.Stack; import java.util.Scanner; public class aoj0013 { public static void main(String[] args) { Scanner s = new Scanner(System.in); Stack data = new Stack(); while(s.hasNext()){ int in = s.nextInt(); if(in != 0) data.push(in); else System.out.println(data.pop()); } ...
Main.java:4: error: class aoj0013 is public, should be declared in a file named aoj0013.java public class aoj0013 { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s721136869
p00013
Java
mport java.util.Scanner; public class Main { public static void main(String arg[]) { Scanner scan = new Scanner(System.in); int cb[] = new int[10+1]; int index = 0; while(scan.hasNext()) { int ca = scan.nextInt(); if (ca == 0) { System.out.println(cb[index-1]); index--; continue; ...
Main.java:1: error: class, interface, enum, or record expected mport java.util.Scanner; ^ 1 error
s170570166
p00013
Java
import java.util.LinkedList; import java.util.List; import java.util.Scanner; public class Main2 { public static void main(String args[]){ Scanner input = new Scanner(System.in); List<Integer> lst = new LinkedList<Integer>(); while(input.hasNext()){ int a = input.nextInt(); ...
Main.java:5: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s622041948
p00013
Java
#include <iostream> using namespace std; int main(){ int cnt = 0; int sta; int train[10]={0}; while(cin >> sta){ if(sta == 0){ cnt--; cout << train[cnt] << endl; } else { train[cnt] = sta; cnt++; } } }
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:1: error: class, interface, enum, or record expected #include <iostream> ^ Main.java:7: error: not a statement int train[10]={0}; ^ Main.java:11: error: not a statement cout << train[cnt] << endl; ...
s466016464
p00013
Java
import java.io.*; port java.util.*; public class Main{ public static void main(String[] args){ BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); LinkedList<Integer> stack=new LinkedList<Integer>(); ArrayList<Integer> list=new ArrayList<Integer>(); String s; int n,t; try{ while...
Main.java:2: error: class, interface, enum, or record expected port java.util.*; ^ 1 error
s607226175
p00013
C
#include <string.h> #include <stdlib.h> //#define DEBUG 1 #define TRAIN_NUMBER 10 int push(int array[TRAIN_NUMBER], int num, int count); int pop(int array[TRAIN_NUMBER], int ans[TRAIN_NUMBER], int count, int *ans_c); main() { int train[TRAIN_NUMBER]; int ans[TRAIN_NUMBER]; int count = 0; int ans_c = 0; int inp...
main.c:10:1: error: return type defaults to 'int' [-Wimplicit-int] 10 | main() | ^~~~ main.c: In function 'main': main.c:24:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 24 | while (scanf("%d", &input) != EOF) | ^~~~~ main.c:3:1: note: inc...
s700362452
p00013
C
#include<stdio.h> int main(){ int train[10], ; int num = 0, i, n; while(scanf("%d", &n) != EOF){ if(n == 0){ num--; printf("%d\n", train[num]); } else { train[num] = n; num++; } } return 0; }
main.c: In function 'main': main.c:4:20: error: expected identifier or '(' before ';' token 4 | int train[10], ; | ^
s894104180
p00013
C
#include<stdio.h> int main(){ int a[500]; int j,a=0; for(int i=0;i<500;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(a=0){ if(j-1!=0){ printf("%d\n",a[j-1]); a=1; } j--; } a=0; a[j]=0; if(j==0){ i=501; } } } return 0; }
main.c: In function 'main': main.c:4:7: error: conflicting types for 'a'; have 'int' 4 | int j,a=0; | ^ main.c:3:5: note: previous declaration of 'a' with type 'int[500]' 3 | int a[500]; | ^
s057404862
p00013
C
#include <stdio.h> int main() { int n,cnt =0,copy,i =0; int data[100]; while(1){ scanf("%d",&n); if(n != EOF){ if(n != 0){ data[i] = n; i++; }else(n == 0){ i--; printf("%d\n",data[i]); } }else{ break; } } return 0; }
main.c: In function 'main': main.c:11:38: error: expected ';' before '{' token 11 | }else(n == 0){ | ^ | ;
s163172531
p00013
C
#include <stdio.h> int main() { int n,cnt =0,copy,i =0; int data[10] =0; while(1){ scanf("%d",&n); if(n == EOF)break; if(n != 0){ data[i] = n; i++; }else{ i--; printf("%d\n",data[i]); } } return 0; }
main.c: In function 'main': main.c:4:23: error: invalid initializer 4 | int data[10] =0; | ^
s645287032
p00013
C
#include<stdio.h> const int SIZE = 10; int main(void){ int i = 0,k = 0,cnt = 0,data[SIZE],box[SIZE]={0}; while(1){ scanf("%d",&data[i]); if(data[i] == 0){ i --; box[k] = data[i]; k ++; cnt ++; // printf("%d\n",data[i]); if(i ...
main.c: In function 'main': main.c:4:50: error: variable-sized object may not be initialized except with an empty initializer 4 | int i = 0,k = 0,cnt = 0,data[SIZE],box[SIZE]={0}; | ^
s245417768
p00013
C
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); Stack<Integer> stack = new Stack<Integer>(); while (scn.hasNext()) { int n = scn.nextInt(); if (n == 0) { System.out.println(stack.pop()); } else { ...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.util.Stack; ...
s700096832
p00013
C
#include <stdio.h> int main() { int i = 0, k = 0, n, car[10] = {0}, out[10] = {0}; do{ scanf("%d", &n); if(n == 0) { i--; out[k] = car[i]; k++ } else { car[i] = n; i++; } } while( i != 0 ); for(i = k; i = 0; i--) printf("%d\n", out[i]); return 0; }
main.c: In function 'main': main.c:10:28: error: expected ';' before '}' token 10 | k++ | ^ | ; 11 | } else { | ~
s510932529
p00013
C
int main(){ int a[10],b[10],c; int i = 0 ,tra = 0; do { scanf("%d" ,&c); it (c >= 1 && c <= 10){ a[tra] = c; tra++; } else if( c == 0){ tra--; b[i] = a[tra]; i++; } }while (tra > 0); printf("\n"); for (c = 0; c < i ; c++){ printf("%d\n",b[c]): } return 0; }
main.c: In function 'main': main.c:9:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 9 | scanf("%d" ,&c); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main.c:9:17: war...
s009679708
p00013
C
#include <stdio.h> int main(void) { int a[10], b[10] , c; int i=0,tra=0; do{ scanf_s("%d",&c); if (c >= 1 && c <= 10){ a[tra] = c; tra++; } else if (c == 0){ tra--; b[i] = a[tra]; i++; } } while (tra > 0); printf("\n"); for (c = 0; c < i; c++){ printf("%d\n",b[c]...
main.c: In function 'main': main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 9 | scanf_s("%d",&c); | ^~~~~~~ | scanf
s700153310
p00013
C
#include <stdio.h> int main(void) { int a[10], b[10] , c; int i=0; int t=0; do{ scanf("%d",&c); if (c >= 1 && c <= 10){ a[t] = c; t++; } else if (c == 0){ t--; b[i] = a[t]; i++; } } while (t > 0); print("\n"); for (c = 0; c < i; c++){ print("%d\n",b[c]); ...
main.c: In function 'main': main.c:24:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 24 | print("\n"); | ^~~~~ | printf
s112569162
p00013
C
#include <stdio.h> int main(void) { int a[10]; int b[10] int c; int i=0; int t=0; do{ scanf_s("%d",&c); if (c >= 1 && c <= 10){ a[t] = c; t++; } else if (c == 0){ t--; b[i] = a[t]; i++; } } while (t > 0); printf("\n"); for (c = 0; c < i; c++){ printf("%d\n",b[c])...
main.c: In function 'main': main.c:6:10: error: expected ';' before 'int' 6 | int b[10] | ^ | ; 7 | int c; | ~~~ main.c:11:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 11 | scanf_s("%d...
s659870287
p00013
C
#include <stdio.h> int main(void) { int a[10]; int b[10]; int c; int i=0; int t=0; do{ scanf_s("%d",&c); if (c >= 1 && c <= 10){ a[t] = c; t++; } else if (c == 0){ t--; b[i] = a[t]; i++; } } while (t > 0); printf("\n"); for (c = 0; c < i; c++){ printf("%d\n",b[...
main.c: In function 'main': main.c:11:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 11 | scanf_s("%d",&c); | ^~~~~~~ | scanf
s062996735
p00013
C
#include
main.c:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^
s620483345
p00013
C
int main(void) { int num, top; int train[1024]; int i; top = 0; while (scanf("%d", &num) != EOF){ if (num == 0){ printf("%d\n", train[top - 1]); train[top - 1] = 0; top--; } else { train[top] = num; top++; ...
main.c: In function 'main': main.c:9:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 9 | while (scanf("%d", &num) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void) ma...
s539334039
p00013
C
#include<stdio.h> int main(void){ int in[10],out[10]; int i=0,j=0,tmp; while(scanf("%d",&tmp)!=EOF){ if(tmp!=0){ in[i]=tmp i++; } else{ out[j]=in[i]; i--; j++; } } for(i=0;i<j;i++){ printf("%d\n",out[i]); } return 0; }
main.c: In function 'main': main.c:9:34: error: expected ';' before 'i' 9 | in[i]=tmp | ^ | ; 10 | i++; | ~
s708333672
p00013
C
#include<stdio.h> int main(void){ int in[10]={},out[10]={}; int i=0,j=0,tmp; while(scanf("%d",&tmp)!=EOF){ if(tmp!=0){ in[i]=tmp; i++; } else{ i--; printf("%d\n",in[i]); } return 0; }
main.c: In function 'main': main.c:18:1: error: expected declaration or statement at end of input 18 | } | ^
s011909265
p00013
C
#include <stdio.h> int main(){ int num,stack[10]={0},p=0; while(scanf("%d",&num)!=EOF){ if(n==0) printf("%d\n"stack[p--]); else stack[p++]=n; } rerturn 0; }
main.c: In function 'main': main.c:6:20: error: 'n' undeclared (first use in this function) 6 | if(n==0) printf("%d\n"stack[p--]); | ^ main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in main.c:6:39: error: expected ')' before ...
s420169592
p00013
C
#include <Stdio.h> int a[22]; int sp=0; int push(int x){ sp++; a[sp]=x; } int pop(){ int x; x=a[sp]; sp--; return x; } int main(){ int x; while(scanf("%d",&x)!=EOF){ if(x==0)printf("%d\n",pop()); else push(x); } return 0; }
main.c:1:10: fatal error: Stdio.h: No such file or directory 1 | #include <Stdio.h> | ^~~~~~~~~ compilation terminated.
s110305896
p00013
C
#include<stdio.h> #include <math.h> int main(){ int n,sya[1000],cnt; cnt =0; while(scanf("%d",&n)==0){ if(n==0){ printf("%d\n", sya[cnt-1]); cnt =cnt-1 }else{ // scanf("%d",&n); sya[cnt]=n; cnt=cnt+1; } } return 0; }
main.c: In function 'main': main.c:12:18: error: expected ';' before '}' token 12 | cnt =cnt-1 | ^ | ; 13 | }else{ | ~
s561385153
p00013
C
#include<stdio.h> int main(void){ int a[200], k, key = 1, i, l; a[0] = 0; for( i = 0; i < 201; i++ ) a[i] = 0; whlie ( scanf("%d", &k) != EOF) { if (k == 0) { key--; for (l = 0; l < 201; l++) if( a[l] == key) printf("%d\n", l); } else { a[k] = key; key++; ...
main.c: In function 'main': main.c:6:4: error: implicit declaration of function 'whlie' [-Wimplicit-function-declaration] 6 | whlie ( scanf("%d", &k) != EOF) { | ^~~~~ main.c:6:35: error: expected ';' before '{' token 6 | whlie ( scanf("%d", &k) != EOF) { | ...
s068352500
p00013
C
#include <stdio.h> int data[100], result[100]; int w, i, p=1, s=0; int main(){ for(i = 0; i < 100; i++){ scanf("%d", &data[i]); if(data[i] != 0){ result[s] = data[i]; s++; } if(data[i] == 0){ printf("%d\n", result[s-1]); s--; } } ]
main.c: In function 'main': main.c:19:1: error: expected statement before ']' token 19 | ] | ^ main.c:19:1: error: expected declaration or statement at end of input
s123896460
p00013
C
#include <stdio.h> int data[100], result[100]; int w, i, p=0, s=0; int main(){ for(i = 0; i < 100; i++){ scanf("%d", &data[i]); if(data[i] != 0){ result[s] = data[i]; s++; } if(data[i] == 0){ printf("%d\n", result[s-1]); s-- } p++; if(p == 100) break; } }
main.c: In function 'main': main.c:14:7: error: expected ';' before '}' token 14 | s-- | ^ | ; 15 | } | ~
s580675234
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int out[SIZE]; int sp = 0; int outSp = 0; int empty(){ return sp <= 0; } void pop(){ out[outSp] = data[sp]; outSp++; sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int i,n; while(1){ scanf("%d",&n); ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~ main.c:5:5: error: variably modified 'out' at file scope 5 | int out[SIZE]; | ^~~
s193602604
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int out[SIZE]; int sp = 0; int outSp = 0; int empty(){ return sp <= 0; } void pop(){ out[outSp] = data[sp]; outSp++; sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int i,n; while(1){ scanf("%d",&n); ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~ main.c:5:5: error: variably modified 'out' at file scope 5 | int out[SIZE]; | ^~~
s074560161
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int out[SIZE]; int sp = 0; int outSp = 0; int empty(){ return sp <= 0; } void pop(){ out[outSp] = data[sp]; outSp++; sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int i,n; while(1){ scanf("%d",&n); ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~ main.c:5:5: error: variably modified 'out' at file scope 5 | int out[SIZE]; | ^~~
s486952434
p00013
C
#include<stdio.h> const int SIZE = 100; int data[SIZE]; int size(int i) { return i; } int top(int i) { return data[i-1]; } void push(int num,int i) { if(num>0) { data[i] = num; i++; } } int main() { int num,i; for(i = 1;i <= 100;i++) { scanf("%d",&num); push(num,i); if(num==0) { printf("%d\n",to...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s149793978
p00013
C
#include<stdio.h> const int SIZE = 100; void func() { int data[SIZE]; } int size(int i) { return i; } int top(int i) { return data[i-1]; } void push(int num,int i) { if(num>0) { data[i] = num; i++; } } int main() { int num,i; for(i = 1;i <= 100;i++) { scanf("%d",&num); push(num,i); if(num==0) { ...
main.c: In function 'top': main.c:12:16: error: 'data' undeclared (first use in this function) 12 | return data[i-1]; | ^~~~ main.c:12:16: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'push': main.c:16:17: error: 'data' undecl...
s868727233
p00013
C
#include<stdio.h> const int SIZE = 100; void func() { int data[SIZE]; } int size(int i) { return i; } int top(data(),i) { return data[i-1]; } void push(int num,data(),i) { if(num>0) { data[i] = num; i++; } } int main() { int num,i; for(i = 1;i <= 100;i++) { scanf("%d",&num); push(num,i); if(num==0)...
main.c:11:9: error: unknown type name 'data' 11 | int top(data(),i) { | ^~~~ main.c:11:16: error: unknown type name 'i' 11 | int top(data(),i) { | ^ main.c:14:19: error: unknown type name 'data' 14 | void push(int num,data(),i) { | ^~~~ main.c:14:26: e...
s463870392
p00013
C
#include<stdio.h> const int SIZE = 100; int data[SIZE]; int size(int i) { return i; } int top(int i) { return data[i-1]; } void push(int num,int i) { if(num>0) { data[i] = num; i++; } } int main() { int num,i; for(i=0;i<100;i++) { scanf("%d",&num); push(num,i); if(num==0) { printf("%d\n",top(i))...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s930393286
p00013
C
#include<stdio.h> const int SIZE = 100; int data[SIZE]; int size(int i) { return i; } int top(int i) { return data[i-1]; } void push(int num,int i) { if(num>0) { data[i] = num; i++; } } int main() { int num,i; for(i=0;i<100;i++) { scanf("%d",&num); push(num,i); if(num==0) { printf("%d\n",top(i))...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s759080436
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int v; while(scanf("%d",&v)!=EOF){ if(v==0){ ...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s923754054
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int n){ data[sp] = n; sp++; } int main(){ int n; while(scanf("%d",&v)!=EOF){ if(n==0){ ...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~ main.c: In function 'main': main.c:23:23: error: 'v' undeclared (first use in this function) 23 | while(scanf("%d",&v)!=EOF){ | ^ main.c:23:23: note: each undeclared identifier is report...
s190533746
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int n){ data[sp] = n; sp++; } int main(){ int n; while(scanf("%d",&n)!=EOF){ if(n==0){ ...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s378920842
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int n){ data[sp] =n; sp++; } int main(){ int n; while(scanf("%d",&n)!=???EOF){ if(n==0){ ...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~ main.c: In function 'main': main.c:23:27: error: expected expression before '?' token 23 | while(scanf("%d",&n)!=???EOF){ | ^
s653253453
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int n){ data[sp] =n; sp++; } int main(){ int n; while(scanf("%d",&n)!=EOF){ if(n==0){ printf...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s805460027
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int n){ data[sp] =n; sp++; } int main(){ int n; while(scanf("%d",&n)!=EOF){ if(n==0){ printf("%d\n",top()); pop(); }else{ push(n); } }...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s493438974
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int n){ data[sp] =n; sp++; } int main(){ int n; while(scanf("%d",&n)!=EOF){ if(n==0){ printf("%d\n",top()); pop(); }else{ ...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s178257440
p00013
C
#include<stdio.h> const int SIZE=100; int data[SIZE]; int sp=0; int size(){ return sp; } int empty(){ return sp<=0; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp]=v; sp++; } int main(){ int n,k; while(scanf("%d",&n)!=EOF){ if(n==0){ p...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s203202950
p00013
C
#include<stdio.h> const int SIZE=100; int data[SIZE]; int sp=0; int size(){ return sp; } int empty(){ return sp<=0; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp]=v; sp++; } int main(){ int n,k; while(scanf("%d",&n)!=EOF){ if(n==0){ ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s706776820
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp=0; int empty(){ return sp <=0; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ while(1){ int v; scanf("%d",&v); if(v==0 && empty()) break; if(v!=0){ ...
main.c:3:13: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s632220512
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp=0; int empty(){ return sp <=0; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ while(1){ int v; scanf("%d",&v); if(v==0 && empty()) break; if(v!=0){ ...
main.c:3:13: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s485389113
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp=0; int empty(){ return sp <=0; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ while(1){ int v; scanf("%d",&v); if(v==0 && empty()) break; if(v!=0){ ...
main.c:3:13: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s553807835
p00013
C
#include<stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int x[100]; int i; int s = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int isfull(){ return sp >= SIZE; } int top(){ return data[sp-1]; } void pop(){ x[s] = data[sp-1]; s++; sp--; } void push(int v){ data[sp] = v; sp++; } ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s510281227
p00013
C
#include<stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int x[100]; int i; int s = 0; int empty(){ return sp <= 0; } int size(){ return sp; } int isfull(){ return sp >= SIZE; } int top(){ return data[sp-1]; } void pop(){ x[s] = data[sp-1]; s++; sp--; } void push(int v){ data[sp] = v; sp++; } ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s200422590
p00013
C
#include<stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int x[100]; int i; int s = 0; void pop(){ x[s] = data[sp-1]; s++; sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int v, count = 0; for(i = 0;i < 100;i++){ scanf("%d", &v); if(v == 0) pop(); else { push(v); count++; ...
main.c:4:5: error: variably modified 'data' at file scope 4 | int data[SIZE]; | ^~~~
s731672813
p00013
C
#include<stdio.h> int main(){ int data[100]; int sp = 0; while(scanf("%d", &v) != EOF){ if(v != 0){ data[sp] = v; sp++; }else{ sp--; printf("%d\n",data[sp]); } } return 0; }
main.c: In function 'main': main.c:6:28: error: 'v' undeclared (first use in this function) 6 | while(scanf("%d", &v) != EOF){ | ^ main.c:6:28: note: each undeclared identifier is reported only once for each function it appears in
s687636563
p00013
C
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp = 0; int empty() { return sp <= 0; } int size() { return sp; } int isfull() { return sp >= SIZE; } int top() { return data[sp-1]; } void pop() { sp--; } void push(int v) { data[sp] = v; sp++; } int main() { int i; ...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s153550851
p00013
C
#include <stdio.h> int SIZE = 100; int data[SIZE]; int sp = 0; int empty() { return sp <= 0; } int size() { return sp; } int isfull() { return sp >= SIZE; } int top() { return data[sp-1]; } void pop() { sp--; } void push(int v) { data[sp] = v; sp++; } int main() { int i; int c...
main.c:3:5: error: variably modified 'data' at file scope 3 | int data[SIZE]; | ^~~~
s207177512
p00013
C
#include <stdio.h> int data[100]; int sp = 0; int empty() { return sp <= 0; } int size() { return sp; } int isfull() { return sp >= SIZE; } int top() { return data[sp-1]; } void pop() { sp--; } void push(int v) { data[sp] = v; sp++; } int main() { int i; int comand[100]...
main.c: In function 'isfull': main.c:14:18: error: 'SIZE' undeclared (first use in this function) 14 | return sp >= SIZE; | ^~~~ main.c:14:18: note: each undeclared identifier is reported only once for each function it appears in
s693853923
p00013
C
#include<stdio.h> int main(){ int n, i, data[10]={0}, x=0; while((1){ if(n == 0){ printf("%d\n", data[x]); x--; }else if(1<=n && n<=10){ x++; data[x] = n; } } return 0; }
main.c: In function 'main': main.c:4:12: error: expected ')' before '{' token 4 | while((1){ | ~ ^ | ) main.c:14:1: error: expected expression before '}' token 14 | } | ^
s555697727
p00013
C
#include <stdio.h> int main(){ int data[10]={}; int n, k, i=0; for(k=0; K<=10; k++){ scanf("%d", &n); if(n!=0){ data[i] = n; i++; } else { i--; printf("%d\n", data[i]); data[i] = 0; } } return 0; }
main.c: In function 'main': main.c:5:18: error: 'K' undeclared (first use in this function) 5 | for(k=0; K<=10; k++){ | ^ main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
s514771581
p00013
C
#include <stdio.h> int main(){ int data[10]={}; int n, k, i=0; for(k=0; K<=20; k++){ scanf("%d", &n); if(n!=0){ data[i] = n; i++; } else { i--; printf("%d\n", data[i]); data[i] = 0; } } return 0; }
main.c: In function 'main': main.c:5:18: error: 'K' undeclared (first use in this function) 5 | for(k=0; K<=20; k++){ | ^ main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
s994126469
p00013
C
#include<stdio.h> struct STACK { int num[ 10 ] ; int p ; int Top( void ) ; void Push( int ) ; void Pop( void ) ; void Init( void ) ; } stack ; int main( void ) { stack.Init() ; int kale ; while( scanf( "%d" ,&kale ) != EOF ) { if( kale == 0 ) { printf( "%d\n" ,stack.Top() ) ; stack.Pop() ; ...
main.c:9:25: error: field 'Top' declared as a function 9 | int Top( void ) ; | ^~~ main.c:10:17: error: field 'Push' declared as a function 10 | void Push( int ) ; | ^~~~ main.c:11:17: error: field 'Pop' declared as a func...
s844679778
p00013
C
#include<stdio.h> int main(){ int x[100],a,k=0,y[100],i,m=0 while(scanf("%d",&a)!=EOF){ if(a==0) y[m++]=x[--k]; else if(a!=0){ x[k]=a; k++; } } for(i=0;i<m;i++) printf("%d\n",y[i]); return 0; }
main.c: In function 'main': main.c:4:1: error: expected ',' or ';' before 'while' 4 | while(scanf("%d",&a)!=EOF){ | ^~~~~
s622950885
p00013
C
z#include <stdio.h> int stack[150], cp; void push(int n) { stack[cp] = n; cp++; } int pop(void) { cp--; return stack[cp]; } int main(void) { int n; stack[0] = -1; cp = 1; while (scanf("%d", &n) != EOF) { if (n == 0) { printf("%d\n", pop());; } else { push(n); } if (stack[cp-1] == -1) b...
main.c:1:2: error: stray '#' in program 1 | z#include <stdio.h> | ^ main.c:1:1: error: unknown type name 'z' 1 | z#include <stdio.h> | ^ main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | z#include <stdio.h> | ^ main.c: In function 'push': ...
s635604671
p00013
C
n,*a=&n;main(){for(;gets(a);)*a%48?a++:puts(--a);}
main.c:1:1: warning: data definition has no type or storage class 1 | n,*a=&n;main(){for(;gets(a);)*a%48?a++:puts(--a);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:4: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 1 | n,*a=&n;main(){...
s129696188
p00013
C
n,a=&n;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);}
main.c:1:1: warning: data definition has no type or storage class 1 | n,a=&n;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 1 | n,a=&n;ma...
s570247060
p00013
C
a=main;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);}
main.c:1:1: warning: data definition has no type or storage class 1 | a=main;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:3: error: 'main' undeclared here (not in a function) 1 | a=main;main(){for(;~scanf("%...
s747313729
p00013
C
*a=main;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);}
main.c:1:1: warning: data definition has no type or storage class 1 | *a=main;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^ main.c:1:2: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 1 | *a=main;main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^ main.c:1:4: error: '...
s718450276
p00013
C
a[1];main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);}
main.c:1:1: warning: data definition has no type or storage class 1 | a[1];main(){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:6: error: return type defaults to 'int' [-Wimplicit-int] 1 | a[1];main(){for(;~scanf("%...
s457580989
p00013
C
main(i,a){for(;~scanf("%s",a);)*a%48?a++:puts(--a);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i,a){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:17: error: ...
s397887602
p00013
C
main(i,*a){for(;~scanf("%s",a);)*a%48?a++:puts(--a);}
main.c:1:8: error: expected ')' before '*' token 1 | main(i,*a){for(;~scanf("%s",a);)*a%48?a++:puts(--a);} | ^ | )
s770611649
p00013
C
n,a=&n;main(){for(;~scanf("%s",a++);)*a--%48?:puts(a++);}
main.c:1:1: warning: data definition has no type or storage class 1 | n,a=&n;main(){for(;~scanf("%s",a++);)*a--%48?:puts(a++);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 1 | n,a=&n;m...
s426229637
p00013
C
#include <stdio.h> int main(void) { int i; int station[10]; int input_data; i = 0; while (scanf("%d", &input_data) != EOF){ if (input_data != 0){ station[i] = input_data; i++; } else { printf("%d\n", station[i - 1]); i--; } } } return (0); }
main.c:23:9: error: expected identifier or '(' before 'return' 23 | return (0); | ^~~~~~ main.c:24:1: error: expected identifier or '(' before '}' token 24 | } | ^
s717852580
p00013
C
#include<stdio.h> #include<stack> using namespace std; int main(){ int n; stack<int> r; while(scanf("%d",&n)!=EOF) if(n){ r.push(n); }else{ printf("%d\n",r.top()); r.pop(); } return 0; }
main.c:2:9: fatal error: stack: No such file or directory 2 | #include<stack> | ^~~~~~~ compilation terminated.
s136536284
p00013
C
#include<stdio.h> int main(){ int car[10]; int a,c=0; while(~scanf("%d",&a)){ if(a==0)printf{("%d",car[c]);c--;} else { car[c]=a; c++; } } }
main.c: In function 'main': main.c:7:31: error: expected ';' before '{' token 7 | if(a==0)printf{("%d",car[c]);c--;} | ^ | ;
s935359576
p00013
C
#include<cstdio> #include<stack> int main() { int input; stack<int> st; while(~scanf("%d",&input)) { if(input == 0) { printf("%d",st.top()); st.pop(); }else { ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s135235439
p00013
C
//#include<stdio.h> #include<iostream> using namespace std; int main(){ int car[1000]; int n,i=0; while(cin>>n){ if(n==0){ cout<<car[i]<<endl; i--; } else { i++; car[i]=n; } } return 0; }
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s157448258
p00013
C
#include <stdio.h> int main(void) { int *train; int train_no; int no; int i; no = 0; train = (int *)malloc(1, sizeof(int)); while (scanf("%d", &train_no) != EOF){ if (train_no != 0){ no++; } else { no--; printf("%d\n", train[no]); } train = (int *)realloc(train, no * sizeof(int)); if (tra...
main.c: In function 'main': main.c:11:24: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 11 | train = (int *)malloc(1, sizeof(int)); | ^~~~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 1 | #include <stdio.h>...
s720908989
p00013
C
#include <stdio.h> int main(void) { int a[10]; int p; int b; p = 0; while (scanf("%d", &b){ if (b == 0){ printf("%d\n", a[p]); p--; } else { a[p] = b; p++; } } return (0); }
main.c: In function 'main': main.c:10:31: error: expected ')' before '{' token 10 | while (scanf("%d", &b){ | ~ ^ | ) main.c:22:1: error: expected expression before '}' token 22 | } | ^
s036687490
p00013
C
#include <stdio.h> #include <math.h> int main(void) { int arr[1000],arr2[1000],n,i,j,c,k; i = 0; j = 0; while(scanf("%d",&n) != EO{ scanf("%d",&n); if(n == 0){ arr2[i] = arr[j-1]; j = j - 1; i = i + 1; }else{ arr[j] = n; j = j + 1; } if(j == 0){ break; } } for(k = 0; k < i; k++){ ...
main.c: In function 'main': main.c:9:33: error: 'EO' undeclared (first use in this function); did you mean 'EOF'? 9 | while(scanf("%d",&n) != EO{ | ^~ | EOF main.c:9:33: note: each undeclared identifier is reported only once for eac...
s213845705
p00013
C
s,*p=s;main(){for(;gets(p);*p-48?p++:puts(--p));}
main.c:1:1: warning: data definition has no type or storage class 1 | s,*p=s;main(){for(;gets(p);*p-48?p++:puts(--p));} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:4: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int] 1 | s,*p=s;main(){fo...
s672692385
p00013
C
s[],p;main(){for(;gets(s);*s-48?p++:puts(s+--p);}
main.c:1:1: warning: data definition has no type or storage class 1 | s[],p;main(){for(;gets(s);*s-48?p++:puts(s+--p);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:5: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int] 1 | s[],p;main(){for...
s834750739
p00013
C
#include <stack> #include <iostream> int main(){ using namespace std; stack<int> st; int n; while ( cin >> n ){ if(n != 0){ st.push(n); }else if(n == 0){ cout << st.top() << endl; st...
main.c:1:10: fatal error: stack: No such file or directory 1 | #include <stack> | ^~~~~~~ compilation terminated.
s250359390
p00013
C
#include<stdio.h> int main(void){ int x,j,k,in[20],out[20]; j = 0; while(scanf("%d",&x) != EOF){ if(x != 0){ in[j] = x; j ++; }else{ printf("%d\n",out[j]); j --; } return 0; }
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s007419095
p00013
C
include<stdio.h> main(){ int tmp,i,j,tr[10000],ans[10000]={}; for(i=0;;i++){ if(scanf("%d",&tr[i]) == EOF){ break; } } tmp=i; for(i=0;i<tmp;i++){ if(tr[i]==0){ for(j=i-1;j>=0;j--){ if(tr[j]!=0){ ans[i]=tr[j]; tr[j]=0; break; } } } } for(i=0;i<tmp;i++){ ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^