submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s841707192
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string sa,sb,sc; cin >> sa >> sb >> sc; reverse(sa.begin(),sa.end()); reverse(sb.begin(),sb.end()); reverse(sc.begin(),sc.end()); char next='a'; while(!(sa.length()==0 || sb.length()==0 sc.length()==0)){ if(next=='a'){ next=sa[sa.length(...
a.cc: In function 'int main()': a.cc:11:43: error: expected ')' before 'sc' 11 | while(!(sa.length()==0 || sb.length()==0 sc.length()==0)){ | ~ ^~~ | ) a.cc:24:4: error: expected ')' before 'if' 24 | } | ^ ...
s320163600
p03998
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { string SA, SB, SC; cin >> SA >> SB >> SC; int SAL = SA.size(); int SBL = SB.size(); in...
a.cc: In function 'int main()': a.cc:17:17: error: 'y' was not declared in this scope 17 | int x = 0; y = 0; z = 0; | ^ a.cc:17:25: error: 'z' was not declared in this scope 17 | int x = 0; y = 0; z = 0; | ^ a.cc:18:19: error: 'winB' was not declared...
s502682061
p03998
C++
#include <bits/stdc++.h> using namespace std; //vector…可変長、データの大きさに合わせてサイズを変える //list…双方向リスト、要素を挿入、削除の多いとき //forward_list //array…固定長配列 //set…集合 //multiset //bitset…2進数、固定長ビット列 //map…連想配列、キーと値を関連付ける //multimap //deque //stack…FILO //queue…FIFO //priority_queue…格納された最大値から順に取り出す //pair…二つの値を一組 //tuple…複数の値を一組 template<...
a.cc: In function 'int main()': a.cc:64:9: error: 'j' was not declared in this scope 64 | j = C[i].front() - 'a'; | ^
s713751455
p03998
C++
using namespace std; #include <bits/stdc++.h> #define rep(i, s) for (int i = 0; i < s; ++i) #define repr(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define all(v) (v.begin(), v.end()) #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i) #define VEC...
a.cc: In function 'int main()': a.cc:27:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 27 | if(a=='a'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In file inclu...
s340091049
p03998
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) int main(){ vector<string> s(3); for(auto&& u:s)cin>>u; vector<int> t(3,0); // rep(i,3)t[i]=s[i].size(); int x=0; while(t[x]<s[x].size()){ t[x]++; c=s[x][t[x]-1]; } cout<<"ABC"[x]<<endl; }
a.cc: In function 'int main()': a.cc:14:3: error: 'c' was not declared in this scope 14 | c=s[x][t[x]-1]; | ^
s721171338
p03998
C++
#include <bits/stdc++.h> using namespace std; int main() { vector <string> A; vector <string> B; vector <string> C; cin >> A >> B >> C; char next = 'A', winner; while(true) { if(next == 'A') { next = A.front(); A.erase(A.begin()); if(A.size() == 0) { winner = 'A'; bre...
a.cc: In function 'int main()': a.cc:8:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 8 | cin >> A >> B >> C; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<...
s728090422
p03998
C++
#include <bits/stdc++.h> using namespace std; int main() { vector <string> A, B, C; cin >> A >> B >> C; char next = 'A', winner; while(true) { if(next == 'A') { next = A.front(); A.erase(A.begin()); if(A.size() == 0) { winner = 'A'; break; } } else if(next == 'B...
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 6 | cin >> A >> B >> C; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<...
s266496026
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(void){ string s[3]; cin>>s[0]>>s[1]>>s[2]; int p[3]={},q=0; while(p[q]!=s[q].size()){ p[q]++; q=s[q][p[q]-1]-'a'; } cout<<(char)('A'+q)<<enld; }
a.cc: In function 'int main()': a.cc:12:24: error: 'enld' was not declared in this scope 12 | cout<<(char)('A'+q)<<enld; | ^~~~
s704093794
p03998
C++
#include <bits/stdc++.h> using namespace std; char a[110],b[110],c[110]; int ax=0,bx=-1,cx=-1; char cc; int main() { gets(a); gets(b); gets(c); cc=a[ax]; while(1) { if(cc=='a') { ax++; if(a[ax]=='\0') { cout<<"A"; return 0; } cc=a[ax]; } else { if(cc=='b') { bx++; if...
a.cc: In function 'int main()': a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(a); | ^~~~ | getw
s199167624
p03998
C++
#include <bits/stdc++.h> using namespace std; char a[110],b[110],c[110]; int ax=0,bx=-1,cx=-1; char cc; int main() { gets(a); gets(b); gets(c); cc=a[ax]; while(1) { if(cc=='a') { ax++; if(a[ax]=='\0') { cout<<"A"; return 0; } cc=a[ax]; } else { if(cc=='b') { bx++; if...
a.cc: In function 'int main()': a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(a); | ^~~~ | getw
s393270378
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(){ string SA,SB,SC,S; cin>>SA>>SB>>SC; S=SA; for(int i=0;i<1000;i++){ if(S.at(i)=='a'){ if(SA.size()>0){ SA.erase(SA.begin()+0) S=SA; continue; } if(SA.size()==0){ ...
a.cc: In function 'int main()': a.cc:11:37: error: expected ';' before 'S' 11 | SA.erase(SA.begin()+0) | ^ | ; 12 | S=SA; | ~ a.cc:23:37: error: expected ';' be...
s500803144
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(){ string SA,SB,SC.S; cin>>SA>>SB>>SC; S=SA for(int i=0;i<1000;i++){ if(S.at(i)=='a'){ if(SA.size()>0){ SA.erase(SA.begin()+0) S=SA; continue; } if(SA.size()==0){ c...
a.cc: In function 'int main()': a.cc:5:24: error: expected initializer before '.' token 5 | string SA,SB,SC.S; | ^ a.cc:6:18: error: 'SC' was not declared in this scope; did you mean 'SB'? 6 | cin>>SA>>SB>>SC; | ^~ | SB a.cc:...
s300815066
p03998
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string A,B,C; cin >> A >> B >> C; char x = A[0]; while() { if(x == 'a'){ if( A.size() == 0){ cout << 'A' << endl; return 0;} x = A[0]; A = A.substr(1,A.size() - 1);} else if(x == 'b'){ ...
a.cc: In function 'int main()': a.cc:13:9: error: expected primary-expression before ')' token 13 | while() | ^
s565912423
p03998
C++
int main(){ string A,B,C; cin>>A>>B>>C; char c=A[0]; A.erase(0,1); while(1){ if(c=='a'){ if(A.size()==0){ cout<<'A'<<endl; return 0; } c=A[0]; A.erase(0,1); }else if(c=='b'){ if(B.size()==0){ cout<<'B'<<endl; return 0; } c=B[0]; B.era...
a.cc: In function 'int main()': a.cc:2:3: error: 'string' was not declared in this scope 2 | string A,B,C; | ^~~~~~ a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin>>A>>B>>C; | ^~~ a.cc:3:8: error: 'A' was not declared in this scope 3 | cin>>A>>B>>C; | ^ a.cc:...
s965850994
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string sa,sb,sc; cin >> sa >> sb >> sc; int turn=0; while(1){ if(turn == 0){ if(sa.size() == 0) break; char a = sa.at(0); sa.erase(sa.begin + 0); if(a == 'b'){ turn = 1; }else if(a == 'c'){ turn = 2; ...
a.cc: In function 'int main()': a.cc:13:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 13 | sa.erase(sa.begin + 0); | ~~~~~~~~ ^ ~ | | | | | int | ...
s572750417
p03998
C++
#include<bits/stdc++.h> using namespace std; string a,b,c; void charlie_chance() { if(c.empty()) {cout<<"C\n";return;} c.pop_back(); switch(c[c.size()-1]) { case 'a': alice_chance(); break; case 'b' : bob_chance(); break; case 'c' : charlie_chance(); break; } } void bob_chance() { if(b.empt...
a.cc: In function 'void charlie_chance()': a.cc:11:15: error: 'alice_chance' was not declared in this scope; did you mean 'charlie_chance'? 11 | case 'a': alice_chance(); break; | ^~~~~~~~~~~~ | charlie_chance a.cc:12:16: error: 'bob_chance' was not declared in this scope ...
s584392629
p03998
C++
ci++; } } if ( len_a < 0 ) cout << "A\n"; else if ( len_b< 0 ) cout << "B/n"; else cout << "C\n"; return 0; }
a.cc:1:7: error: 'ci' does not name a type 1 | ci++; | ^~ a.cc:2:5: error: expected declaration before '}' token 2 | } | ^ a.cc:3:3: error: expected declaration before '}' token 3 | } | ^ a.cc:5:3: error: expected unqualified-id before 'if' 5 | if ( len_a < 0 ...
s076371657
p03998
C++
#include <iostream> using namespace std; int main(){ string s[3]; cin >> s[0] >> s[1] >> s[2]; int n[3],t[3]; for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); int now=0; while(n[0]&&n[1]&&n[2]){ n[now]--; if(s[now].at(t[now]-n[now]-1)=='a') now=0; else if(s[now].at(t[now]-n[now]-1)=='b'...
a.cc: In function 'int main()': a.cc:8:44: error: 'i' was not declared in this scope 8 | for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); | ^
s876699232
p03998
C++
#include <iostream> using namespace std; int main(){ string s[3]; cin >> s[0] >> s[1] >> s[2]; int n[3],t[3] for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); int now=0; while(n[0]&&n[1]&&n[2]){ n[now]--; if(s[now].at(t[now]-n[now]-1)=='a') now=0; else if(s[now].at(t[now]-n[now]-1)=='b')...
a.cc: In function 'int main()': a.cc:8:3: error: expected initializer before 'for' 8 | for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); | ^~~ a.cc:8:15: error: 'i' was not declared in this scope 8 | for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); | ^ a.cc:8:42: e...
s150506860
p03998
C++
#include <iostream> using namespace std; int main(){ string s[3] cin >> s[0] >> s[1] >> s[2]; int n[3],t[3] for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); int now=0; while(n[0]&&n[1]&&n[2]){ n[now]--; if(s[now].at(t[now]-n[now]-1)=='a') now=0; else if(s[now].at(t[now]-n[now]-1)=='b') ...
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'cin' 6 | cin >> s[0] >> s[1] >> s[2]; | ^~~ a.cc:8:3: error: expected initializer before 'for' 8 | for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size(); | ^~~ a.cc:8:15: error: 'i' was not declared in this scope...
s514748388
p03998
C++
#include <iostream> using namespace std; int main(){ string a,b,c; int a_count = 0; int b_count = 0; int c_count = 0; char turn = 'a'; cin >> a >> b >> c; while(true){ if(turn == 'a'){ if(a_count == a.length()-1){ cout >> "A" >> endl; br...
a.cc: In function 'int main()': a.cc:16:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]') 16 | cout >> "A" >> endl; | ~~~~ ^~ ~~~ | | | | | const c...
s331606099
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S[3]; cin >> S[0] >> S[1] >> S[2]; int now = 0; while(1){ if(S[now].size() == 0){ printf("%c\n", (char)((int)'a' + now)); return 0; } else{ now = S[now][S[now].size() - 1] - (int)'a'; S[now].pop_buck(); } } }
a.cc: In function 'int main()': a.cc:15:32: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_buck'; did you mean 'pop_back'? 15 | S[now].pop_buck(); | ^~~~~~~~ | pop_back
s470168007
p03998
C++
#include <bits/stdc++.h> using namespace std; int play (int X, string a, string b, string c, string A, string B, stringC) { if (X == a) { X = A[1]; A.erase[1]; if (A.size() == 0) { cout << A << endl; break; } } if (X == b) { X = B[1]; B.erase[1]; if (B.size() == 0) { ...
a.cc:4:68: error: 'stringC' has not been declared 4 | int play (int X, string a, string b, string c, string A, string B, stringC) { | ^~~~~~~ a.cc: In function 'int play(int, std::string, std::string, std::string, std::string, std::string, int...
s538830087
p03998
C++
#include <bits/stdc++.h> using namespace std; int play (int X, string a, b, c, A, B, C) { if (X == a) { X = A[1]; A.erase[1]; if (A.size() == 0) { cout << A << endl; break; } } if (X == b) { X = B[1]; B.erase[1]; if (B.size() == 0) { cout << B << endl; break; ...
a.cc:4:28: error: 'b' has not been declared 4 | int play (int X, string a, b, c, A, B, C) { | ^ a.cc:4:31: error: 'c' has not been declared 4 | int play (int X, string a, b, c, A, B, C) { | ^ a.cc:4:34: error: 'A' has not been declared 4 |...
s627639274
p03998
C++
#include <bits/stdc++.h> using namespace std; int play (int X) { if (X == a) { X = A[1]; A.erase[1]; if (A.size() == 0) { cout << A << endl; break; } } if (X == b) { X = B[1]; B.erase[1]; if (B.size() == 0) { cout << B << endl; break; } } if (X == c)...
a.cc: In function 'int play(int)': a.cc:5:12: error: 'a' was not declared in this scope 5 | if (X == a) { | ^ a.cc:6:9: error: 'A' was not declared in this scope 6 | X = A[1]; | ^ a.cc:10:7: error: break statement not within loop or switch 10 | break; | ...
s965366587
p03998
C++
#include <bits/stdc++.h> using namespace std; int X; int play(X) { if (X == a) { X = A[1]; A.erase[1]; if (A.size() == 0) { cout << A << endl; break; } } if (X == b) { X = B[1]; B.erase[1]; if (B.size() == 0) { cout << B << endl; break; } } if (X == c...
a.cc:4:13: error: expected ',' or ';' before '{' token 4 | int play(X) { | ^ a.cc: In function 'int main()': a.cc:36:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 36 | A.erase[1]; | ^ a.cc:37:7: error: 'a' was not declared in this sco...
s366833361
p03998
C++
#include <bits/stdc++.h> using namespace std; int play(X) { if (X == a) { X = A[1]; A.erase[1]; if (A.size() == 0) { cout << A << endl; break; } } if (X == b) { X = B[1]; B.erase[1]; if (B.size() == 0) { cout << B << endl; break; } } if (X == c) { ...
a.cc:4:10: error: 'X' was not declared in this scope 4 | int play(X) { | ^ a.cc: In function 'int main()': a.cc:37:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 37 | A.erase[1]; | ^ a.cc:39:8: error: 'a' was not declared in this scope ...
s062559877
p03998
C++
#include <bits/stdc++.h> using namespace std; int play(X) { if (X == a) { X = A[1]; A.erase[1]; if (A.size() == 0) { cout << A << endl; break; } } if (X == b) { X = B[1]; B.erase[1]; if (B.size() == 0) { cout << B << endl; break; } } if (X == c) { ...
a.cc:4:10: error: 'X' was not declared in this scope 4 | int play(X) { | ^ a.cc: In function 'int main()': a.cc:37:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 37 | A.erase[1]; | ^ a.cc:39:8: error: 'a' was not declared in this scope ...
s648206468
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<string> S(3); cin >> S[0] >> S[1] >> S[2]; vector<int> index(3, 0); int next = 0; while(true){ if(index[next] == S[index].size()){ cout << (char)('A'+index) << endl; return 0; } index[next]++; next = S[next][index[n...
a.cc: In function 'int main()': a.cc:10:24: error: no match for 'operator[]' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'std::vector<int>') 10 | if(index[next] == S[index].size()){ | ^ In file included from /usr/include/c++/14/vector:66, ...
s972892458
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string SA, SB, SC; cin >> SA >> SB >> SC; char next = SA.pop_front(); while(true){ switch(next){ case 'a': if(SA.empty()){ cout << 'A' << endl; return 0; } next = SA.pop_front(); break; ...
a.cc: In function 'int main()': a.cc:7:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front' 7 | char next = SA.pop_front(); | ^~~~~~~~~ a.cc:15:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop...
s333226828
p03998
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.InputStreamReader; import java.util.List; import java.util.StringTokenizer; import java.io.BufferedReader; import java.util.LinkedList; import java.io.InputStream; ...
Main.java:67: error: reached end of file while parsing if (listC.isEmpty()) { ^ 1 error
s237877612
p03998
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { string A, B, C; cin >> A >> B >> C; char next = 'a'; char ans; for(;;) { if(next == 'a') { next = A.front(); ans = 'A'; if(A.length()) A.pop_front(); else break; } else if (next == 'b')...
a.cc: In function 'int main()': a.cc:14:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front' 14 | if(A.length()) A.pop_front(); | ^~~~~~~~~ a.cc:19:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no memb...
s029182498
p03998
C++
#include "bits/stdc++.h" using namespace std; #define Rep(i,n) for(int i=0;i<n;i++) #define For(i,n1,n2) for(int i=n1;i<n2;i++) #define REP(i,n) for(ll i=0;i<n;i++) #define RREP(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,n1,n2) for(ll i=n1;i<n2;i++) #define put(a) cout<<a<<"\n" #define all(a) (a).begin(),(a).end() #def...
a.cc: In function 'int main()': a.cc:31:31: error: void value not ignored as it ought to be 31 | int temp = s[turn].pop(); | ~~~~~~~~~~~^~
s468104264
p03998
C++
#include "bits/stdc++.h" using namespace std; #define Rep(i,n) for(int i=0;i<n;i++) #define For(i,n1,n2) for(int i=n1;i<n2;i++) #define REP(i,n) for(ll i=0;i<n;i++) #define RREP(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,n1,n2) for(ll i=n1;i<n2;i++) #define put(a) cout<<a<<"\n" #define all(a) (a).begin(),(a).end() #def...
a.cc: In function 'int main()': a.cc:31:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::queue<int> >, std::queue<int> >::value_type' {aka 'class std::queue<int>'} has no member named 'top'; did you mean 'pop'? 31 | int temp = s[turn].top(); | ^~~ | ...
s123242753
p03998
C++
#include<iostream> #include<stdio.h> #include<cstring> using namespace std; int main() { char a[110]{}, b[110], c[110]; scanf("%s%s%s", &a, &b, &c); int al, bl, cl; al = strlen(a); bl = strlen(b); cl = strlen(c); int ac, bc, cc; ac = bc = cc = 0; char temp = a[0]; while (1) { if (temp == 'a') { ++ac...
a.cc: In function 'int main()': a.cc:28:36: error: expected ';' before '}' token 28 | temp==a[ac] | ^ | ; 29 | } | ~
s332265139
p03998
C++
#include<iostream> #include <algorithm> #include <string> #include<math.h> #include<stdio.h> #include<vector> #define rep(i,n)for(int i=0;i<n;i++) //printf("%.yf\n",x); xを小数点以下y桁で using namespace std; int main() { string a, b, c; cin >> a >> b >> c; int player = 0; for (;;) { if (player == 0) { if (a.size() ==...
a.cc: In function 'int main()': a.cc:29:43: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s022644707
p03998
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; bool prime(int n){ if(n==1){ return false; }else if(n==2){ return true; }else...
a.cc: In function 'int main()': a.cc:95:5: error: 'erase' was not declared in this scope 95 | erase(s[next].begin(),s[next].begin()+1); | ^~~~~
s795226088
p03998
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; bool prime(int n){ if(n==1){ return false; }else if(n==2){ return true; }else...
a.cc: In function 'int main()': a.cc:95:5: error: 'erase' was not declared in this scope 95 | erase(s[next].begin(),s[next].begin()+1); | ^~~~~
s735872200
p03998
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; bool prime(int n){ if(n==1){ return false; }else if(n==2){ return true; }else...
a.cc: In function 'int main()': a.cc:94:25: error: expected ';' before 's' 94 | next_char=s[next][0] | ^ | ; 95 | s[next]=s[next].substr(1,s[next].size()-1); | ~
s926453694
p03998
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; bool prime(int n){ if(n==1){ return false; }else if(n==2){ return true; }else...
a.cc: In function 'int main()': a.cc:89:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 89 | cin>>s[i]; | ~~~^~~~~~ | | | | | std::vector<std::__cxx11::basic_stri...
s807423649
p03998
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) #define int long long #define elif else if using namespace std; string s[4]; int a=0,b=0,c=0,d=0; signed main(){ rep(i,3){ cin>>s[i]; } while(){ if(a==0){ a=s[0][b]-97; b++; }elif(a==1){ a=s[1][c]-97; c++; }else{ a=s[2]...
a.cc: In function 'int main()': a.cc:12:15: error: expected primary-expression before ')' token 12 | while(){ | ^ a.cc:25:9: error: expected primary-expression before '}' token 25 | } | ^ a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:8:1...
s561298102
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(){ string sa,sb,sc; cin>>sa>>sb>>sc; int i=0;j=-1,k=-1; int na=sa.size(),nb=sb.size(),nc=sc.size(); char ans = 'A'; string cur = a; int cnt = i; while(i<na&&j<nb&&k<nc){ if(cur[cnt]=='a'){ i++; ans='A'; cur=sa; cnt = i;...
a.cc: In function 'int main()': a.cc:8:11: error: 'j' was not declared in this scope 8 | int i=0;j=-1,k=-1; | ^ a.cc:8:16: error: 'k' was not declared in this scope 8 | int i=0;j=-1,k=-1; | ^ a.cc:11:16: error: 'a' was not declared in this scope; did you mean 'na'? 11...
s006696898
p03998
C
#include <bits/stdc++.h> using namespace std; // gcd(a,b) int gcd(int a,int b){ return (b == 0) ? a : gcd(b, a % b); } // lcm(a,b) int lcm(int a,int b){ return (a * b) / gcd(a,b); } int main(int argc, char const *argv[]){ int player = 0,turn[3] = {0,-1,-1}; char card[3][120]; scanf("%s %s %s",card[0],card[1],ca...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s940142675
p03998
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <iostream> #define TLong long long int main(int argc, char const *argv[]){ int player = 0,turn[3] = {0,0,0}; char card[3][111]; std::cin<<card[0]<<card[1]<<card[2]; // scanf("%s %s %s",card[0],card[1],card[...
a.cc: In function 'int main(int, const char**)': a.cc:13:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char [111]') 13 | std::cin<<card[0]<<card[1]<<card[2]; | ~~~~~~~~^~~~~~~~~ | | | | | char...
s394408538
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin >> A >> B >> C; int na=nb=nc=0; char X=A.at(0); while(true){ if(X=='a'){ na++; if(na==A.size()){ cout << "A" << endl; return 0; } else X = A.at(na); } else if(X=='b'){ nb++; ...
a.cc: In function 'int main()': a.cc:7:10: error: 'nb' was not declared in this scope; did you mean 'na'? 7 | int na=nb=nc=0; | ^~ | na a.cc:7:13: error: 'nc' was not declared in this scope; did you mean 'na'? 7 | int na=nb=nc=0; | ^~ | na
s423699799
p03998
C++
#include<bits/stdc++.h> using namespace std; string Aturn(int a,int b,int c,string A,string B, string C) string Bturn(int a,int b,int c,string A,string B, string C) string Cturn(int a,int b,int c,string A,string B, string C) string Aturn(int a,int b,int c,string A,string B, string C){ a++; if(a+1==A.size()) ret...
a.cc:5:1: error: expected initializer before 'string' 5 | string Bturn(int a,int b,int c,string A,string B, string C) | ^~~~~~ a.cc: In function 'std::string Bturn(int, int, int, std::string, std::string, std::string)': a.cc:18:22: error: 'Aturn' was not declared in this scope; did you mean 'Bturn'? 18 | ...
s988907288
p03998
C++
#include<bits/stdc++.h> using namespace std; string Aturn(int a,int b,int c,string A,string B, string C){ a++; if(a+1==A.size()) return "A"; if(A.at(a) == 'a') Aturn(a,b,c,A,B,C); else if(A.at(a) == 'b') Bturn(a,b,c,A,B,C); else if(A.at(a) == 'c') Cturn(a,b,c,A,B,C); } string Bturn(int a,int b,int c,string...
a.cc: In function 'std::string Aturn(int, int, int, std::string, std::string, std::string)': a.cc:10:27: error: 'Bturn' was not declared in this scope; did you mean 'Aturn'? 10 | else if(A.at(a) == 'b') Bturn(a,b,c,A,B,C); | ^~~~~ | Aturn a.cc:11:27: ...
s807495682
p03998
C++
#include<bits/stdc++.h> using namespace std; string Aturn(int a,int b,int c){ a++; if(a+1==A.size()) return "A"; if(A.at(a) == 'a') Aturn(a,b,c); else if(A.at(a) == 'b') Bturn(a,b,c); else if(A.at(a) == 'c') Cturn(a,b,c); } string Bturn(int a,int b,int c){ b++; if(b+1==B.size()) return "B"; if(B.at(b...
a.cc: In function 'std::string Aturn(int, int, int)': a.cc:8:11: error: 'A' was not declared in this scope 8 | if(a+1==A.size()) return "A"; | ^ a.cc:9:6: error: 'A' was not declared in this scope 9 | if(A.at(a) == 'a') Aturn(a,b,c); | ^ a.cc:10:27: error: 'Bturn' was not declared...
s822977635
p03998
C++
#include<iostream> #include<string> using namespace std; int main(){ string a,b,c; int counta=0,countb=0,countc=0; int turn=1; cin>>a>>b>>c; counta++; while(1){ if(turn==1){ if(a[counta-1]=='a'){ counta++; turn=1; } else if(a[count-1]=='b'){ countb++; ...
a.cc: In function 'int main()': a.cc:18:17: error: 'count' was not declared in this scope; did you mean 'countc'? 18 | else if(a[count-1]=='b'){ | ^~~~~ | countc a.cc:30:17: error: 'count' was not declared in this scope; did you mean 'countc'? 30 | else if(b...
s782335354
p03998
C++
#include<iostream> using namespace std; string a,b,c; void judge(string s){ if(s.size()==0)return; if(s[0]=='a'){ s.erase(s.begin()); judge(a); } else if(s[0]=='b'){ s.erase(s.begin()); judge(b); } else if(s[0]=='c') { s.erase(s.begi...
a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s024429702
p03998
C++
#include<iostream> using namespace std; string a,b,c; void judge(string s){ if(s.size()==0)return; if(s[0]=='a'){ s.pop_front(); judge(a); } else if(s[0]=='b'){ s.pop_front(); judge(b); } else if(s[0]=='c') { s.pop_front(); ...
a.cc: In function 'void judge(std::string)': a.cc:9:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front' 9 | s.pop_front(); | ^~~~~~~~~ a.cc:13:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '...
s579811156
p03998
C++
//file_name:ABC45_B.cpp #include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define max...
a.cc: In function 'int main()': a.cc:100:21: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 100 | if(s[n[x]-1]=='a'){ | ~~~~~~~~~^~~~~ | | | | | char | ...
s369329464
p03998
C++
//file_name:ABC45_B.cpp #include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define max...
a.cc: In function 'int main()': a.cc:87:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s851602704
p03998
C++
#include<bits/stdc++.h> #define int long long #define REP(i,n) for(int i=0;i<(n);i++) #define ALL(v) (v).begin(),(v).end() using namespace std; typedef vector<int> vint; typedef pair<int,int> pint; signed main() { string A,B,C; cin>>A>>B>>C; int posA=0,posB=0,posC=0; int cur=0; while...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:10:1: note: to match this '{' 10 | { | ^
s808695693
p03998
C++
#include <iostream> using namespace std; int main(){ string s[3]; cin >> s[0] >> s[1] >> s[2]; int x = 0, i[3] = {0}; while(){ if(i[x] == s[x].size()){ char c = 'A' + x; cout << c << endl; return 0; } if(s[x][i[x]] == 'a'){ i[x]++; x = 0; }else if(s[x][i[x]...
a.cc: In function 'int main()': a.cc:9:9: error: expected primary-expression before ')' token 9 | while(){ | ^
s146296081
p03998
C++
#include <iostream> #include <iomanip> // std::cout << std::setprecision(2) << 3.141; // "3.1" #include <algorithm> #include <vector> #include <string> #include <cmath> #include <map> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> plglg; typedef pair<double, ll> pdlg; type...
a.cc: In function 'void game()': a.cc:38:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'strlen' 38 | int len_a = sa.strlen(); | ^~~~~~ a.cc:39:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'strlen' ...
s498468216
p03998
C++
#include <iostream> #include <iomanip> // std::cout << std::setprecision(2) << 3.141; // "3.1" #include <algorithm> #include <vector> #include <string> #include <cmath> #include <map> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> plglg; typedef pair<double, ll> pdlg; type...
a.cc: In function 'void game()': a.cc:37:15: error: 'sa' was not declared in this scope 37 | int len_a = sa.strlen(); | ^~ a.cc:46:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 46 | } else if(turn == 0 && && counter_a != len_a){ | ...
s959916511
p03998
C++
import sys SA = str(input()) SB = str(input()) SC = str(input()) turn = "A" while (1): if( turn == "A"): if SA == "": break if SA[0] == "a": turn = "A" elif SA[0] == "b": turn = "B" else: turn = "C" SA = SA[1:] elif( turn ==...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s846460498
p03998
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { string Sa, Sb, Sc, n; int ai, bi, ci,Dis; ai = 0; bi = 0; ci = 0; n = "a"; cin >> Sa >> Sb >> Sc; while (Dis==0){ if (n == "a"){ n = Sa.substr(ai, 1); ai++; } else if (n == "b"){ n = Sb.substr(bi, 1); ...
a.cc: In function 'int main()': a.cc:40:23: error: expected ';' before '{' token 40 | else(n == "c"){ | ^ | ; a.cc:40:16: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [...
s707681784
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s[3]; cint>>s[0]>>s[1]>>s[2]; int turn=0; char c; while(true){ if(s[turn]==""){ cout<<(char)('A'+turn)<<endl; } c=s[turn].at(0); s[turn]=s[turn].substr(1,s[turn].length()-1); turn=c-'a'; } return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'cint' was not declared in this scope; did you mean 'uint'? 6 | cint>>s[0]>>s[1]>>s[2]; | ^~~~ | uint
s934671051
p03998
C++
#include<iostream> #include<string> using namespace std; int main() { int x, y, z; char next = 'A'; string A, B, C; cin >> A >> B >> C; while (A.length > x && B.length > y && C.length > z) { switch (next) { case 'A': next = A[x]; x++; case 'B': next = B[y]; y++; case 'C': next = C[z]...
a.cc: In function 'int main()': a.cc:14:18: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s252539914
p03998
C
#include<stdio.h> #include<string.h> int main(void) { int Acount = 0,Bcount = 0,Ccount = 0flag = 0; char A[110],B[110],C[110]; scanf("%s",A); scanf("%s",B); scanf("%s",C); while(flag != 4) { switch(flag) { case 0: if(Acount == strlen(A) - 1){printf("A"); flag = 4; break;} i...
main.c: In function 'main': main.c:6:38: error: invalid suffix "flag" on integer constant 6 | int Acount = 0,Bcount = 0,Ccount = 0flag = 0; | ^~~~~ main.c:10:9: error: 'flag' undeclared (first use in this function) 10 | while(flag != 4) | ^~~~ main.c:1...
s659964942
p03998
C++
# include <bits/stdc++.h> # define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i) # define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i) # define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i) # define rreps(i, n) for(int i=((int)(n)); i>0; --i) # define ALL(x) (x).begin(), (x).end() # define SZ(x) ((int)(x...
a.cc: In function 'int main()': a.cc:59:14: error: expected '}' at end of input 59 | return 0; | ^ a.cc:16:1: note: to match this '{' 16 | { | ^
s568599571
p03998
C++
#include <bits/stdc++.h> using namespace std; int main() { string s[3]; REP(i, 3) cin >> s[i]; int mbr_next; int mbr_prev = 0; do { mbr_next = s[mbr_prev].c_str()[0] - 'a'; s[mbr_prev] = s[mbr_prev].substr(1, s[mbr_prev].size() - 1); mbr_prev = mbr_next; } whil...
a.cc: In function 'int main()': a.cc:7:9: error: 'i' was not declared in this scope 7 | REP(i, 3) cin >> s[i]; | ^ a.cc:7:5: error: 'REP' was not declared in this scope 7 | REP(i, 3) cin >> s[i]; | ^~~
s478548692
p03998
C++
#include <iostream> #include <string> #include <sstream> #include <set> #include <map> #include <unordered_map> #include <stack> #include <queue> #include <vector> #include <utility> #include <iomanip> #include <sstream> #include <bitset> #include <cstdlib> #include <iterator> #include <algorithm> #include <functional>...
a.cc: In function 'int main()': a.cc:47:48: error: 'nn' was not declared in this scope; did you mean 'yn'? 47 | cout << "A" << nn; | ^~ | yn a.cc:54:48: error: 'nn' was not declar...
s689331677
p03998
C++
#include<bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; char card=='a'; while () { if (card = 'a') { if (a.size() == 0) { cout << "A" << endl; return 0; } else { card = a[0]; a = a.substr(1, a.size() - 1); } } if (card = 'b') { if (b.size()...
a.cc: In function 'int main()': a.cc:6:18: error: expected initializer before '==' token 6 | char card=='a'; | ^~ a.cc:7:16: error: expected primary-expression before ')' token 7 | while () { | ^ a.cc:8:21: error: 'card' was not declared in this scope ...
s994449851
p03998
C++
#include<bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> > b >> c; char card=='a'; while () { if (card = 'a') { if (a.size() == 0) { cout << "A" << endl; return 0; } else { card = a[0]; a = a.substr(1, a.size() - 1); } } if (card = 'b') { if (b.size(...
a.cc: In function 'int main()': a.cc:5:21: error: expected primary-expression before '>' token 5 | cin >> a >> > b >> c; | ^ a.cc:5:25: error: no match for 'operator>>' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::b...
s740385023
p03998
C++
include<bits/stdc++.h> using namespace std; int main(){ char s1[101],s2[100],s3[100]; deque<char> a; deque<char> b; deque<char> c; scanf("%s",s1); for (int i=0;i<strlen(s1);i++) a.push_back(s1[i]); scanf("%s",s2); for (int i=0;i<strlen(s2);i++) b.push_back(s2[i]); scanf("%s",s3); ...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'deque' was not declared in this scope 7 | deque<char> a; | ^~~~~ a.cc:7:11: error: expected primary-expression before 'char' 7 | deque<char> a; ...
s964968377
p03998
C++
#include <iostream> #include <queue> #include <cstring> #include <algorithm> #include <vector> using namespace std; int main(void){  char sa[105],sb[105],sc[105];  cin>>sa>>sb>>sc;  int now=sa[0];  int a=0,b=0,c=0;  for(int i=0;i<310;i++){   if(now=='a') {a++; now=sa[a]; if(now!='a'&&now!='b'&&now!='c') {cout<<'A';b...
a.cc:8:1: error: extended character   is not valid in an identifier 8 |  char sa[105],sb[105],sc[105]; | ^ a.cc:9:1: error: extended character   is not valid in an identifier 9 |  cin>>sa>>sb>>sc; | ^ a.cc:10:1: error: extended character   is not valid in an identifier 10 |  int now=sa[0]; ...
s575668319
p03998
C++
#! /usr/bin/python3 # 3人でカードゲームイージー / Card Game for Three (ABC Edit) """ 1≤|SA|≤100 1≤|SB|≤100 1≤|SC|≤100 SA、SB、SC に含まれる文字はそれぞれ a、b、c のいずれか """ import sys test_mode = False S_A = list(str(input())) S_B = list(str(input())) S_C = list(str(input())) def turn(player): """ プレイヤー player のターンを消化する関数...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #! /usr/bin/python3 | ^ a.cc:2:3: error: "3人でカードゲームイージー" after # is not a positive integer 2 | # 3人でカードゲームイージー / Card Game for Three (ABC Edit) | ^~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:3:3: warning: missing terminating " character 3 | """ ...
s359949275
p03998
C++
#include<stdio.h> int main(void){ char a[100],b[100],c[100]; scanf("%s",a); scanf("%s",b); scanf("%s",c); int ca=0,cb=0,cc=0; char n="a"; char ans=0; while(n!=0){ if(n=="a"){ ans="a"; n=a[ca]; ca++; }else if(n=="b"){ ans="b"; n=b[cb]; cb++; }else if(n=="c")...
a.cc: In function 'int main()': a.cc:12:10: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 12 | char n="a"; | ^~~ | | | const char* a.cc:17:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 17 | if(n=="a"){ ...
s938905758
p03998
C++
#include<stdio.h> int main(void){ char a[100],b[100],c[100]; scanf("%s",a); scanf("%s",b); scanf("%s",c); int ca=0,cb=0,cc=0; int n="a"; char ans=0; while(n!=0){ if(n=="a"){ ans="a"; n=a[ca]; ca++; }else if(n=="b"){ ans="b"; n=b[cb]; cb++; }else if(n=="c"){...
a.cc: In function 'int main()': a.cc:12:9: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 12 | int n="a"; | ^~~ | | | const char* a.cc:17:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 17 | if(n=="a"){ | ...
s774329402
p03998
C
#include<stdio.h> #include<string.h> char s[4][102],x_x; int len[4],p; int main() { scanf("%s %s %s",s[1],s[2],s[3]); len[1]=strlen(s[1])-1; len[2]=strlen(s[2])-1; len[3]=strlen(s[3])-1; len[4]=strlen(s[4])-1; int gun(char x); gun('a'); } char gun(char x){ if(x=='a') p=1; else if(x=='b') p=2; else p...
main.c:18:6: error: conflicting types for 'gun'; have 'char(char)' 18 | char gun(char x){ | ^~~ main.c:14:13: note: previous declaration of 'gun' with type 'int(char)' 14 | int gun(char x); | ^~~
s893602339
p03998
C
#include<stdio.h> #include<string.h> #include<math.h> #include<iostream> using namespace std; int main() { int a, b, c; int la, lb, lc; int i = 0; char A[120], B[120], C[120]; cin >> A >> B >> C; a = b = c = -1; la = strlen(A); lb = strlen(B); lc = strlen(C); while(1) { if(a = la) { printf("A\n"); ...
main.c:4:9: fatal error: iostream: No such file or directory 4 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s038871872
p03998
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <stack> #include <deque> #include <cmath> #include <map> using ll = long long; using namespace std; int main() { string sa, sb, sc; cin >> sa >> sb >> sc; queue<char> qa, qb, qc; for (int i = 0; i < sa.size(); ...
a.cc: In function 'int main()': a.cc:16:3: error: 'queue' was not declared in this scope 16 | queue<char> qa, qb, qc; | ^~~~~ a.cc:10:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 9 | #include <map> +++ |+#include <queue> 10 | using ll ...
s959412786
p03998
C++
#include<bits\stdc++.h> using namespace std; typedef long long ll; #define put(n) cout<<(n)<<"\n" #define FOR(i,num,N) for(int(i)=(num);(i)<(N);++(i)) #define RFOR(i,num,N) for(int (i)=(num);(i)>(N);--(i)) #define all(v) (v).begin() , (v).end() #define rall(v) (v).rbegin() , (v).rend() int main(){ string s,t,u; ...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s925740025
p03998
C++
#include<cstdio> std::string s[3]; int T=0,N=0; int main() { std::cin>>s[0]>>s[1]>>s[2]; while(s[N].size()) { This=N; N=s[T][0]-'a'; std::s[T].erase(0,1); } printf("%c",'A'+N); }
a.cc:2:6: error: 'string' in namespace 'std' does not name a type 2 | std::string s[3]; | ^~~~~~ a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 1 | #include<cstdio> +++ |+#include <string> 2 | std::string s[3]; a.cc: In func...
s252569167
p03998
C++
#include<cstdio> string s[3]; int T=0,N=0; int main() { std::cin>>s[0]>>s[1]>>s[2]; while(s[N].size()) { This=N; N=s[T][0]-'a'; s[T].erase(0,1); } printf("%c",'A'+N); }
a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'? 2 | string s[3]; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:6:14: error: 'cin' is not a member of 'std' 6 | std::cin>>s[0]>>s[1]>>s[2]; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<...
s437811227
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string array[4],name[4]; int i=0,j; cin>>array[0]>>array[1]>>array[2]; name[0]="A"; name[1]="B"; name[2]="C"; for( ; ; ){ if(array[i].at(0)=='a'){ j=0; }else if(array[i].at(0)=='b'){ j=1; }else if(array[i].at(0)=='c'){ ...
a.cc: In function 'int main()': a.cc:19:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s676756418
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string array[4],i=0,j,name[4]; cin>>array[0]>>array[1]>>array[2]; name[0]="A"; name[1]="B"; name[2]="C"; for( ; ; ){ if(array[i].at(0)=='a'){ j=0; }else if(array[i].at(0)=='b'){ j=1; }else if(array[i].at(0)=='c'){ j=2; ...
a.cc: In function 'int main()': a.cc:11:13: error: no match for 'operator[]' (operand types are 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 11 | if(array[i].at(0)=='a'){ | ^ a.cc:12:9: error: ambiguous overload for '...
s074279738
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string array[4],i=0,j,name[4]; cin>>array[0]>>array[1]>>array[2]; name[0]="A"; name[1]="B"; name[2]="C"; for( ; ; ){ if(array[i]=='a'){ j=0; }else if(array[i]=='b'){ j=1; }else if(array[i]=='c'){ j=2; } if(array...
a.cc: In function 'int main()': a.cc:11:13: error: no match for 'operator[]' (operand types are 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 11 | if(array[i]=='a'){ | ^ a.cc:12:9: error: ambiguous overload for 'operat...
s308403028
p03998
C
#include<iostream> int main() { char s[3][101]; for(int i = 0; i < 3; i++) { std::cin >> s[i]; } int end[3]; for(int i = 0; i < 3; i++) { for(int j = 0;; j++) { if(s[i][j] == '\0') { end[i] = j; break; } } } int num[3] {0, 0, 0}; while(true) { static int turn = 0; switch(s[turn][...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s229719911
p03998
C++
#include<bits/stdc++.h> //Ithea Myse Valgulious namespace chtholly{ typedef long long ll; #define re0 register int #define rec register char #define rel register ll #define gc getchar #define pc putchar #define p32 pc(' ') #define pl puts("") /*By Citrus*/ inline int read(){ int x=0,f=1;char c=gc(); for (;!isdigit(...
a.cc: In function 'int main()': a.cc:46:10: error: 'now' was not declared in this scope; did you mean 'pow'? 46 | if (mp[now].empty()) return pc(r-32),0; | ^~~ | pow
s566337526
p03998
C++
#include "bits/stdc++.h" using namespace std; int main() { string Sa, Sb, Sc; cin >> Sa >> Sb >> Sc; transform(Sa.begin(), Sa.end(), Sa.begin(), toupper); transform(Sb.begin(), Sb.end(), Sb.begin(), toupper); transform(Sc.begin(), Sc.end(), Sc.begin(), toupper); char turn = 'A'; while (true) { if (turn == ...
a.cc: In function 'int main()': a.cc:9:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)' 9 | transform(Sa.begin(), Sa.end(), Sa.beg...
s306432235
p03998
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include<bits/stdc++.h> using namespace std; using ll =long long; int main (void) { vector<string> cards(3); for (int i=0; i<3; i++) cin >> card[i]; int turn =0; while(true){ if (card[turn].empty()){ cout <...
a.cc: In function 'int main()': a.cc:12:34: error: 'card' was not declared in this scope; did you mean 'cards'? 12 | for (int i=0; i<3; i++) cin >> card[i]; | ^~~~ | cards a.cc:16:9: error: 'card' was not declared in this scope; did you ...
s478290645
p03998
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S[3]; cin >> S[0] >> S[1] >> S[2]; int i=0; while(1){ if(S[i].size()==0){ cout << (char)(t+'A'); return 0; } char c=S[i][0]; S[i].erase(S[i].begin()); i=c-'a'; } return 0; }
a.cc: In function 'int main()': a.cc:11:40: error: 't' was not declared in this scope 11 | cout << (char)(t+'A'); | ^
s119726518
p03998
C++
#include <iostream> using namespace std; int main(){ int a=0, b=0, c=0; string A, B, C; char X='a'; cin >> A >> B >> C; while(1){ if(X=='a'){ X=A[i]; a++; if(a==A.size()){ cout << 'A' << endl; break; } } else if(X=='b'){ X=B[b]; b++; if(b==B.size()){ cout << 'B' << endl; b...
a.cc: In function 'int main()': a.cc:11:29: error: 'i' was not declared in this scope 11 | X=A[i]; | ^
s045709225
p03998
C++
#include <iostream> using namespace std; int main(){ int i=0, j=0, k=0; string SA, SB, SC; char X='a'; cin >> SA >> SB >> SC; while(1){ if(X=='a'){ X=a[i]; i++; if(i==A.size()){ cout << 'A' << endl; break; } } else if(X=='b'){ X=a[j]; j++; if(j==B.size()){ cout << 'B' << endl;...
a.cc: In function 'int main()': a.cc:11:27: error: 'a' was not declared in this scope 11 | X=a[i]; | ^ a.cc:13:31: error: 'A' was not declared in this scope 13 | if(i==A.size()){ | ^ a.cc:18:27: err...
s175634483
p03998
C++
#include<bits/stdc++.h> using namespace std; int main(){ int i,ia=0,ib=0,ic=0,turna=1,turnb=0,turnc=0; char sa[101],sb[101],sc[101]; cin>>sa>>sb>>sc; while(1){ if(turna==1) { if(sa[ia+1]=='\0') { cout<<"a"<<endl; return 0; } if(sa[ia]=='b') { turna = 0; turnb =1 } ...
a.cc: In function 'int main()': a.cc:13:31: error: expected ';' before '}' token 13 | turnb =1 | ^ | ; 14 | } | ~ a.cc:16:31: error: expected ';' before '}' token 16 | ...
s845352693
p03998
C++
#include <iostream> #include <string> #include <vector> using namespace std; vector< vector<int> > myVector; int main(){ for(int i = 0; i < 3; i++){ string cards; cin >> cards; //input int n = cards.length(); //length vector<int> myRow(n); myVector.push_back(myRow); char char_array[n+1]; strcpy(char_...
a.cc: In function 'int main()': a.cc:18:17: error: 'strcpy' was not declared in this scope 18 | strcpy(char_array, cards.c_str()); | ^~~~~~ a.cc:4:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector...
s306621725
p03998
C++
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <li...
a.cc: In function 'int main()': a.cc:48:18: error: request for member 'end' in 's', which is of non-class type 'std::string [3]' {aka 'std::__cxx11::basic_string<char> [3]'} 48 | s[p].erase(s.end()-1); | ^~~
s696027008
p03998
C++
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <li...
a.cc: In function 'int main()': a.cc:30:20: error: request for member 'begin' in 's', which is of non-class type 'std::string [3]' {aka 'std::__cxx11::basic_string<char> [3]'} 30 | #define all(v) (v).begin(), (v).end() | ^~~~~ a.cc:44:21: note: in expansion of macro 'all' 44 | rep(i, 3)...
s281574703
p03998
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, n) for(int i = 0; i < (n); i++) #define MEM(a, x) memset(a, x, sizeof(a)) #define ALL(a) a.begin(), a.end() #define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) typedef long long ll; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); ...
a.cc: In function 'int main(int, const char**)': a.cc:19:33: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'? 19 | int next = q[x].top(); | ^~~ | pop
s343706165
p03998
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<functional> #include<cstring> using namespace std; int main(void){ int i,abcp[3],abcl[3],p; char abc[3][101],x; for(i=0;i<3;i++){ cin>>abc[i]; abcl[i]=strlen(abc[i]); abcp[i]=0 } p=0; while(1){ if(abcp[p]==abcl[p]) break; x=abc[p][abcp[p]]...
a.cc: In function 'int main()': a.cc:13:26: error: expected ';' before '}' token 13 | abcp[i]=0 | ^ | ; 14 | } | ~
s946867802
p03998
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <vector> using namespace std; int main() { string A,B,C; cin >> A >> B >> C; int cnt = 0; char tmp = 'a'; while (true) { switch (tmp) { case 'a': a = A[0]; A.erase(...
a.cc: In function 'int main()': a.cc:18:13: error: 'a' was not declared in this scope 18 | a = A[0]; | ^ a.cc:21:13: error: 'b' was not declared in this scope 21 | b = B[0]; | ^ a.cc:24:13: error: 'c' was not declared in this scope 24 | c ...
s525842966
p03998
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> using namespace std; int main(){ string a,b,c; cin >> a >> b >> c; a+='a'; b+='b'; c+='c'; int i=1; string seq="a"; while(1){ if(a.size()==1||b.size()==1||c.size()==1){ if(a.size()==1){ cout << "A" << endl; break;} if(...
a.cc: In function 'int main()': a.cc:26:10: error: 'S' was not declared in this scope 26 | if(S[i-1]=='b'){ | ^ a.cc:32:10: error: 'S' was not declared in this scope 32 | if(S[i-1]=='c'){ | ^
s652804075
p03998
C++
#include <bits/stdc++.h> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) #define shosu(n) setprecision(n) using namespace std; int main() { string a[3]; cin >> a[0] >> a[1] >> a[2]; int p = 0; for (;;) { if (a[p].size() == 0) { cout << static_cast<char>(p + 'A') << endl; retur...
a.cc:21:5: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s397119635
p03998
C++
#include <bits/stdc++.h> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) #define shosu(n) setprecision(n) using namespace std; int main() { vector<string> s(3); int key = 0; cin >> s[0] >> s[1] >> s[2]; while (s[key].size() > 0) { int ans = s[key] - 'a'; if (s[key].size() == 1) ...
a.cc: In function 'int main()': a.cc:12:22: error: no match for 'operator-' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'char') 12 | int ans = s[key] - 'a'; In file in...
s834897054
p03998
C
include <stdio.h> char A(char q[100],int a); char B(char w[100],int s); char C(char e[100],int d); int main() { char a[100],b[100],c[100],ans,result; int i,j,k; i=j=k=0; scanf("%s %s %s",a,b,c); ans = A(a,i); i++; while(ans != '\0'){ if(ans == 'a'){ ans = A(a,i); i++; result = 'A'; } else if(ans == 'b'){ ans = ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ main.c: In function 'main': main.c:14:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 14 | scanf("%s %s %s",a,b,c); | ^~~~~ main.c:1:1: note: inc...
s477602149
p03998
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<math.h>     using namespace std; #define out(s) cout<<(s)<<endl; using ll = long long;   int main() { string A, B, C; cin >> A >> B >> C; char next = 'a'; while (true) { if (next == 'a') { if (A.size() == 0)break; next = A[0];...
a.cc:6:1: error: extended character   is not valid in an identifier 6 |   | ^ a.cc:7:1: error: extended character   is not valid in an identifier 7 |   | ^ a.cc:11:1: error: extended character   is not valid in an identifier 11 |   | ^ a.cc:6:1: error: '\U000000a0' does not name a type ...