submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s283686090 | p03997 | C++ | #include <cstdio>
using namespace std;
int main(){
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d\n",((a+b)*(h/2));
return 0;
} | a.cc: In function 'int main()':
a.cc:9:30: error: expected ')' before ';' token
9 | printf("%d\n",((a+b)*(h/2));
| ~ ^
| )
|
s289151840 | p03997 | Java | package tstFlickr3;
import java.util.Scanner;
public class Atcoder {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a= sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
}
| Main.java:5: error: class Atcoder is public, should be declared in a file named Atcoder.java
public class Atcoder {
^
1 error
|
s262031095 | p03997 | C++ | include <iostream>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin.tie(0);
| ^~~
a.cc:5:3: error: 'ios' has not been declared
5 | ios::sync_with_stdio(false);
| ^~~
a.cc:9:3:... |
s187910645 | p03997 | C++ | #include <stdio.h>
int main()
{
int a, b, h, s;
scanf_s("%d\n%d\n%d", &a, &b, &h);
s = ((a + b)*h) / 2;
printf("%d", s);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d\n%d\n%d", &a, &b, &h);
| ^~~~~~~
| scanf
|
s064315001 | p03997 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,h;
cin>>a>>b>>c;
cout<<(a+b)*c/2<<endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'c' was not declared in this scope
7 | cin>>a>>b>>c;
| ^
|
s639435303 | p03997 | C | #incloud <stdio.h>
main()
{
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d\n",(a+b)*h/2);
} | main.c:1:2: error: invalid preprocessing directive #incloud; did you mean #include?
1 | #incloud <stdio.h>
| ^~~~~~~
| include
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function '... |
s741621672 | p03997 | C++ | a = int(input())
b, c = map(int, input().split())
result = int(a*(b+c)/2)
print(result) | a.cc:1:1: error: 'a' does not name a type
1 | a = int(input())
| ^
|
s923362344 | p03997 | C | #include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int a;
int b;
int h
int sum1;
// 個数のの入力
sum1 = 0;
scanf("%d %d %d",&a,&b,&h);
sum1 = ((a + b) * h) / 2;
printf("%d\n",sum1);
return 0;
} | main.c: In function 'main':
main.c:9:14: error: expected ';' before 'int'
9 | int h
| ^
| ;
10 | int sum1;
| ~~~
main.c:15:33: error: 'h' undeclared (first use in this function)
15 | scanf("%d %d %d",&a,&b,&h);
| ... |
s676317274 | p03997 | C++ | a = int(input())
b, c = map(int, input().split())
print(a*(b+c)/2) | a.cc:1:1: error: 'a' does not name a type
1 | a = int(input())
| ^
|
s730721664 | p03997 | C++ | a = int(input())
b = int(input())
h = int(input())
print((a+b)*h/2) | a.cc:1:1: error: 'a' does not name a type
1 | a = int(input())
| ^
|
s090041757 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
} | Main.java:12: error: reached end of file while parsing
}
^
1 error
|
s227068515 | p03997 | Java | import java.util.Scanner;
Class FirstJava {
public static void main(String[] args){
Scanner scan = new Scanner( System.in );
int a = Integer.parseInt( scan.nextLine() );
int b = Integer.parseInt( scan.nextLine() );
int h = Integer.parseInt( scan.nextLine() );
System.out.println( (a+b)*h/2 );
}
} | Main.java:3: error: class, interface, enum, or record expected
Class FirstJava {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
^
(use --enable-preview to enable unnamed classes)
Main.java:12: error: class, interface, en... |
s529110142 | p03997 | C++ | #include<stdio .h>
int main(void){
Int a,b,h;
scanf("%d%d%d",&a,&b,&h);
printf("%d¥n",(a+b)*h/2);
return 0;
} | a.cc:1:9: fatal error: stdio .h: No such file or directory
1 | #include<stdio .h>
| ^~~~~~~~~~
compilation terminated.
|
s626389798 | p03997 | Java | import java.util.Scanner;
public class FirstJava {
public static void main(String[] args){
Scanner scan = new Scanner( System.in );
int a = Integer.parseInt( scan.nextLine() );
int b = Integer.parseInt( scan.nextLine() );
int h = Integer.parseInt( scan.nextLine() );
System.out.println( (a+b)*h/2 );
}
} | Main.java:3: error: class FirstJava is public, should be declared in a file named FirstJava.java
public class FirstJava {
^
1 error
|
s067776904 | p03997 | C++ | a = gets.to_i
b = gets.to_i
h = gets.to_i
S = (a + b) * h / 2
print S
| a.cc:1:1: error: 'a' does not name a type
1 | a = gets.to_i
| ^
|
s790111324 | p03997 | C | #include<stdio.h>
#include <stdlib.h>
int main () {
int8_t a, b, c;
uint8_t str[128];
fgets(str,sizeof(str),stdin);
a = atoi(str);
fgets(str,sizeof(str),stdin);
b = atoi(str);
fgets(str,sizeof(str),stdin);
c = atoi(str);
//printf("%d, %d, %d\n", a,b,c);
printf ("%d\n", (a+b)*c... | main.c: In function 'main':
main.c:6:5: error: unknown type name 'uint8_t'
6 | uint8_t str[128];
| ^~~~~~~
main.c:3:1: note: 'uint8_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
2 | #include <stdlib.h>
+++ |+#include <stdint.h>
3 |
main.c:8:1... |
s659433282 | p03997 | Java | import java.util.Scanner;
public class Main1 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int total = 0;
if( a <100 && b<100 && c<100){
total = (a+b)*c/2;
}else ... | Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
^
1 error
|
s411078183 | p03997 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int total = 0;
if( a <100 && b<100 && c<100){
total = (a+b)*c/2;
}else {... | Main.java:25: error: reached end of file while parsing
}
^
1 error
|
s169066749 | p03997 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int a, h, b;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
return 0;
}
| a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s344533882 | p03997 | Java | import java.util.*;
public class A{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
} | Main.java:3: error: class A is public, should be declared in a file named A.java
public class A{
^
1 error
|
s407280127 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner gio = new Scanner(System.in);
a = gio.nextInt();
b = gio.nextInt();
h = gio.nextInt();
System.out.println((double)((a + b) * h)/(double)2);
}
} | Main.java:5: error: cannot find symbol
a = gio.nextInt();
^
symbol: variable a
location: class Main
Main.java:6: error: cannot find symbol
b = gio.nextInt();
^
symbol: variable b
location: class Main
Main.java:7: error: cannot find symbol
h = gio.nextInt();
^
symbol: variable h
location: c... |
s839898576 | p03997 | C++ | #inlcude<iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
cout<<((a+b)*c)/2<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
7 | cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostrea... |
s092637027 | p03997 | C++ | include<#bits/stdc++.h>
using namespace std;
int main() {
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 <<endl;
return 0;
} | a.cc:1:9: error: stray '#' in program
1 | include<#bits/stdc++.h>
| ^
a.cc:1:1: error: 'include' does not name a type
1 | include<#bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin >> a >> b >> h;
| ^~~
a.cc:7:1: ... |
s024581228 | p03997 | C++ | def solve():
a = int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)
| a.cc:1:1: error: 'def' does not name a type
1 | def solve():
| ^~~
|
s249007759 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_... | a.cc: In function 'int main()':
a.cc:21:23: error: 'h' was not declared in this scope
21 | cout << (a+b)*h/2 << endl;
| ^
|
s258773638 | p03998 | Java | import java.util.*;
import java.io.*;
public class HelloWorld{
public static void main(String []args){
Scanner scanner = new Scanner(System.in);
String a = scanner.next();
String b = scanner.next();
String c = scanner.next();
List<Character> list1 = new ArrayList<>();... | Main.java:4: error: class HelloWorld is public, should be declared in a file named HelloWorld.java
public class HelloWorld{
^
1 error
|
s198814597 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string X,Y,Z;cin>>X>>Y>>Z;
int lx=X.size();
int ly=Y.size();
int lz=Z.size();
int p=1,q=0,r=0;
char S=X.at(0);
while(true){
if(S=='a'){
S=X.at(p);
p++;
}
else if(S=='b'){
S=Y.at(q);
q++;
}
else{
S=Z... | a.cc: In function 'int main()':
a.cc:38:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
38 | cout<<ans<<endl;
| ^~~
| abs
|
s496308631 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string X,Y,Z;cin>>X>>Y>>Z;
int lx=X.size();
int ly=Y.size();
int lz=Z.size();
int p=1,q=0;r=0;
char S=X.at(0);
while(true){
if(S=='a'){
S=X.at(p);
p++;
}
else if(S=='b'){
S=Y.at(q);
q++;
}
else{
S=Z... | a.cc: In function 'int main()':
a.cc:9:15: error: 'r' was not declared in this scope
9 | int p=1,q=0;r=0;
| ^
a.cc:38:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
38 | cout<<ans<<endl;
| ^~~
| abs
|
s211263220 | p03998 | C++ | #include <iostream>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <iomanip>
#include <cstdio>
#include <new>
#include <vector>
#include <cstdlib>
#include <string>
#include <set>
#include <tuple>
#include<map>
using namespace std;
int main() {
string sa, sb, sc;
cin >> sa >> sb >> sc;
char turn ... | a.cc: In function 'int main()':
a.cc:26:32: 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... |
s927727903 | p03998 | C++ | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#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++)
int main() {
string A, B, C;
cin >> A >> B >> C;
int Al = A.size();
int Bl = B.size();
int Cl = C.size();
... | a.cc: In function 'int main()':
a.cc:15:11: error: 'b' was not declared in this scope
15 | int a = b = c = 0;
| ^
a.cc:15:15: error: 'c' was not declared in this scope
15 | int a = b = c = 0;
| ^
|
s747868246 | p03998 | C++ | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#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++)
int main() {
string A, B, C;
cin >> A >> B >> C;
int Al = A.size();
int Bl = B.size();
int Cl = C.size();
... | a.cc: In function 'int main()':
a.cc:13:12: error: 'Bc' was not declared in this scope; did you mean 'Ac'?
13 | int Ac = Bc = Cc = 0;
| ^~
| Ac
a.cc:13:17: error: 'Cc' was not declared in this scope; did you mean 'Ac'?
13 | int Ac = Bc = Cc = 0;
| ^~
... |
s299322067 | p03998 | C++ | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
int main(){
string Sa,Sb,Sc;
cin>>Sa>>Sb>>Sc;
string next;
next.push_back(Sa[0]);
while(true)
{
if(next=="a")
{
if(Sa.empty())
{
cout<<"A"<<endl;
break... | a.cc:51:1: error: expected unqualified-id before '++' token
51 | ++;
| ^~
a.cc:52:9: error: expected declaration before '}' token
52 | }
| ^
a.cc:53:5: error: expected declaration before '}' token
53 | }
| ^
a.cc:54:5: error: expected unqualified-id before 'return'
... |
s096333457 | p03998 | C++ | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
int main(){
string Sa,Sb,Sc;
cin>>Sa>>Sb>>Sc;
string next;
next.push_back(a[0]);
while(true)
{
if(next=="a")
{
if(Sa.empty())
{
cout<<"A"<<endl;
break;... | a.cc: In function 'int main()':
a.cc:12:16: error: 'a' was not declared in this scope; did you mean 'Sa'?
12 | next.push_back(a[0]);
| ^
| Sa
a.cc: At global scope:
a.cc:53:8: error: redefinition of 'struct cww'
53 | struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0)... |
s494308954 | p03998 | C++ | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
int main(){
string a,b,c;
cin>>a>>b>>c;
string next;
next.push_back(a[0]);
while(true)
{
if(next=="a")
{
if(Sa.empty())
{
cout<<"A"<<endl;
break;
}
... | a.cc: In function 'int main()':
a.cc:18:28: error: 'Sa' was not declared in this scope; did you mean 'a'?
18 | if(Sa.empty())
| ^~
| a
a.cc:23:31: error: 'Sa' was not declared in this scope; did you mean 'a'?
23 | ... |
s061946060 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
queue<char>A;queue<char>B;queue<char>C;
string a,b,c; cin>>a>>b>>c;
for(int i=0;i<a.size();i++)A.push(a.at(i));
for(int i=0;i<b.size();i++)B.push(b.at(i));
for(int i=0;i<c.size();i++)C.push(c.at(i));
int count=0;
for(int i=0;i<500;i++){
if(count... | a.cc: In function 'int main()':
a.cc:13:15: error: 'class std::queue<char>' has no member named 'top'; did you mean 'pop'?
13 | count=A.top()-97;
| ^~~
| pop
a.cc:18:15: error: 'class std::queue<char>' has no member named 'top'; did you mean 'pop'?
18 | count=B.... |
s546613569 | p03998 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
string s1,s2,s3;
cin>>s1>>s2>>s3;
stack<char>a,b,c;
int a1=s1.length();
int b2=s2.length();
int c1=s3.length();
for(int i=a1-1;i>=0;i--)
{
a.push(s1[... | a.cc: In function 'int main()':
a.cc:18:15: error: 'b1' was not declared in this scope; did you mean 'c1'?
18 | for(int i=b1-1;i>=0;i--)
| ^~
| c1
|
s081387278 | p03998 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
string s1,s2,s3;
cin>>s1>>s2>>s3;
stack<char>a,b,c;
int a1=s1.length();
int b2=s2.length();
int c1=s3.length();
for(int i=a-1;i>=0;i--)
{
a.push(s1[i... | a.cc: In function 'int main()':
a.cc:14:16: error: no match for 'operator-' (operand types are 'std::stack<char>' and 'int')
14 | for(int i=a-1;i>=0;i--)
| ~^~
| | |
| | int
| std::stack<char>
In file included from /usr/include/c++/1... |
s960415681 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
char next = 'a';
while (1) {
if (next == 'a') {
next = a.at(0);
a.erase(a.begin());
if (a.size() == 0) {
cout << A << endl;
break;
}
}
if (next == 'b') {
... | a.cc: In function 'int main()':
a.cc:15:17: error: 'A' was not declared in this scope
15 | cout << A << endl;
| ^
a.cc:23:17: error: 'B' was not declared in this scope
23 | cout << B << endl;
| ^
a.cc:31:17: error: 'C' was not declared in this scope
3... |
s788186337 | p03998 | C++ | #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
using namespace std;
int main() {
string p[3];
char men[3] = {'A', 'B', 'C'};
int idx[3] = {};
for (int i=0; i<3; i++) cin >> p[i];
int who = 0;
while(1) {
if ((int)p[who].le... | a.cc: In lambda function:
a.cc:20:16: error: expected '{' before '[' token
20 | who = [who][idx[who]-1] - 'a';
| ^
a.cc: In function 'int main()':
a.cc:20:16: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
|
s893681037 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string a, b, c;
cin >> a >> b >> c;
char t = 'a';
while (true) {
if (t == 'a') {
if (!a.size()) {
cout << "A";
break;
}
t = a.front();
a = a.substr(1, a... | a.cc: In function 'int main()':
a.cc:38:6: error: expected '}' at end of input
38 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s505249698 | p03998 | C++ |
#include <bits/stdc++.h>
#include <string.h>
#include <vector>
//s#define rep(i, n) for (int i = 0; i < (n); i++)
#define MAX 10000
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define rep(i,a,n) for(int i=a; i<n; i++)
#define r0 return 0
#d... | a.cc: In function 'int main()':
a.cc:39:9: error: 'n' was not declared in this scope
39 | if(n == 'a'){
| ^
|
s495799950 | p03998 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char s[3][110];
int now[3]={0,0,0};
int rec(int i){
if(now[i] == strlen(s[i])) return i;
char next = s[i][now[i]];
now[i]++;
return rec(next - 'a');
}
int main(){
for(int i = 0; i < 3; i++) int ret = scanf("%s", s[i]);
printf("%c\n", ... | main.c: In function 'main':
main.c:16:32: error: expected expression before 'int'
16 | for(int i = 0; i < 3; i++) int ret = scanf("%s", s[i]);
| ^~~
|
s385161958 | p03998 | Java | import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
ArrayList<String> sa = new ArrayList<>();
for(String s: scanner.next().split("")) {
sa.add(s);
}
ArrayList<String> sb = new Array... | Main.java:20: error: cannot find symbol
HashMap<String, ArrayList> smap = new HashMap<>();
^
symbol: class HashMap
location: class Main
Main.java:20: error: cannot find symbol
HashMap<String, ArrayList> smap = new HashMap<>();
^
symbol: class HashMap
loc... |
s966681730 | p03998 | C | a = list(input())
b = list(input())
c = list(input())
check = "a"
while len(a) != 0 and len(b) != 0 and len(c) != 0:
if check == "a":
check = a[0]
a.pop(0)
elif check == "b":
check = b[0]
b.pop(0)
else:
check = c[0]
c.pop(0)
if len(a) == 1:
print("A")
eli... | main.c:1:1: warning: data definition has no type or storage class
1 | a = list(input())
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'list' [-Wimplicit-function-declaration]
1 | a = list(input())
| ^~~~
m... |
s383356044 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string Sa,Sb,Sc;
char card;
int a = 1,b = 0,c = 0;
int len_a,len_b,len_c;
bool flag = true;
cin >> Sa >> Sb >> Sc;
len_a = Sa.size();
len_b = Sb.size();
len_c = Sc.size();
card = Sa[0];
while(flag){
switch (card){
case 'a... | a.cc: In function 'int main()':
a.cc:31:17: error: expected ':' before ';' token
31 | case 'b';
| ^
| :
|
s985481542 | p03998 | C++ |
#include<iostream>
using namespace std;
int main(){
string sa, sb, sc;
cin >> sa >> sb >> sc;
int total = sa.length() + sb.length() + sc.length();
int a = 0,b = 0,c = 0;
char x = 'a';
for (int i = 0; i < total - 2; i ++){
if (x == 'a' && a <= sa.length() - 1){
x = sa[a]... | a.cc: In function 'int main()':
a.cc:30:23: error: expected ';' before '}' token
30 | return 'B'
| ^
| ;
31 | }
| ~
a.cc:33:23: error: expected ';' before '}' token
33 | return 'C'
| ... |
s534144059 | p03998 | C++ | #include<iostream>
using namespace std;
int main(){
string sa, sb, sc;
cin >> sa >> sb >> sc;
int total = sa.length() + sb.length() + sc.length();
int a = 0,b = 0,c = 0;
char x = 'a';
for (int i = 1; i < total; i ++){
if (x == 'a' && a <= sa.length() - 1){
x = sa[a];
... | a.cc: In function 'int main()':
a.cc:28:23: error: expected ';' before '}' token
28 | return 'B'
| ^
| ;
29 | }
| ~
a.cc:31:23: error: expected ';' before '}' token
31 | return 'C'
| ... |
s292120782 | p03998 | C++ | #include<iostream>
using namespace std;
int main(){
string sa, sb, sc;
cin >> s a>> sb >> sc;
int total = sa.length() + sb.length() + sc.length();
int a = 0,b = 0,c = 0;
char x = 'a';
for (int i = 1; i < total; i ++){
if (x == 'a' && a <= sa.length() - 1){
x = sa[a];
... | a.cc: In function 'int main()':
a.cc:6:12: error: 's' was not declared in this scope; did you mean 'sc'?
6 | cin >> s a>> sb >> sc;
| ^
| sc
|
s046648729 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length();
int a=0,b=0,c=0;
char x='a';
for(int i=1;i<total;i++){
if(x=='a'&&a<=sa.length()-1){
x=sa[a];
a+=1;
}
if(x=='b'&... | a.cc: In function 'int main()':
a.cc:26:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
26 | return;
| ^~~~~~
a.cc:30:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
30 | return;
| ... |
s244487263 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length();
int a=0,b=0,c=0;
char x='a';
for(int i=1;i<total;i++){
if(x=="a"&&a<=sa.length()){
x=sa[a];
a+=1;
}
if(x=="b"&&b... | a.cc: In function 'int main()':
a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if(x=="a"&&a<=sa.length()){
| ~^~~~~
a.cc:16:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if(x=="b"&&b<=sb.length(... |
s421640596 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length();
int a=0,b=0,c=0;
string x='a';
for(int i=1;i<total;i++){
if(x=="a"&&a<=sa.length()){
x=sa[a];
a+=1;
}
if(x=="b"&... | a.cc: In function 'int main()':
a.cc:9:14: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
9 | string x='a';
| ^~~
|
s661866023 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length()
int a=0,b=0,c=0;
string x='a';
for(int i=1;i<total;i++){
if(x="a"&&a<=sa.length()){
x=sa[a];
a+=1;
}
if(x... | a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'int'
8 | int a=0,b=0,c=0;
| ^~~
a.cc:9:14: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
9 | string x='a';
| ^~~
a.cc:12:19: error... |
s510424058 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length()
int a=0,b=0,c=0;
for(int i=1;i<total;i++){
string x='a';
if(x="a"&&a<=sa.length()){
x=sa[a];
a+=1;
}
if(x="b"&... | a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'int'
8 | int a=0,b=0,c=0;
| ^~~
a.cc:10:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
10 | string x='a';
| ^~~
a.cc:11:... |
s637702166 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length()
int a=0,b=0,c=0;
for(int i=1;i<total;i++){
string x='a';
if(x="a"&&a<=sa.length()){
x=sa[a];
a+=1;
}
if(x="b"&... | a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'int'
8 | int a=0,b=0,c=0;
| ^~~
a.cc:10:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
10 | string x='a';
| ^~~
a.cc:11:... |
s780755709 | p03998 | C++ | #include <iostream>
using namespace std;
int main(){
string sa,sb,sc;
cin>>sa>>sb>>sc;
int total=sa.length()+sb.length()+sc.length()
int a=0,b=0,c=0;
for(int i=1;i<total;i++){
string x='a'
if(x="a"&&a<=sa.length()){
x=sa[a];
a+=1;
}
if(x="b"&&... | a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'int'
8 | int a=0,b=0,c=0;
| ^~~
a.cc:10:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
10 | string x='a'
| ^~~
a.cc:11:9... |
s927540631 | p03998 | C++ | #include<iostream>
using namespace std;
int getNextTurn(int currentTurn, string decks){
if(decks[currentTurn].length() == 0){
return -1;
}
int nextTurn = decks[currentTurn][0] - 'a';
decks[currentTurn] = decks[currentTurn].substr(1);
return nextTurn;
}
int main(){
string decks[3];
... | a.cc: In function 'int getNextTurn(int, std::string)':
a.cc:5:27: error: request for member 'length' in 'decks.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)currentTurn))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'c... |
s080343775 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C,D={};
cin >> A >> B >> C;
D=A;
while(A.empty!=1 && (B.empty!=1 && C.empty!=)){
if(D==A){
if(A[0]==a){
A = A.substr(1,A.size()-1);
D = A;
}
else if(A[0]==b){
A... | a.cc: In function 'int main()':
a.cc:8:17: error: invalid use of member function 'bool std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::empty() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' (did you forget the '()' ?)
8 | while(A.empty!=1 && (B.empty!=1 && ... |
s983557987 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C,D={};
cin >> A >> B >> C;
D=A;
while(A[0]!="" && (B[0]!="" && C[0]!="")){
if(D==A){
if(A[0]==a){
A = A.substr(1,A.size()-1);
D = A;
}
else if(A[0]==b){
A = A.... | a.cc: In function 'int main()':
a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | while(A[0]!="" && (B[0]!="" && C[0]!="")){
a.cc:8:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | while(A[0]!="" && (B[0]!="" && C[0]!=... |
s068014644 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C,D={};
cin >> A >> B >> C;
D=A;
while(A[0]!={} && (B[0]!={} && C[0]!={})){
if(D==A){
if(A[0]==a){
A = A.substr(1,A.size()-1);
D = A;
}
else if(A[0]==b){
A = A.... | a.cc: In function 'int main()':
a.cc:8:21: error: expected primary-expression before '{' token
8 | while(A[0]!={} && (B[0]!={} && C[0]!={})){
| ^
a.cc:8:21: error: expected ')' before '{' token
8 | while(A[0]!={} && (B[0]!={} && C[0]!={})){
| ~ ^... |
s707173941 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C,D={};
cin >> A >> B >> C;
D=A;
while(A!={} && (B!={} && C!={})){
if(D==A){
if(A[0]==a){
A = A.substr(1,A.size()-1);
D = A;
}
else if(A[0]==b){
A = A.substr(1,... | a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before '{' token
8 | while(A!={} && (B!={} && C!={})){
| ^
a.cc:8:18: error: expected ')' before '{' token
8 | while(A!={} && (B!={} && C!={})){
| ~ ^
| ... |
s490326045 | p03998 | C | #include <bits/stdc++.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define PI 3.14159265
typede... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s649346858 | p03998 | C++ | #include <bits/stdc++.h>
#include <Windows.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define ... | a.cc:2:10: fatal error: Windows.h: No such file or directory
2 | #include <Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s274450194 | p03998 | C++ | #include <bits/stdc++.h>
#include <Windows.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define ... | a.cc:2:10: fatal error: Windows.h: No such file or directory
2 | #include <Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s536834854 | p03998 | C++ | #include <bits/stdc++.h>
#include <Windows.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define ... | a.cc:2:10: fatal error: Windows.h: No such file or directory
2 | #include <Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s609523725 | p03998 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000; // n の最大値
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-... | a.cc: In function 'int main()':
a.cc:56:31: error: expected '}' at end of input
56 | sc=sc.substr(1,sc.size()-1);}}
| ^
a.cc:19:12: note: to match this '{'
19 | int main() {
| ^
|
s235544690 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string[3] S;
for (int i = 0; i < 3; ++i) cin >> S[i];
vector<vector<int>> cards(3);
for (int i = 0; i < 3; ++i) {
for (auto &c : S[i]) {
int n = -1;
if (c == 'a') n = 0;
if (c == 'b') n = 1;
if (c == 'c') n = 2;
car... | a.cc: In function 'int main()':
a.cc:5:10: error: expected identifier before numeric constant
5 | string[3] S;
| ^
a.cc:5:10: error: expected ']' before numeric constant
5 | string[3] S;
| ^
| ]
a.cc:5:9: error: structured binding declaration cannot have type 'st... |
s617698983 | p03998 | C++ | #include<iostream>
#include<vector>
int main(){
std::vector<std::string> s(3);
std::cin>>s[0]>>s[1]>>s[2];
int t = 0;
std::vector<int> i(3);
while(1){
if(s[t].size()==i[t]){
std::cout<< 'A'+t std::endl;
break;
}
t = s[t][i[t]++];
}
} | a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before 'std'
10 | std::cout<< 'A'+t std::endl;
| ^~~~
| ;
|
s675852259 | p03998 | C++ | /*
* atcoder/abc089/b.cpp
*/
// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
template <class T> ostream & operat... | a.cc: In function 'void solve()':
a.cc:38:21: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} to 'int' in assignment
38 | cur = B[I[cur]++];
| ^
|
s450629098 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b>> c;
string x=a;
char ans='A';
while (1){
if (x.empty()){
cout << ans << endl;
return 0;
}
x.erase(0,1);
if (x.empty) continue;
x=x.at(0);
... | a.cc: In function 'int main()':
a.cc:15:20: error: cannot convert 'std::__cxx11::basic_string<char>::empty' from type 'bool (std::__cxx11::basic_string<char>::)() const noexcept' to type 'bool'
15 | if (x.empty) continue;
| ^
|
s105091673 | p03998 | C++ | #include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(long long)(n);i++)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
templa... | a.cc: In function 'int main()':
a.cc:29:34: error: request for member 'size' in 'used.std::vector<int>::operator[](((std::vector<int>::size_type)now))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
29 | if(s[now].size() > used[now].size()){
| ... |
s353722905 | p03998 | C++ | #include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(long long)(n);i++)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
templa... | a.cc: In function 'int main()':
a.cc:29:16: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
29 | used[now]++;
a.cc:30:29: error: no match for 'operator-' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::val... |
s876640851 | p03998 | C++ | #include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(long long)(n);i++)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
templa... | a.cc: In function 'int main()':
a.cc:25:23: error: expected ';' before 'int'
25 | rep(i,3) cin >> s[i]
| ^
| ;
26 | int now=0;
| ~~~
a.cc:28:10: error: 'now' was not declared in this scope; did you mean 'pow'?
28 | if(s[n... |
s685951100 | p03998 | Java | import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<String> A = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
ArrayList<String> B = new ArrayList<>(Arrays.asList(sc.nextLine().spl... | Main.java:8: error: cannot find symbol
ArrayList<String> A = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
^
symbol: variable Arrays
location: class Main
Main.java:9: error: cannot find symbol
ArrayList<String> B = new ArrayList<>(Arrays.asList(sc.nextL... |
s990424578 | p03998 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<String> A = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
ArrayList<String> B = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
ArrayList<Stri... | Main.java:7: error: cannot find symbol
ArrayList<String> A = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
^
symbol: class ArrayList
location: class Main
Main.java:7: error: cannot find symbol
ArrayList<String> A = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
... |
s703081519 | p03998 | Java |
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<String> A = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
ArrayList<String> B = new ArrayList<>(Arrays.asList(sc.nextLine().split("")));
ArrayList<String> C = new ArrayList<>(Ar... | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find s... |
s257877648 | p03998 | C++ | #include<iostream>
#include<string>
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;
return 0;
}
else if(t=='b'&&b.empty()){
cout<<"B"<<endl;
return 0;
}
else if(t=="C"&&c.empty()){
cout<... | a.cc: In function 'int main()':
a.cc:18:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
18 | else if(t=="C"&&c.empty()){
| ~^~~~~
|
s330544731 | p03998 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
#include<iomanip>
#include<sstream>
#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
#define deb(args...) { string ... | a.cc:18:6: error: variable or field 'err' declared void
18 | void err(istream_iterator<string> it) { cout << '\n';}
| ^~~
a.cc:18:10: error: 'istream_iterator' was not declared in this scope
18 | void err(istream_iterator<string> it) { cout << '\n';}
| ^~~~~~~~~~~~~~~~
a.cc:11:1: note: '... |
s119399322 | p03998 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define rep(i,n) for (int i=0;i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
int main() {
string a,b,c;
cin >> a >> b >> c;
char trun = 'a';
while(true){
if(trun=='a'){
turn = a[0];
... | a.cc: In function 'int main()':
a.cc:14:13: error: 'turn' was not declared in this scope; did you mean 'trun'?
14 | turn = a[0];
| ^~~~
| trun
a.cc:18:13: error: 'turn' was not declared in this scope; did you mean 'trun'?
18 | turn = b[0];
| ... |
s891738826 | p03998 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define rep(i,n) for (int i=0;i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
int main() {
string a,b,c;
cin >> a >> b >> c;
char turn = 'a';
while(true){
if(trun=='a'){
turn = a[0];
... | a.cc: In function 'int main()':
a.cc:13:12: error: 'trun' was not declared in this scope; did you mean 'turn'?
13 | if(trun=='a'){
| ^~~~
| turn
a.cc:17:12: error: 'trun' was not declared in this scope; did you mean 'turn'?
17 | if(trun=='b'){
| ^... |
s855425308 | p03998 | Java | import java.util.Scanner;
public class Practice {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
String c = sc.next();
StringBuilder aa = new StringBuilder(a);
StringBuilder bb = new StringBuilder(b);
StringBuilder... | Main.java:3: error: class Practice is public, should be declared in a file named Practice.java
public class Practice {
^
1 error
|
s430038520 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
string A, B, C;
cin >> A >> B >> C;
int ca = 1, cb = 1, cc = 1;
char ans = 'a';
while(ca < A.size() && cb < B.size() && cc < C.size()){
if(ans == 'a'){
ans = A[ca];
ca++;
}else if(ans == 'b'){
ans = B[cb... | a.cc: In function 'int main()':
a.cc:24:19: error: expected ';' before '}' token
24 | else{ans = 'c'}
| ^
| ;
|
s616996526 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
string A, B, C;
cin >> A >> B >> C;
int ca = 1, cb = 1, cc = 1;
char ans = a;
while(ca < A.size() && cb < B.size() && cc < C.size()){
if(ans == 'a'){
ans = A[ca];
ca++;
}else if(ans == 'b'){
ans = B[cb];... | a.cc: In function 'int main()':
a.cc:9:14: error: 'a' was not declared in this scope
9 | char ans = a;
| ^
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s628027800 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
string A, B, C;
cin >> A >> B >> C;
int ca = 1, cb = 1, cc = 1;
char ans = a;
while(ca < A.size() && cb < B.size() && cc < C.size()){
if(ans == a){
ans = A[ca];
ca++;
}else if(ans == b){
ans = B[cb];
... | a.cc: In function 'int main()':
a.cc:9:14: error: 'a' was not declared in this scope
9 | char ans = a;
| ^
a.cc:14:19: error: 'b' was not declared in this scope
14 | }else if(ans == b){
| ^
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:5:1... |
s983823864 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
string X=a;
for(int i=0; i<a.length()+b.length()+c.length();i++){
if (X.at(0)=='a'){
if(X.length()==0){
cout << X << endl;
return;
}
else{
X.substr(0);
X=a;
... | a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
12 | return;
| ^~~~~~
a.cc:15:17: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allo... |
s882052111 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
string X=a;
for(int i=0; i<a.length()+b.length()+c.length();i++){
if (X.at(0)=='a'){
if(X.length()==0){
cout << X << endl;
return;
}
else{
substr(0);
X=a;
}
... | a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
12 | return;
| ^~~~~~
a.cc:15:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
15 | substr(0);
| ^~~~~~
| ... |
s504908578 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
string X=a;
for(int i=0; i<a.length()+b.length()+c.length();i++){
if (X.at(0)=='a'){
if(X.length()==0){
cout << X << endl;
return;
}
else{
substr(1,X.length()-1);
... | a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
12 | return;
| ^~~~~~
a.cc:15:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
15 | substr(1,X.length()-1);
| ^~~~~~
... |
s309883542 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
string X=a;
for(int i=0; i<a.length()+b.length()+c.length();i++){
if (X.at(0)=='a'){
substr(1,X.length()-1);
X=a;
}
else if(X.at(0)=='b'){
substr(1,X.length()-1);
X=b;
}
els... | a.cc: In function 'int main()':
a.cc:10:7: error: 'substr' was not declared in this scope; did you mean 'strstr'?
10 | substr(1,X.length()-1);
| ^~~~~~
| strstr
a.cc:14:7: error: 'substr' was not declared in this scope; did you mean 'strstr'?
14 | substr(1,X.length()-1);
... |
s832218839 | p03998 | C++ | //#pragma GCC optimize(\"Ofast,no-stack-protector\")
//#pragma GCC target(\"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx\")
//#pragma GCC target(\"avx,tune=native\")
// Neil
#include<bits/stdc++.h>
using namespace std;
typedef complex<double> base;
typedef long double ld;
typedef long long ll;
#define endl "\n"
#define ... | a.cc:28:25: warning: missing terminating ' character
28 | else if(s[pos]=='c)
| ^
a.cc:28:25: error: missing terminating ' character
28 | else if(s[pos]=='c)
| ^~~
a.cc: In function 'int func(std::string, int)':
a.cc:29:7: error: expected... |
s248107710 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
bool run = true;
string turn = "A";
while(run){
if (turn == "A"){
if (A.size() == 0){
run = false;
}
else{
turn = A[0];
A.erase(A.begin());
}
}
else if(turn... | a.cc: In function 'int main()':
a.cc:44:19: error: expected ';' before '}' token
44 | turn = "C"
| ^
| ;
45 | }
| ~
|
s730013336 | p03998 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
bool run = true;
string turn = "A";
while(run){
if (turn == "A"){
if (A.size() == 0){
run = false;
}
else{
turn = A[0];
A.erase(A.begin());
}
}
else if(turn... | a.cc: In function 'int main()':
a.cc:39:20: 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>)'
39 | cout << transform(turn.begin(), turn.end(),... |
s048570403 | p03998 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
#define MODSIZE 1000000007
int main(){
int na;
int nb;
int nc;
int sp[3];
sp[0] = sp[1] = sp[2] = 0;
char s[3][105];
scanf("%s %s %s", s[0], s[1], s[2]);
na = strlen(s[0]);
nb = strlen... | a.cc: In function 'int main()':
a.cc:38:12: error: expected '}' at end of input
38 | return 0;
| ^
a.cc:7:11: note: to match this '{'
7 | int main(){
| ^
|
s873068727 | p03998 | C++ | from sys import exit
sa = input()
sb = input()
sc = input()
turn = 'a'
while True:
if turn == 'a':
if len(sa) == 0:
print('A')
exit()
else:
turn = sa[0]
sa = sa[1:]
if turn == 'b':
if len(sb) == 0:
print('B')
exit()
else:
turn = sb[0]
sb = sb[1:]
i... | a.cc:1:1: error: 'from' does not name a type
1 | from sys import exit
| ^~~~
|
s314524486 | p03998 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
String c = sc.next();
StringBuilder aa = new StringBuilder(a);
StringBuilder bb = new StringBuilder(b);
StringBuilder cc = new StringBuilder(c);
... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s165661348 | p03998 | Java | ss | Main.java:1: error: reached end of file while parsing
ss
^
1 error
|
s106064364 | p03998 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string a, b, c;
bool flag;
int a_length, b_length, c_length = 0;
int turn = 0;
cin >> a >> b >> c;
flag = false;
while (flag)
{
if (turn == 0)
{
a_length++;
if (a_length == a.length()) flag = true;
if ... | a.cc: In function 'int main()':
a.cc:22:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
22 | if (a[a_length - 1] == "a") turn = 0;
a.cc:23:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
23 | else if (a[a_length - 1] == "b") turn = 1;
a... |
s671768992 | p03998 | C++ | #include <iostream>
#include <string>
using namespace std;
char select(char a){
if(a=='a'){
return 'A';
}
else if(a=='b'){
return 'B';
}
else if(a=='c'){
return 'C';
}
}
int main(){
string a,b,c;
getline(cin,a);
getline(cin,b);
getline(cin,c);
char flag='A',turn='A';
while(true){... | a.cc: In function 'int main()':
a.cc:26:17: error: expected ';' before 'break'
26 | turn='A'
| ^
| ;
27 | break;
| ~~~~~
a.cc:35:17: error: expected ';' before 'break'
35 | turn='B'
| ^
| ... |
s031976192 | p03998 | C++ | #include <iostream>
#include <string>
using namespace std;
char select(char a){
if(a=='a'){
return 'A';
}
else if(a=='b'){
return 'B';
}
else if(a=='c'){
return 'C';
}
}
int main(){
string a,b,c;
getline(cin,a);
getline(cin,b);
getline(cin,c);
char flag='A',turn='A';
while(!a.emp... | a.cc: In function 'int main()':
a.cc:24:14: error: expected ';' before 'if'
24 | turn=flag
| ^
| ;
25 | if(flag=='A'){
| ~~
a.cc: In function 'char select(char)':
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
15 | }
... |
s935615937 | p03998 | C++ | #include <iostream>
#include <string>
using namespace std;
char select(char a){
if(a=='a'){
return 'A'
}
else if(a=='b'){
return 'B'
}
else if(a=='c'){
return 'C'
}
}
int main(){
string a,b,c;
getline(cin,a);
getline(cin,b);
getline(cin,c);
char flag='A';
while(true){
if(flag=='... | a.cc: In function 'char select(char)':
a.cc:7:15: error: expected ';' before '}' token
7 | return 'A'
| ^
| ;
8 | }
| ~
a.cc:10:15: error: expected ';' before '}' token
10 | return 'B'
| ^
| ;
11 ... |
s174862013 | p03998 | C++ | #include <iostream>
#include <string>
using namespace std;
char select(char a){
if(a=='a'){
return 'A'
}
else if(a=='b'){
return 'B'
}
else if(a=='c'){
return 'C'
}
}
int main(){
string a,b,c;
getline(cin,a);
getline(cin,b);
getline(cin,c);
char flag='A';
while(true){
if(flag=='... | a.cc: In function 'char select(char)':
a.cc:7:15: error: expected ';' before '}' token
7 | return 'A'
| ^
| ;
8 | }
| ~
a.cc:10:15: error: expected ';' before '}' token
10 | return 'B'
| ^
| ;
11 ... |
s235526269 | p03998 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
void ABC40(void);
void ABC41(void);
void ABC42(void);
void ABC43(void);
void ABC44(void);
void ABC45(void);
void ABC46(void);
void ABC47(void);
void ABC48(void);
void ABC49(void);
int main(void){
ABC45();
}
void ABC45(){
int a,b,c;
char ch='a... | a.cc: In function 'void ABC45()':
a.cc:25:5: error: 'asize' was not declared in this scope; did you mean 'dysize'?
25 | asize=sa.length();
| ^~~~~
| dysize
a.cc:27:5: error: 'bsize' was not declared in this scope; did you mean 'dysize'?
27 | bsize=sb.length();
| ^~~~~
|... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.