submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s911882372
p01839
C++
#include <cstdio> #include <algorithm> #include <math> #include <map> using namespace std; int main() { int n; char str[110][5]; int a = 0; scanf("%d", &n); for (int i = 0; i < n; i++){ scanf("%s", str[i]); } for (int i = 0; i < n; i++){ if(str[i][0] == 'A') a++; if(str[i][0] == 'U') { if (a <...
a.cc:3:10: fatal error: math: No such file or directory 3 | #include <math> | ^~~~~~ compilation terminated.
s543350972
p01839
C++
#include<iostream> #include<cstdio> #include<vector> #include<string> #include<queue> #include<algorithm> #include<complex> #include<cstdlib> #include<cctype> #define REP(i,n) for(int i = 0;i < (n);i++) #define PB push_back #define MP make_pair #define SHOW1d(v,n) {for(int i = 0;i < (n);i++)cout << v[i] << ' ';cout <<...
a.cc: In function 'int main()': a.cc:29:17: error: expected ';' before 'int' 29 | cin >> n | ^ | ; 30 | int num = 0; | ~~~ a.cc:45:31: error: 'num' was not declared in this scope; did you mean 'enum'? 45 | if(tmp ==...
s800295416
p01839
C++
#include <iostream> #include <string> using namespace std; int main() { int N, cnt = 0; cin >> N; for (int i = 0; i < N; i++) { string s; cin >> s; if (s == "A") { cnt++ }; else { cnt--; if (cnt < 0) { cout << "NO" << endl; ...
a.cc: In function 'int main()': a.cc:14:30: error: expected ';' before '}' token 14 | if (s == "A") { cnt++ }; | ^~ | ; a.cc:15:9: error: 'else' without a previous 'if' 15 | else { | ^~~~
s409450853
p01839
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int count = 0; bool flag = true; while (n--) { string s; cin >> s; if (s == "A") count++; else count--; if (count < 0) flag = false; } if (flag) cout << "YES" << endl; e...
a.cc: In function 'int main()': a.cc:19:10: error: expected primary-expression before '<<' token 19 | else << "NO" << endl; | ^~
s617712766
p01839
C++
1 #include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; int cnt1 = 0; int cnt2 = 0; for(int i=0;i<N;i++){ string s; cin>>s; if(i == N-1 && s == "A") break; if(s == "A") cnt1++; if(s == "Un") cnt2++; } if(cnt1 == cnt2) cout<<"YES"<<endl; else cout<<"NO"<<endl; retur...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:2: /usr/i...
s318517979
p01839
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; string k; bool judge=true; int ca=0,cu=0; cin >> n; for(int i = 1;i<=n;i++) { cin >> k; if(n%2 == 1) { cout << "NO" << endl; break; } else { if(k=="A")ca++; if(k=="Un")cu++; if(ca < cu) { ...
a.cc: In function 'int main()': a.cc:32:6: error: 'judege' was not declared in this scope; did you mean 'judge'? 32 | if(judege)cout << "YES" << endl; | ^~~~~~ | judge
s620531362
p01839
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; string k; bool judge=true; int ca=0,cu=0; cin >> n; for(int i = 1;i<=n;i++) { cin >> k; if(n%2 == 1) { cout << "NO" << endl; break; } else { if(k=="A")ca++; if(k=="Un")cu++; if(ca < cu) { ...
a.cc: In function 'int main()': a.cc:32:6: error: 'judege' was not declared in this scope; did you mean 'judge'? 32 | if(judege) | ^~~~~~ | judge
s055136990
p01839
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,c,op,ed; int cnta, cntb; c =0; cnta =0; cntb =0; cin >> a; string b[101] ={}; for(int i=0;i<a;i++){ cin >> b[i]; } for(int i=0;i<a;i++){ if(b[i]=="Un")ed=i; } for(int i=a-1;-1<i;i--){ if(b[i]=="A")op=i; } if(op != 0...
a.cc: In function 'int main()': a.cc:24:5: error: break statement not within loop or switch 24 | break; | ^~~~~
s212518876
p01839
C++
#include <iostream> using namespace std; int main(void){ int n; char henzi[100][3]; int x = 0; int y = 0; int s = 0; int i = 0; scanf("%d", &n); while(i < n) { cin >> henzi[i]; i++; } for(i = 0;i < n; i++) { if(strlen(henzi[i]) == 1) { x++; } if (strlen(henzi[i]) == 2) { y++; } ...
a.cc: In function 'int main()': a.cc:22:20: error: 'strlen' was not declared in this scope 22 | if(strlen(henzi[i]) == 1) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s473803231
p01839
C++
#include <iostream> using namespace std; int main(void){ int n; char henzi[100][3]; int x = 0; int y = 0; int s = 0; int i = 0; scanf("%d", &n); while(i < n) { cin >> henzi[i]; i++; } for(i = 0;i < n; i++) { if((int)strlen(henzi[i]) == 1) { x++; } if ((int)strlen(henzi[i]) == 2) { y+...
a.cc: In function 'int main()': a.cc:22:25: error: 'strlen' was not declared in this scope 22 | if((int)strlen(henzi[i]) == 1) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <io...
s951390350
p01839
C++
#include <iostream> using namespace std; int main(void) { calloc(524288 * 1024); int N; cin >> N; string s; int cnt = 0; bool b = true; for(int i = 0 ; i < N ; i++) { cin >> s; if(s == "A") { cnt++; }else{ cnt--; if(c...
a.cc: In function 'int main()': a.cc:5:11: error: too few arguments to function 'void* calloc(size_t, size_t)' 5 | calloc(524288 * 1024); | ~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, ...
s910297958
p01839
C++
#include <iostream> using namespace std; int main(void) { char c* = malloc(524288 * 1024); for(long int i = 0 ; i < 524288 * 1024 ; i++){ c[i] = 0; } int N; cin >> N; string s; int cnt = 0; bool b = true; for(int i = 0 ; i < N ; i++) { cin >> s; if(s ==...
a.cc: In function 'int main()': a.cc:5:11: error: expected initializer before '*' token 5 | char c* = malloc(524288 * 1024); | ^ a.cc:7:9: error: 'c' was not declared in this scope 7 | c[i] = 0; | ^
s718214159
p01839
C++
#include <iostream> using namespace std; int main(void) { char *c = malloc(524288 * 1024); for(long int i = 0 ; i < 524288 * 1024 ; i++){ c[i] = 0; } int N; cin >> N; string s; int cnt = 0; bool b = true; for(int i = 0 ; i < N ; i++) { cin >> s; if(s ==...
a.cc: In function 'int main()': a.cc:5:21: error: invalid conversion from 'void*' to 'char*' [-fpermissive] 5 | char *c = malloc(524288 * 1024); | ~~~~~~^~~~~~~~~~~~~~~ | | | void*
s314952470
p01839
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(void) { int n,x=0,y=0; cin >> n; vector<string> a(n); for(int i = 0;i < n;i++) cin >> a[i]; for(int i = 0;i < n;i++){ if(a[i] == "A"){ x++; if(a[i-1] =="Un" && x-1 > y...
a.cc: In function 'int main()': a.cc:32:21: error: expected ';' before '}' token 32 | cout << "NO" | ^ | ; 33 | } | ~
s205821270
p01839
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(void) { int n,x=0,y=0; cin >> n; vector<string> a(n); for(int i = 0;i < n;i++) cin >> a[i]; for(int i = 0;i < n;i++){ if(a[i] == "A"){ x++; if(a[i-1] =="Un" && x-1 > y...
a.cc: In function 'int main()': a.cc:32:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 32 | cout << "NO" < endl; | ~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/...
s731439835
p01840
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<map> #include<string> #include<cmath> #include<numeric> #include<queue> using namespace std; long long int mod = 1000000007; int main(void) { int n, m, t; cin >> n >> m >> t; vector<bool> a(10000+5, false); for(int i=1; i<n+1;...
a.cc: In function 'int main()': a.cc:23:35: error: no matching function for call to 'min(std::vector<bool>::size_type, int)' 23 | for(int j=max(0, tmp-m); j<min(a.size(), tmp+m); j++) a[j] = true; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s665127059
p01840
C++
#include <iostream> #include <vector> #include <algorithm> #define ll long long using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, M, T; cin >> N >> M >> T; vector<ll> a(N); for (int i = 0; i < N; i++) cin >> a[i]; ll ans = 0; ans += a[0] - M; for (int i = 1; i < N;i++) { if (a[i]...
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s927904774
p01840
C++
#include <iostream> #include <vector> #include <algorithm> #define ll long long using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, M, T; cin >> N >> M >> T; vector<ll> a(N); for (int i = 0; i < N; i++) cin >> a[i]; ll ans = 0; ans += a[0] - M; for (int i = 1; i < N;i++) { if (a[i]...
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s798446655
p01840
C++
#include <iostream> using namespace std; main(){ ????int a,b,c,n,t[10001]={0},p=0,i,j; ????for(cin>>n>>a>>b,i=0;n--;) ????????for(cin>>c,j=c-a;j<=c+a-1&&j<b;)if(!(t[j++]++))p--; ????cout<<b+p<<endl; }
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:4:1: error: expected primary-expression before '?' token 4 | ????int a,b,c,n,t[10001]={0},p=0,i,j; | ^ a.cc:4:2: error: expected primary-expression before '?'...
s672887820
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,max,total; cin>>n>>m>>t; total=2*m; max=t-(total*n); for(i=0;i<=n;i++){ if(max>t){ cout<<max<<endl; i=n+1; } else(max<t){ max=t-(total/i); } } }
a.cc: In function 'int main()': a.cc:15:20: error: expected ';' before '{' token 15 | else(max<t){ | ^ | ;
s408250965
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,max,total; cin>>n>>m>>t; total=2*m; max=t-(total*n); for(i=0;i<=n;i++){ if(max<t){ cout<<max<<endl; i=n+1; } else(max>t){ max=t-(total/i); } } }
a.cc: In function 'int main()': a.cc:15:20: error: expected ';' before '{' token 15 | else(max>t){ | ^ | ;
s451290622
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,max,total; cin>>n>>m>>t; total=2*m; for(i=0;i<=n;i++){ max=t-(total*n); if(max<=t){ cout<<max<<endl; i=n+1; } else(max>t){ max=t-(total/i); } } }
a.cc: In function 'int main()': a.cc:16:20: error: expected ';' before '{' token 16 | else(max>t){ | ^ | ;
s560232419
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,max,total; cin>>n>>m>>t; total=2*m; for(i=0;i<=n;i++){ max=t-(total*n); if(max>=0){ cout<<max<<endl; i=n+1; } else(max<0){ max=t-(total/i); } } }
a.cc: In function 'int main()': a.cc:16:20: error: expected ';' before '{' token 16 | else(max<0){ | ^ | ;
s009295520
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,max,total; cin>>n>>m>>t; total=2*m; for(i=0;i<=n;i++){ max=t-(total*n); if(max>=0){ cout<<max<<endl; i=n+1; } else(max<0){ max=t-(total/i+1); } } }
a.cc: In function 'int main()': a.cc:16:20: error: expected ';' before '{' token 16 | else(max<0){ | ^ | ;
s654937640
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,ai,max,total,loss; cin>>n>>m>>t>>data[100]; for(i=0;i<n;i++){ cin>>data[i]; } total=2*m; loss=total-(data[i+1]-data[i]); if(loss>=total){ max=t-(total*n); } else{ max=t-total; } cout<<m...
a.cc: In function 'int main()': a.cc:7:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 7 | cin>>n>>m>>t>>data[100]; | ^ a.cc:9:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 9 | cin>>data...
s829571280
p01840
C++
#include<iostream> using namespace std; int main(){ int n,m,t,i,ai,max,total,loss; cin>>n>>m>>t>>data[100]; for(i=0;i<n;i++){ cin>>data[i]; } total=2*m; for(i=0;i<n;i++){ loss=total-(data[i+1]-data[i]); } if(loss>=total){ max=t-(total*n); } else{ ma...
a.cc: In function 'int main()': a.cc:7:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 7 | cin>>n>>m>>t>>data[100]; | ^ a.cc:9:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 9 | cin>>data...
s806931682
p01841
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define mt make_tuple #define fi first #define se second #define all(a) (a).begin(), (a).end() #define endl "\n" string mul(string a) { int n = (int)a.size(); string res = ""; bool up = false; for (int i = n - 1; i >= 0; ...
a.cc: In function 'void parseA(std::string, std::string)': a.cc:78:18: error: no match for 'operator*' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 78 | parseA(idx * 2, s.substr(1, i - 2)); | ~~~ ^ ~ | | | | | ...
s441729163
p01841
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++) const ll mod = ll(1e9) + 7; const int INF = int(1e9); int idxa = 0, idxb = 0; int calc(string &A, string &B)...
a.cc:88:10: error: redefinition of 'const ll mod' 88 | const ll mod = ll(1e9) + 7; | ^~~ a.cc:8:10: note: 'const ll mod' previously defined here 8 | const ll mod = ll(1e9) + 7; | ^~~ a.cc:89:11: error: redefinition of 'const int INF' 89 | const int INF = int(1e9); | ...
s405998450
p01841
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++) const ll mod = ll(1e9) + 7; const int INF = int(1e9); int idxa = 0, idxb = 0; int calc(string &A, string &B)...
a.cc:88:10: error: redefinition of 'const ll mod' 88 | const ll mod = ll(1e9) + 7; | ^~~ a.cc:8:10: note: 'const ll mod' previously defined here 8 | const ll mod = ll(1e9) + 7; | ^~~ a.cc:89:11: error: redefinition of 'const int INF' 89 | const int INF = int(1e9); | ...
s522518806
p01841
C++
#include<bits/stdc++.h> using namespace std; typedef string::const_iterator State; struct node{ int item; struct node *left, *right; }; node *make_node(){ node *d = new node; d -> left = NULL; d -> right = NULL; return d; } int number(State &begin){ int ret = 0; while (isdigit(*begin)...
a.cc: In function 'int main()': a.cc:51:23: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 51 | r1 = read(s1.begin()); | ~~~~~~~~^~ I...
s947793092
p01841
C++
#define _USE_MATH_DEFINES #include <cmath> #include <string> #include <vector> #include <utility> #include <iostream> #include <algorithm> #include <unordered_map> #include <numeric> #include <array> #include <float.h> #include <memory> #include <functional> #include <iomanip> #include <queue> #include <random> #includ...
a.cc: In function 'int main()': a.cc:74:32: error: cannot bind non-const lvalue reference of type 'Iterator&' {aka 'std::__cxx11::basic_string<char>::iterator&'} to an rvalue of type 'std::__cxx11::basic_string<char>::iterator' 74 | auto *at = CreateTree(a.begin(), a.end()), *bt = CreateTree(b.begin(), b.end()); ...
s810161036
p01841
C++
#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<queue> #include<map> ...
a.cc:245:1: error: ISO C++ forbids declaration of 'saiki' with no type [-fpermissive] 245 | saiki(node* v){ | ^~~~~ a.cc: In function 'int saiki(node*)': a.cc:253:1: warning: no return statement in function returning non-void [-Wreturn-type] 253 | } | ^
s516572265
p01841
C++
#include<bits/stdc++.h> typedef long long ll; #define REP(i,n) for(int i = 0;i < (n);i++) #define rep(i,m,n) for(int i = (m);i < (n);i++) #define P pair<int,int> #define pb push_back #define mk make_pair using namespace std; #define Vec(a) vector <int> a const int INF = 1 << 20; const int MOD = 1e9+7; string s1,s2; ...
a.cc: In function 'int main()': a.cc:137:8: error: 'd' was not declared in this scope 137 | }*/d | ^
s366582788
p01842
C++
#include<bits/stdc++.h> using namespace std; using vi=vector<ll>; using vvi=vector<vi>; using vvvi=vector<vvi>; using vvvvi=vector<vvvi>; using vvvvvi=vector<vvvvi>; using ll=long long; const ll INF=1e15; int main(){ int n,m; cin>>n>>m; vector<ll> a(n); vector<ll> b(m); for(int i=0;i<n;i++) cin>>...
a.cc:4:17: error: 'll' was not declared in this scope 4 | using vi=vector<ll>; | ^~ a.cc:4:19: error: template argument 1 is invalid 4 | using vi=vector<ll>; | ^ a.cc:4:19: error: template argument 2 is invalid a.cc:5:18: error: 'vi' was not declared in this scope ...
s714039313
p01842
C++
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG_MODE #define DBG(n) n; #else #define DBG(n) ; #endif #define REP(i,n) for(ll (i) = (0);(i) < (n);++i) #define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i) #define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i)) #define PB push_back #define MP make_pair #define F...
a.cc: In function 'll dfs(ll, ll, ll, ll, ll, ll)': a.cc:94:16: error: 'dp' was not declared in this scope; did you mean 'dup'? 94 | return dp[type][x1][y1][x2][y2] = ret; | ^~ | dup
s778873469
p01842
C++
// g++ -std=c++11 a.cpp #include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<unordered_map> #include<utility> #include<cmath> #include<random> #include<cstring> #include<queue> #include<stack> #include<bitset> #include<cstdio> #include<sstream> #include<iomani...
a.cc: In function 'int f(int, int, int, int, int)': a.cc:68:35: error: no match for 'operator+' (operand types are 'pii' {aka 'std::pair<int, int>'} and 'int') 68 | ma=max(ma,dp[a][b][co][tu]+f(A,B,0,TU^1,pas+1)); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ | ...
s601896768
p01842
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
/tmp/cc8x8U3W.o: in function `dfs(int, int, int, int, int, int, int)': a.cc:(.text+0x2d4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc8x8U3W.o a.cc:(.text+0xbc4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc8x8U3W.o...
s153839518
p01842
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
/tmp/ccljNFbR.o: in function `dfs(int, int, int, int, int, int, int)': a.cc:(.text+0x2d4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccljNFbR.o a.cc:(.text+0xbc4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccljNFbR.o...
s025222863
p01842
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
/tmp/cckxQgCL.o: in function `dfs(int, int, int, int, int, int, int)': a.cc:(.text+0x2d4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cckxQgCL.o a.cc:(.text+0xbc4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cckxQgCL.o...
s071166189
p01842
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
/tmp/ccQTOMQX.o: in function `dfs(int, int, int, int, int, int, int)': a.cc:(.text+0x2d4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQTOMQX.o a.cc:(.text+0xbc4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccQTOMQX.o...
s182627703
p01843
C++
#ifndef ___Geometry_Library #define ___Geometry_Library ?? // ------ Includes ------ // #include <cmath> #include <vector> #include <complex> #include <utility> #include <algorithm> ?? // ------ Defines ------ // typedef long double GType; typedef std::complex<GType> Point; typedef std::pair<Point, Point> Segment; ?? /...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^ In file included from /usr/include/c++/14/cmath:45, from a.cc:5: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_...
s623619527
p01844
C++
#include<bits/stdc++.h> using namespace std; int H,W,N; int a[201][201]; int A[201][201]; int calc(int h,int w,int H,int W){ return A[H][W]-A[H][w]-A[h][W]+A[h][w]; } int mem[201][201][201][201][5]; int solve(int h,int w,int H,int W,int N){ if(mem[h][w][H][W][N]!=-1) return mem[h][w][H][W][N]; int res...
a.cc: In function 'int solve(int, int, int, int, int)': a.cc:36:28: error: expected ';' before 'res' 36 | return mem[h][w][H][W][N]res; | ^~~ | ;
s748939741
p01844
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int a[201][201],h,w,n,mid; bool used[201][201]; set<P>st; int get_area(int &sx,int &sy,int &gx,int &gy){ int res = a[gy][gx]; if(sx!=0&&sy!=0)res=res-a[gy][sx-1]-a[sy-1][gx]+a[sy-1][sx-1]; else if(sy!=0)res-=a[sy-1][gx]; else if(sx...
a.cc:6:5: error: 'P' was not declared in this scope 6 | set<P>st; | ^ a.cc:6:6: error: template argument 1 is invalid 6 | set<P>st; | ^ a.cc:6:6: error: template argument 2 is invalid a.cc:6:6: error: template argument 3 is invalid a.cc: In function 'bool dfs(int, int, int)': a.cc:14:34: er...
s195186381
p01845
Java
#include <iostream> #include <cmath> using namespace std; int main(){ while(1){ int r0,w0,c,r; cin >> r0 >> w0 >> c >> r; if(r0==0) break; if(w0*c > r0){ cout << (int)ceil((double)(w0*c-r0)/r) << endl; }else{ cout << 0 << endl; } } ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <cmath> ^ Main.java:8: error: not a statement cin >> r0 >> w0 >> c >> r; ^ Main.java:12: error: not a statement cout << (int)ceil((double)(w0*c-r0)/r) << ...
s037319440
p01845
C
#include <stdio.h> int main(void){ int w0,R0,R,C,x; while(1){ scanf("%d %d %d %d",&R0,&w0,&C,&R); if(R0<1||w0<1||C<1||R<1) break; if(R0<(C*w0)){ if((C*w0-R0)%R==0){ x=(C*w0-R0)/R; } else{ x=(C*w0-R0)/R+1; } ...
main.c: In function 'main': main.c:21:4: error: expected declaration or statement at end of input 21 | return 0; | ^~~~~~
s853502103
p01845
C++
#include <bits/stdc++.h> using namespace std; signed main() { int A, B, C, D; while(cin >> A >> B >> C >> D, A || B || C || D) { cout << max(0LL, (B * C - A + D - 1) / D) << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: no matching function for call to 'max(long long int, int)' 9 | cout << max(0LL, (B * C - A + D - 1) / D) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86...
s017002020
p01845
C++
#include<iostream> using namespace std; int main() { int R0,W,C,R; while(true) { cin >> R0 >> W0 >> C >>R ; if(R0 == 0) break; cout << static_cast<int>((C*W0-R0)/R + 1) << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:14: error: 'W0' was not declared in this scope; did you mean 'W'? 9 | cin >> R0 >> W0 >> C >>R ; | ^~ | W
s199202976
p01845
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ double Ra,Wa,C,R; while(cin >> Ra >> Wa >> C >> R,Ra+Wa+C+R){ if(Ra / Wa >= C) cout << "0" << endl; int n = 1; else{ while(((Ra + R * n) / Wa) < C){ n++; } cout << n << endl; } } }
a.cc: In function 'int main()': a.cc:14:5: error: 'else' without a previous 'if' 14 | else{ | ^~~~
s504660510
p01845
C++
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) #define all(x) x.begin(),x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast32_t; u...
a.cc: In function 'int main()': a.cc:29:28: error: no matching function for call to 'max(int, int32)' 29 | cout << max(0, (C*W0-R0+R-1)/R) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64...
s766598986
p01845
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,i; while(1){ cin >> a >> b >> c >> d; f=0; if(a==0 && b ==0 && c==0 && d==0) break; for(i=0;i<100;i++){ e=a/b; if(e<c){ a+=d; }else{ break; } } cout << i << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: 'f' was not declared in this scope 7 | f=0; | ^
s780926861
p01845
C++
import Control.Applicative import Data.List main = do xs <- init . map (map (read :: String -> Double) . words) . lines <$> getContents let x = do [r0, w0, c, r] <- xs return . show . max 0 . ceiling $ (w0*c-r0) / r putStrLn . intercalate "\n" $ x
a.cc:1:1: error: 'import' does not name a type 1 | import Control.Applicative | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s862264646
p01845
C++
#include <stdio.h> int main(void){ int w0,R0,R,C,x; while(1){ scanf("%d %d %d %d",&R0,&w0,&C,&R); if(R0<1||w0<1||C<1||R<1){ break; } if(R0<(C*w0)){ if((C*w0-R0)%R==0){ x=(C*w0-R0)/R; } else{ x=(C*w0-R0)/R+1; } ...
a.cc: In function 'int main()': a.cc:22:13: error: expected '}' at end of input 22 | return 0; | ^ a.cc:2:15: note: to match this '{' 2 | int main(void){ | ^
s683483874
p01846
C++
#include <bits/stdc++.h> using namespace std; #define r(i,n) for(int i=0;i<n;i++) int main(){ string s; while(cin>>s,s[0]!='#'){ string t[9]; int q=0,r=0,a,b,c,d; r(i,s.size()){ if(s[i]=='/')r++,q=0; else if(s[i]=='b')t[r]+='b',q++; else r(j,s[i]-'0')t[r]+='.',q++; } cin>>a>>b>...
a.cc: In function 'int main()': a.cc:29:4: error: expected '}' at end of input 29 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s089606093
p01846
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <map> #include <set> #include <algorithm> #include <cmath> #define say(args) cout << (args) << endl #define rep(i, a) for (int i = 0; i < a; i++) using namespace std; typedef struct point { int x; int y; } Point; string make_key(...
a.cc: In function 'int main()': a.cc:87:17: error: expected '}' at end of input 87 | cin >> jfen; | ^ a.cc:85:48: note: to match this '{' 85 | while (jfen[0] != '#' && jfen.length() != 1) { | ^ a.cc:87:17: error: expected '}' at end ...
s566379997
p01847
C++
#include <iostream> #include <vector> #define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++) using namespace std; typedef long long ll; int N, X[104], Y[104], CXL, CYL, CXR, CYR; int w, h; vector<ll> vx, vy; int compress(int n, int *p, vector<ll> &s) { REP(i, 0, n) s.push_back(p[i]); sort(s.begin(), s.en...
a.cc: In function 'int compress(int, int*, std::vector<long long int>&)': a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(s.begin(), s.end()); | ^~~~ | short a.cc:14:11: error: 'unique' was not declared in this scope 14 | s.erase(unique(s.begin(), s.end...
s187596641
p01849
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #define REP(i,n) for(int i=0;i<(n);i++) #define FOR(i,j,n) for(int i=(j);i<(n);i++) using namespace std; int dp[102][1<<15]; int w[1<<15]; int main(){ int n,m; while(cin>>n>>m,n){ vector<int> s(n),d(m); REP(i,n)cin>>s[i]; RE...
a.cc: In function 'int main()': a.cc:20:13: error: 'i' was not declared in this scope 20 | REP(bit,i<<n){ | ^ a.cc:5:33: note: in definition of macro 'REP' 5 | #define REP(i,n) for(int i=0;i<(n);i++) | ^
s402019142
p01849
C++
#include<iostream> #include<climits> #include<bitset> using namespace std; int n,m; long long s[16], d[101]; int main(){ while(cin >> n >> m && n){ for(int i=0;i<n;i++) cin >> s[i]; d[0] = 0LL; for(int i=1;i<=m;i++) cin >> d[i]; sort(d, d+m+1); long long sigma[1<<n]; ...
a.cc: In function 'int main()': a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(d, d+m+1); | ^~~~ | short
s847372797
p01850
C++
s
a.cc:1:1: error: '\U0000ff53' does not name a type 1 | s | ^~
s376882394
p01851
C++
以外の点数を適当に配置 ll add = combination_duplicate(S, free_pt); // 引き分けの位置 (add *= combination_array(S, C)) %= MOD; // 勝ちの位置 (add *= combination_array(A+B, A)) %= MOD; // P, Q の計算 (それぞれ A 以上・B 以上でなければならない) int P = X - free_pt, Q = Y - free_p...
a.cc:1:1: error: '\U00004ee5\U00005916\U0000306e\U000070b9\U00006570\U00003092\U00009069\U00005f53\U0000306b\U0000914d\U00007f6e' does not name a type 1 | 以外の点数を適当に配置 | ^~~~~~~~~~~~~~~~~~~~~~ a.cc:5:17: error: expected ')' before '*=' token 5 | (add *= combination_array(S, C)) %= MOD; | ...
s053013359
p01851
C++
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG_MODE #define DBG(n) n; #else #define DBG(n) ; #endif #define REP(i,n) for(ll (i) = (0);(i) < (n);++i) #define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i) #define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i)) #define PB push_back #define MP make_pair #define F...
a.cc: In function 'int main()': a.cc:61:39: error: no matching function for call to 'min(int)' 61 | for(int i = 0;i <= min(x+y);i++){ | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/...
s231075869
p01851
C++
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG_MODE #define DBG(n) n; #else #define DBG(n) ; #endif #define REP(i,n) for(ll (i) = (0);(i) < (n);++i) #define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i) #define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i)) #define PB push_back #define MP make_pair #define F...
a.cc: In function 'int main()': a.cc:61:39: error: no matching function for call to 'min(int)' 61 | for(int i = 0;i <= min(x+y);i++){ | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/...
s149928549
p01852
C
t;main(long long n){for(scanf("%lld",&n);n;t++;)n/=2;printf("%d\n",t);}
main.c:1:1: warning: data definition has no type or storage class 1 | t;main(long long n){for(scanf("%lld",&n);n;t++;)n/=2;printf("%d\n",t);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int] main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int] 1 | t;main(lo...
s216970253
p01852
C
#include<bits/stdc++.h> using namespace std; #define FOR(i,s,t )for(int i = s; i <t ; i++) using LL = long long; using ll = LL; using PLL = pair<LL, LL>; using pll = PLL; using PII = pair<int, int>; using pii = PII; #define SZ(a) (int)a.size() #define ALL(a) a.begin(),a.end() #define SORT(a) sort(ALL(a)) int main...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s689811187
p01852
C++
i = bin(int(raw_input())) print len(str(i)[2:])
a.cc:1:1: error: 'i' does not name a type 1 | i = bin(int(raw_input())) | ^
s255513713
p01852
C++
1>------ ?????????????§?: ???????????§??????:working, ?§????:Debug Win32 ------ 1>cl : ???????????? ????????? warning D9025: '/sdl' ?????? '/GS-' ???????????????????????? 1>cl : ???????????? ????????? warning D9007: '/Gm' ?????? '/Zi ????????? /ZI' ???????????§?????????????????§??????????????????????????? 1> 2752.cpp ...
a.cc:1:23: error: extended character § is not valid in an identifier 1 | 1>------ ?????????????§?: ???????????§??????:working, ?§????:Debug Win32 ------ | ^ a.cc:1:38: error: extended character § is not valid in an identifier 1 | 1>------ ?????????????§?: ???????????§??????:working, ...
s033658312
p01853
C++
include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; typedef long long ll; const int IINF = INT_MAX; void compute(ll n,int e){ ll remain = n; int cnt = 0; while( remain && cnt+1 < e ) { remain /= 2; ++cnt; } if( remain ) { if( rema...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc:9:18: error: 'INT_MAX' was not declared in this scope 9 | const int IINF = INT_MAX; | ^~~~~~~ a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#in...
s688596007
p01853
C++
nclude<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; typedef long long ll; const int IINF = INT_MAX; void compute(ll n,int e){ ll remain = n; int cnt = 0; while( remain && cnt+1 < e ) { remain /= 2; ++cnt; } if( remain ) { if( remai...
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<bits/stdc++.h> | ^~~~~~ a.cc:9:18: error: 'INT_MAX' was not declared in this scope 9 | const int IINF = INT_MAX; | ^~~~~~~ a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#inclu...
s255789263
p01853
C++
#include <bits/stdc++.h> using namespace std; int n, m; int main() { cin >> n >> m; int l = (n - 1) / 2; for(int i = 0; i < l; i++) printf(i ? "%d" : " %d", 0); for(int i = l; i < n; i++) printf(i : "%d" : " %d", m); printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:8:44: error: expected ')' before ':' token 8 | for(int i = l; i < n; i++) printf(i : "%d" : " %d", m); | ~ ^~ | ) a.cc:8:43: error: invalid conversion from 'int' to 'const cha...
s238293567
p01853
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; for(int i=0;i<a;i++){ if(i)cout<<' '; if(i<n/2)cout<<0; else cout<<b; }cout<<endl; }
a.cc: In function 'int main()': a.cc:8:12: error: 'n' was not declared in this scope 8 | if(i<n/2)cout<<0; | ^
s081074498
p01853
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; for(int i=0;i<a;i++){ if(i)cout<<' '; if(I<a/2)cout<<0; else cout<<b; }cout<<endl; }
a.cc: In function 'int main()': a.cc:8:10: error: 'I' was not declared in this scope 8 | if(I<a/2)cout<<0; | ^
s639282041
p01854
C++
2 25 4 8 9 1 9 6 5 2 8 4 1 7 4 4 1 6 4 3
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 25 | ^
s448286420
p01855
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <cstring> #include <cassert> typedef long long ll; using namespace std; #define mod 1000000007 #define INF 100000...
In file included from /usr/include/c++/14/cassert:44, from a.cc:13: a.cc: In function 'int main()': a.cc:48:13: error: expected primary-expression before ')' token 48 | assert() | ^~~~~~
s631013910
p01855
C++
#include<iostream> #include<iomanip> #include<string> #include<cstdlib> #include<cmath> #include<algorithm> using namespace std; int main() { int T, h, w; cin >> T; for(int i=0; i<T; i++) { cin >> h >> w; int bigger = h > w ? h : w; if(h == w) cout << "1 0" << endl; else if(h == 1 || w == 1) { if(bigger...
a.cc: In function 'int main()': a.cc:18:59: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 18 | if(bigger % 2 == 0) cout << "1 1" < endl; | ~~~~~~~~~~~~~~^~~~~~ In fil...
s174235411
p01857
C++
include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; typedef long long ll; const int IINF = INT_MAX; void compute(ll n,int e){ ll remain = n; int cnt = 0; while( remain && cnt+1 < e ) { remain /= 2; ++cnt; } if( remain ) { if( remain+(...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc:9:18: error: 'INT_MAX' was not declared in this scope 9 | const int IINF = INT_MAX; | ^~~~~~~ a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#in...
s890236966
p01857
C++
#include <string> #include <vector> #include <array> #include <memory> #include <iostream> #include <algorithm> long long int memo[100][100]; int main(void) { //boost::shared_ptr<vector<string>> log(boost::make_shared<vector<string>>()); //log->push_back("dd"); //log->push_back("dde"); //boost::shared_ptr<vector<s...
a.cc: In function 'int main()': a.cc:119:64: error: 'max' was not declared in this scope; did you mean 'std::max'? 119 | memo[i][j] = min(memo[i][j], 1+max(memo[i][k], memo[i - 1][j-1-k])); | ^~~ | ...
s255563611
p01857
C++
#include <string> #include <vector> #include <array> #include <memory> #include <iostream> #include <algorithm> using namespace std; int main(void) { //boost::shared_ptr<vector<string>> log(boost::make_shared<vector<string>>()); //log->push_back("dd"); //log->push_back("dde"); //boost::shared_ptr<vector<string>>...
a.cc: In function 'int main()': a.cc:107:25: error: 'memo' was not declared in this scope 107 | memo[i][j] = 999999999999999999; | ^~~~ a.cc:111:17: error: 'memo' was not declared in this scope 111 | memo[1][i] = i;//x+1こ卵があるとき e<=iならy回で割れる ...
s959980793
p01858
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import Sendame.Sendame.Pose; /** * AOJ Sendame</br> * * @author ?????????????????§??? */ public class Main{ public enum Pose { tameru, mamoru, kougekida; }// ??????...
Main.java:9: error: package Sendame.Sendame does not exist import Sendame.Sendame.Pose; ^ Main.java:211: error: cannot find symbol public List<Pose> gesture = new ArrayList<Pose>(); ^ symbol: class Pose location: class Player Main.java:213: error: cannot find symbol public Lis...
s446453003
p01858
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import Sendame.Sendame.Pose; /** * AOJ Sendame</br> * * @author ?????????????????§??? */ public class Main{ public enum Pose { tameru, mamoru, kougekida; }// ??????...
Main.java:9: error: package Sendame.Sendame does not exist import Sendame.Sendame.Pose; ^ Main.java:99: error: cannot find symbol public List<Pose> gesture = new ArrayList<Pose>(); ^ symbol: class Pose location: class Player Main.java:101: error: cannot find symbol public List...
s154263907
p01858
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import Sendame.Sendame.Pose; /** * AOJ Sendame</br> * * @author ?????????????????§??? */ public class Main{ public enum Pose { tameru, mamoru, kougekida; }// ?????...
Main.java:9: error: package Sendame.Sendame does not exist import Sendame.Sendame.Pose; ^ Main.java:95: error: cannot find symbol private List<Pose> gesture = new ArrayList<Pose>(); ^ symbol: class Pose location: class Player Main.java:97: error: cannot find symbol List<Pose>...
s999756076
p01858
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import Sendame.Sendame.Pose; /** * AOJ Sendame</br> * * @author ?????????????????§??? */ public class Main{ public enum Pose { tameru, mamoru, kougekida }// ??????...
Main.java:9: error: package Sendame.Sendame does not exist import Sendame.Sendame.Pose; ^ Main.java:90: error: cannot find symbol private List<Pose> gesture = new ArrayList<Pose>(); ^ symbol: class Pose location: class Player Main.java:92: error: cannot find symbol public Lis...
s145977668
p01858
C++
d
a.cc:1:1: error: 'd' does not name a type 1 | d | ^
s353635331
p01858
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #include <windows.h> #define REP(i,a,b) for(i=a;i<b;++i) #define rep(i,n) REP(i,0,n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) begin(a),end(a) #define ifnot(a) if(not a) #define dump(x) cerr <<...
a.cc:5:10: fatal error: windows.h: No such file or directory 5 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s792724193
p01858
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #include <windows.h> #define REP(i,a,b) for(i=a;i<b;++i) #define rep(i,n) REP(i,0,n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) begin(a),end(a) #define ifnot(a) if(not a) #define dump(x) cerr <<...
a.cc:5:10: fatal error: windows.h: No such file or directory 5 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s940264286
p01859
C++
L0, R0 = input().split() L0 = int(L0) R0 = int(R0) L1, R1 = input().split() L1 = int(L1) R1 = int(R1) def swap(a,b):#b = max if (a > b): tmp = a a = b b = tmp return a,b p = 1 while max(L0,R0)!=0 and max(L1,R1)!=0: L0,R0 = swap(L0,R0) #attacker L1,R1 = swap(L1,R1) atackma...
a.cc:9:15: error: stray '#' in program 9 | def swap(a,b):#b = max | ^ a.cc:18:25: error: stray '#' in program 18 | L0,R0 = swap(L0,R0) #attacker | ^ a.cc:36:6: error: invalid preprocessing directive #print 36 | # print(L0,R0) | ^~~~~ a.cc:37:...
s853169510
p01859
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,aa,b,bb,c=0; cin>>a>>aa>>b>>bb; cout<<"ISONO"<<endl; else cout<<"NAKAJIMA"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'else' without a previous 'if' 7 | else cout<<"NAKAJIMA"<<endl; | ^~~~
s780261420
p01859
C++
#include <bits/stdc++.h> using namespace std; int main(){ ????int a,aa,b,bb,c=0; ????cin>>a>>aa>>b>>bb; if(a,aa,b,bb)cout<<"ISONO"<<endl; ????else cout<<"NAKAJIMA"<<endl; ????return 0; }
a.cc: In function 'int main()': a.cc:4:1: error: expected primary-expression before '?' token 4 | ????int a,aa,b,bb,c=0; | ^ a.cc:4:2: error: expected primary-expression before '?' token 4 | ????int a,aa,b,bb,c=0; | ^ a.cc:4:3: error: expected primary-expression before '?' token 4 | ????int a,a...
s753929224
p01859
C++
#include <bits/stdc++.h> using namespace std; int main(){ ????int a,aa,b,bb,c=0; ????cin>>a>>aa>>b>>bb; if(a!=1&&b!=1&&a==aa&&b==bb)cout<<"ISONO"<<endl; ????else cout<<"NAKAJIMA"<<endl; ????return 0; }
a.cc: In function 'int main()': a.cc:4:1: error: expected primary-expression before '?' token 4 | ????int a,aa,b,bb,c=0; | ^ a.cc:4:2: error: expected primary-expression before '?' token 4 | ????int a,aa,b,bb,c=0; | ^ a.cc:4:3: error: expected primary-expression before '?' token 4 | ????int a,a...
s344866089
p01860
C++
#define _STDIO_H #include <cstdio> #include <cstdint> #include <cctype> #include <climits> #include <cinttypes> #include <set> #include <map> #include <algorithm> #include <vector> #include <utility> //#define fprintf(...) void(0) int main() { intmax_t N; int M, K, D, S; scanf("%jd %d %d %d %d", &N, &M, &K, &D...
In file included from a.cc:3: /usr/include/c++/14/cstdio:98:11: error: 'FILE' has not been declared in '::' 98 | using ::FILE; | ^~~~ /usr/include/c++/14/cstdio:99:11: error: 'fpos_t' has not been declared in '::' 99 | using ::fpos_t; | ^~~~~~ /usr/include/c++/14/cstdio:101:11:...
s932542992
p01860
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define FFOR(i,a,b) for(int i=(a);i<=(b);i++) #define REP(i,b) FOR(i,0,b) #define RREP(i,b) FFOR(i,1,b) #define PB push_back #define F first #define S second #define BE(c) c.begin(),c.end() using namespace std; typedef long long LL; typedef LL ut; typ...
a.cc: In function 'int main()': a.cc:62:35: error: no matching function for call to 'min(LL&, int)' 62 | target=min(target,SIZE-1); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux...
s335820826
p01860
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define FFOR(i,a,b) for(int i=(a);i<=(b);i++) #define REP(i,b) FOR(i,0,b) #define RREP(i,b) FFOR(i,1,b) #define PB push_back #define F first #define S second #define BE(c) c.begin(),c.end() using namespace std; typedef long long LL; typedef LL ut; ty...
a.cc: In function 'int main()': a.cc:62:35: error: no matching function for call to 'min(LL&, int)' 62 | target=min(target,SIZE-1); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux...
s785880983
p01863
Java
import java.util.Arrays; import java.util.Scanner; import vol_024.AOJ_2444.RollingHash; public class Main { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); final int MOD = 1000000007; int[] dx = { 1, 0, 0, -1 }...
Main.java:4: error: package vol_024.AOJ_2444 does not exist import vol_024.AOJ_2444.RollingHash; ^ 1 error
s911197218
p01863
C
har s[1<<20];m[1<<20],n,t;main(){for(gets(s);s[n];m[++n]=--t)for(;t&&s[~t]-s[n];t=m[~t]);n=!printf(t*2<n?"Love %.*s!\n":"mitomerarenaiWA\n",(t-=~n)+n/3/t*t,s);}
main.c:1:1: error: unknown type name 'har'; did you mean 'char'? 1 | har s[1<<20];m[1<<20],n,t;main(){for(gets(s);s[n];m[++n]=--t)for(;t&&s[~t]-s[n];t=m[~t]);n=!printf(t*2<n?"Love %.*s!\n":"mitomerarenaiWA\n",(t-=~n)+n/3/t*t,s);} | ^~~ | char main.c:1:14: warning: data definition has no type or storage ...
s976354323
p01863
C++
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; const ull B = 100000007; ull hash[3000010]; ull po[3000010]; int main(){ string s; cin >> s; int n = (int)s.size(); hash[0] = 0; po[0] = 1; for(int i = 1; i <= n; i++){ po[i] = po[i - 1] * B; ...
a.cc: In function 'int main()': a.cc:15:5: error: reference to 'hash' is ambiguous 15 | hash[0] = 0; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, f...
s865312597
p01863
C++
char s[1<<20];m[1<<20],n;main(t){t=--*m;for(gets(s);s[n];m[++n]=++t)for(;~t&&s[t]-s[n];t=m[t]);t=n-t;printf(t*2<n?"Love %.*s!\n":"mitomerarenaiWA\n",t*=n/3/t+1,s);}
a.cc:1:15: error: 'm' does not name a type 1 | char s[1<<20];m[1<<20],n;main(t){t=--*m;for(gets(s);s[n];m[++n]=++t)for(;~t&&s[t]-s[n];t=m[t]);t=n-t;printf(t*2<n?"Love %.*s!\n":"mitomerarenaiWA\n",t*=n/3/t+1,s);} | ^ a.cc:1:30: error: expected constructor, destructor, or type conversion before '(...
s281024887
p01863
C++
import java.util.Arrays; import java.util.Scanner; public class Main { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); final int MOD = 1000000007; int[] dx = { 1, 0, 0, -1 }; int[] dy = { 0, 1, -1, 0 }; void ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ 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 java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s369724511
p01863
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cstdio> using namespace std; void z_algorithm(string& S,vector<int>& res) { int sz = (int)S.size(); res.resize(sz); int c = 0; for(int i = 1; i < sz; i++){ if(i+res[i-c] < c+res[c]){ res[i] = res...
a.cc: In function 'int main()': a.cc:32:31: error: expected ';' before 'return' 32 | cout << "MURI" << endl | ^ | ; 33 | return 0; | ~~~~~~
s841026301
p01865
C++
#include <stdafx.h> #include <iostream> using namespace std; int main() { int L, N, i, j, k, weight = 0; cin >> L >> N; int x[5000], w[5000], xx[5000], ww[5000]; for (i = 0; i < N; i++) { cin >> x[i] >> w[i]; weight = weight + x[i] * w[i]; } j = 0; for (i = L * -1; i <= L; i++) { if (i == 0) i+...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include <stdafx.h> | ^~~~~~~~~~ compilation terminated.
s707469211
p01865
C++
int main() { int L, N, i, j, k, l = 0, weight = 0; cin >> L >> N; int x[5000], w[5000], xx[5000], ww[5000]; for (i = 0; i < N; i++) { cin >> x[i] >> w[i]; weight = weight + x[i] * w[i]; } j = 0; if (weight > 0) { l = L * -1; } if (weight < 0) { weight = weight * -1; } for (i = l; i <= L; i++) ...
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin >> L >> N; | ^~~ a.cc:40:25: error: 'cout' was not declared in this scope 40 | cout << 0; | ^~~~ a.cc:45:9: error: 'cout' was not declared in t...
s454978789
p01865
C++
#include <stdio.h> int main() { int L, N, i, j, k, l = 0, weight = 0; cin >> L >> N; int x[5000], w[5000], xx[5000], ww[5000]; for (i = 0; i < N; i++) { cin >> x[i] >> w[i]; weight = weight + x[i] * w[i]; } j = 0; if (weight > 0) { l = L * -1; } if (weight < 0) { weight = weight * -1; } for ...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin >> L >> N; | ^~~ a.cc:42:25: error: 'cout' was not declared in this scope 42 | cout << 0; | ^~~~ a.cc:47:9: error: 'cout' was not declared in t...
s752723680
p01865
C++
#include <stdio.h> int main() { int L, N, i, j, k, l = 0, weight = 0; cin >> L >> N; int x[5000], w[5000], xx[5000], ww[5000]; for (i = 0; i < N; i++) { cin >> x[i] >> w[i]; weight = weight + x[i] * w[i]; } j = 0; if (weight > 0) { l = L * -1; } if (weight < 0) { weight = weight * -1; } for ...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin >> L >> N; | ^~~ a.cc:42:25: error: 'cout' was not declared in this scope 42 | cout << 0; | ^~~~ a.cc:47:9: error: 'cout' was not declared in t...