submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s455086798
p00683
Java
import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import jav...
Main.java:17: error: class, interface, enum, or record expected ?????????????? ^ Main.java:19: error: illegal start of type ?????? ^ Main.java:26: error: illegal start of type ?????? ^ Main.java:28: error: illegal start of expression ????BufferedReader br=new BufferedReader(new InputStreamReader(in)); ^ Main.java:28: e...
s470212420
p00683
Java
import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import jav...
Main.java:29: error: cannot find symbol Scanner sc=new Scanner(in); ^ symbol: class Scanner location: class Main Main.java:29: error: cannot find symbol Scanner sc=new Scanner(in); ^ symbol: class Scanner location: class Main 2 errors
s169033657
p00683
Java
import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import jav...
Main.java:60: error: unclosed string literal String insertionStr="=com.substring(8,(com.length()-1)); ^ 1 error
s144235240
p00683
Java
import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import jav...
Main.java:60: error: unclosed string literal String insertionStr="=com.substring(8,com.length()-1); ^ 1 error
s757710336
p00683
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:21: error: cannot find symbol Arrays.fill(str,'-'); ^ symbol: variable str location: class Main Main.java:22: error: cannot find symbol for(int i=0;i<s.length();i++) str[i]=s.charAt(i); ^ symbol: variable str location: class Main Main.java:28: ...
s173447496
p00683
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter o...
Main.java:48: error: cannot find symbol for(int i=MAX-insertionStr.length();i>=cur;i--){ ^ symbol: variable MAX location: class Main 1 error
s858874134
p00683
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter...
Main.java:20: error: ';' expected int cur=0,MAX=1500 ^ 1 error
s599291389
p00683
C
#include <cstdio> #include <cctype> #include <cstring> #include <string> #define MIN(A,B) \ ( (B) < (A) ? (B) : (A) ) #define MAX(A,B) \ ( (B) > (A) ? (B) : (A) ) using namespace std; /** Application main entry point. */ int main ( int argc, char * argv[ ] ) { char buf[ 256 ]; int n; fgets ( bu...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s564671327
p00683
C++
3 A sample input 9 forward word delete char forward word delete char forward word delete char backward word backward word forward word Hallow, Word. 7 forward char delete word insert "ello, " forward word backward char backward char insert "l" 3 forward word backward word delete word
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s872430847
p00683
C++
#include <iostream> #include <stdlib> #include <string> using namespace std; int main() { int N,n,c; string str,cmd; getline(cin,cmd); N=atoi(cmd.c_str()); while(N--) { c=0; getline(cin,str); getline(cin,cmd); n=atoi(cmd.c_str()); while(n--) { getline(cin,cmd); if(cmd=="forward char") { ...
a.cc:2:10: fatal error: stdlib: No such file or directory 2 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s872045397
p00683
C++
{ string str; char c; c = _space(); if (c == '\n') return str; do { str+=c; } while ((c = getchar()) != '\n'); return string(str); } string nextQuote() { space(); char c; string str = ""; while ((c = getchar()) != '"') { str += c; } return str; } int main() { int nTest; scanf(...
a.cc:1:1: error: expected unqualified-id before '{' token 1 | { | ^ a.cc:13:1: error: 'string' does not name a type 13 | string nextQuote() | ^~~~~~ a.cc: In function 'int main()': a.cc:27:3: error: 'scanf' was not declared in this scope 27 | scanf("%d ",&nTest); | ^~~~~ a.cc:31:5: error...
s306400747
p00683
C++
using namespace std; #include <iostream> #include <vector> #include <string.h> #include <string> #define REP(i, n) for(int i=0; i<n; i++) typedef vector<int> VI; int T, N; string text; string cmd; string tmp; void execute(string& text, string cmd) { if(cmd == "forward char"){ REP(i, text.size()) { if(text[i...
a.cc: In function 'void execute(std::string&, std::string)': a.cc:135:25: error: expected primary-expression before '<' token 135 | < first = i; | ^
s081347466
p00683
C++
#include <cstdio> #include <iostream> #include <string> #include <cmath> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ char b[1009]; gets(b); gets(b); string buf(b); //cout << "buf is " << buf << endl; int pos=0; int cn; ...
a.cc: In function 'int main()': a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 13 | gets(b); | ^~~~ | getw
s167841141
p00683
C++
#include <iostream> #include <cstdio> #include <cmath> #include <string> using namespace std; int main(){ int n,r; cin >> n; cin.ignore(); while(n--){ int cur = 0; string text, command; getline(cin, text); int len = text.size(); cin >> r; cin.ignore(); while(r--){ getline(cin, command); if(comm...
a.cc: In function 'int main()': a.cc:43:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 43 | int main(){ | ^~ a.cc:43:9: note: remove parentheses to default-initialize a variable 43 | int main(){ | ^~ | -- a.cc:43:9: note: or re...
s129125254
p00683
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int main() { string bla = "bla"; cout<<bla.substr(3)<<endl; int nb_cas; cin>>nb_cas; cin.ignore(); while(nb_cas--) { string texte; getline(cin,texte); int nb_op; ...
a.cc: In function 'int main()': a.cc:46:47: error: no matching function for call to 'min(std::__cxx11::basic_string<char>::size_type, int&)' 46 | texte = texte.substr(0,min(texte.size(),curseur))+texte.substr(min(curseur+1,(int)texte.size())); | ~~...
s000147843
p00683
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int main() { string bla = "bla"; cout<<bla.substr(3)<<endl; int nb_cas; cin>>nb_cas; cin.ignore(); while(nb_cas--) { string texte; getline(cin,texte); int nb_op; ...
a.cc: In function 'int main()': a.cc:46:47: error: no matching function for call to 'min(std::__cxx11::basic_string<char>::size_type, int)' 46 | texte = texte.substr(0,min(texte.size(),(int)curseur))+texte.substr(min(curseur+1,(int)texte.size())); | ...
s924950111
p00683
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int main() { string bla = "bla"; cout<<bla.substr(3)<<endl; int nb_cas; cin>>nb_cas; cin.ignore(); while(nb_cas--) { string texte; getline(cin,texte); int nb_op; ...
a.cc: In function 'int main()': a.cc:62:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 62 | while(s2[0]!="\"") s2=s2.substr(1); a.cc:63:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 63 | while(s2[s2.size()-1]!="\"...
s993638147
p00683
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main(){ int n; cin >>n; cin.ignore(); for(int i=0;i<n;i++){ string str; int cn,pos; if(!getline(cin,str)){ str = ""; } cin >> cn; pos = 0; for(int j=0;j<cn;j++){ string command,target; ch...
a.cc: In function 'int main()': a.cc:51:24: error: 'temp' was not declared in this scope; did you mean 'tm'? 51 | if(str[temp]!=" "){ | ^~~~ | tm a.cc:55:24: error: 'temp' was not declared in this scope; did you mean 'tm'? 55 | ...
s987592711
p00684
Java
import java.util.*; public class AOJ_1102{ void run(){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String exp = sc.next(); try{ Parser parser = new Parser(exp); System.out.println(parser.expression()); } c...
Main.java:2: error: class AOJ_1102 is public, should be declared in a file named AOJ_1102.java public class AOJ_1102{ ^ 1 error
s262172638
p00684
C
typedef struct{int r,i;}C;char*p,s[999];o;C E(),M(),a;C G(r,i){C c={r,i};o|=abs(r)>1e4||abs(i)>1e4;return c;}C T(r,l){C c;*p==40?c=E(p++),p++:*p<58?sscanf(p,"%d%n",&r,&l),p+=l,c=G(r,0):(c=G(0,1),p++);return c;}C E(f){C c=M(),d;for(f=1;f;)f=*p==43?d=M(p++),c=G(c.r+d.r,c.i+d.i),1:*p==45?d=M(p++),c=G(c.r-d.r,c.i-d.i),1:0;...
main.c:1:41: warning: data definition has no type or storage class 1 | typedef struct{int r,i;}C;char*p,s[999];o;C E(),M(),a;C G(r,i){C c={r,i};o|=abs(r)>1e4||abs(i)>1e4;return c;}C T(r,l){C c;*p==40?c=E(p++),p++:*p<58?sscanf(p,"%d%n",&r,&l),p+=l,c=G(r,0):(c=G(0,1),p++);return c;}C E(f){C c=M(),d;for(f=1;f;)f=*p==4...
s666973850
p00684
C++
#include <bits/stdc++.h> using namespace std; typedef string::const_iterator State; typedef pair<int, int> Pii; #define fr first #define sc second bool is_over = false; struct Parser { Pii expression(State &idx) { Pii ret = term(idx); if ( abs(ret.fr) > 10000 || abs(ret.sc) > 10000 ) is_over = true; ...
a.cc:98:11: error: stray '#' in program 98 | int main()#include <bits/stdc++.h> | ^ a.cc:209:31: error: stray '#' in program 209 | printf("%di\n", ret.sc);#include <bits/stdc++.h> | ^ a.cc:98:12: error: expected initializer before 'include' 98 | int main...
s648858868
p00684
C++
#include<iostream> #include<string> #include<complex> using namespace std; typedef complex<int> ci; string expr;bool of; ci prs(int s,int t){ int d=0,mi=t,pmi=t; for(int i=s;i<t;i++){ char c=expr[i]; if(c=='(')d++; if(c==')')d--; if(d==0&&c=='*')mi=i; if(d==0&&(c=='+'||c=='-'))pmi=i; } ci r; if(pmi<t)r=p...
a.cc: In function 'ci prs(int, int)': a.cc:21:39: error: lvalue required as left operand of assignment 21 | if(expr[s]=='i')r.imag()=1; | ~~~~~~^~ a.cc:22:48: error: lvalue required as left operand of assignment 22 | else for(int i=s;i<t;i++)r....
s938746705
p00684
C++
#include <iostream> #include <complex> #include <map> #include <stack> #include <string> #include <cctype> #include <cstdlib> using namespace std; typedef complex<int> C; int p; string expr; bool err; int parseInt() { int ret=0; while(isdigit(expr[p])) { ret*=10; ret+=expr[p]-'0'; p++; } return ret; } ...
a.cc: In function 'int main()': a.cc:122:36: error: expected ';' before 'err' 122 | if(check(num.top()) err=1; | ^~~~ | ; a.cc:124:17: error: expected primary-expression before 'if' 124 | if(err) cout <...
s506569916
p00684
C++
#include <iostream> #include <complex> #include <map> #include <stack> #include <string> #include <cctype> #include <cstdlib> using namespace std; typedef complex<int> C; int p; string expr; bool err; int parseInt() { int ret=0; while(isdigit(expr[p])) { ret*=10; ret+=expr[p]-'0'; p++; } return ret; } ...
a.cc: In function 'int main()': a.cc:122:36: error: expected ';' before 'err' 122 | if(check(num.top()) err=1; | ^~~~ | ; a.cc:124:17: error: expected primary-expression before 'if' 124 | if(err) cout <...
s211369230
p00684
C++
#include <iostream> #include <complex> #include <map> #include <stack> #include <string> #include <cctype> #include <cstdlib> using namespace std; typedef complex<int> C; int p; string expr; bool err; int parseInt() { int ret=0; while(isdigit(expr[p])) { ret*=10; ret+=expr[p]-'0'; p++; } return ret; } ...
a.cc: In function 'int main()': a.cc:122:36: error: expected ';' before 'err' 122 | if(check(num.top()) err=1; | ^~~~ | ; a.cc:124:17: error: expected primary-expression before 'if' 124 | if(err) cout <...
s511513627
p00684
C++
#include <iostream> #include <complex> #include <map> #include <stack> #include <string> #include <cctype> #include <cstdlib> using namespace std; typedef complex<int> C; int p; string expr; bool err; int parseInt() { int ret=0; while(isdigit(expr[p])) { ret*=10; ret+=expr[p]-'0'; p++; } return ret; } ...
a.cc: In function 'int main()': a.cc:122:36: error: expected ';' before 'err' 122 | if(check(num.top()) err=1; | ^~~~ | ; a.cc:124:17: error: expected primary-expression before 'if' 124 | if(err) cout <...
s666844273
p00684
C++
#include <iostream> #include <algorithm> #include <complex> #include <cassert> using namespace std; typedef complex<long long> P; long long abs(long long x){ return x < 0 ? -x : x; } int pos; string ln; bool f = 0; P term(); P factor(); P formula(){ P ans = term(); while(ln[pos] == '+' || ln[pos] == '-'){ if(ln[...
a.cc: In function 'P formula()': a.cc:26:24: error: call of overloaded 'abs(long long int)' is ambiguous 26 | if( abs(ans.real()) > 10000 || abs(ans.imag()) > 10000 ) f = 1; | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/in...
s060003057
p00684
C++
#include <iostream> #include <algorithm> #include <complex> #include <cassert> long long abs(long long x){ return x<0?-x:x; } using namespace std; typedef complex<long long> P; int pos; string ln; bool f = 0; P term(); P factor(); P formula(){ P ans = term(); while(ln[pos] == '+' || ln[pos] == '-'){ if(ln[pos] ==...
a.cc: In function 'P formula()': a.cc:25:24: error: call of overloaded 'abs(long long int)' is ambiguous 25 | if( abs(ans.real()) > 10000 || abs(ans.imag()) > 10000 ) f = 1; | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/in...
s617108945
p00684
C++
#include <iostream> #include <complex> using namespace std; #define COMP complex<long long> #define abs(a) (a<0?-a:a) char *p, buf[150]; COMP expr(); COMP fact(){ COMP ret; if(*p == '('){ p++; ret=expr(); p++; }else if(*p == 'i'){ ret=COMP(0,1); p++; }else{ while(isdigit(*p)){ ret = ret * 10 + i...
a.cc: In function 'std::complex<long long int> fact()': a.cc:24:35: error: no match for 'operator*' (operand types are 'std::complex<long long int>' and 'int') 24 | ret = ret * 10 + int(*p - '0'); | ~~~ ^ ~~ | | | ...
s053353059
p00684
C++
#include <iostream> #include <complex> using namespace std; #define COMP complex<int> int abs(int a) {return (a<0) ?-a:a} char *p, buf[11000]; COMP expr(); COMP fact(){ COMP ret; if(*p == '('){ p++; ret=expr(); p++; }else if(*p == 'i'){ ret=COMP(0,1); p++; }else{ while(isdigit(*p)){ ret = ret * ...
a.cc: In function 'int abs(int)': a.cc:7:35: error: expected ';' before '}' token 7 | int abs(int a) {return (a<0) ?-a:a} | ^ | ;
s053499838
p00684
C++
#include <iostream> #include <string> #include <complex> #include <cstdlib> #include <cctype> using namespace std; int p; string str; bool v; complex<int> expr(); complex<int> factor(); complex<int> term(); bool isValid(complex<int>& c) { if(abs(c.real()) > 10000 || abs(c.imag()) > 10000) return false; return true...
a.cc: In function 'std::complex<int> parseInt()': a.cc:30:30: error: cannot bind non-const lvalue reference of type 'std::complex<int>&' to an rvalue of type 'std::complex<int>' 30 | v &= isValid(complex<int>(res, 0)); | ^~~~~~~~~~~~~~~~~~~~ a.cc:16:28: note: init...
s000757064
p00684
C++
#define _USE_MATH_DEFINES #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <cassert> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #inc...
a.cc: In function 'P val(const char*&)': a.cc:66:26: error: cannot bind non-const lvalue reference of type 'P&' {aka 'std::complex<int>&'} to an rvalue of type 'P' {aka 'std::complex<int>'} 66 | is_error(P(v,0)); | ^~~~~~ a.cc:44:18: note: initializing argument 1 of '...
s561561765
p00684
C++
#include <iostream> #include <string> #include <cstdio> #include <cstdlib> using namespace std; struct complex{ int re, im; complex(int r, int i): re(r), im(i){ if(abs(r) > 10000 || abs(i) > 10000) throw 0; } complex operator+ (const complex &c) const{ return complex(re + c.re, im + c.im); } complex op...
a.cc: In function 'int main()': a.cc:111:2: error: expected '}' at end of input 111 | } | ^ a.cc:86:11: note: to match this '{' 86 | int main(){ | ^
s799067086
p00684
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include <climits> #include <algorithm> #include <map> #include <set> #include <stack> #include <vector> #include <queue> #include <string> #include <complex> using namespace std; #define re...
a.cc:29:5: error: 'int index' redeclared as different kind of entity 29 | int index; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:7: /usr/include/strings.h:50:20: note: previous declaration 'const char* index(const...
s299520002
p00684
C++
#include <iostream> #include <string> #include <complex> using namespace std; // typedef complex<int> comp; class comp : public complex<int> { public: comp() : complex<int>() {} comp(complex<int> const& c) { real(c.real()), imag(c.imag()); } bool overflow; }; int const lim = 10000; comp ope...
/usr/bin/ld: /tmp/ccMTruPL.o: in function `expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': a.cc:(.text+0x197): undefined reference to `term(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: a.cc:(.text+0x1e1): undefined referen...
s009620523
p00684
C++
// Calculation of Expressions import java.util.*; public class Main { static String formula; static int pos; static boolean overflow; public static void main(String[] args) { Scanner sc = new Scanner(System.in); formula = sc.next(); pos = 0; overflow = false; Complex c = parse(); if (overflow) Syst...
a.cc:95:17: error: stray '@' in program 95 | @Override | ^ a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 |...
s398049153
p00685
Java
import java.util.Scanner; public class AOJ_1103{ int HEIGHT = 4; int WIDTH = 4; int[][] relationXY; void run(){ Scanner sc = new Scanner(System.in); //int[][] temp = { { -2, 1},{ -1, 1},{ 1, 1},{ 1, 2}}; while(true){ int[][] temp = new int[4][2]; ...
Main.java:3: error: class AOJ_1103 is public, should be declared in a file named AOJ_1103.java public class AOJ_1103{ ^ 1 error
s734022720
p00685
C++
#include "stdafx.h" #include <stdio.h> // #include <windows.h> int ans = 0; int x[4],y[4]; int depth = 0; int put_map(int m[4][4],int current){ if(depth == 8){ ans++; return 0; } int i,j,k,a,b,pointer; int next1,next2; int copy[4][4]; for(pointer = current; pointer < 15; pointer++){ i = pointer / 4; ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s269900901
p00685
C++
#include "stdafx.h" #include <stdio.h> int ans = 0; int x[4],y[4]; int depth = 0; int put_map(int m[4][4],int current){ if(depth == 8){ ans++; return 0; } int i,j,k,a,b,pointer; int next1,next2; int copy[4][4]; for(pointer = current; pointer < 15; pointer++){ i = pointer / 4; j = pointer % 4; if(...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s398880643
p00685
C++
using namespace std; #include <iostream> #include <vector> #define REP(i, n) for(int i=0; i<n; i++) typedef vector<int> VI; int cnt; int num[8]; void solve(VI board, int depth) { //end check if(depth == 8) { bool is_end = true; REP(i, board.size()) { if(board[i] == 0) { is_end = false; break;...
a.cc: In function 'void solve(VI, int)': a.cc:52:57: error: 'memcpy' was not declared in this scope 52 | memcpy(&v[0], &board[0], sizeof(int)*16); | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in head...
s867694389
p00686
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int mX,mY; int ang=0; String[] puts=new String[50]; do{ int x=sc.nextInt(); int y=sc.nextInt(); String s=sc.next(); while(!(s.equals("STOP"))){ ...
Main.java:15: error: ')' expected if(s.equals("FORWARD"){ ^ Main.java:47: error: ')' expected }else if(s.equals("RIGHT"){ ^ Main.java:53: error: ')' expected }else if(s.equals("LEFT"){ ^ 3 errors
s843018629
p00686
Java
import java.util.*; public class AOJ1104{ public static void main(String[] args){ int Walk,x,y,w,h; Scanner in = new Scanner(System.in); final int[] dx = {0,1,0,-1}; final int[] dy = {1,0,-1,0}; int dir; while(true){ w = in.nextInt(); h = in.nextInt(); if(w+h == 0)break; ...
Main.java:3: error: class AOJ1104 is public, should be declared in a file named AOJ1104.java public class AOJ1104{ ^ 1 error
s461787113
p00686
C
import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);int[][]ds={{0,1},{1,0},{0,-1},{-1,0}};for(int[]n={0,0};(n[0]=s.nextInt())>0;){n[1]=s.nextInt();int[]p={1,1};int d=0,i,x;for(String y;!(y=s.next()).equals("STOP");System.out.println(p[0]+" "+p[1])){if(y.endsWith("D"))for(i=...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);int[][]ds={{0,1},{1,0},{0,-1},{-1,0}};for(int[]n={0,0};(n[0]=s.nextInt())>0;){n[1]=s.nextInt();int[]p={1,1};int d=0,i,x;for(String y;!(y=s.next()).equals("STOP");System...
s095544594
p00686
C
#include<stdio.h> #include<string.h> int main(void){ &#160; struct place{ &#160; &#160; char x,y,dir; &#160; } now; &#160; unsigned int m,n; &#160; int k; &#160; char input[32],command[16]; &#160; while(scanf("%u%u%*c",&m,&n) && m && n){ &#160; &#160; now=(struct place){1,1,0}; &#160; &#160;&#160; &#160; &#160;...
main.c: In function 'main': main.c:8:2: error: stray '#' in program 8 | &#160; struct place{ | ^ main.c:8:1: error: lvalue required as unary '&' operand 8 | &#160; struct place{ | ^ main.c:9:1: error: expected specifier-qualifier-list before '&' token 9 | &#160; &#160; char x,y,dir; | ^ m...
s400466871
p00686
C++
#include<iostream> #include<cstring> #include<algorithm> #include<cstdlib> #include<vector> #include<cmath> #include<stdlib.h> #include<iomanip> #include<list> #include<deque> #include<map> #include <stdio.h> #include <queue> #include <stack> #define maxn 10000+5 #define ull unsigned long long #define ll long long #def...
a.cc: In function 'int getbool(int)': a.cc:48:1: error: a function-definition is not allowed here before '{' token 48 | { | ^ a.cc:66:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 66 | int main() | ^~ a.cc:66:9: note: remove parentheses to default-...
s304471525
p00686
C++
#include<iostream> #include<math.h> #include<iomanip> #include<String> using namespace std; int main(){ int n,m,x,y,num; int di=0; string order; while(1){ cin>>n>>m; x=1;y=1; if(n==0 && m==0)break; while(1){ cin>>order; if(order=="FORWARD"){ cin>>num; if(di==0){ y=min(y+num,m);...
a.cc:4:9: fatal error: String: No such file or directory 4 | #include<String> | ^~~~~~~~ compilation terminated.
s131794166
p00686
C++
#include<algorithm> #include<cstring> #include<map> #include<set> #define rep(i,n) for(int i=0;i<n;i++) #define INF 1<<29 using namespace std; int main(){ int mv[4][3]= {{0,1,1}, //forward {-1,0,0},//left {0,-1,0},//backward {1,0,0}};//right int n,m,num,x,y; string op; while(true){ cin ...
a.cc: In function 'int main()': a.cc:16:3: error: 'string' was not declared in this scope 16 | string op; | ^~~~~~ a.cc:5:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 4 | #include<set> +++ |+#include <string> 5 | #define rep(i,n) f...
s402386936
p00686
C++
#include <iostream> #include <string> using namespace std; int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int main(){ int n, m; while(cin >> n >> m, n+m){ int mx = 1, my = 1; int direction = 0; while(1){ string command; int step; cin >> command...
a.cc: In function 'int main()': a.cc:35:38: error: expected ')' at end of input 35 | else if(command == "STOP" | ~ ^ | ) a.cc:35:38: error: expected statement at end of input a.cc:35:38: error: expected '}' at end of inpu...
s240137546
p00686
C++
#include<iostream> #include<vector> #include<algorithm> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define all(in) in.begin(),in.end() #define pb(in,a) in.push_back(a) using namespace std; int a[4]={0,1,0,-1}; int b[4]={1,0,-1,0}; int main(){ int n,m; while(cin>>n>>m,n||m){ int to=0; ...
a.cc: In function 'int main()': a.cc:28:8: error: 'else' without a previous 'if' 28 | }else if(s=="STOP")break; | ^~~~
s963721834
p00687
C
/* */ #include<stdio.h> int Main(); int main(int argc, char *argv[]){ while( Main() == 0 ); return 0; } int Main(){ int n = 0, a = 0, b = 0, count = 0, i = 0, j = 0; //?????????????????\????????????a??¨b???????????§?????????????????°??? if( scanf("%d %d %d", &n, &a, &b) != 3 ){ return -1; } char list[n+1]; //...
main.c: In function 'Main': main.c:27:1: error: expected declaration or statement at end of input 27 | } | ^
s589515638
p00687
C
/* */ #include<stdio.h> int Main(); int main(int argc, char *argv[]){ while( Main() == 0 ); return 0; } int Main(){ int n = 0, a = 0, b = 0, count = 0, i = 0, j = 0; //?????????????????\????????????a??¨b???????????§?????????????????°??? if( scanf("%d %d %d", &n, &a, &b) != 3 ){ return -1; } char list[n+1]; //...
main.c: In function 'Main': main.c:27:1: error: expected declaration or statement at end of input 27 | } | ^
s899961245
p00687
C
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<cassert> #include<iostream> #include<sstream> #include<string> #include<vector> #include<queue> #include<set> #include<map> #include<utility> #include<numeric> #include<algorithm> #include<bitset> #include<complex> #include<stack> using name...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s076275394
p00687
C++
#include<iostream> #include<string> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int n,a,b; bool used[1000004]; int main(){ while(cin>>n>>a>>b,n){ int sum=0; memset(used,0,sizeof(used)); for(int i=a;i<=n;i+=a)used[i]=1; for(int j=b;j<=n;j+=b)used[j]=1; r(i,n+1)if(used[i]&&i+a<=n)used[i...
a.cc: In function 'int main()': a.cc:10:5: error: 'memset' was not declared in this scope 10 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> ...
s110371419
p00687
C++
include<iostream> using namespace std; typedef long long int lli; lli gcd(lli a, lli b){ if(a%b==0)return b; return gcd(b,a%b); } lli lcm(lli a, lli b){ if(a<b)swap(a,b); lli g=gcd(a,b); return b*(a/g); } int main(){ while(true){ int ableCount = 0; int n,a,b; cin >> n >> a >> b; if(n==0...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'lli lcm(lli, lli)': a.cc:13:10: error: 'swap' was not declared in this scope 13 | if(a<b)swap(a,b); | ^~~~ a.cc: In function 'int main()': a.cc:22:5: error: 'cin' was not declared in this sco...
s796877058
p00687
C++
#include<iostream> int n,a,b,i,j,f[1000001];main(){ for(;std::cin>>n>>a>>b,n|a|b;printf("%d\n",j)){for(i=0;i<n;i++)f[i]=1;for(i=0;i<=n;i+=a)if(f[i])for(j=i;j<=n;j+=b)f[j]=0;j=0;for(i=1;i<=n;)f[i++]&&j++;}
a.cc:2:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int n,a,b,i,j,f[1000001];main(){ for(;std::cin>>n>>a>>b,n|a|b;printf("%d\n",j)){for(i=0;i<n;i++)f[i]=1;for(i=0;i<=n;i+=a)if(f[i])for(j=i;j<=n;j+=b)f[j]=0;j=0;for(i=1;i<=n;)f[i++]&&j++;} | ^~~~ a...
s121038704
p00687
C++
I would, if I could,
a.cc:1:5: error: 'I' does not name a type 1 | I would, if I could, | ^
s735812911
p00687
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(void){ int n,a,b; while(cin >> n >> a >> b,n|a|b){ vector<int>cnt(n+1); fill(cnt,cnt+n+1,1); for(int i=0;i<=n;i++){ for(int j=0;min(a*i+b*j,j*j)<=n;j++){ cnt[a*i+b*j]=0; } } int ans=0; for(int i=0;i<=n;i...
a.cc: In function 'int main()': a.cc:12:29: error: no match for 'operator+' (operand types are 'std::vector<int>' and 'int') 12 | fill(cnt,cnt+n+1,1); | ~~~^~ | | | | | int | ...
s216904611
p00688
C++
from fractions import gcd while True: a, b, c = map(int, input().split()) if not a: break d = (b ** 2 - 4 * a * c) ** 0.5 if isinstance(d, complex) or d - int(d) > 1e-6: print('Impossible') continue num1, num2 = -b + int(d), -b - int(d) den = 2 * a cmn1, cmn2 = gcd(n...
a.cc:9:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 9 | print('Impossible') | ^~~~~~~~~~~~ a.cc:1:1: error: 'from' does not name a type 1 | from fractions import gcd | ^~~~
s403651549
p00688
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c; while(cin>>a>>b>>c,a){ if(c==0){ if(a==1&&b<0)cout<<a<<' '<<0<<' '<<1<<' '<<b<<endl; else cout<<a<<' '<<b<<' '<<1<<' '<<0<<endl; } else{for(int j=1;j<=a;j++){ if(a%j==0){ if(a/j>=j) for(int i=10...
a.cc: In function 'int main()': a.cc:25:30: error: expected primary-expression before '?' token 25 | if(j*j==a&&i<t)?????? cout<<a/j<<' '<<t<<' '<<j<<' '<<i<<endl; | ^ a.cc:25:31: error: expected primary-expression before '?' token 25 | if(j*j==a&&i<t...
s608794039
p00688
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c; while(cin>>a>>b>>c,a){ if(c==0){ if(a==1&&b<0)cout<<a<<' '<<0<<' '<<1<<' '<<b<<endl; else cout<<a<<' '<<b<<' '<<1<<' '<<0<<endl; } else{for(int j=1;j<=a;j++){ if(a%j==0){ if(a/j>=j) for(int i=10...
a.cc: In function 'int main()': a.cc:35:4: error: expected '}' at end of input 35 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s948906393
p00688
C++
<iostream> #include <math.h> #include <stdlib.h> using namespace std; typedef long long int lli; lli a, b, c; lli p, q, r, s; bool solve() { if(a == 0) return false; if(c == 0) { if(a != 1) { p = a; q = b; r = 1; s = 0; return true; } else { p = 1; q = max(b, (lli)0); r = 1;...
a.cc:2:2: error: expected unqualified-id before '<' token 2 | <iostream> | ^ In file included from /usr/include/c++/14/cmath:45, from /usr/include/c++/14/math.h:36, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_...
s345421908
p00688
C++
#include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> #include <c...
a.cc: In function 'int main()': a.cc:54:58: error: expected '}' at end of input 54 | continue; | ^ a.cc:49:48: note: to match this '{' 49 | FOR(q, st, en) { | ...
s091706918
p00689
C++
#include <iostream> #include <iomanip> #include <cmath> using namespace std; const double PI = 3.14159265; bool eq(double a, double b){ return fabs(a-b) < 1e-7; } double angle(double cur, double next){ double r = cur - next + 2*PI; while( r >= 2*PI ) r -= 2*PI; return r; } double dist(double x1, dou...
a.cc: In function 'double dist(double, double, double, double)': a.cc:19:51: error: expected ')' before ';' token 19 | return sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2); | ~ ^ | )
s310351458
p00689
C++
#include <iostream> #include <vector> #include <complex> #include <iterator> #include <iomanip> using namespace std; int main() { int n; while (cin>>n) { vector<complex<float>> vs; complex<float> next_point, last_vector; float min = 10.0f; for (int i = 0; i < n; i++) { ...
a.cc: In function 'int main()': a.cc:24:22: error: no matching function for call to 'find(std::vector<std::complex<float> >::iterator, std::vector<std::complex<float> >::iterator, std::complex<float>&)' 24 | vs.erase(find(begin(vs), end(vs), next_point)); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~...
s453408956
p00689
C++
#include<iostream> #include<vector> #include<cstring> #include<cmath> #include<cstdlib> #include<cstdio> #define X first #define Y second using namespace std; const int MAX = 450; const double EPS = 1e-9; typedef pair<int,int> P; vector<P> V; bool come[MAX]; double dot(P a, P b){ return a.X*b.X+a.Y*b.Y; } doub...
a.cc: In function 'void solve()': a.cc:53:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 53 | sort(V.begin(),V.end()); | ^~~~ | sqrt
s433369436
p00689
C++
#include <iostream> #include <cfloat> #include <cmath> #include <vector> #include <algorithm> using namespace std; #define EPS (1e-10) #define equals(a,b) (fabs((a)-(b)) < EPS) #define dle(a,b) (equals(a, b) || a < b) static const double PI = acos(-1); class Point { public: double x, y; Point (double x = 0, ...
a.cc: In function 'int main()': a.cc:82:109: error: expected ';' before '}' token 82 | if(ccw(p[i],p[j],p[k]) == COUNTER_CLOCKWISE || ccw(p[i],p[j],p[k]) == ONLINE_BACK) swap(p[j],p[k]) | ^ ...
s073652471
p00690
Java
import java.util.Scanner; public class AOJ_1108{ int ans_dict,num_of_stations,num_of_routes; int[][] node; boolean[][] visited; String ans_routes; void run(){ Scanner sc = new Scanner(System.in); while(true){ num_of_stations = sc.nextInt(); num_of_routes = sc....
Main.java:2: error: class AOJ_1108 is public, should be declared in a file named AOJ_1108.java public class AOJ_1108{ ^ 1 error
s319550474
p00690
C++
#include <stdio.h> #include <vector> using namespace std; int RB[11][11],j,N;bool used[11][11];vector<int>a,x; void dfs(int here, int prev, int cost) {used[here][prev]=used[prev][here]=0;x.push_back(here);for (int i=1,k=0;i<=N;i++) if (used[here][i] && RB[here][i]) k++,dfs(i,here,cost+RB[here][i]);if (!k) if (j<cost) j...
a.cc: In function 'void dfs(int, int, int)': a.cc:5:194: error: 'k' was not declared in this scope 5 | void dfs(int here, int prev, int cost) {used[here][prev]=used[prev][here]=0;x.push_back(here);for (int i=1,k=0;i<=N;i++) if (used[here][i] && RB[here][i]) k++,dfs(i,here,cost+RB[here][i]);if (!k) if (j<cost) j=cos...
s968557262
p00690
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; #define NIL -1 vector< vector<int> > edge; vector<int> answer; class Result { public: vector<int> path; int cost; }; Result rec(int v, vector< vector<int> > visited, int cost) { Result result; result.cost = cost; int ma...
/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
s486132026
p00691
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; テつ? ll calc(ll x,ll y,ll z){ テつ?つ?l A=x*x*x+y*y*y; テつ?つ?eturn (A<=z*z*z) ? A:0; } テつ? int main(){ テつ?つ?l z; テつ?つ?hile(cin>>z,z){ テつ? テつ?つ?つ?つ?l mx=0; テつ?つ?つ?つ?or(int i=1;i<2000;i++) テつ?つ?つ?つ?つ?つ?or(int j=1;j<2000;j++)mx=max(mx,calc(i,j,z)); テつ?つ?つ?つ?ou...
a.cc:4:1: error: '\U000030c6\U00003064' does not name a type 4 | テつ? | ^~~~ a.cc:9:1: error: '\U000030c6\U00003064' does not name a type 9 | テつ? | ^~~~
s679458919
p00691
C++
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ long long int n; while(cin >> n, n){ long long int ans = 100000; for(long long int i=1; pow(i,3) <= pow(n, 3); i++){ for(long long int j=1; pow(i,3)+pow(j,3) <= pow(n,3); j++){ ...
a.cc: In function 'int main()': a.cc:15:10: error: expected '}' at end of input 15 | } | ^ a.cc:8:23: note: to match this '{' 8 | while(cin >> n, n){ | ^ a.cc:15:10: error: expected '}' at end of input 15 | } | ^ a.cc:6:11: note: to...
s675694045
p00692
Java
import java.util.*; import java.lang.Math; public class AOJ1110 { /* static int[][] d={{-5,-4,-3,-1,0,1,3,4,5}, {-4,-1,+1,+4}};*/ static int[] d={-5,-4,-3,-1,0,1,3,4,5}; static int[] a={0,2,5,7,8,10,13,15,16,18}; public static void main(String[] args) { ArrayList<Integer> layout...
Main.java:4: error: class AOJ1110 is public, should be declared in a file named AOJ1110.java public class AOJ1110 ^ 1 error
s532544507
p00692
Java
import java.util.*; import java.lang.Math; public class AOJ1110 { static int[] d={-5,-4,-3,-1,0,1,3,4,5}; static int[] a={0,2,5,7,8,10,13,15,16,18}; public static void main(String[] args) { ArrayList<Integer> layout; Scanner sc=new Scanner(System.in); int attend=sc.nextInt(); for(int i=...
Main.java:4: error: class AOJ1110 is public, should be declared in a file named AOJ1110.java public class AOJ1110 ^ 1 error
s321772051
p00692
C++
4 1 4 5 2 3 1 4 3 5 4 2 2 4 5 2 3 1 1 3 5 5 1 5 1 4 5 3 2 3 2 1 4 1 4 5 3 2 3 4 2 1 2 1 2 5 4 5 4 2 1 2 1 3 5 3 4 3 3 5 4 4 2 3 1 2 5 3 1 3 5 4 2 1 5 4 1 4 5 3 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s981091899
p00693
C
#include <iostream> #include <cstdio> #include <memory.h> #include <cmath> #include <cstring> #include <algorithm> #include <queue> #include <map> #include <vector> using namespace std; char a1[1100][60],b1[1100][60],c1[1100][60],a2[1100][60],b2[1100][60],c2[1100][60]; int a[1100],c[1100]; int main() { int n,m; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s160064702
p00693
C
#include <cstdio> int father[1010]; int n,m; void init(int val){ for(int i=1;i<=val;i++){ father[i]=i; } } int find(int val){ if(father[val]==val) return val; return find(father[val]); } void combine(int x,int y){ int tx = find(x); int ty = find(y); if(tx!=ty) father[tx]=ty; } int main(){ while(scanf("%d",...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s911539106
p00693
C
#include <cstdio> int father[1010]; int n,m; void init(int val){ for(int i=1;i<=val;i++){ father[i]=i; } } int find(int val){ if(father[val]==val) return val; return find(father[val]); } void combine(int x,int y){ int tx = find(x); int ty = find(y); if(tx!=ty) father[tx]=ty; } int main(){ while(scanf("%d",...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s859447135
p00693
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) FOR(i,0,n) #define pb push_back #define mp make_pair typedef long long ll; typedef pair<int,int> pint; string s[1024][3],ans[1024][3]; bool ck(string c1,string c2){ bool flag=true; rep(i,8){ if(...
a.cc: In function 'int main()': a.cc:31:42: error: 'flag' was not declared in this scope 31 | if(s[j][0][0]=='p'&&!flag){ | ^~~~
s640540808
p00693
C++
#include <iostream> #include <vector> using namespace std; struct rule { bool permit; string src; string dst; rule(bool p, const string& s, const string& d) : permit(p), src(s), dst(d) {} }; bool match(const string& pat, const string& addr) { const int N = min(pat.size(), addr.size()); for (int i = ...
a.cc: In function 'int main()': a.cc:48:5: error: 'reverse' was not declared in this scope 48 | reverse(rules.begin(), rules.end()); | ^~~~~~~
s388805144
p00693
C++
ICPC Domestic 2000
a.cc:1:1: error: 'ICPC' does not name a type 1 | ICPC Domestic 2000 | ^~~~
s639659137
p00693
C++
#include<iosrteam> #include<algorithm> using namespace std; int main(){ int a[10]; for(int i=0;i<10;i++)cin >> a[i]; sort(a,a+10); for(int i=9;i>6;i--)cout << a[i] << endl; }
a.cc:1:9: fatal error: iosrteam: No such file or directory 1 | #include<iosrteam> | ^~~~~~~~~~ compilation terminated.
s925957182
p00693
C++
#include<iosrteam> #include<algorithm> using namespace std; int main(){ int a[10]; for(int i=0;i<10;i++)cin >> a[i]; sort(a,a+10); for(int i=9;i>6;i--)cout << a[i] << endl; }
a.cc:1:9: fatal error: iosrteam: No such file or directory 1 | #include<iosrteam> | ^~~~~~~~~~ compilation terminated.
s479009805
p00694
C++
#include<map> #include<cstdio> #include<vector> #include<algorithm> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; struct point{ int x,y,z; point operator+(const point &a)const{ return (point){x+a.x,y+a.y,z+a.z}; } point operator-(const point &a)const{ return (point){x-a.x,y-a.y,z-a.z}; } bool oper...
a.cc: In function 'key getkey()': a.cc:35:20: error: 'isdigit' was not declared in this scope 35 | if(isdigit(s[0])){ | ^~~~~~~
s070431903
p00695
Java
import java.util.Scanner; public class Mian { public static void main(String arg[]) { Scanner in = new Scanner(System.in); int a[][]=new int[5][5]; int n=in.nextInt(); while(n-->0) { for(int i=0; i<5; i++) for(int j=0; j<5; j++) a[i][j]=in.nextInt(); int max=0; for(int i=0; i<5; i++) { ...
Main.java:2: error: class Mian is public, should be declared in a file named Mian.java public class Mian ^ 1 error
s179379904
p00695
Java
import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.Scanner; import java.util.Stack; public class Main_Fast { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int m = sc.nextInt(); ...
Main.java:8: error: class Main_Fast is public, should be declared in a file named Main_Fast.java public class Main_Fast { ^ 1 error
s906111903
p00695
Java
import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.Scanner; import java.util.Stack; public class Main_Fast { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int m = sc.nextInt(); ...
Main.java:8: error: class Main_Fast is public, should be declared in a file named Main_Fast.java public class Main_Fast { ^ 1 error
s998553720
p00695
C++
#include<stdio.h> int main(){ int a[7][7],m,i,j,k,l,n,o,not,max,my,mx; scanf("%d",&m); for(i=0;i<m;i++){ //syokika for(j=0;j<7;j++){ for(k=0;k<7;k++){ a[j][k]=0; } } max=0; //in for(j=0;j<5;j++){ for(k=0;k<5;k++){ scanf("%d",&a[j][k]); } } //syori for(...
a.cc: In function 'int main()': a.cc:3:29: error: expected unqualified-id before 'not' token 3 | int a[7][7],m,i,j,k,l,n,o,not,max,my,mx; | ^~~ a.cc:12:5: error: 'max' was not declared in this scope 12 | max=0; | ^~~ a.cc:25:15: error: 'mx' was not declared in th...
s223494113
p00695
C++
#include<stdio.h> int main(){ int a[7][7],m,i,j,k,l,n,o,not,max,my,mx; scanf("%d",&m); for(i=0;i<m;i++){ //syokika for(j=0;j<7;j++){ for(k=0;k<7;k++){ a[j][k]=0; } } max=0; //in for(j=0;j<5;j++){ for(k=0;k<5;k++){ scanf("%d",&a[j][k]); } } //syori for(...
a.cc: In function 'int main()': a.cc:3:29: error: expected unqualified-id before 'not' token 3 | int a[7][7],m,i,j,k,l,n,o,not,max,my,mx; | ^~~ a.cc:12:5: error: 'max' was not declared in this scope 12 | max=0; | ^~~ a.cc:25:15: error: 'mx' was not declared in th...
s602322890
p00696
C++
#include <cstring> #include <cstdlib> #include <string> #include <cmath> #include <queue> using namespace std; #define REP(i,n) for(int i=0;i<(int)n;++i) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(), (c).end() const int INF = 1<<29; string buf[101]; int main() ...
a.cc: In function 'int main()': a.cc:19:9: error: 'cin' was not declared in this scope 19 | while(cin>>plen, plen) { | ^~~ a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include <queue> +++ |+#include <iostream> 6 ...
s837347439
p00697
Java
import java.util.Scanner; public class Jigsaw { static char[][] input = new char[9][4]; static char[][] puzzles = new char[9][4]; public static void main(String[] args) { Scanner s = new Scanner(System.in); int cnt = Integer.parseInt(s.nextLine()); for(int i=0 ; i<cnt ; i++) { String[] tmp = s.nextLine()...
Main.java:4: error: class Jigsaw is public, should be declared in a file named Jigsaw.java public class Jigsaw { ^ 1 error
s540927990
p00697
Java
import java.util.*; class Main{ String[][] puzzle; String[][] field; boolean[] used; void run(){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int attend=0;attend<n;attend++){ field =new String[3][3]; puzzle=new String[9][4]; used=new boolean[9]; for(int i=0;i<9;i++)...
Main.java:50: error: cannot find symbol new AOJ1116().run(); ^ symbol: class AOJ1116 location: class Main 1 error
s149264787
p00697
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; char s[9][5], t[3][3][5]; int dx[]{ -1,0,1,0 }, dy[]{ 0,1,0,-1 }; int dfs(int p) { int res = 0; rep(i, 3)rep(j, 3) { if (t[i][j][0])continue; rep(k, 4) { rep(l, 4) { int nx = i + dx[l], ny = j + dy[l]; if (nx < 0 || 3 ...
a.cc: In function 'int main()': a.cc:29:31: error: 'j' was not declared in this scope 29 | scanf("%s", s[j]); | ^
s813325885
p00697
C++
#include<iostream> #include<string> #include<vector> using namespace std; class P{ public: int d,r; }; int data,res; vector<string>sv; int dy[] = {-1,0,1,0}; int dx[] = {0,1,0,-1}; void input(){ string tmp; sv.clear(); for(int i = 0 ; i < 9 ; i++)cin >> tmp,sv.push_back(tmp); } bool check(int x,int y){ ...
a.cc: In function 'void solve()': a.cc:87:3: error: reference to 'data' is ambiguous 87 | data = 0; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s170074008
p00697
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:123:27: error: cannot bind non-const lvalue reference of type 'vvP&' {aka 'std::vector<std::vector<P> >&'} to an rvalue of type 'vvP' {aka 'std::vector<std::vector<P> >'} 123 | cout<<dfs(vvP(3,vP(3,P(" "))),vi(9),0,pieces)<<endl; | ...
s566856758
p00698
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:104:9: error: jump to label 'ng_p' 104 | ng_p:; | ^~~~ a.cc:88:38: note: from here 88 | goto ng_p; | ^~~~ a.cc:90:37: note: crosses initialization of 'int sum1' 90 | ...
s424181652
p00700
Java
Last login: Thu May 30 19:04:59 on ttys000 cmccl04:~ rigaku$ vim Main.java cmccl04:~ rigaku$ vim Main.java cmccl04:~ rigaku$ javac Main.java Main.java:44: class?Ainterface?A?&#1794;??? enum ??????&#1794;???B } ^ ?G???[ 1 ?? cmccl04:~ rigaku$ vim Main.java cmccl04:~ rigaku$ javac Main.java Main.java...
Main.java:1: error: class, interface, enum, or record expected Last login: Thu May 30 19:04:59 on ttys000 ^ Main.java:26: error: <identifier> expected Main.java:44: class?Ainterface?A?&#1794;??? enum ??????&#1794;???B ^ Main.java:26: error: illegal character: '#' Main.java:44: class?Ainterface?A?&#17...
s410760358
p00700
Java
public class Main{ public static void main(String[] args){ int n; int x,y,dx,dy; int xmax,ymax; int d,dmax; Scanner kbd=new Scanner(System.in); n=kbd.nextInt(); x=0; y=0; d=0; for(int i=0; i<n; i++){ dmax=0; xmax...
Main.java:9: error: cannot find symbol Scanner kbd=new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:9: error: cannot find symbol Scanner kbd=new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s934797005
p00700
C
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<cassert> #include<iostream> #include<sstream> #include<string> #include<vector> #include<queue> #include<set> #include<map> #include<utility> #include<numeric> #include<algorithm> #include<bitset> #include<complex> #include<stack> using name...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s255104465
p00700
C++
#include <iostream> #include <algorithm> using namespace std; int n, dx, dy; int main() { cin >> n; for(int i = 0; i < n; i++) { int x = 0, y = 0, px = 0, py = 0; while(cin >> dx >> dy, dx | dy) { x += dx, y += dy; if((10000LL * (px * px + py * py) + px) < 10000LL * (x * x + y * y) + x)) px = x, py = y; }...
a.cc: In function 'int main()': a.cc:11:97: error: expected primary-expression before ')' token 11 | if((10000LL * (px * px + py * py) + px) < 10000LL * (x * x + y * y) + x)) px = x, py = y; | ...
s750620929
p00700
C++
#include <iostream> #include <cmath> using namespace std; int main(){ int n, dx, dy; int px, py; long long int mdis, dis; int mpx, mpy; cin>> n; for(int i = 0;i < n;i++){ px = py = 0; mdis = 0; do{ cin >> dx >> dy; px += dx; py += dy; dis = pow(px,2)+pow(py,2); if...
a.cc: In function 'int main()': a.cc:27:12: error: expected '}' at end of input 27 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^