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 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:5:13: error: '_' was not declared in this scope 5 | foreach(_; 0..10) { | ^ a.cc:9:5: error: 'writeln' was not declared in this scope 9 | writeln(a); | ^~~~~~~
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; did you mean 'int'? 7 | for(uint = 0; i < 10; i++) { | ^~~~ | int a.cc:7:19: error: 'i' was not declared in this scope 7 | for(uint = 0; i < 10; i++) { | ^ a.cc:8:16: error: 'readln' was not declared in this scope 8 | sum += readln().to!int; | ^~~~~~ a.cc:11:5: error: 'writeln' was not declared in this scope 11 | writeln(sum); | ^~~~~~~
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; did you mean 'int'? 7 | for(uint = 0; i < 10; i++) { | ^~~~ | int a.cc:7:19: error: 'i' was not declared in this scope 7 | for(uint = 0; i < 10; i++) { | ^ a.cc:8:16: error: 'readln' was not declared in this scope 8 | sum += readln().to!int; | ^~~~~~ a.cc:11:5: error: 'writef' was not declared in this scope 11 | writef("%d\n",sum); | ^~~~~~
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; did you mean 'int'? 7 | for(uint = 0; i < 10; i++) { | ^~~~ | int a.cc:7:19: error: 'i' was not declared in this scope 7 | for(uint = 0; i < 10; i++) { | ^ a.cc:8:16: error: 'readln' was not declared in this scope 8 | sum += readln().chomp().to!int; | ^~~~~~ a.cc:11:5: error: 'writef' was not declared in this scope 11 | writef("%d\n",sum); | ^~~~~~
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: error: 'import' does not name a type 3 | import std.string; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: '::main' must return 'int' 5 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'uint' was not declared in this scope; did you mean 'int'? 9 | for(uint = 0; i < 10; i++) { | ^~~~ | int a.cc:9:19: error: 'i' was not declared in this scope 9 | for(uint = 0; i < 10; i++) { | ^ a.cc:10:16: error: 'readln' was not declared in this scope 10 | sum += readln().chomp().to!int; | ^~~~~~ a.cc:13:5: error: 'writef' was not declared in this scope 13 | writef("%d\n",sum); | ^~~~~~
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 | import std.algorithm; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: '::main' must return 'int' 4 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:8:13: error: '_' was not declared in this scope 8 | foreach(_; 0..10) { | ^ a.cc:12:5: error: 'writeln' was not declared in this scope 12 | writeln(sum); | ^~~~~~~
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 | import std.array; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import std.range; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import std.string; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: '::main' must return 'int' 6 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:10:13: error: '_' was not declared in this scope 10 | foreach(_; 0..10) { | ^ a.cc:14:5: error: 'writeln' was not declared in this scope 14 | writeln(sum); | ^~~~~~~
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 | import std.array; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import std.range; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import std.string; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import std.algorithm; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:7:1: error: '::main' must return 'int' 7 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:11:13: error: '_' was not declared in this scope 11 | foreach(_; 0..10) { | ^ a.cc:15:5: error: 'writeln' was not declared in this scope 15 | writeln(sum); | ^~~~~~~
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 included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << sum << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << sum << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:41: error: expected ')' before ';' token 9 | for (int i = 0; i < 10; i++, sum ;= s[i]); | ~ ^~ | ) a.cc:9:43: error: expected primary-expression before '=' token 9 | for (int i = 0; i < 10; i++, sum ;= s[i]); | ^ a.cc:9:47: error: 'i' was not declared in this scope 9 | for (int i = 0; i < 10; i++, sum ;= s[i]); | ^ a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout << sum << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout << sum << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 | for (int i = 0; i < 10; i++, sum ;= s[i]); | ^ a.cc:11:47: error: 'i' was not declared in this scope 11 | for (int i = 0; i < 10; i++, sum ;= s[i]); | ^
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(t) priority_queue<t, vector<t>, greater<t> > #define MP make_pair #define PB push_back #define ALL(v) (v).begin(), (v).end() #define UNIQ(v) do {sort(ALL(v)); (v).erase(unique(ALL(v)), (v).end());} while (0) template <typename T> inline bool chmax(T &a, T b){if (a < b){a = b; return true;} return false;} template <typename T> inline bool chmin(T &a, T b){if (a > b){a = b; return true;} return false;} int main() { int sum = 0; FOR(i, 10){ int a; scanf("%d", &a); sum += a; } printf("%d\n", sum); }
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 declared in this scope 21 | FOR(i, 10){ | ^~~
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(){int a = 0,in; for(int i = 0; i <10; i++){scanf("%d",&in);a += in;}printf("%d",a); return 0;} | ^~~~~~~~~~~~ compilation terminated.
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; | ^~~ | 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; ///< Linked to standard input | ^~~ a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << k << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << k << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | cout << k << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:18:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout << k << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | cout << k << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:18:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout << k << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | cout << k << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:18:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout << k << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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: expected primary-expression before '?' token a.cc:8:13: error: expected primary-expression before '?' token 8 | for???(int i = 0; i < 10; i++) { | ^ a.cc:8:14: error: expected primary-expression before '?' token 8 | for???(int i = 0; i < 10; i++) { | ^ a.cc:8:16: error: expected primary-expression before 'int' 8 | for???(int i = 0; i < 10; i++) { | ^~~ a.cc:8:16: error: expected ')' before 'int' 8 | for???(int i = 0; i < 10; i++) { | ~^~~ | ) a.cc:8:25: error: expected ':' before ';' token 8 | for???(int i = 0; i < 10; i++) { | ^ | : a.cc:8:25: error: expected primary-expression before ';' token a.cc:8:25: error: expected ':' before ';' token 8 | for???(int i = 0; i < 10; i++) { | ^ | : a.cc:8:25: error: expected primary-expression before ';' token a.cc:8:25: error: expected ':' before ';' token 8 | for???(int i = 0; i < 10; i++) { | ^ | : a.cc:8:25: error: expected primary-expression before ';' token a.cc:8:27: error: 'i' was not declared in this scope 8 | for???(int i = 0; i < 10; i++) { | ^ a.cc:13:13: error: expected ';' before 'j' 13 | cout j<< sum << endl; | ^~ | ;
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 0; }
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' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 |
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\n",x); return 0;
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; ///< Linked to standard input | ^~~ a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout<<x<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:9: error: 'x' was not declared in this scope 9 | cout<<x<<endl; | ^ a.cc:9:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout<<x<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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.println(total); } }
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 type 2 | import std.stdio; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import std.array; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import std.range; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import std.string; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: 'import' does not name a type 6 | import std.algorithm; | ^~~~~~ a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: '::main' must return 'int' 8 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:12:17: error: '_' was not declared in this scope 12 | foreach(_; 0..10) { | ^ a.cc:16:9: error: 'writeln' was not declared in this scope 16 | writeln(sum); | ^~~~~~~
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){ System.out.println("Close"); } else { if(b1 == 1 && b2 == 1 && b2 == 0 || b1 == 0 && b2 == 0 && b3 == 1){ System.out.println("Open"); } } } }
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"); } return 0; }
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"); } return 0; }
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 operand of assignment 12 | else if(a=1&&b=1&&c=0){ | ^ main.c:15:20: error: lvalue required as left operand of assignment 15 | else if(a=0&&b=0&&c=1){ | ^
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: error: expected ')' before 'b2' 11 | if(b2 b2 b1){ | ~ ^~~ | ) main.c:15:14: error: expected ')' before 'b2' 15 | if(b2 b2 b1){ | ~ ^~~ | )
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(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^~~~ main.c: In function 'main': main.c:1:12: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^~~~ main.c:1:20: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts' +++ |+#include <stdio.h> 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} main.c:1:65: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^~~~ main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} main.c:1:65: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^~~~ main.c:1:65: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:1:72: error: expected ';' before '}' token 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^ | ; main.c: At top level: main.c:1:1: warning: array 'a' assumed to have one element 1 | a[];main(){gets(a);puts(15&*a&15&*a>>16|15&a[1]?"Open":"Close");exit(0)} | ^
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: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 4 | gets(a); | ^~~~ | fgets main.c:5:8: error: invalid operands to binary / (have 'int *' and 'int') 5 | puts(a/7%6)|a[1]%2?"Open":"Close"); | ~^ | | | int * main.c:5:35: error: expected ';' before ')' token 5 | puts(a/7%6)|a[1]%2?"Open":"Close"); | ^ | ; main.c:5:35: error: expected statement before ')' token
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: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 4 | gets(a); | ^~~~ | fgets main.c:5:11: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 5 | puts(*a/7%6)|a[1]%2?"Open":"Close"); | ~~~~^~ | | | int In file included from main.c:1: /usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int' 714 | extern int puts (const char *__s); | ~~~~~~~~~~~~^~~ main.c:5:36: error: expected ';' before ')' token 5 | puts(*a/7%6)|a[1]%2?"Open":"Close"); | ^ | ; main.c:5:36: error: expected statement before ')' token
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: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 4 | gets(a); | ^~~~ | fgets main.c:5:11: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 5 | puts(*a/7%6)|a[1]%2?"Open":"Close"); | ~~~~^~ | | | int In file included from main.c:1: /usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int' 714 | extern int puts (const char *__s); | ~~~~~~~~~~~~^~~ main.c:5:36: error: expected ';' before ')' token 5 | puts(*a/7%6)|a[1]%2?"Open":"Close"); | ^ | ; main.c:5:36: error: expected statement before ')' token main.c:6:2: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 6 | exit(0) ; | ^~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit' 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | a[2]; main.c:6:2: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 6 | exit(0) ; | ^~~~ main.c:6:2: note: include '<stdlib.h>' or provide a declaration of 'exit'
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); I++) #define rep(i, n) FOR(i, 0, n) #define FIN(V) cout<<V<<endl #define pb push_back #define INF (1 << 30) typedef pair<int, int> P; typedef long long ll; typedef priority_queue<int> pq; int StrToInt(string); string IntToStr(int); int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; int main(void){ int a, b, c; cin >> a >> b >> c; if((a == 1 && b == 1 || c==1)cout << "Open"<<endl; else cout << "Close" << endl; return 0; } int StrToInt(string s){ stringstream ss; ss << s; int val; ss >> val; return val; } string IntToStr(int i){ stringstream ss; ss << i; return ss.str(); }
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 | else cout << "Close" << endl; | ^~~~ a.cc:32:59: error: expected ')' before 'else' 32 | if((a == 1 && b == 1 || c==1)cout << "Open"<<endl; | ~ ^ | ) 33 | else cout << "Close" << endl; | ~~~~
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(b1=0, b2=0, b3=0) { printf("Close\n"); } return 0; }
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 left operand of assignment 10 | if(a=0&&b=0&&c=1){ | ~^~~ a.cc:12:17: error: 'retun' was not declared in this scope 12 | retun 0; | ^~~~~
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"); } return 0; }
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){ | ~^~~ a.cc:12:28: error: lvalue required as left operand of assignment 12 | if(i=1||n=1||f=0){ | ~^~~ a.cc:15:28: error: lvalue required as left operand of assignment 15 | if(i=0||n=0||f=1){ | ~^~~ a.cc:18:28: error: lvalue required as left operand of assignment 18 | if(i=0||n=0||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"); } return 0; }
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){ | ~^~~ a.cc:12:28: error: lvalue required as left operand of assignment 12 | if(i=1&&n=1&&f=0){ | ~^~~ a.cc:15:28: error: lvalue required as left operand of assignment 15 | if(i=0&&n=0&&f=1){ | ~^~~ a.cc:18:28: error: lvalue required as left operand of assignment 18 | if(i=0&&n=0&&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>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main(void) a.cc:12:9: error: 'printf' was not declared in this scope 12 | printf("Open\n"); | ^~~~~~ a.cc:12:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' a.cc:15:9: error: 'printf' was not declared in this scope 15 | printf("Close\n"); | ^~~~~~ a.cc:15:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
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;} | ^~~~ a.cc:1:54: fatal error: stdio.h>in: No such file or directory 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;} | ^~~~~~~~~~~~ compilation terminated.
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 | #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;} | ^~~~~~~~~~~~ compilation terminated.
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 | #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;} | ^~~~~~~~~~~~ compilation terminated.
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: error: expected declaration before '}' token 19 | } | ^
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;break; cefault:cout << "Close"<<endl;break; }
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 '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #inclde<iostream> a.cc:9:1: error: 'cout' was not declared in this scope 9 | cout << "Open" << endl; | ^~~~ a.cc:9:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:19: error: 'endl' was not declared in this scope 9 | cout << "Open" << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #inclde<iostream> a.cc:11:6: error: 'cout' was not declared in this scope 11 | else cout << "Close" << endl; | ^~~~ a.cc:11:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:25: error: 'endl' was not declared in this scope 11 | else cout << "Close" << endl; | ^~~~ a.cc:11:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
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-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<"Open"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<"Open"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout<<"Close"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout<<"Close"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
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 all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<(n);i++) #define FOR(itr,data) for(__typeof((data).begin()) itr=(data).begin();itr!=(data).end();++itr) #define pb(e) push_back(e) #define mp(a, b) make_pair(a, b) #define fr first #define sc second typedef unsigned long long UInt64; typedef long long Int64; const int INF=100000000; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; using namespace std; typedef pair<int ,int > P; int main() { int a,b,c; cin>>a>>b>>c; if(a&b||c) cout>>"Open">>endl; else cout<<"Close"<<endl; return 0; }
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; | ~~~~^~~~~~~~ | | | | | const char [5] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/unordered_map:59, from /usr/include/c++/14/functional:63, from a.cc:2: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:44:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~ In file included from /usr/include/c++/14/string:55, from a.cc:7: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from a.cc:8: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[5]]': a.cc:44:19: required from here 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ In file included from a.cc:10: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)' 237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed: a.cc:44:26: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 44 | if(a&b||c) cout>>"Open">>endl; | ^~~~~~ /usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_money<_MoneyT>)' 271 | operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT>
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 'int main()': a.cc:1:17: error: 'a' was not declared in this scope 1 | a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));} | ^ a.cc:1:12: error: 'gets' was not declared in this scope 1 | a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));} | ^~~~ a.cc:1:24: error: 'puts' was not declared in this scope 1 | a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));} | ^~~~ a.cc:1:20: error: 'div' was not declared in this scope 1 | a[];main(){gets(a);div(puts(*a&*a>>16|a[1]%2?"Open":"Close"));} | ^~~
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); } else { printf("%d\n", h[i] - h[i - 1]); } break; } } } return 0; }
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); } else { printf("%d\n", h[i] - h[i - 1]); } break; } } } return 0; }
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; } int main(void) { int i; scanf("%d", &N); ++N; for(i = 0; i < N; ++i) scanf("%d", &len[i]); int ans = -1; for(i = 0; i < N; ++i){ int d = (i != 0 && i != 1 ? len[1] - len[0] : len[3] - len[2]); if(isOK(i, d)) ans = i; } printf("%d\n", len[ans]); return 0; }
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(start == diff[i]) count++; else{ if(s==0) s=i; else t=i; } } if(count>=2 && t!=0) printf("%ld\n", h[t]); else if(count>=2 && t==0) printf("%ld\n", h[s+1]); else if(count == 1)(printf("%ld\n", h[1]); else printf("%ld\n", h[0]); } return 0; }
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 '}' token 32 | else printf("%ld\n", h[0]); | ^ | ; 33 | 34 | } | ~
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++; } } if (c1 > b1) { b = c; } for (i = 1; i < n; i++) { if (b != a[i] - a[i - 1] && b != a[i + 1] - a[i]) { j = i; break; } } if (j == -1) { if (b != a[1] - a[0]) { j = 0; } else { j = n; } } printf("%d\n", a[j]); scanf_s("%d", &n); c1 = 0; b1 = 0; b = 0; c = 0; j = -1; } return 0; }
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++; } } if (c1 > b1) { b = c; } for (i = 1; i < n; i++) { if (b != a[i] - a[i - 1] && b != a[i + 1] - a[i]) { j = i; break; } } if (j == -1) { if (b != a[1] - a[0]) { j = 0; } else { j = n; } } printf("%d\n", a[j]); scanf_s("%d", &n); c1 = 0; b1 = 0; b = 0; c = 0; j = -1; } return 0; }
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++; } } if (c1 > b1){ b = c; } for (i = 1; i < n; i++) { if (b != a[i] - a[i - 1] && b != a[i + 1] - a[i]) { j = i; break; } } if (j == -1) { if (b != a[1] - a[0]) { j = 0; } else { j = n; } } printf("%ld\n", a[j]); scanf("%d", &n); c1 = 0; b1 = 0; j = -1; } return 0; }
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.c:9:31: note: each undeclared identifier is reported only once for each function it appears in
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]-a[4]; } for(i=1;i<=n+1;i++){ o=s+((i-1)*y); if(o!=a[i]){ n=a[i]; w=s+((3-1)*y); if(i==2&&w!=a[3]){ n=a[1]; } break; } } printf("%d\n",n); scanf("%d",&n); } return 0; }
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:??¬???,n:??? | ^
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++){ o=s+((i-1)*y); if(o!=a[i]){ n=a[i]; w=s+((3-1)*y); if(i==2&&w!=a[3]){ n=a[1]; } break; } } printf("%d\n",n); scanf("%d",&n); } return 0; }
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){ b[l]=h[j]; k++; } } for(j=0;j<n-1;j++){ s[j]=b[j+1]-b[j]; } f=0; for(j=0;j<n-2;j++){ if(s[j]!=s[j+1]){ f=1; } } if(f==0){ printf("%d\n",h[i]); break; } } scanf("%d",&n); } return 0; }
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]); } else if(b[1]==b[2])printf("%d\n",a[3]); else if(b[2]==b[3])printf("%d\n",a[0]); else if(b[1]==a[3]-a[1])printf("%d\n",a[2]),fprintf(stderr,"4 %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);; else if(b[3]==a[2]-a[0])printf("%d\n",a[1]),fprintf(stderr,"4 %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); else exit(1); } exit(0);}
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){ | ^ main.c:2:15: error: return type defaults to 'int' [-Wimplicit-int] 2 | a[110],b[110];main(i,n){ | ^~~~ main.c: In function 'main': main.c:2:15: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:2:15: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:4:25: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 4 | if(n>90)exit(1); | ^~~~ main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit' 1 | #include <stdio.h> +++ |+#include <stdlib.h> 2 | a[110],b[110];main(i,n){ main.c:4:25: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 4 | if(n>90)exit(1); | ^~~~ main.c:4:25: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:7:51: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 7 | if(a[i]<1||100000000<a[i])exit(1); | ^~~~ main.c:7:51: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:12:32: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 12 | if(i>n)exit(1); | ^~~~ main.c:12:32: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:18:17: error: 'else' without a previous 'if' 18 | else if(b[3]==a[2]-a[0])printf("%d\n",a[1]),fprintf(stderr,"4 %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); | ^~~~ main.c:19:22: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 19 | else exit(1); | ^~~~ main.c:19:22: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:21:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 21 | exit(0);} | ^~~~ main.c:21:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
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 = 0; i < n+1; ++i) cin >> h[i]; for(int k = 0; k < n+1; ++k) { vector<int> v; for(int i = 0; i < n+1; ++i) { if(i == k) continue; v.push_back(h[i]); } if(isValid(v)) { cout << h[k] << endl; break; } } } return 0; }
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, j; for ( ; ; ) { scanf ( "%d", &n ); if ( n == 0 ) break ; for ( i = 0; i <= n; ++i ) scanf ( "%d", &d[ i ] ); for ( i = 0; i <= n; ++i ) { int t[ N ]; int sp = 0; for ( j = 0; j <= n; ++j ) { if ( j == 0 ) continue ; t[ sp++ ] = d[ j ]; } if ( judge ( t ) ) { printf ( "%d\n", d[ i ] ); break ; } } } return ( EXIT_SUCCESS ); }
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]); break; } } return 0; }
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[a]); break; } } return 0; }
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){ | ^ main.c:22:20: note: each undeclared identifier is reported only once for each function it appears in
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 <climits> #define all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<(n);i++) #define pb(e) push_back(e) #define mp(a, b) make_pair(a, b) #define fr first #define sc second const int INF=100000000; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; using namespace std; typedef pair<int ,int > P; typedef long long ll; int n; int h[102]; bool ok(int a) { rep(i,n+1) { if(i==a) continue; int p = i -1; if(i==a+1) p = i - 2; if(p<0) continue; // printf("%d : %d %d,%d %d\n", i, h[0], h[1], h[p],h[i]); if(h[0]-h[1] != h[p]-h[i]) return false; } return true; } void solve() { rep(i,n+1) cin>>h[i]; rep(i,n+1) { if(ok(i)) { cout<<h[i]<<endl; return; } } cout<<a[0]<<endl; } int main() { while(cin>>n) { if(n==0) break; solve(); } return 0; }
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] = cin.nextInt(); } int[] cnt = new int[n + 1]; bool writed = false; for (int i = 1; i < n; i++) { if (h[i] - h[i - 1] != h[i + 1] - h[i]) { cnt[i - 1]++; cnt[i]++; cnt[i + 1]++; if (cnt[i - 1] == 3) { Console.WriteLine(h[i - 1]); writed = true; break; } } } if (!writed) { if (cnt[0] == 1) { Console.WriteLine(cnt[1] == 2 ? h[1] : h[0]); } else { Console.WriteLine(cnt[n - 1] == 2 ? h[n - 1] : h[n]); } } } return 0; } } class Scanner { string[] s; int i; char[] cs = new char[] { ' ' }; public Scanner() { s = new string[0]; i = 0; } public string next() { if (i < s.Length) return s[i++]; do { s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries); } while ((s.Length == 1 && s[0] == "") || s.Length == 0); i = 0; return s[i++]; } public int nextInt() { return int.Parse(next()); } public long nextLong() { return long.Parse(next()); } public double nextDouble() { return double.Parse(next()); } }
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.ComponentModel.Design; | ^~~~~~ a.cc:7:15: error: expected ':' before 'static' 7 | public static int Main() | ^~~~~~~ | : a.cc:53:2: error: expected ';' after class definition 53 | } | ^ | ; a.cc: In static member function 'static int Program::Main()': a.cc:9:17: error: 'Scanner' was not declared in this scope 9 | Scanner cin = new Scanner(); | ^~~~~~~ a.cc:12:33: error: 'cin' was not declared in this scope 12 | int n = cin.nextInt(); | ^~~ a.cc:17:29: error: structured binding declaration cannot have type 'long int' 17 | long[] h = new long[n + 1]; | ^~ a.cc:17:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:17:29: error: empty structured binding declaration a.cc:17:32: error: expected initializer before 'h' 17 | long[] h = new long[n + 1]; | ^ a.cc:20:33: error: 'h' was not declared in this scope 20 | h[i] = cin.nextInt(); | ^ a.cc:22:28: error: structured binding declaration cannot have type 'int' 22 | int[] cnt = new int[n + 1]; | ^~ a.cc:22:28: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:22:28: error: empty structured binding declaration a.cc:22:31: error: expected initializer before 'cnt' 22 | int[] cnt = new int[n + 1]; | ^~~ a.cc:26:37: error: 'h' was not declared in this scope 26 | if (h[i] - h[i - 1] != h[i + 1] - h[i]) | ^ a.cc:28:41: error: 'cnt' was not declared in this scope; did you mean 'int'? 28 | cnt[i - 1]++; | ^~~ | int a.cc:33:49: error: 'Console' was not declared in this scope 33 | Console.WriteLine(h[i - 1]); | ^~~~~~~ a.cc:41:37: error: 'cnt' was not declared in this scope; did you mean 'int'? 41 | if (cnt[0] == 1) | ^~~ | int a.cc:43:41: error: 'Console' was not declared in this scope 43 | Console.WriteLine(cnt[1] == 2 ? h[1] : h[0]); | ^~~~~~~ a.cc:43:73: error: 'h' was not declared in this scope 43 | Console.WriteLine(cnt[1] == 2 ? h[1] : h[0]); | ^ a.cc:47:41: error: 'Console' was not declared in this scope 47 | Console.WriteLine(cnt[n - 1] == 2 ? h[n - 1] : h[n]); | ^~~~~~~ a.cc:47:77: error: 'h' was not declared in this scope 47 | Console.WriteLine(cnt[n - 1] == 2 ? h[n - 1] : h[n]); | ^ a.cc: At global scope: a.cc:56:9: error: 'string' does not name a type 56 | string[] s; | ^~~~~~ a.cc:59:13: error: expected unqualified-id before '[' token 59 | char[] cs = new char[] { ' ' }; | ^ a.cc:61:15: error: expected ':' before 'Scanner' 61 | public Scanner() { | ^~~~~~~~ | : a.cc:66:15: error: expected ':' before 'string' 66 | public string next() { | ^~~~~~~ | : a.cc:66:16: error: 'string' does not name a type 66 | public string next() { | ^~~~~~ a.cc:75:15: error: expected ':' before 'int' 75 | public int nextInt() { | ^~~~ | : a.cc:79:15: error: expected ':' before 'long' 79 | public long nextLong() { | ^~~~~ | : a.cc:83:15: error: expected ':' before 'double' 83 | public double nextDouble() { | ^~~~~~~ | : a.cc:87:2: error: expected ';' after class definition 87 | } | ^ | ; a.cc: In constructor 'Scanner::Scanner()': a.cc:62:17: error: 's' was not declared in this scope 62 | s = new string[0]; | ^ a.cc:62:25: error: 'string' does not name a type 62 | s = new string[0]; | ^~~~~~ a.cc: In member function 'int Scanner::nextInt()': a.cc:76:24: error: expected primary-expression before 'int' 76 | return int.Parse(next()); | ^~~ a.cc:76:24: error: expected ';' before 'int' a.cc:76:27: error: expected unqualified-id before '.' token 76 | return int.Parse(next()); | ^ a.cc: In member function 'long int Scanner::nextLong()': a.cc:80:24: error: expected primary-expression before 'long' 80 | return long.Parse(next()); | ^~~~ a.cc:80:24: error: expected ';' before 'long' a.cc:80:28: error: expected unqualified-id before '.' token 80 | return long.Parse(next()); | ^ a.cc: In member function 'double Scanner::nextDouble()': a.cc:84:24: error: expected primary-expression before 'double' 84 | return double.Parse(next()); | ^~~~~~ a.cc:84:24: error: expected ';' before 'double' a.cc:84:30: error: expected unqualified-id before '.' token 84 | return double.Parse(next()); | ^
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; //cout<<d1<<" "<<d2<<" "<<d3<<endl; if(d2==d3&&d1!=d2){K=x0;f=true;} if(x2-x0==d3){K=x1;f=true;} if(d1==x3-x1){K=x2;f=true;} if(d1==d2&&d1!=d3){K=x3;f=true;} if(f!=true){ d=d1;x=x3;} for(int i=4;i<=N;i++) { cin>>y; if(y-x!=d&&f==false){K=y;f==true} else x=y; } //} cout<<K<<endl; } }
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++; } if((i==2)&&(F==2)){ cout<<h[0]<<endl; break; } else if(F==2){ cout<<h[i]<<endl; break; } else if((i<=n-1)&&(F==1)){ cout<<h[n]<<endl; break; } } } return 0;
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[j]; } d=tmp[1]-tmp[0]; for(int a=1;a<n-1;a++){ if(tmp[a+1]-tmp[a]!=d){ F=1; break; } } if(F==1){ cout<<h[a]<<endl; break; } } } return 0; }
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]=h[j]; } d=tmp[1]-tmp[0]; for(int a=1;a<n-1;a++){ if(tmp[a+1]-tmp[a]!=d){ F=1; break; } } if(F==1){ cout<<h[a]<<endl; break; } } } return 0; }
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-1]=h[j]; } d=tmp[1]-tmp[0]; for(int a=1;a<n-1;a++){ if(tmp[a+1]-tmp[a]!=d){ F=1; break; } } if(F==1){ cout<<h[a]<<endl; break; } } } return 0; }
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-1]=h[j]; } d=tmp[1]-tmp[0]; for(int a=1;a<n-1;a++){ if(tmp[a+1]-tmp[a]!=d){ F=0; break; } } if(F==0){ cout<<h[a]<<endl; break; } } } return 0; }
a.cc: In function 'int main()': a.cc:33:41: error: 'a' was not declared in this scope 33 | cout<<h[a]<<endl; | ^