submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s995667403
p00251
C++
import std.stdio; void main() { int a = 0; foreach(_; 0..10) { a += readln().chomp().to!int; } writeln(a); }
a.cc:5:16: error: too many decimal points in number 5 | foreach(_; 0..10) { | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: '::main' must return 'int' 2 | v...
s240386491
p00251
C++
import std.stdio; void main() { int sum = 0; for(uint = 0; i < 10; i++) { sum += readln().to!int; } writeln(sum); }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'uint' was not declared in this scope; d...
s134448688
p00251
C++
import std.stdio; void main() { int sum = 0; for(uint = 0; i < 10; i++) { sum += readln().to!int; } writef("%d\n",sum); }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'uint' was not declared in this scope; d...
s458383797
p00251
C++
import std.stdio; void main() { int sum = 0; for(uint = 0; i < 10; i++) { sum += readln().chomp().to!int; } writef("%d\n",sum); }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'uint' was not declared in this scope; d...
s150878734
p00251
C++
import std.stdio; import std.array; import std.string; void main() { int sum = 0; for(uint = 0; i < 10; i++) { sum += readln().chomp().to!int; } writef("%d\n",sum); }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import std.array; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: er...
s806735436
p00251
C++
import std.stdio; import std.algorithm; void main() { int sum = 0; foreach(_; 0..10) { sum += readln().chomp().to!int; } writeln(sum); }
a.cc:8:16: error: too many decimal points in number 8 | foreach(_; 0..10) { | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 ...
s234874763
p00251
C++
import std.stdio; import std.array; import std.range; import std.string; void main() { int sum = 0; foreach(_; 0..10) { sum += readln().chomp().to!int; } writeln(sum); }
a.cc:10:16: error: too many decimal points in number 10 | foreach(_; 0..10) { | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2...
s868649293
p00251
C++
import std.stdio; import std.array; import std.range; import std.string; import std.algorithm; void main() { int sum = 0; foreach(_; 0..10) { sum += readln().chomp().to!int; } writeln(sum); }
a.cc:11:16: error: too many decimal points in number 11 | foreach(_; 0..10) { | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2...
s931612224
p00251
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s952289667
p00251
C++
#include <iostream> #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() { int sum = 0, c; rep(i,10) { cin >> c; sum += c; } cout << sum << endl; }
a.cc:2:2: error: invalid preprocessing directive #using 2 | #using namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:8:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> c; | ^~~ | std::cin In file inc...
s356754194
p00251
C++
#include <iostream> using namespace std; int main(void){ int sum = 0; for(int i = 0; i < 10; i++){ int a; cin >> a; sum += a; } cout << a << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'a' was not declared in this scope 12 | cout << a << endl; | ^
s726399705
p00251
C++
#include <iostream> int main() { int s[10]; for (int i = 0; i < 10; i++) cin >> s[i]; int sum; for (int i = 0; i < 10; i++, sum ;= s[i]); cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> s[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | ex...
s723503229
p00251
C++
#include <iostream> using namespace std; int main() { int s[10]; for (int i = 0; i < 10; i++) cin >> s[i]; int sum; for (int i = 0; i < 10; i++, sum ;= s[i]); cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:41: error: expected ')' before ';' token 11 | for (int i = 0; i < 10; i++, sum ;= s[i]); | ~ ^~ | ) a.cc:11:43: error: expected primary-expression before '=' token 11 | ...
s234777871
p00251
C++
#include <bits/stdc++.h> using namespace std; #define INF (1 << 28) #define BIT(x) (1ull << (x)) #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define REP(i, n) FOR(i, 0, n) #define EACH(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i) #define PQ(t) priority_queue<t> #define PQL(...
a.cc:21:18: error: macro "FOR" requires 3 arguments, but only 2 given 21 | FOR(i, 10){ | ^ a.cc:6:9: note: macro "FOR" defined here 6 | #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++) | ^~~ a.cc: In function 'int main()': a.cc:21:9: error: 'FOR' was not...
s273714043
p00251
C++
#include<stdio.h>int main(){int a = 0,in; for(int i = 0; i <10; i++){scanf("%d",&in);a += in;}printf("%d",a); return 0;}
a.cc:1:22: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int main(){int a = 0,in; for(int i = 0; i <10; i++){scanf("%d",&in);a += in;}printf("%d",a); return 0;} | ^~~~ a.cc:1:9: fatal error: stdio.h>in: No such file or directory 1 | #include<stdio.h>int main...
s393185012
p00251
C++
#include <iostream> using nemespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k; cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j; k = a+b+c+d+e+f+g+h+i+j; cout << k << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nemespace' 2 | using nemespace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j; | ^...
s819054615
p00251
C++
#include <iostream> using nemespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k; cin >> a cin>> b cin>> c cin>> d cin>> e cin>> f cin>> g cin>> h cin>> i cin>> j; k = a+b+c+d+e+f+g+h+i+j; cout << k << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nemespace' 2 | using nemespace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a | ^~~ | std::cin In file included f...
s664391136
p00251
C++
#include <iostream> using nemespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k; cin >> a cin >> b cin >> c cin >> d cin >> e cin >> f cin >> g cin >> h cin >> i cin >> j; k = a+b+c+d+e+f+g+h+i+j; cout << k << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nemespace' 2 | using nemespace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a | ^~~ | std::cin In file included f...
s250190471
p00251
C++
#include <iostream> using nemespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k; cin >> a cin >> b cin >> c cin >> d cin >> e cin >> f cin >> g cin >> h cin >> i cin >> j; k = a+b+c+d+e+f+g+h+i+j; cout << k << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nemespace' 2 | using nemespace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a | ^~~ | std::cin In file included f...
s711172809
p00251
C++
#include<iostream> using namespace std; int main (){ int sum = 0; for???(int i = 0; i < 10; i++) { int s; cin >> s; sum += s; } cout j<< sum << endl; return 0; }
a.cc:8:13: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 8 | for???(int i = 0; i < 10; i++) { a.cc: In function 'int main()': a.cc:8:12: error: expected '(' before '?' token 8 | for???(int i = 0; i < 10; i++) { | ^ | ( a.cc:8:12: error: e...
s607582472
p00251
C++
#include<iostream> using namespace std; int main (){ int sum = 0; for(int i = 0; i < 10; i++) { int s; cin >> s; sum += s; } cout j<< sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:13: error: expected ';' before 'j' 13 | cout j<< sum << endl; | ^~ | ;
s742670511
p00251
C++
int main(void) { int a,b,c,d,e,f,g,h,i,j,x; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); scanf("%d",&e); scanf("%d",&f); scanf("%d",&g); scanf("%d",&h); scanf("%d",&i); scanf("%d",&j); x = a + b + c + d + e + f + g + h + i + j; printf("%d\n",x); return...
a.cc: In function 'int main()': a.cc:5:18: error: 'scanf' was not declared in this scope 5 | scanf("%d",&a); | ^~~~~ a.cc:16:18: error: 'printf' was not declared in this scope 16 | printf("%d\n",x); | ^~~~~~ a.cc:1:1: note: 'printf' ...
s233121127
p00251
C++
#include<stdio.h> int main(void) { int a,b,c,d,e,f,g,h,i,j,x; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); scanf("%d",&e); scanf("%d",&f); scanf("%d",&g); scanf("%d",&h); scanf("%d",&i); scanf("%d",&j); x = a + b + c + d + e + f + g + h + i + j; printf("%d...
a.cc: In function 'int main()': a.cc:17:27: error: expected '}' at end of input 17 | return 0; | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s791893882
p00251
C++
#include<iostream> int main(){ int point; for(int i = 0; i <10; i++){ int x; cin >> x; point += x; } cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | int x; cin >> x; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s751738109
p00251
C++
#include<iostream> using namespace std; int main(){ int point; for(int i = 0; i <10; i++){ int x; cin >> x; point += x; } cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'x' was not declared in this scope 9 | cout<<x<<endl; | ^
s133009508
p00251
C++
bakakakakakahimazinkayo
a.cc:1:1: error: 'bakakakakakahimazinkayo' does not name a type 1 | bakakakakakahimazinkayo | ^~~~~~~~~~~~~~~~~~~~~~~
s651087833
p00251
C++
#include <stdio.h> int main(void) { int a,b=0,i,j; for(i=0;i<10;i++){ scanf("%d",6a); b=b+a; } printf("%d\n",b); }
a.cc: In function 'int main()': a.cc:7:28: error: unable to find numeric literal operator 'operator""a' 7 | scanf("%d",6a); | ^~
s830944061
p00251
C++
#include <stdio.h> int main(void){ int a,i,ans; scanf("%d",&i); for(i=0;i<=10;i++){ a==0; ans=a+i; } printf("%d\n",ans); return ; }
a.cc: In function 'int main()': a.cc:17:1: error: return-statement with no value, in function returning 'int' [-fpermissive] 17 | return ; | ^~~~~~
s654134459
p00251
C++
#include <stdio.h> int main(void) { int a, i; int ans=0; for (i = 0; i < 10; i++) { scanf_s("%d", &a); ans = ans + a; } printf("%d\n", ans); return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s344037643
p00251
C++
import java.util.Scanner; public class Main{ public static void main(String[] args){ int data[] = new int[10]; Scanner scan = new Scanner(System.in); for(int i = 0; i < 10; i++){ data[i] = scan.nextInt(); } int total = 0; for(int i = 0; i < 10; i++){ total = total + data[i]; } System.out.print...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s661288724
p00251
C++
import std.conv; import std.stdio; import std.array; import std.range; import std.string; import std.algorithm; void main() { int sum = 0; foreach(_; 0..10) { sum += readln().chomp().to!int; } writeln(sum); }
a.cc:12:20: error: too many decimal points in number 12 | foreach(_; 0..10) { | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import std.conv; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a typ...
s070382419
p00251
C++
#include <iostream> using namespace std; int main (int argc, char const* argv[]) { int p=0; for (int i = 0; i < 10; ++i) { int j; cin >> j; p += j; } cout << j << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:13:13: error: 'j' was not declared in this scope 13 | cout << j << endl; | ^
s485442297
p00252
Java
import java.util.Scanner; public class maina{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a[]=sc.nextLine().split (" "); String b=a[0]+a[1]+a[2]; int ans=Integer.parseInt(b,2); if(ans==6||ans==1)System.out.println("Open"); else System.out.println("Close"); } }
Main.java:3: error: class maina is public, should be declared in a file named maina.java public class maina{ ^ 1 error
s440160055
p00252
Java
import java.util.*; class Main{ Scanner sc=new Scanner(System.in); void main(){ int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); if(a==b&&a!=c)System.out.println("Open"); else System.out.println("Close") } public static void main(String[]ag){ new Main().main(); } }
Main.java:9: error: ';' expected else System.out.println("Close") ^ 1 error
s438058348
p00252
Java
import java.util.Scanner; public class Main2{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int b1 = scan.nextInt(); int b2 = scan.nextInt(); int b3 = scan.nextInt(); if(b1 == 1 && b2 == 0 && b3 == 0 || b1 == 0 && b2 == 1 && b3 == 0 || b1 == 0 && b2 == 0 && b3 == 0){ Syst...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s806495002
p00252
C
include <stdio.h> int main(void){ int a, b, c; scanf("%d%d%d", &a, &b, &c); if((a == 1 && b == 1) || (c == 1)){ printf("Open\n"); }else{ printf("Close\n"); } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s085809510
p00252
C
#include <stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if (a==1&&b==0&&c==0) { printf("Close\n"); } if (a==0&&b==1&&c==0) { printf("Close\n"); } if (a==a&&b==1&&c==0) { printf("Open\n"); } if (a==0&&b==0&&c==1) { printf("Open\n"); } if (a==0&&b==&&c==0) { printf("Close\n");...
main.c: In function 'main': main.c:22:20: warning: comparison between pointer and integer 22 | if (a==0&&b==&&c==0) | ^~ main.c:22:9: error: label 'c' used but not defined 22 | if (a==0&&b==&&c==0) | ^~
s288047987
p00252
C
#include <stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if (a==1&&b==0&&c==0) { printf("Close\n"); } if (a==0&&b==1&&c==0) { printf("Close\n"); } if (a==a&&b==1&&c==0) { printf("Open\n"); } if (a==0&&b==0&&c==1) { printf("Open\n"); } if (a==0&&b==&&c==0) { printf("Close\n");...
main.c: In function 'main': main.c:22:20: warning: comparison between pointer and integer 22 | if (a==0&&b==&&c==0) | ^~ main.c:22:9: error: label 'c' used but not defined 22 | if (a==0&&b==&&c==0) | ^~
s197400642
p00252
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d %d %d",&a,&b,&c); if (a==1&&b==1&&c==0||a&b==0&&c==1){ printf("Open\n"); } else printf("Close\n") return 0; }
main.c: In function 'main': main.c:10:26: error: expected ';' before 'return' 10 | printf("Close\n") | ^ | ; 11 | return 0; | ~~~~~~
s258838834
p00252
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d %d %d",&a,&b,&c); if (a==1&&b==1&&c==0||a&b==0&&c==1){ printf("Open\n"); } else { printf("Close\n") } return 0; }
main.c: In function 'main': main.c:10:26: error: expected ';' before '}' token 10 | printf("Close\n") | ^ | ; 11 | } | ~
s735690407
p00252
C
#include <stdio.h> int main(void) { int a,b,c,d,e; scanf("%d %d %d",&a,&b,&c); if (a==1&&b==1&&c==0||a==0&&b==0&&c==1){ printf("Open\n"); } else { printf("Close\n") } return 0; }
main.c: In function 'main': main.c:10:26: error: expected ';' before '}' token 10 | printf("Close\n") | ^ | ; 11 | } | ~
s798437887
p00252
C
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=1&&b=0&&c=0){ printf("Close"); } else if(a=0&&b=1&&c=0){ printf("Close"); } else if(a=1&&b=1&&c=0){ printf("Open"); } else if(a=0&&b=0&&c=1){ printf("Open"); } else{ printf("Close"); } return 0; }
main.c: In function 'main': main.c:6:15: error: lvalue required as left operand of assignment 6 | if(a=1&&b=0&&c=0){ | ^ main.c:9:20: error: lvalue required as left operand of assignment 9 | else if(a=0&&b=1&&c=0){ | ^ main.c:12:20: error: lvalue required as left ope...
s513981025
p00252
C
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=1&&b=1&&c=0){ printf("Open"); } else if(a=0&&b=0&&c=1){ printf("Open"); } else{ printf("Close"); } return 0; }
main.c: In function 'main': main.c:6:15: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0){ | ^ main.c:9:20: error: lvalue required as left operand of assignment 9 | else if(a=0&&b=0&&c=1){ | ^
s479814764
p00252
C
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=1&&b=1&&c=0){ printf("Open\n"); } else if(a=0&&b=0&&c=1){ printf("Open\n"); } else{ printf("Close\n"); } return 0; }
main.c: In function 'main': main.c:6:15: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0){ | ^ main.c:9:20: error: lvalue required as left operand of assignment 9 | else if(a=0&&b=0&&c=1){ | ^
s707405923
p00252
C
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=1&&b=1&&c=0||a=0&&b=0&&c=1){ printf("Open\n"); } else{ printf("Close\n"); } return 0; }
main.c: In function 'main': main.c:6:30: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0||a=0&&b=0&&c=1){ | ^
s054933228
p00252
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a=1&&b=1&&c=0||a=0&&b=0&&c=1){ printf("Open\n"); } else{ printf("Close\n"); } return 0; }
main.c: In function 'main': main.c:6:30: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0||a=0&&b=0&&c=1){ | ^
s606485479
p00252
C
#include<stdio.h> int main(){ int b1,b2,b3; scanf("%d%d%d",&b1,&b2,&b3); if(b1=1&&b2=1&&b3=0||b1=0&&b2=0&&b3=1){ printf("Open\n"); } else{ printf("Close\n"); } return 0; }
main.c: In function 'main': main.c:5:36: error: lvalue required as left operand of assignment 5 | if(b1=1&&b2=1&&b3=0||b1=0&&b2=0&&b3=1){ | ^
s842739104
p00252
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a=1&&b=1&&c=0||a=0&&b=0&&c=1){ printf ("Open\n"); } else{ printf ("Close\n"); } return 0; }
main.c: In function 'main': main.c:6:30: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0||a=0&&b=0&&c=1){ | ^
s385330231
p00252
C
#include<stdio.h> int main(void) { int b1,b2,b3; b1=1; b2=0; scanf("%d",&b); if(b2 b2 b1){ printf("Open\n",b3); } if(b2 b2 b1){ printf("Open\n",b3); } else{ printf("Close\n",b3); } return 0; }
main.c: In function 'main': main.c:9:21: error: 'b' undeclared (first use in this function); did you mean 'b3'? 9 | scanf("%d",&b); | ^ | b3 main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in main.c:11:14: e...
s233700142
p00252
C
#include<stdio.h> int main(void) { int s1,s2,s3; scanf("%d %d %d",&s1,&s2,&s3); if(s1==1&&s2==1&&s3==0){ printf("Open\n"); } if(s==0&&s2==0&&s3==1){ printf("Open\n"); } else{ printf("Close\n"); } return 0; }
main.c: In function 'main': main.c:13:12: error: 's' undeclared (first use in this function); did you mean 's3'? 13 | if(s==0&&s2==0&&s3==1){ | ^ | s3 main.c:13:12: note: each undeclared identifier is reported only once for each function it appears in
s263288682
p00252
C
a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)}
main.c:1:1: warning: data definition has no type or storage class 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int] 1 | a[];main...
s604666085
p00252
C
#include<stdio.h> a[2]; main(){ gets(a); puts(a/7%6)|a[1]%2?"Open":"Close"); }
main.c:2:1: warning: data definition has no type or storage class 2 | a[2]; | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:4:2: error: implici...
s375944645
p00252
C
#include<stdio.h> a[2]; main(){ gets(a); puts(*a/7%6)|a[1]%2?"Open":"Close"); return 0; }
main.c:2:1: warning: data definition has no type or storage class 2 | a[2]; | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:4:2: error: implici...
s096755892
p00252
C
#include<stdio.h> a[2]; main(){ gets(a); puts(*a/7%6)|a[1]%2?"Open":"Close"); exit(0) ; }
main.c:2:1: warning: data definition has no type or storage class 2 | a[2]; | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:4:2: error: implici...
s898583855
p00252
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <time.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <string> #include <bitset> using namespace std; #define FOR(I,F,N) for(int I = F; I < (int)(N...
a.cc: In function 'int main()': a.cc:32:38: error: expected ';' before 'cout' 32 | if((a == 1 && b == 1 || c==1)cout << "Open"<<endl; | ^~~~ | ; a.cc:33:9: error: expected primary-expression before 'else' 33 | el...
s244971471
p00252
C++
include<stdio.h> int main(void) { int b1,b2,b3; scanf("%d",&b1); scanf("%d",&b2); scanf("%d",&b3); if(b1=1, b2=0, b3=0) { printf("Close\n"); } else if(b1=0, b2=1, b3=0) { printf("Close\n"); } else if(b1=0, b2=0, b3=1) { printf("Open\n"); } else if(b1=1, b2=1, b3=0) { printf("Open\n"); } else if(b...
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s198881017
p00252
C++
#include <iostream> int main(){ int b1,b2,b3; std::cin>>b1>>b2>>b3; if(b1==b2 && b1==1 || b3==1)std::cout<<"Open"<<std:endl; else std::cout<<"Close"<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:6:59: error: found ':' in nested-name-specifier, expected '::' 6 | if(b1==b2 && b1==1 || b3==1)std::cout<<"Open"<<std:endl; | ^ | ::
s026442321
p00252
C++
#include<iostream> using namespace std; int main() { int b1,b2,b3; cin >> b1 >> b2 >> b3; if ((b1 == 1 && b2 == 1)||b3 == 1) { cout << "Open" << endl; } else { cout << "Close" << endl; } return 0; } 1
a.cc:18:1: error: expected unqualified-id before numeric constant 18 | 1 | ^
s041163861
p00252
C++
#include<iostream> using namespace std; int main () { int b1, b2, b3; cin >> b1 >> b2 >> b3; if ((b1 == 1 && b2 == 1)||b3 == 1) { cout << "Open" << endl; }else { cout << "Close" << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:2: error: expected '}' at end of input 14 | } | ^ a.cc:3:13: note: to match this '{' 3 | int main () { | ^
s331771530
p00252
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=1&&b=1&&c=0){ printf("Open\n"); retun 0; } if(a=0&&b=0&&c=1){ printf("Open\n"); retun 0; } printf("Close\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:20: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0){ | ~^~~ a.cc:8:17: error: 'retun' was not declared in this scope 8 | retun 0; | ^~~~~ a.cc:10:20: error: lvalue required as ...
s747455225
p00252
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=1&&b=1&&c=0){ printf("Open\n"); return 0; } if(a=0&&b=0&&c=1){ printf("Open\n"); return 0; } printf("Close\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:20: error: lvalue required as left operand of assignment 6 | if(a=1&&b=1&&c=0){ | ~^~~ a.cc:10:20: error: lvalue required as left operand of assignment 10 | if(a=0&&b=0&&c=1){ | ~^~~
s738414711
p00252
C++
#include<stdio.h> int main(void) { int i,n,f; scanf("%d %d %d",&i,&n,&f); if(i=1||n=0||f=0){ printf("Close\n"); } if(i=0||n=1||f=0){ printf("Close\n"); } if(i=1||n=1||f=0){ printf("Oprn\n"); } if(i=0||n=0||f=1){ printf("Open\n"); } if(i=0||n=0||f=0){ printf("Close\n"); } re...
a.cc: In function 'int main()': a.cc:6:28: error: lvalue required as left operand of assignment 6 | if(i=1||n=0||f=0){ | ~^~~ a.cc:9:28: error: lvalue required as left operand of assignment 9 | if(i=0||n=1||f=0){ | ~...
s380336488
p00252
C++
#include<stdio.h> int main(void) { int i,n,f; scanf("%d %d %d",&i,&n,&f); if(i=1&&n=0&&f=0){ printf("Close\n"); } if(i=0&&n=1&&f=0){ printf("Close\n"); } if(i=1&&n=1&&f=0){ printf("Oprn\n"); } if(i=0&&n=0&&f=1){ printf("Open\n"); } if(i=0&&n=0&&f=0){ printf("Close\n"); } re...
a.cc: In function 'int main()': a.cc:6:28: error: lvalue required as left operand of assignment 6 | if(i=1&&n=0&&f=0){ | ~^~~ a.cc:9:28: error: lvalue required as left operand of assignment 9 | if(i=0&&n=1&&f=0){ | ~...
s500609898
p00252
C++
int main(void) { int i,a[10]; for(i=0;i<3;i++){ scanf("%d",&a[i]); } for(i=0;i<1;i++){ if(a[i]==1&&a[i+1]==1&&a[i+2]==0){ printf("Open\n"); } else if(a[i]==0&&a[i+1]==0&&a[i+2]==1){ printf("Open\n"); } else{ printf("Close\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf' was not declared in this scope 5 | scanf("%d",&a[i]); | ^~~~~ a.cc:9:9: error: 'printf' was not declared in this scope 9 | printf("Open\n"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; thi...
s088717479
p00252
C++
/*omaera kann ning sunn na gomi www (^p^)9m*/#include<stdio.h>int main(){int b1,b2,b3;scanf("%d%d%d",&b1,&b2,&b3);if(b1==1&&b2==1||b3==1){printf("Open\n");}else{printf("Close\n");}return 0;}
a.cc:1:67: warning: extra tokens at end of #include directive 1 | /*omaera kann ning sunn na gomi www (^p^)9m*/#include<stdio.h>int main(){int b1,b2,b3;scanf("%d%d%d",&b1,&b2,&b3);if(b1==1&&b2==1||b3==1){printf("Open\n");}else{printf("Close\n");}return 0;} | ...
s911711993
p00252
C++
#include<stdio.h>int main(){int b1,b2,b3;scanf("%d%d%d",&b1,&b2,&b3);if(b1==1&&b2==1||b3==1){printf("Open\n");}else{printf("Close\n");}return 0;}
a.cc:1:22: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int main(){int b1,b2,b3;scanf("%d%d%d",&b1,&b2,&b3);if(b1==1&&b2==1||b3==1){printf("Open\n");}else{printf("Close\n");}return 0;} | ^~~~ a.cc:1:9: fatal error: stdio.h>in: No such file or directory 1 | #...
s443120514
p00252
C++
/* omaera kann ning sunn na gomi www (^p^)9m */ #include<stdio.h>int main(){int b1,b2,b3;scanf("%d%d%d",&b1,&b2,&b3);if(b1==1&&b2==1||b3==1){printf("Open\n");}else{printf("Close\n");}return 0;}
a.cc:20:22: warning: extra tokens at end of #include directive 20 | #include<stdio.h>int main(){int b1,b2,b3;scanf("%d%d%d",&b1,&b2,&b3);if(b1==1&&b2==1||b3==1){printf("Open\n");}else{printf("Close\n");}return 0;} | ^~~~ a.cc:20:9: fatal error: stdio.h>in: No such file or directory 20 |...
s384564276
p00252
C++
#include<iostream> using namespace std; #include<algorithm> #define REP(i,Z) for(int i=0;i<Z;i++) int main(){ int a,b,c,A; cin>>a>>b>>c; A=a*4+b*2+c; } if(A==1||A==6){ cout<<"Open"<<endl; } else{ cout<<"Close"<<endl; } return 0; }
a.cc:12:9: error: expected unqualified-id before 'if' 12 | if(A==1||A==6){ | ^~ a.cc:15:9: error: expected unqualified-id before 'else' 15 | else{ | ^~~~ a.cc:18:9: error: expected unqualified-id before 'return' 18 | return 0; | ^~~~~~ a.cc:19:1...
s696613628
p00252
C++
#include<iostream> using namespace std; int main(){ int temp; int x; cin >> temp; x += temp * 100; cin >> temp; x += temp*10; cin >> temp; x += temp; switch(temp){ case 100: case 10: case 0:cout << "Close"<<endl;break; case 110:cout << "Open" << endl;break; case 1:cout << "Open" << endl;bre...
a.cc: In function 'int main()': a.cc:20:4: error: expected '}' at end of input 20 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s484597627
p00252
C++
#inclde<iostream> using namespace std; int main() { int j,t,r; cin >> j >> t >> r; if(r==1 || j==1 && t ==1) { cout << "Open" << endl; } else cout << "Close" << endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde<iostream> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin >> j >> t >> r; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iost...
s293784603
p00252
C++
#include"bits/stdc++.h" using namespace st; int main(){ int a[3]; cin>>a[0]>>a[1]>>a[2]; if(a[0]==1&&a[1]==1&&a[2]==0||a[0]==0&&a[1]==0&&a[2]==1){ cout<<"Open"<<endl; } else { cout<<"Close"<<endl; } }
a.cc:2:17: error: 'st' is not a namespace-name 2 | using namespace st; | ^~ a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a[0]>>a[1]>>a[2]; | ^~~ | std::cin In file included from /usr/include/x86_64-linu...
s378386632
p00252
C++
#include<iostream> using namespace std; int main(){ int a,b,i; cin >> a >> b >> i; if(a==1&&b==1){ cout << "open" << endl; } else if(i==1){ cout << "open" << endl; } else{ cout << "close" << endl; } cout<<sum<<endl; }
a.cc: In function 'int main()': a.cc:15:15: error: 'sum' was not declared in this scope 15 | cout<<sum<<endl; | ^~~
s059096938
p00252
C++
#include <bits/stdc++.h> using namespace std; int main() { bool f[3]; for (int i = 0; i < 3; ++i) cin >> f[i]; f[2] = !f[2] cout << (f[0] == f[1] && f[1] == f[2] ? "Open" : "Close") << endl; }
a.cc: In function 'int main()': a.cc:9:15: error: expected ';' before 'cout' 9 | f[2] = !f[2] | ^ | ; 10 | cout << (f[0] == f[1] && f[1] == f[2] ? "Open" : "Close") << endl; | ~~~~
s418031264
p00252
C++
#include<iostream> #include<string> main(){ std::string s; std::getline(cin,s); if(s=="1 1 0"||s=="0 0 1")std::cout << "Open\n"; else std::cout << "Close\n"; }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:16: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | std::getline(cin,s); | ^~~ | std::cin In...
s385513604
p00252
C++
#include<algorithm> #include<functional> #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<sstream> #include<iostream> #include<iomanip> #include<vector> #include<list> #include<stack> #include<queue> #include<map> #include<set> #include<bitset> #include<climits> #define al...
a.cc: In function 'int main()': a.cc:44:24: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [5]') 44 | if(a&b||c) cout>>"Open">>endl; | ~~~~^~~~~~~~ | | | | | ...
s492505009
p00252
C++
a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));}
a.cc:1:1: error: 'a' does not name a type 1 | a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));} | ^ a.cc:1:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));} | ^~~~ a.cc: In function 'in...
s104501357
p00253
C
#include <stdio.h> int main(void) { int n; int h[100]; while (scanf("%d", &n) * n != 0){ int i; int dif; for (i = 0; i < n; i++){ scanf("%d", &n); if (i == 1){ dif = h[1] - h[0]; } else if (i > 1 && dif != h[i] - h[i - 1]){ if (dif != h[i - 1][i - 2]){ printf("%d\n", dif); } ...
main.c: In function 'main': main.c:18:52: error: subscripted value is neither array nor pointer nor vector 18 | if (dif != h[i - 1][i - 2]){ | ^
s249269767
p00253
C
#include <stdio.h> int main(void) { int n; int h[100]; while (scanf("%d", &n) * n != 0){ int i; int dif; for (i = 0; i < n; i++){ scanf("%d", h + i); if (i == 1){ dif = h[1] - h[0]; } else if (i > 1 && dif != h[i] - h[i - 1]){ if (dif != h[i - 1][i - 2]){ printf("%d\n", dif); ...
main.c: In function 'main': main.c:18:52: error: subscripted value is neither array nor pointer nor vector 18 | if (dif != h[i - 1][i - 2]){ | ^
s426718196
p00253
C
#include <stdio.h> const int MAX_N = 105; int N, len[MAX_N]; int isOK(int now, int d){ int i; int tmp[MAX_N], tmp_i = 0; for(i = 0; i < N; ++i){ if(i == now) continue; tmp[tmp_i] = len[i]; ++tmp_i; } for(i = 0; i < tmp_i - 1; ++i){ if(tmp[i + 1] - tmp[i] != d) return 0; } return 1...
main.c:4:8: error: variably modified 'len' at file scope 4 | int N, len[MAX_N]; | ^~~
s244142433
p00253
C
#include <stdio.h> int main(void){ while(1){ int n, i, count=0; long h[101], diff[100]; scanf("%d", &n); if(n==0) break; for(i=0; i<=n; i++){ scanf(" %ld", &h[i]); } for(i=0; i<n; i++){ diff[i] = h[i+1] - h[i]; } long start = diff[0]; long s=0, t=0; for(i=1; i<n; i++){ if(st...
main.c: In function 'main': main.c:31:58: error: expected ')' before ';' token 31 | else if(count == 1)(printf("%ld\n", h[1]); | ~ ^ | ) main.c:32:44: error: expected ';' before...
s294964124
p00253
C
#include<stdio.h> int main() { int a[101], n, b, b1 = 1, c, c1 = 0, d, i, j = -1, pp; scanf_s("%d", &n); while (n != 0) { for (i = 0; i < n + 1; i++) { scanf_s("%d", &a[i]); } b = a[1] - a[0]; for (i = 2; i < n + 1; i++) { if (b == a[i] - a[i - 1]) { b1++; } else { c = a[i] - a[i - 1]; c1++; ...
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s764398669
p00253
C
#include<stdio.h> int main() { int a[101], n, b, b1 = 1, c, c1 = 0, d, i, j = -1, pp; scanf_s("%d", &n); while (n != 0) { for (i = 0; i < n + 1; i++) { scanf_s("%d", &a[i]); } b = a[1] - a[0]; for (i = 2; i < n + 1; i++) { if (b == a[i] - a[i - 1]) { b1++; } else { c = a[i] - a[i - 1]; c1++; ...
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s069368260
p00253
C
#include<stdio.h> int main() { int n, b, b1 = 1, c, c1 = 0, i, j = -1; long a[101] scanf("%d", &n); while (n != 0) { for (i = 0; i < n + 1; i++) { scanf("%ld", &a[i]); } b = a[1] - a[0]; for (i = 2; i < n + 1; i++) { if (b == a[i] - a[i - 1]) { b1++; } else { c = a[i] - a[i - 1]; c1++...
main.c: In function 'main': main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 6 | scanf("%d", &n); | ^~~~~ main.c:9:31: error: 'a' undeclared (first use in this function) 9 | scanf("%ld", &a[i]); | ^ main....
s507894154
p00253
C
#include <stdio.h> int main(void){ int n,i,a[101],y,o,s,n,w; //s:??????,y:??¬???,n:??? scanf("%d",&n); while(n!=0){ scanf("%d",&a[1]); s=a[1]; for(i=2;i<=n+1;i++){ scanf("%d",&a[i]); } if(a[2]-a[1]==a[3]-a[2]){ y=a[2]-a[1]; } else if(a[3]-a[2]==a[4]-a[3]){ y=a[3]-a[2]; } else{ y=a[5]-...
main.c: In function 'main': main.c:3:30: error: redeclaration of 'n' with no linkage 3 | int n,i,a[101],y,o,s,n,w; //s:??????,y:??¬???,n:??? | ^ main.c:3:13: note: previous declaration of 'n' with type 'int' 3 | int n,i,a[101],y,o,s,n,w; //s:??????,y:??¬???...
s351639958
p00253
C
#include <stdio.h> int main(void){ int n,i,a[101],y,o,s,n,w; scanf("%d",&n); while(n!=0){ scanf("%d",&a[1]); s=a[1]; for(i=2;i<=n+1;i++){ scanf("%d",&a[i]); } if(a[2]-a[1]==a[3]-a[2]){ y=a[2]-a[1]; } else if(a[3]-a[2]==a[4]-a[3]){ y=a[3]-a[2]; } else{ y=a[5]-a[4]; } for(i=1;i<=n+1;i...
main.c: In function 'main': main.c:3:30: error: redeclaration of 'n' with no linkage 3 | int n,i,a[101],y,o,s,n,w; | ^ main.c:3:13: note: previous declaration of 'n' with type 'int' 3 | int n,i,a[101],y,o,s,n,w; | ^
s611416387
p00253
C
#include<stdio.h> int main(void) { int n,h[101]; int i,j,l; int s[101],b[101]; int f; scanf("%d",&n); while(n!=0){ for(i=0;i<n+1;i++){ scanf("%d",&h[i]); } for(i=0;i<n+1;i++){ k=0; for(j=0;j<n+1;j++){ if(i!=j){ ...
main.c: In function 'main': main.c:15:13: error: 'k' undeclared (first use in this function) 15 | k=0; | ^ main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
s923843136
p00253
C
#include <stdio.h> a[110],b[110];main(i,n){ for(;scanf("%d",&n),n;){ if(n>90)exit(1); for(i=0;i<=n;i++){ scanf("%d",a+i); if(a[i]<1||100000000<a[i])exit(1); } for(i=1;i<=n;i++)b[i]=a[i]-a[i-1]; if(b[1]==b[2]&&b[2]==b[3]){ for(i=4;i<=n;i++)if(b[i]!=b[1])break; if(i>n)exit(1); printf("%d\n",a[i]...
main.c:2:1: warning: data definition has no type or storage class 2 | a[110],b[110];main(i,n){ | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:2:8: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] 2 | a[110],b[110];main(i,n){ | ^...
s525904705
p00253
C
#include <iostream> #include <algorithm> #include <vector> using namespace std; bool isValid(const vector<int> &v) { int d = v[1] - v[0]; for(int i = 1; i+1 < v.size(); ++i) { if(v[i+1] - v[i] != d) return false; } return true; } int main() { int n; while(cin >> n && n) { int h[n+1]; for(int i...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s721015092
p00253
C
#include <stdio.h> #include <stdlib.h> #define N 100 static int d[ N + 1 ]; static int n; int judge ( int *d, ) { int i; for ( i = 2; i < n; ++i ) { if ( d[ i - 1 ] - d[ i - 2 ] != d[ i ] - d[ i - 1 ] ) break ; } return ( i == n ); } int main ( int argc, char *argv[ ] ) { int i, ...
main.c:12:3: error: expected declaration specifiers or '...' before ')' token 12 | ) | ^ main.c: In function 'main': main.c:52:12: error: implicit declaration of function 'judge' [-Wimplicit-function-declaration] 52 | if ( judge ( t ) ) | ^~~~~
s524850102
p00253
C
#include <stdio.h> int main(void) { int n = 0, temp = 0; int h[] = {0}; int a = 0; scanf("%d", &n); if (n == 0) { return 0; } for (int i = 0; i < n; i++) { scanf("%d", &temp); h[i] = temp; } while (a < i){ if ( (h[a+1] - h[a]) * 2 == (h[a+2] - h[a]) ) { a++; } else { printf("%d\n", h[a]);...
main.c: In function 'main': main.c:21:20: error: 'i' undeclared (first use in this function) 21 | while (a < i){ | ^ main.c:21:20: note: each undeclared identifier is reported only once for each function it appears in
s834803239
p00253
C
#include <stdio.h> int main(void) { int n = 0, temp = 0; int a = 0; scanf("%d", &n); int h[n+1] = {0}; if (n == 0) { return 0; } for (int i = 0; i < n; i++) { scanf("%d", &temp); h[i] = temp; } while (a < i){ if ( (h[a+1] - h[a]) * 2 == (h[a+2] - h[a]) ) { a++; } else { printf("%d\n", h[...
main.c: In function 'main': main.c:10:22: error: variable-sized object may not be initialized except with an empty initializer 10 | int h[n+1] = {0}; | ^ main.c:22:20: error: 'i' undeclared (first use in this function) 22 | while (a < i){ | ^ mai...
s444617611
p00253
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
s560714200
p00253
C++
#include <algorithm> #include <functional> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <sstream> #include <iostream> #include <iomanip> #include <vector> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #include <cl...
a.cc: In function 'void solve()': a.cc:61:11: error: 'a' was not declared in this scope 61 | cout<<a[0]<<endl; | ^
s399113431
p00253
C++
using System; using System.Collections.Generic; using System.ComponentModel.Design; class Program { public static int Main() { Scanner cin = new Scanner(); while (true) { int n = cin.nextInt(); if (n == 0) { break; } long[] h = new long[n + 1]; for (int i = 0; i < n + 1; i++) { h[i...
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.C...
s201693032
p00253
C++
#include<stdio.h> #include<iostream> #include<string> #include<math.h> #include<algorithm> using namespace std; int main(){ int N; while(1){ long long int x0=0,x1=0,x2=0,x3=0,d1=0,d2=0,d3=0; long long int K=0,y,x=0,d=0; cin>>N;if(N==0)break; cin>>x0>>x1>>x2>>x3; bool f=false; d1=x1-x0;d2=x2-x1;d3=x3-x2; //c...
a.cc: In function 'int main()': a.cc:29:49: error: expected ';' before '}' token 29 | if(y-x!=d&&f==false){K=y;f==true} | ^ | ;
s372456731
p00253
C++
#include<iostream> using namespace std; int main(){ while(1){ int n=0; int h[10000000001]; int HI[10000000001]; int A=0; int B=0; int F=0; cin>>n; if(n==0){ break; } for(int i=0;i<n+1;i++){ cin>>h[i]; HI[i]=0; } A=h[0]-h[1]; for(int i=1;i<n;i++){ B=h[i]-h[i+1]; if(A!=B){ F+...
a.cc: In function 'int main()': a.cc:41:18: error: expected '}' at end of input 41 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s286237935
p00253
C++
#include<iostream> using namespace std; int main(){ while(1){ int h[101]; int n=0; int d=0; int F=0; cin>>n; if(n==0){ break; } for(int i=0;i<n+1;i++){ cin>>h[i]; } for(int i=0;i<n+1;i++){ int tmp[100]; for(int j=0;j<i;j++){ tmp[j]=h[j]; } for(int j=0;j<i;j++){ tmp[j-1]=h...
a.cc: In function 'int main()': a.cc:33:41: error: 'a' was not declared in this scope 33 | cout<<h[a]<<endl; | ^
s589770217
p00253
C++
#include<iostream> using namespace std; int main(){ while(1){ int h[101]; int n=0; int d=0; int F=0; cin>>n; if(n==0){ break; } for(int i=0;i<n+1;i++){ cin>>h[i]; } for(int i=0;i<n+1;i++){ int tmp[100]; for(int j=0;j<i;j++){ tmp[j]=h[j]; } for(int j=0;j<n+1;j++){ tmp[j-1]...
a.cc: In function 'int main()': a.cc:33:41: error: 'a' was not declared in this scope 33 | cout<<h[a]<<endl; | ^
s749526878
p00253
C++
#include<iostream> using namespace std; int main(){ while(1){ int h[101]; int n=0; int d=0; int F=0; cin>>n; if(n==0){ break; } for(int i=0;i<n+1;i++){ cin>>h[i]; } for(int i=0;i<n+1;i++){ int tmp[100]; for(int j=0;j<i;j++){ tmp[j]=h[j]; } for(int j=i+1;j<n+1;j++){ tmp[j-...
a.cc: In function 'int main()': a.cc:33:41: error: 'a' was not declared in this scope 33 | cout<<h[a]<<endl; | ^
s613724133
p00253
C++
#include<iostream> using namespace std; int main(){ while(1){ int h[101]; int n=0; int d=0; int F=1; cin>>n; if(n==0){ break; } for(int i=0;i<n+1;i++){ cin>>h[i]; } for(int i=0;i<n+1;i++){ int tmp[100]; for(int j=0;j<i;j++){ tmp[j]=h[j]; } for(int j=i+1;j<n+1;j++){ tmp[j-...
a.cc: In function 'int main()': a.cc:33:41: error: 'a' was not declared in this scope 33 | cout<<h[a]<<endl; | ^