submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s126600917 | p03998 | C++ | /***
* author :_shamim
* created : 06.05.2020
*
***/
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <list>
#include <set>
#include <queue>
#include <iterator>
#include <bitset>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#define ll long long
#de... | a.cc: In function 'int main()':
a.cc:34:9: error: expected ',' or ';' before 'cin'
34 | cin>>sa>>sb>>sc;
| ^~~
|
s414444443 | p03998 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
int unused __attribute__((unused));
int i, turn, next, cnt[3];
char S[3][100];
unused = scanf("%s", S[0]);
unused = scanf("%s", S[1]);
unused = scanf("%s", S[2]);
cnt[0] = strlen(S[0]); cnt[1] = strlen(S[1]); cnt[2] = strlen(S[2]);
tu... | main.c: In function 'main':
main.c:26:3: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s366403305 | p03998 | C++ | #include <iostream>
using namespace std;
int main() {
string a,b,c;
cin>>a>>b>>c;
reverse(a.begin(),a.end());
reverse(b.begin(),b.end());
reverse(c.begin(),c.end());
char cur = 'a';
while (true) {
switch (cur){
case 'a': if(a.empty()){puts("A");return 0;} cur=a.back();a.... | a.cc: In function 'int main()':
a.cc:7:5: error: 'reverse' was not declared in this scope
7 | reverse(a.begin(),a.end());
| ^~~~~~~
|
s294681971 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
char t = 'a';
while (1) {
if (t == 'a'&&a.empty()) {
cout << "A" << endl;
break;
} else if (t == 'b'&&b.empty()) {
cout << "B" << endl;
break;
} else if (c.emty()&&t == 'c') {
... | a.cc: In function 'int main()':
a.cc:18:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'emty'; did you mean 'empty'?
18 | } else if (c.emty()&&t == 'c') {
| ^~~~
| empty
|
s566810407 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int top_A = 0;
int top_B = 0;
int top_C = 0;
char turn = 'a';
while(top_A++ != A.size()-1 && top_B++ != B.size()-1 && top_C++ == C.size()-1){
if(turn == 'a'){
if(top_A++ == A.size()-1){
cout <<... | a.cc: In function 'int main()':
a.cc:19:14: error: expected ';' before '}' token
19 | top_A++
| ^
| ;
20 | }
| ~
a.cc:27:14: error: expected ';' before '}' token
27 | top_B++
| ^
| ;
28 | }
... |
s341464687 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int top_A = 0;
int top_B = 0;
int top_C = 0;
char turn = 'a'
while(top_A++ != A.size()-1 && top_B++ != B.size()-1 && top_C++ == C.size()-1){
if(turn == 'a'){
if(top_A++ == A.size()-1){
cout << ... | a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'while'
12 | while(top_A++ != A.size()-1 && top_B++ != B.size()-1 && top_C++ == C.size()-1){
| ^~~~~
|
s727735392 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int top_A = 0;
int top_B = 0;
int top_C = 0;
char turn = 'a'
while(){
if(turn == 'a'){
if(top_A++ == A.size()-1){
cout << 'A' << endl;
return 0;
}
turn = A[top_A];
top... | a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'while'
12 | while(){
| ^~~~~
|
s565454440 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
void game(string S, string A, string B, string C){
char card = S[1];
S.erase(1,1);
if(S.empty()) return;
if(card == 'a') game(A, A, B, C);
if(card == 'b') game(B, A, B, C);
if(card == 'c') game(C, A, B, C);
}
int main(){
string A, B, C;
cin >> A >> B... | a.cc: In function 'int main()':
a.cc:19:7: error: too few arguments to function 'void game(std::string, std::string, std::string, std::string)'
19 | game(A);
| ~~~~^~~
a.cc:4:6: note: declared here
4 | void game(string S, string A, string B, string C){
| ^~~~
|
s172170516 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
void game(string S){
char card = S[1];
S.erase(1,1);
if(S.empty()) return;
if(card == 'a') game(A);
if(card == 'b') game(B);
if(card == 'c') game(C);
}
int main(){
string A, B, C;
cin >> A >> B >> C;
game(A);
if(A.empty()) cout << 'A' << endl;... | a.cc: In function 'void game(std::string)':
a.cc:10:24: error: 'A' was not declared in this scope
10 | if(card == 'a') game(A);
| ^
a.cc:11:24: error: 'B' was not declared in this scope
11 | if(card == 'b') game(B);
| ^
a.cc:12:24: error: 'C' was not d... |
s462028802 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
void game(string S){
char card = S[1];
S.erase(1,1);
if(S.empty()) return;
if(S[n] == 'a') game(A);
if(S[n] == 'b') game(B);
if(S[n] == 'c') game(C);
}
int main(){
string A, B, C;
cin >> A >> B >> C;
game(A);
if(A.empty()) cout << 'A' << endl;... | a.cc: In function 'void game(std::string)':
a.cc:10:8: error: 'n' was not declared in this scope
10 | if(S[n] == 'a') game(A);
| ^
a.cc:10:24: error: 'A' was not declared in this scope
10 | if(S[n] == 'a') game(A);
| ^
a.cc:11:8: error: 'n' was not declared in this sc... |
s982660080 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
string game(string S){
char card = S[1];
S.erase(1,1);
if(S.empty()) return;
if(S[n] == 'a') game(A);
if(S[n] == 'b') game(B);
if(S[n] == 'c') game(C);
}
int main(){
string A, B, C;
cin >> A >> B >> C;
game(A);
if(A.empty()) cout << 'A' << end... | a.cc: In function 'std::string game(std::string)':
a.cc:8:17: error: return-statement with no value, in function returning 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-fpermissive]
8 | if(S.empty()) return;
| ^~~~~~
a.cc:10:8: error: 'n' was not declared in this scope
10 | i... |
s040643022 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
void game(if(card == 'a') game(queue<char> &X, queue<char> &A, queue<char> &B, queue<char> &C){
char card = X[0]//場に出すカード
X.pop();
if(X.empty()) return;
if(card == 'a') game(queue<char> &A, queue<char> &A, queue<char> &B, queue<char> &C);
if(card == 'b') game(q... | a.cc:4:6: error: variable or field 'game' declared void
4 | void game(if(card == 'a') game(queue<char> &X, queue<char> &A, queue<char> &B, queue<char> &C){
| ^~~~
a.cc:4:11: error: expected primary-expression before 'if'
4 | void game(if(card == 'a') game(queue<char> &X, queue<char> &A, queue<char> &... |
s538361231 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string sA,sB,sC;
cin>>sA>>sB>>sC;
sA+='A'; sB+='B'; sC+='C';
int i=0;
int j=-1;
int k=-1;
char ans=sA.at(0);
for(l=0; ;l++){
if(ans=='a'){
i++; ans=sA.at(i);
}else if(ans=='b'){
j++; ans=sB.at(j);
}else{
k++; ans=sC.at(k);
}if(an... | a.cc: In function 'int main()':
a.cc:11:7: error: 'l' was not declared in this scope
11 | for(l=0; ;l++){
| ^
|
s301808063 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string sA,sB,sC;
cin>>sA>>sB>>sC;
sA+='A'; sB+='B'; sC+='C';
int i=0;
int j=-1;
int k=-1;
char ans=sA.at(0);
for(l=0; ;l++){
if(ans=='a'){
i++; ans=sA.at(i)
}else if(ans=='b'){
j++; ans=sB.at(j);
j
}else{
k++; ans=sC.at(k);
}if(an... | a.cc: In function 'int main()':
a.cc:11:7: error: 'l' was not declared in this scope
11 | for(l=0; ;l++){
| ^
a.cc:13:20: error: expected ';' before '}' token
13 | i++; ans=sA.at(i)
| ^
| ;
14 | }else if(ans=='b'){
| ~ ... |
s667323612 | p03998 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String sa = sc.next();
String sb = sc.next();
String sc = sc.next();
int la = sa.length();
int lb = sb.length();
int lc = sc.length();
int pa = 0;
int pb = 0;
... | Main.java:8: error: variable sc is already defined in method main(String[])
String sc = sc.next();
^
Main.java:8: error: cannot find symbol
String sc = sc.next();
^
symbol: method next()
location: variable sc of type String
2 errors
|
s193999222 | p03998 | C++ | afafdaf | a.cc:1:1: error: 'afafdaf' does not name a type
1 | afafdaf
| ^~~~~~~
|
s713546270 | p03998 | C++ | int main() {
string a, b, c;
cin>>a>>b>>c;
int an=0, bn=0, cn=0;
char x = 'a';
while (an<a.length() and bn<b.length() and cn<c.length()){
if (x=='a'){
x = a[an];
an++;
if (an==a.length()){
cout << "A\n";
}
}
if (x=='b'){
x = b[bn];
bn++;
if (bn==b.length()){
cout << "B\n";
}
... | a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
2 | string a, b, c;
| ^~~~~~
a.cc:3:9: error: 'cin' was not declared in this scope
3 | cin>>a>>b>>c;
| ^~~
a.cc:3:14: error: 'a' was not declared in this scope
3 | cin... |
s457654069 | p03998 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
string A,B,C,a,b,c;
cin >> A >> B >> C;
char x='a';
a=A;
b=B;
c=C;
reverse(a.begin(... | a.cc:58:1: error: 'C' does not name a type
58 | C
| ^
|
s237134927 | p03998 | C++ | def get_i() #空白区切の入力を数値(整数)の配列で返す
return gets.chomp.split(" ").map(&:to_i)
end
def get_f() #空白区切の入力を数値(実数)の配列で返す
return gets.chomp.split(" ").map(&:to_f)
end
def get() #空白区切の入力を文字列の配列で返す
return gets.chomp.split(" ")
end
def get_nsp() #入力されたものを一文字ずつに区切った文字列の配列で返す
return gets.chomp.split("")
end
def yn_judge(bool... | a.cc:1:13: error: stray '#' in program
1 | def get_i() #空白区切の入力を数値(整数)の配列で返す
| ^
a.cc:4:13: error: stray '#' in program
4 | def get_f() #空白区切の入力を数値(実数)の配列で返す
| ^
a.cc:7:11: error: stray '#' in program
7 | def get() #空白区切の入力を文字列の配列で返す
| ^
a.cc:10:15: error:... |
s073096845 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define l long
#define pb push_back
#define mp make_pair
#define mt make_tuple
int main() {
// your code goes here
//ifstream cin("input.txt");
//ofstream cout("output.txt");
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string A,B,C;... | a.cc: In function 'int main()':
a.cc:21:15: error: 'id' was not declared in this scope; did you mean 'id3'?
21 | while(id<l1 && id2<l2 && id3<l3)
| ^~
| id3
a.cc:25:31: error: expected ',' or ';' before 'id1'
25 | char c=A[id1] id1++;
| ... |
s996845187 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define l long
#define pb push_back
#define mp make_pair
#define mt make_tuple
int main() {
// your code goes here
//ifstream cin("input.txt");
//ofstream cout("output.txt");
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string A,B,C;... | a.cc: In function 'int main()':
a.cc:21:15: error: 'id' was not declared in this scope; did you mean 'id3'?
21 | while(id<l1 && id2<l2 && id3<l3)
| ^~
| id3
a.cc:25:24: error: 'a' was not declared in this scope
25 | char c=a[id1] id1++;
| ... |
s599636512 | p03998 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a ... | a.cc: In function 'int main()':
a.cc:61:33: error: 'n' was not declared in this scope
61 | string s1 = s.substr(1, n - 1);
| ^
|
s130890002 | p03998 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
class Progaram
{
static void Main(string[] args)
{
var cards = new List<char>[3];
for (var i = 0; 3 > i; i++)
{
cards[i] = Console.ReadLine().ToCharArray().ToList();
}
var now = 'a';
v... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s985468958 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
char next = 'a';
cin >> a >> b >> c;
while(true) {
if(next == 'a') {
if(a.empty()) {
cout << 'A' << endl;
break;
}
next = a[0];
a.erase(0,1);
}
else if(next == 'b') {
if(b.empty()... | a.cc: In function 'int main()':
a.cc:33:4: error: expected '}' at end of input
33 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s300601060 | p03998 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX(a,b) (a > b) ? a : b
#define MIN(a,b) (a < b) ? a : b
const int inf = 1000000000; // 10^9
int main(){
char a[101],b[101],c[101];scanf("%s %s %s",a,b,c);
char table = 'a';
int ta=,tb=0,tc=0;
for(int i = 0;i < 300;i++){
if(table ==... | main.c: In function 'main':
main.c:12:11: error: expected expression before ',' token
12 | int ta=,tb=0,tc=0;
| ^
|
s009926384 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string SA, SB, SC;
cin >> SA >> SB >> SC;
char turn = 'a';
int posA = 0, posB = 0, posC = 0;
for (int i=0; i< 310; i++){
if (turn == 'a') {
if (posA >= SA.size()) {
cout << "A" << endl;
break;
}
turn = SA.at(posA);
posA ++;
}
else if (t... | a.cc:39:1: error: expected declaration before '}' token
39 | }
| ^
|
s443115706 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> st(3);
vector<int> left(3);
cin >> st[0] >> st[1] >> st[2];
left[0] = st[0].size();
left[1] = st[1].size();
left[2] = st[2].size();
int turn = 0;
int subturn = 0;
while (0 = 0) {
if (st[turn][0] == 'A') subturn = 0;
els... | a.cc: In function 'int main()':
a.cc:12:10: error: lvalue required as left operand of assignment
12 | while (0 = 0) {
| ^
|
s015544488 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> st(3)
vector<int> left(3)
cin >> st[0] >> st[1] >> st[2];
left[0] = st[0].size();
left[1] = st[1].size();
left[2] = st[2].size();
int turn = 0;
int subturn = 0;
while (0 = 0) {
if (st[turn][0] == 'A') subturn = 0;
else ... | a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'vector'
5 | vector<int> left(3)
| ^~~~~~
a.cc:7:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
7 | left[0] = st[0].size();
| ^
a.cc:7:11: error: assignment of read-only location '* std:... |
s408081688 | p03998 | C | #include<stdio.h>
int main(void)[
char a[100],b[100],c[100],moji;
int i=1,j=0,k=0;
scanf("%s",a);
scanf("%s",b);
scanf("%s",c);
moji=a[0];
while(1){
while(a[i]=='a'){
if(a[i]=='\0'){
printf("A\n");
break;
}
moji=a[i];
i++;
}
while(b[j]=='b'){
if(b[... | main.c:3:3: error: expected expression before 'char'
3 | char a[100],b[100],c[100],moji;
| ^~~~
|
s774514978 | p03998 | C | #include<stdio.h>
int main(void){
char A[100],B[100],c[100],alf[3]={a,b,c};
int i=0,j=0,k=0,cnt=0;
scanf("%s",A);
scanf("%s",B);
scanf("%s",C);
while((A[i]!='\0'||B[j]!='\0')||C[k]!='\0')){
while(A[i]==alf[0]&&A[i]==alf[cnt]){
i++;
if(A[i]==alf[1]) cnt++;
if(A[i]==alf[2]) cnt+=2;
}... | main.c: In function 'main':
main.c:3:37: error: 'a' undeclared (first use in this function)
3 | char A[100],B[100],c[100],alf[3]={a,b,c};
| ^
main.c:3:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:39: error: 'b' undecl... |
s008758932 | p03998 | C++ | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;
int main(){
string v[3];
for(ll i=0;i<3;++i){
cin>>v[i];
}
char ans;
ll flag=0;
bool bol=true;
while(bol){
if(v[flag].size()==0){
if(flag==0){
ans='A'... | a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before '}' token
18 | ans='A'
| ^
| ;
19 | }else if(flag==1){
| ~
|
s573415846 | p03998 | C++ | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;
int main(){
string v[3];
for(ll i=0;i<3;++i){
cin>>v[i];
}
char ans;
ll flag=0;
bool bol=true;
while(bol){
if(v[flag].size()==0){
if(flag==0){
ans='A'... | a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before '}' token
18 | ans='A'
| ^
| ;
19 | }else if(flag==1){
| ~
|
s965481177 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
map<char,string> mp;
cin >> mp['a'] >> mp['b'] >> mp['c'];
char turn = 'a';
while(true){
if(mp[turn].size()==0){
switch(turn){
case 'a':
string output = "A";
break;
case 'b':
string output = "B";... | a.cc: In function 'int main()':
a.cc:14:14: error: jump to case label
14 | case 'b':
| ^~~
a.cc:12:18: note: crosses initialization of 'std::string output'
12 | string output = "A";
| ^~~~~~
a.cc:15:18: error: redeclaration of 'std::string output'
1... |
s825398766 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
main(){
map<char,string> m;
string a,b,c;cin>>a>>b>>c;
m['a']=a;
m['b']=b;
m['c']=c;
char t='a';
while(1){
if(m[t].size()==0){cout<<(char)('A'+t-'a');return 0;}
char tm=m[t][0];
m[t].pop_front();
t=tm;}}
| 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:13:6: error: 'std::map<char, std::__cxx11::basic_string<char> >::mapped_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front'
13 | m[t... |
s637493742 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
main(){
map<char,string> m;
string a,b,c;cin>>a>>b>>c;
m[a]=a;
m[b]=b;
m[c]=c;
char t='a';
while(1){
if(m[t].size()==0){cout<<(char)('A'+t-'a');return 0;}
char tm=m[t].back();
m[t].pop_back();
t=tm;}}
| 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:6:2: error: no match for 'operator[]' (operand types are 'std::map<char, std::__cxx11::basic_string<char> >' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})... |
s227582932 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string SA,SB,SC;
cin >> SA;
cin >> SB;
cin >> SC;
string S = SA;
char c = 'a';
while(true){
if(S.at(0) == 'a'){
S.erase(S.begin());
if(c == 'a'){
SA = S;
}
else if(c == 'b'){
SB = S;
}
else{... | a.cc: In function 'int main()':
a.cc:54:17: error: expected primary-expression before ']' token
54 | if(S == ""){]
| ^
a.cc:58:7: error: expected '}' before 'else'
58 | else if(c == 'b'){
| ^~~~
a.cc:54:16: note: to match this '{'
54 | if(S == ""){]
| ... |
s332115052 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string SA,SB,SC;
cin >> SA;
cin >> SB;
cin >> SC;
string S = SA;
char c = 'a';
while(true){
if(S.at(0) == 'a'){
S.erase(S.begin());
if(c == 'a'){
SA = S;
}
else if(c == 'b'){
SB = S;
}
else{... | a.cc: In function 'int main()':
a.cc:58:2: error: expected '}' at end of input
58 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s168324754 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
int ac = a.size(),bc = b.size(),cc = c.size();
char now = 'a';
while(a.size() > 0 && b.size() > 0 && c.size() > 0){
if(now = 'a'){
if(a.at[0] = 'a'){
a.erase(0,0);
now = 'a';
}
else... | a.cc: In function 'int main()':
a.cc:10:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
10 | if(a.at[0] = 'a'){
| ^
a.cc:14:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
14 | else if(a.at[0] = 'b')... |
s152858325 | p03998 | C++ | include<iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <functional>
#include <iomanip>
#include <bitset>
#include <numeric>
#include <queue>
#include <map>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
const long long mod = 1000000007;
typedef long lon... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type... |
s095537669 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s[3];
for(int i=0;i<3;++I){
cin >> s[i];
}
int turn =0;
while(true){
int now = turn;
if(s[now].empty())break;
turn = s[now][0] -'a';//s[now][0]==s[i].at(0)
s[now].erase(0,1);
}
if(turn == 0)cout << 'A' << endl;
else ... | a.cc: In function 'int main()':
a.cc:6:21: error: 'I' was not declared in this scope
6 | for(int i=0;i<3;++I){
| ^
|
s999555460 | p03998 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<map>
#include<stdio.h>
#include<vector>
using namespace std;
#define rep(s,i,n) for(int i=s;i<n;i++)
#define c(n) cout<<n<<endl;
#define ic(n) int n;cin>>n;
#define sc(s) string s;cin>>s;
#define mod 1000000007
#define f first
#define s second
int a[114514... | a.cc: In function 'int main()':
a.cc:19:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
19 | char t=a;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
|
s989512304 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<string> S(3);
cin>>S.at(0)>>S.at(1)>>S.at(2);
int turn=0;
char winner;
while(1){
if(S.at(turn).size()==0){
switch(turn){
case 0:
winner='a';
break;
case 1:
winner='b';
break;
... | a.cc: In function 'int main()':
a.cc:26:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front'
26 | S.at(turn).pop_front();
| ^~~~~... |
s009929478 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<string> S(3);
cin>>S.at(0)>>S.at(1)>>S.at(2);
int turn=0;
char winner;
while(1){
if(S.at(turn)==0){
switch(turn){
case 0:
winner='a';
break;
case 1:
winner='b';
break;
... | a.cc: In function 'int main()':
a.cc:11:18: 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 'int')
11 | if(S.at(turn)==0){
| ... |
s976801132 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
//現在, 文字列のうち, 先頭から何番目に位置するかを示す
map<char, int> pages;
map<char, string> cards;
cin >> cards['a'] >> cards['b'] >> cards['c'];
char turn = 'a'; //現在が誰のターンであるかを示す
//ターンの人がカードをすべて使い切ったか否かを確認する.
while (pages[turn] != cards[turn].size())... | a.cc:22:10: error: extended character is not valid in an identifier
22 | cout << (char)toupper(turn) << endl;
| ^
a.cc: In function 'int main()':
a.cc:22:13: error: expected primary-expression before 'char'
22 | cout << (char)toupper(turn) << endl;
| ^~~~
a.cc:22:10: error: ... |
s385467324 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B, C;
cin >> A >> B >> C;
char turn = 'a';
int ai=0,bi=0,ci=0;
while(1){
if(ai=<A.size()){
cout << "A" << endl;
return 0;
}
if(bi=<B.size()){
cout << "B" << endl;
return 0;
}
if(ci=<C.size... | a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before '<' token
12 | if(ai=<A.size()){
| ^
a.cc:16:11: error: expected primary-expression before '<' token
16 | if(bi=<B.size()){
| ^
a.cc:20:11: error: expected primary-expression before '<' to... |
s305706814 | p03998 | Java | import sun.text.normalizer.UCharacter;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next(),b=sc.next(),c=sc.next();
int ptA=0,ptB=0,ptC=0;
char next = 'a';
while(true){
if... | Main.java:1: error: package sun.text.normalizer does not exist
import sun.text.normalizer.UCharacter;
^
1 error
|
s156338427 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A,B,C;
cin>>A>>B>>C;
A.push_back('w'); B.push_back('w'); C.push_back('w');
char turn ='a';
int a=0,b=0,c=0;
while(true){
if(turn=='a'){
if(A.at(a)=='w'){cout<<A<<endl;break;}
turn = A.at(a); a++; }
if(turn=='b'){
if(B.at(b)==... | a.cc: In function 'int main()':
a.cc:22:16: error: expected primary-expression before '<<' token
22 | cout<< <<endl;
| ^~
|
s180612213 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A,B,C;
cin>>A>>B>>C;
A.push_back('w'); B.push_back('w'); C.push_back('w');
char turn ='a'
int a=0,b=0,c=0;
while(true){
if(turn=='a'){
if(A.at(a)=='w'){cout<<A<<endl;break;}
turn = A.at(a); a++; }
if(turn=='b'){
if(B.at(b)=='... | a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'int'
10 | int a=0,b=0,c=0;
| ^~~
a.cc:13:13: error: 'a' was not declared in this scope
13 | if(A.at(a)=='w'){cout<<A<<endl;break;}
| ^
a.cc:14:17: error: 'a' was not declared in this scope
... |
s055448268 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
stack<char> sa;
stack<char> sb;
stack<char> sc;
int main(){
string a,b,c;
cin>>a>>b>>c;
for(int i=0;i<a.size();i++){
sa.push(a[i]);
}
for(int i=0;i<b.size();i++){
sb.push(b[i]);
}
for(int i=0;i<c.size();i++){
sc.push(c[i]);
}
char val='a';
while... | a.cc: In function 'int main()':
a.cc:23:9: error: 'k' was not declared in this scope
23 | k=sa.top();
| ^
a.cc:27:9: error: 'k' was not declared in this scope
27 | k=sb.top();
| ^
a.cc:31:7: error: 'k' was not declared in this scope
31 | k=sc.top();
| ... |
s603517688 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
in.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
Timer TM;
string a[10];
cin>>a[0]>>a[1]>>a[2];
ll now=0;
while(a[now].size()>0){
ll Now=now;
Now=a[now][0]-'a';
a[now]=a[n... | a.cc: In function 'int main()':
a.cc:6:5: error: 'in' was not declared in this scope; did you mean 'yn'?
6 | in.tie(0);
| ^~
| yn
a.cc:9:5: error: 'Timer' was not declared in this scope
9 | Timer TM;
| ^~~~~
a.cc:14:5: error: 'll' was not declared in this scope
14 | ... |
s449023640 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
in.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
Timer TM;
string a[10];
cin>>a[0]>>a[1]>>a[2];
ll now=0;
while(a[now].size()>0){
ll Now=now;
Now=a[now][0]-'a';
a[now]=a[n... | a.cc: In function 'int main()':
a.cc:6:5: error: 'in' was not declared in this scope; did you mean 'yn'?
6 | in.tie(0);
| ^~
| yn
a.cc:9:5: error: 'Timer' was not declared in this scope
9 | Timer TM;
| ^~~~~
a.cc:14:5: error: 'll' was not declared in this scope
14 | ... |
s293382001 | p03998 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char[] a = sc.next().toCharArray();
char[] b = sc.next().toCharArray();
char[] c = sc.next().toCharArray();
int an = a.length;
int bn = b.length;
int cn = c.length;
int ... | Main.java:70: error: variable ans might not have been initialized
System.out.println(ans);
^
1 error
|
s345019709 | p03998 | C++ | #include <iostream>
#include <cstdio>
#include <String>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(void){
string a,b,c;cin>>a>>b>>c;
int flag=1;
char turn=a[0];
a.erase(0,1);
while(flag==1){
if(turn == 'a'){
if (a.size()==0){
cout<<"A"<<e... | a.cc:3:10: fatal error: String: No such file or directory
3 | #include <String>
| ^~~~~~~~
compilation terminated.
|
s878162335 | p03998 | C++ | #include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
int turn = 1;
char S1[200],S2[200],S3[200];
queue<int> A,B,C;
scanf("%s", S1);
for (int i=0;i<strlen(S1);i++) {
A.push(S1[i]);
}
scanf("%s", S2);
for (int i=0;i<strlen(S2);i++) {
B.p... | a.cc: In function 'int main()':
a.cc:11:20: error: 'strlen' was not declared in this scope
11 | for (int i=0;i<strlen(S1);i++) {
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
+++ |+#i... |
s676425783 | p03998 | C++ | #include <iostream>
#include <queue>
using namespace std;
int main() {
int turn = 1;
char S1[200],S2[200],S3[200];
queue<int> A,B,C;
scanf("%s", S1);
for (int i=0;i<strlen(S1);i++) {
A.push(S1[i]);
}
scanf("%s", S2);
for (int i=0;i<strlen(S2);i++) {
B.push(S2[i]);
}
... | a.cc: In function 'int main()':
a.cc:10:20: error: 'strlen' was not declared in this scope
10 | for (int i=0;i<strlen(S1);i++) {
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
+++ |+#i... |
s245569885 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
queue sa, sb, sc;
for(char t : a){
sa.push(t);
}
for(char t : b){
sb.push(t);
}
for(char t : c){
sc.push(t);
}
char turn = sa.front();
sa.pop();
while(!sa.empty() & !sb.empty() & !sc.empty(... | a.cc: In function 'int main()':
a.cc:7:9: error: class template argument deduction failed:
7 | queue sa, sb, sc;
| ^~
a.cc:7:9: error: no matching function for call to 'queue()'
In file included from /usr/include/c++/14/queue:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++... |
s528892404 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
queue sa, sb, sc;
for(char t : a){
sa.push(t);
}
for(char t : b){
sb.push(t);
}
for(char t : c){
sc.push(t);
}
char turn = sa.front();
sa.pop();
while(!sa.empty() & !sb.empty() & !sc.empty(... | a.cc: In function 'int main()':
a.cc:7:9: error: class template argument deduction failed:
7 | queue sa, sb, sc;
| ^~
a.cc:7:9: error: no matching function for call to 'queue()'
In file included from /usr/include/c++/14/queue:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++... |
s597532522 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c,turn = a;
cin >>a>>b>>c;
while(1){
if(turn=='a'){
if(a.size()==a+1){
cout << 'A' << endl;
continue;
}
turn = 'a';
a++;
}
if(turn=='b'){
if(b.size()==b+1){
cout << 'B' << endl;
continue;
... | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if(turn=='a'){
| ~~~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
I... |
s734364773 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c,turn;
cin >>a>>b>>c;
turn = 'a';
while(1){
if(turn=='a'){
if(a.size()==a+1){
cout << 'A' << endl;
continue;
}
turn = 'a';
a++;
}
if(turn=='b'){
if(b.size()==b+1){
cout << 'B' << endl;
c... | a.cc: In function 'int main()':
a.cc:10:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
10 | if(turn=='a'){
| ~~~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
... |
s045343538 | p03998 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#include <iomanip>
#include <map>
#include <bits/stl_numeric.h>
#define DEBUG 0
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1... | a.cc: In function 'int main()':
a.cc:38:29: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
38 | turn = s[i] - 'a';
| ~~~~ ^ ~~~
| | |
| ... |
s698703493 | p03998 | C++ | A = list(input())
B = list(input())
C = list(input())
#終わり条件(手札を持っていない条件を定義)
A.append('f')
B.append('f')
C.append('f')
now = A.pop(0)
while(len(A) != 0 and len(B) != 0 and len(C) != 0):
if(now == 'a'):
now = A.pop(0)
if(len(A) == 0):
winner = 'A'
elif(now == 'b'):
now = B.p... | a.cc:4:2: error: invalid preprocessing directive #\U00007d42\U0000308f\U0000308a\U00006761\U00004ef6\U0000ff08\U0000624b\U0000672d\U00003092\U00006301\U00003063\U00003066\U00003044\U0000306a\U00003044\U00006761\U00004ef6\U00003092\U00005b9a\U00007fa9
4 | #終わり条件(手札を持っていない条件を定義)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s088341278 | p03998 | C++ | abcb
aacb
bccc | a.cc:1:1: error: 'abcb' does not name a type
1 | abcb
| ^~~~
|
s539077458 | p03998 | Java | import java.util.Scanner;
public class ABC045B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String A = sc.next();
String B = sc.next();
String C = sc.next();
String[] S = new String[] {A,B,C};
sc.close();
int num = 0;
while(S[num].length() != 0) {
int cnt = S[num... | Main.java:3: error: class ABC045B is public, should be declared in a file named ABC045B.java
public class ABC045B {
^
1 error
|
s328403898 | p03998 | Java | public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
StringBuilder sa = new StringBuilder(in.next());
StringBuilder sb = new StringBuilder(in.next());
StringBuilder sc = new StringBuilder(in.next());
char nextTurn = 'a';
int N = sa.length() + sb.length() + sc.... | Main.java:4: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s516455747 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)
int int_len(int n) {
int s=0;
while(n!=0) s++, n/=10;
return s;
}
int int_sum(int n) {
int m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow... | a.cc: In function 'int main()':
a.cc:81:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
81 | if(cnt=='a' && flaga){
| ~~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic... |
s801565355 | p03998 | C++ | include <bits/stdc++.h>
using namespace std;
int i,j,y,x=1,m1,m2,m3;
string a,b,c;
bool t=0;
int main()
{
cin>>a>>b>>c;
while(t==0)
{
if(x==1)
{
if(m1==a.size())
{
cout<<"A"<<endl;
t=1;
return 0;
... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc:4:5: error: 'string' does not name a type
4 | string a,b,c;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin>>a>>b>>c;
| ^~~
a.cc... |
s486495397 | p03998 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
A.push_back('x'), B.push_back('x'), C.push_back('x');
char c = 'a';
char winner;
while(c != 'x'){
if(c == 'a'){
c = A[A.size()-1];
A.pop_back;
winner = 'A';
}else if(c ==... | a.cc: In function 'int main()':
a.cc:16:9: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
16 | A.pop_back;
| ~~^~~~~~~~
In file included fro... |
s024937306 | p03998 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
vector<char> A(100), B(100), C(100);
cin >> A >> B >> C;
A.push_back('x'), B.push_back('x'), C.push_back('x');
char c = 'a';
char winner;
while(c != 'x'){
if(c == 'a'){
c = A[A.size()-1];
A.pop_back;
winner = '... | 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<char>')
8 | cin >> A >> B >> C;
| ~~~ ^~ ~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<cha... |
s046478745 | p03998 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
A.push_back('x'), B.push_back('x'), C.push_back('x');
char c = 'a';
char winner;
while(c != 'x'){
if(c == 'a'){
c = A[A.size()-1];
A.pop_back;
winner = 'A';
}else if(c ==... | a.cc: In function 'int main()':
a.cc:16:9: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
16 | A.pop_back;
| ~~^~~~~~~~
In file included fro... |
s521531250 | p03998 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
vector<char> A, B, C;
cin >> A >> B >> C;
A.push_back('x'), B.push_back('x'), C.push_back('x');
char c = 'a';
char winner;
while(c != 'x'){
if(c == 'a'){
c = A[A.size()-1];
A.pop_back;
winner = 'A';
}else i... | 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<char>')
8 | cin >> A >> B >> C;
| ~~~ ^~ ~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<cha... |
s291472177 | p03998 | C++ | #include <iostream>
#include <string>
#include <map>
#define rep(i, n) for(int i ; i<n; ++i)
using namespace std;
int main(){
map<char, string> player;
for(char ch='A'; ch<='C'; ch++){
string s;
cin>>s;
player[ch] = s;
}
while(1){
int i = 1, j = 0, k = 0;
char ter... | a.cc: In function 'int main()':
a.cc:18:29: 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... |
s156883493 | p03998 | C++ | #include <iostream>
#include <string>
#include <map>
#define rep(i, n) for(int i ; i<n; ++i)
using namespace std;
int main(){
map<char, string> player;
for(char ch='A'; ch<='C'; ch++){
string s;
cin>>s;
player[ch] = s;
}
while(1){
int i = 1, j = 0, k = 0;
char ter... | a.cc: In function 'int main()':
a.cc:18:28: 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... |
s827986896 | p03998 | C++ | #include <iostream>
#include <string>
#define rep(i, n) for(int i ; i<n; ++i)
using namespace std;
int main(){
map<char, string> players;
for(char ch='A'; ch<='C'; ch++){
string s;
cin>>s;
player[ch] = s;
}
while(1){
int i = 1, j = 0, k = 0;
char tern = player['A'... | a.cc: In function 'int main()':
a.cc:6:5: error: 'map' was not declared in this scope
6 | map<char, string> players;
| ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
1 | #include <iostream>
+++ |+#include <map>
2 | #include <s... |
s502451731 | p03998 | C++ | #include <iostream>
#include <string>
#define rep(i, n) for(int i ; i<n; ++i)
use namespace std;
int main(){
map<char, string> players;
for(char ch='A'; ch<='C'; ch++){
string s;
cin>>s;
player[ch] = s;
}
while(1){
int i = 1, j = 0, k = 0;
char tern = player['A'][... | a.cc:4:1: error: 'use' does not name a type
4 | use namespace std;
| ^~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'map' was not declared in this scope
6 | map<char, string> players;
| ^~~
a.cc:6:9: error: expected primary-expression before 'char'
6 | map<char, string> players... |
s672377779 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
string Sa, Sb, Sc;
cin >> Sa >> Sb >> Sc;
vector<string> Ss = {Sa, Sb, Sc};
vector<vector<char>> S = {{}, {}, ... | a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
20 | while (S[tmp].length() > 0){
| ^~~~~~
a.cc:21:27: error: '__gnu_cxx::__alloc... |
s066548440 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
string Sa, Sb, Sc;
cin >> Sa >> Sb >> Sc;
vector<string> Ss = {Sa, Sb, Sc};
vector<vector<char>> S = {{}, {}, ... | a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
20 | while (S[tmp].length() > 0){
| ^~~~~~
a.cc:21:28: error: void value not igno... |
s514596845 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
string Sa, Sb, Sc;
cin >> Sa >> Sb >> Sc;
vector<string> Ss = {Sa, Sb, Sc};
vector<vector<char>> S = {{}, {}, ... | a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
20 | while (S[tmp].length() > 0){
| ^~~~~~
a.cc:21:28: error: void value not igno... |
s284539308 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
string Sa, Sb, Sc;
cin >> Sa >> Sb >> Sc;
vector<string> Ss = {Sa, Sb, Sc};
vector<vector<char>> S (3);
fo... | a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
20 | while (S[tmp].length() > 0){
| ^~~~~~
a.cc:21:28: error: void value not igno... |
s135073499 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
char T = 'a';
while (A.size()>0 && B.size()>0 && C.size()>0){
if (T = 'a'){
T = A[0];
A = substr(1,A.size()-1);
}
if (T = 'b'){
T = B[0];
B = substr(1,B.size()-1);
}
if (T = 'c... | a.cc: In function 'int main()':
a.cc:10:11: error: 'substr' was not declared in this scope; did you mean 'strstr'?
10 | A = substr(1,A.size()-1);
| ^~~~~~
| strstr
a.cc:14:11: error: 'substr' was not declared in this scope; did you mean 'strstr'?
14 | B = substr(1,B.siz... |
s986618314 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s_a, s_b, s_c;
cin >> s_a >> s_b >> s_c;
string next_card = 'a';
bool b = true;
while (b) {
if (next_card == 'a'){
next_card = s_a.at(0);
s_a.erase(s_a.begin());
if(s_a.empty() == true) {
cout << "A" << endl;
... | a.cc: In function 'int main()':
a.cc:8:22: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
8 | string next_card = 'a';
| ^~~
a.cc:11:19: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11... |
s611068125 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s_a, s_b, s_c;
cin >> s_a >> s_b >> s_c;
string next_card == 'a';
bool b = ture;
while (b) {
if (next_card == 'a'){
next_card = s_a.at(0);
s_a.erase(s_a.begin());
if(s_a.empty() == true) {
cout << "A" << endl;
... | a.cc: In function 'int main()':
a.cc:8:20: error: expected initializer before '==' token
8 | string next_card == 'a';
| ^~
a.cc:9:12: error: 'ture' was not declared in this scope
9 | bool b = ture;
| ^~~~
a.cc:11:9: error: 'next_card' was not declared in this scope;... |
s489075052 | p03998 | C++ | abcb
aacb
bccc | a.cc:1:1: error: 'abcb' does not name a type
1 | abcb
| ^~~~
|
s430211882 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define ALL(x) (x).begin(),(x).end()
const long long MOD = 1000000007;
const long long INF = 1LL << 60;
int main(){
string A1,... | a.cc: In function 'int main()':
a.cc:29:32: error: expected ';' before 'if'
29 | A.pop()
| ^
| ;
30 | if(S == 'a'){
| ~~
a.cc:32:26: error: expected '}' bef... |
s999101312 | p03998 | C++ | #include <bits/stdc++.h>
#define repeat(i,a,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
vector<string> S(3);
repeat(i,0,3) cin >>S[i];
int i = 0;
char ans;
while(true){
if (s[i].size()==0){
ans = 'A'+i;
break;
}
char front = s[i][0];
s[i].erase(0,1);
i = front ... | a.cc: In function 'int main()':
a.cc:12:9: error: 's' was not declared in this scope
12 | if (s[i].size()==0){
| ^
a.cc:16:18: error: 's' was not declared in this scope
16 | char front = s[i][0];
| ^
|
s987994694 | 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(true){
if(s[i].size()==0){
cout<<char('A'+i)<<endl;
}
char c=s[i].substr(0,1);
s[i].erase(0,0);
i=c-'a';
}
}
| a.cc: In function 'int main()':
a.cc:12:25: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in initialization
12 | char c=s[i].substr(0,1);
| ~~~~~~~~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
|
s754610771 | 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(true){
if(s[i].size()==0){
cout<<char('A'+i)<<endl;
}
string c=s[i].substr(0,1);
s[i].erase(0,0);
i=c-"a";
}
} | a.cc: In function 'int main()':
a.cc:14:10: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'const char [2]')
14 | i=c-"a";
| ~^~~~
| | |
| | const char [2]
| std::string {aka std::__cxx11::bas... |
s183133538 | p03998 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#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,n) FOR(i,0,n)
#define RREP(i,n) FFOR(i,0,n)
#define SORT(V) sor... | a.cc: In function 'int main()':
a.cc:22:13: error: no match for 'operator>' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
22 | while(S[0]>0 || S[1]>0 || S[2]>0){
| ~~~~^~
| | |
| | int
| std::string {aka std::__... |
s169508720 | p03998 | C++ | #include <algorithm>
#include <iostream> //入出力
#include <stdio.h>
#include <map>
#include <set>
#include <string>
#include <math.h> //算術演算子
#include <vector>
#include <cstdlib>
#include <queue>
#include <stack>
#include <list>
#include <iomanip> //小数点以下を表示させる(setprecision())
// #include <bits/stdc++.h>
using namespace ... | a.cc: In function 'int main()':
a.cc:105:23: error: 'v' was not declared in this scope
105 | PRINT(v);
| ^
a.cc:24:37: note: in definition of macro 'PRINT'
24 | for (int i = 0; i < V.size(); i++) \
| ^
|
s852002964 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s[3];
cin>>s[0]>>s[1]>>s[2];
int turn=0;
char ans;
while(1){
if(s[turn].empty()){
ans=turn+'A';
break;
}
int tmp=s[turn][0]-'a'
s[turn].erase(s[turn].begin());
turn=tmp;
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:14:5: error: expected ',' or ';' before 's'
14 | s[turn].erase(s[turn].begin());
| ^
|
s418165387 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
string a,b,c;
cin>>a>>b>>... | a.cc: In function 'int main()':
a.cc:18:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
18 | char next=a;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
|
s887393826 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
string a,b,c;
cin>>a>>b>>... | a.cc: In function 'int main()':
a.cc:68:2: error: expected '}' at end of input
68 | }
| ^
a.cc:13:11: note: to match this '{'
13 | int main(){
| ^
|
s978281325 | p03998 | C | #include <stdio.h>int main(){char a[99],b[99],c[99];char t,x;int g=0,h=0,q=0,end =1;scanf("%s%s%s",a,b,c);t = a[g];while(end){switch (t){case('a'): g++;t = a[g];x = 'A';break;case('b'): t= b[h];h++;x ='B';break;case('c'):t= c[q]; q++;x='C'; break;default: printf("%c",x); end =0;}}return 0;} | main.c:1:19: warning: extra tokens at end of #include directive
1 | #include <stdio.h>int main(){char a[99],b[99],c[99];char t,x;int g=0,h=0,q=0,end =1;scanf("%s%s%s",a,b,c);t = a[g];while(end){switch (t){case('a'): g++;t = a[g];x = 'A';break;case('b'): t= b[h];h++;x ='B';break;case('c'):t= c[q]; q++;x='C'; break;d... |
s393879479 | p03998 | C | #include <stdio.h>
int main(){
char a[100],b[100],c[100];
char t,x;
int g=0,h=0,q=0;
int end =1;
scanf("%s%s%s",a,b,c);
t = a[g];
while(end){
switch (t){
case('a'):
aa++;
t = a[g];
x = 'A';
break;
case('b'):
t= b[h];
bb++;
x = 'B';
break;
case('c'):
t= c[q];
cc++;
x='C';
break;
default:
printf... | main.c: In function 'main':
main.c:12:3: error: 'aa' undeclared (first use in this function); did you mean 'a'?
12 | aa++;
| ^~
| a
main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:3: error: 'bb' undeclared (first use in this function); d... |
s872077050 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<string> s(3);
cin>>s.at(0)>>s.at(1)>>s.at(2);
int n=0;
while(true){
if(s.at(n).empty()){
if(n==0)cout<<'A'<<endl;
else if(n==1)cout<<'B'<<endl;
else if(n==2)cout<<'C'<<endl;
break;
}
if(s.at(n).at... | a.cc:33:1: error: 'c' does not name a type
33 | c
| ^
|
s581891769 | p03998 | C | #include <stdio.h>
#include <string.h>
char s[3][101]; int n[3], c[3];
int r(int i){
if(c[i] == n[i]) return i;
return dfs(s[i][c[i]++] - 'a');
}
int
main()
{
for(int i = 0; i < 3; i++){
scanf("%s", s[i]);
n[i] = strlen(s[i]);
}
printf("%c\n", r(0) + 'A');
return 0;
}
| main.c: In function 'r':
main.c:7:10: error: implicit declaration of function 'dfs'; did you mean 'ffs'? [-Wimplicit-function-declaration]
7 | return dfs(s[i][c[i]++] - 'a');
| ^~~
| ffs
|
s988433378 | p03998 | C | #include <stdio.h>
#include <string.h>
char s[3][101]; int n[3], c[3];
int r(int i){
if(c[i] == n[i]) return i;
return dfs(s[i][c[i]++] - 'a');
}
int
main()
{
for(int i = 0; i < 3; i++){
scanf("%s", s[i]);
n[i] = strlen(s[i]);
}
printf("%c\n", dfs(0) + 'A');
return 0;
}
| main.c: In function 'r':
main.c:7:10: error: implicit declaration of function 'dfs'; did you mean 'ffs'? [-Wimplicit-function-declaration]
7 | return dfs(s[i][c[i]++] - 'a');
| ^~~
| ffs
|
s429788582 | p03998 | C++ | a = [0] * 3
a[0] = input()[::-1]
a[1] = input()[::-1]
a[2] = input()[::-1]
d = dict()
d['a'] = 0
d['b'] = 1
d['c'] = 2
nxt = 0
cur = 0
while True:
cur = nxt
if len(a[cur]) == 0:
break
nxt = d[a[cur][-1]]
a[cur] = a[cur][:-1]
if cur == 0:
print('A')
elif cur == 1:
print('B')
else:
print('C') | a.cc:1:1: error: 'a' does not name a type
1 | a = [0] * 3
| ^
|
s943754182 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
char t = 'a';
cin >> a >> b >> c;
reverse(a.begin,a.end);
reverse(b.begin,b.end);
reverse(c.begin,c.end);
while(true){
if(t == 'a'){
if(a.size() == 0){
break;
}
t = a.at(a.size() - 1);
a.pop_back;... | a.cc: In function 'int main()':
a.cc:8:10: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
8 | reverse(a.begin,a.end);
| ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from /usr... |
s178136735 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C; int countA=1;int countB,countC=0; char win;
cin>>A>>B>>C;
char ch=A.at(0);
Outer:
for(int i=0;i<300;i++){
Inner: switch(ch){
case 'a': countA++;
ch=A.at(i);
if(countA=A.size()){
win... | a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before 'Outer'
14 | break Outer;
| ^~~~~~
| ;
a.cc:14:25: error: 'Outer' was not declared in this scope
14 | break Outer;
| ^~... |
s851831267 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C; int countA=1;int countB,countC=0; char win;
cin>>A>>B>>C;
char ch=A.at(0);
Outer:
for(int i=0;i<300;i++){
switch(ch){
case 'a': countA++;
ch=A.at(i);
if(countA=A.size()){
win='A';
... | a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before 'Outer'
14 | break Outer;
| ^~~~~~
| ;
a.cc:14:25: error: 'Outer' was not declared in this scope
14 | break Outer;
| ^~... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.