submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s477328154 | p03729 | C++ | int main(){
string A, B, C;
cin >> A >> B >> C;
if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0]){
cout << "YES" << endl;
}
else count << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
2 | string A, B, C;
| ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> A >> B >> C;
| ^~~
a.cc:3:10: error: 'A' was not declared in this scope
3 | cin >> A >> B >> C;
|... |
s746403081 | p03729 | C++ | int main(){
string A, B, C;
cin >> A >> B >> C;
if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0]){
cout << "YES" << endl;
}
else count << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
2 | string A, B, C;
| ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> A >> B >> C;
| ^~~
a.cc:3:10: error: 'A' was not declared in this scope
3 | cin >> A >> B >> C;
|... |
s078713894 | p03729 | C++ | int main(){
string A, B, C;
cin >> A >> B >> C;
if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0]){
cout << "YES" << endl;
}
else count << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
2 | string A, B, C;
| ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> A >> B >> C;
| ^~~
a.cc:3:10: error: 'A' was not declared in this scope
3 | cin >> A >> B >> C;
|... |
s717568318 | p03729 | C++ | #include<iostrem>
#include<string>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
return 0;
} | a.cc:1:9: fatal error: iostrem: No such file or directory
1 | #include<iostrem>
| ^~~~~~~~~
compilation terminated.
|
s920931992 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
if((A[A.size()]==B[0])&&(B[B.size]==C[0])){
cout << "YES" <<endl
}else cout << "NO" <<endl;
} | a.cc: In function 'int main()':
a.cc:8:35: error: invalid use of non-static 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 = ... |
s432602637 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
if((A.end==B.begin)&&(B.end==C.begin)){
cout << "YES" <<endl;
}else cout << "NO" <<endl;
} | a.cc: In function 'int main()':
a.cc:8:18: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
8 | if((A.end==B.begin)&&(B.end==C.begin)){
| ~~~~~^~~~~~~~~
| | |
| ... |
s297281271 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
if((A.end==B.begin)&&(B.end==C.begin)){
cout << "YES" <<endl
}else cout << "NO" <<endl;
} | a.cc: In function 'int main()':
a.cc:8:18: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
8 | if((A.end==B.begin)&&(B.end==C.begin)){
| ~~~~~^~~~~~~~~
| | |
| ... |
s916556255 | p03729 | C | #include<stdio.h>
int main()
{
char A[11],B[11],C[11];
int a,b,i;
fgets(A,sizeof(A),stdin);
fgets(B,sizeof(B),stdin);
fgets(C,sizeof(C),stdin);
for(i=0;i<10;i++){
if(A[i]=='\0'){
a=i-1;
break;
}
for(i=0;i<10;i++){
if(B[i]=='\0'){
b=i-1;
break;
}
if(A[a]... | main.c: In function 'main':
main.c:32:1: error: expected declaration or statement at end of input
32 | }
| ^
main.c:32:1: error: expected declaration or statement at end of input
|
s886135525 | p03729 | C | #include<stido.h>
int main()
{
char A[11],B[11],C[11];
int a,b,c,i;
fgets(A,sizeof(A),stdin);
fgets(B,sizeof(B),stdin);
fgets(C,sizeof(C),stdin);
for(i=0;i<10;i++){
if(A[i]=='\0'){
a=i-1;
break;
}
for(i=0;i<10;i++){
if(B[i]=='\0'){
b=i-1;
break;
}
if(A[... | main.c:1:9: fatal error: stido.h: No such file or directory
1 | #include<stido.h>
| ^~~~~~~~~
compilation terminated.
|
s074262445 | p03729 | C | #include<stido.h>
int main()
{
char A[11],B[11],C[11];
fgets(A,sizeof(A),stdin);
fgets(B,sizeof(B),stdin);
fgets(C,sizeof(C),stdin);
if(A[9]==B[0]){
if(B[9]==C[0]){
printf("YES");
}
}else{
printf("NO");
}
return 0;
} | main.c:1:9: fatal error: stido.h: No such file or directory
1 | #include<stido.h>
| ^~~~~~~~~
compilation terminated.
|
s940646290 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin>>A>>B>>C;
int sizea,sizeb;
sizea = sizeof(A);
sizeb = sizeof(B)
if((A[sizea-1]==B[0])&&(B[sizeb-1]==C[0])){
cout<<"Yes";
}else{
cout<<"No";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'if'
9 | sizeb = sizeof(B)
| ^
| ;
10 | if((A[sizea-1]==B[0])&&(B[sizeb-1]==C[0])){
| ~~
a.cc:12:4: error: 'else' without a previous 'if'
12 | }else{
| ... |
s998397556 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
stirng A, B, C;
cin >> A >> B >> C;
cout << ((A.end() == B.begin() && B.end() == C.begin())?"YES":"NO") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'stirng' was not declared in this scope
7 | stirng A, B, C;
| ^~~~~~
a.cc:8:10: error: 'A' was not declared in this scope
8 | cin >> A >> B >> C;
| ^
a.cc:8:15: error: 'B' was not declared in this scope
8 | cin >> A >> B >> C;
... |
s373612167 | p03729 | Java | #include<stdio.h>
#include<string.h>
int main(){
char a[100],b[100],c[100];
scanf("%s%s%s",a,b,c);
int len1 = strlen(a),len2 = strlen(b);
if(a[len1-1]==b[0] && b[len2-1]==c[0])printf("YES\n");
else printf("NO\n");
} | Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:2: error: illegal character: '#'
#include<string.h>
^
Main.java:5: error: class, interface, enum, or record expected
scanf("%s%s%s",a,b,c);
^
Main.j... |
s556477753 | p03729 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:13: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >')
8 | if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl;
... |
s070595743 | p03729 | Java | import java.util.*;
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();
char a = a.charAt(a.length() - 1);
char b1 = b.charAt(0);
char b2 = b.charAt(b.leng... | Main.java:8: error: variable a is already defined in method main(String[])
char a = a.charAt(a.length() - 1);
^
Main.java:8: error: char cannot be dereferenced
char a = a.charAt(a.length() - 1);
^
Main.java:8: error: char cannot be dereferenced
char a = a.... |
s097982743 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main (){
string a, b, c;
cin >> a >> b >> c;
if(b[0]==a[(int)(a.length())-1] && b[(int)(b.length())-1]==c[0]){
cout << "YES" << endl;
}else {
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:12:6: error: expected '}' at end of input
12 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main (){
| ^
|
s743144866 | p03729 | C++ | #include<cstdio>
#include<iostream>
#include<string>
using namespace std;
int main(void) {
string a, b, c;
cin >> a >> b >> c;
if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) {
cout << "YES\n";
}
else {
cout << "NO\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::__cxx11::basic_string<char>::iterator)'
13 | if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) {
| ~~~~^~~~~~~~~
In file included from /usr/... |
s221783102 | p03729 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(void)
{
string a,b,c;
bool judge = true;
cin >> a >> b >> c;
if(a[a.length() - 1] != b[0] || b[b.length() - 1] != c[0]){judge = false;}
cout << if(judge){"YES";}else{"NO";} << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before 'if'
12 | cout << if(judge){"YES";}else{"NO";} << endl;
| ^~
a.cc:12:30: error: 'else' without a previous 'if'
12 | cout << if(judge){"YES";}else{"NO";} << endl;
| ^~~... |
s516235889 | p03729 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(void)
{
string a,b,c;
bool judge = true;
cin >> a >> b >> c;
if(a[a.length() - 1] != b[0] || b[b.length() - 1] != c[0]){judge = false;}
cout << if(judge){"YES"}else{"NO"} << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before 'if'
12 | cout << if(judge){"YES"}else{"NO"} << endl;
| ^~
a.cc:12:29: error: 'else' without a previous 'if'
12 | cout << if(judge){"YES"}else{"NO"} << endl;
| ^~~~
a.c... |
s857641241 | p03729 | C++ | // https://atcoder.jp/contests/
#include <iostream>
using namespace std;
int main()
{
/* Magic word */
cin.tie(0);
ios::sync_with_stdio(false);
/* ---------- */
string a, b, c, r;
cin >> a >> b >> c;
r = a[a.length - 1] == b[0] && b[b.length - 1] == c[0] ? "YES" : "NO";
cout << r << "\n";
retur... | a.cc: In function 'int main()':
a.cc:17:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s359750202 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c,d,e;cin>>a>>b>>c;
d=a.size();e=b.size();
if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | a.cc: In function 'int main()':
a.cc:6:9: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";}
| ~^~
| | |
| | int
| std::string {aka s... |
s517033142 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c,d,e;cin>>a>>b>>c;
d=a.size()-1;e=b.size()-1;
if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";} | a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
6 | if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";}
| ^
In file included from /usr/inc... |
s342497054 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;cin>>a>>b>>c;
d=a.size()-1;e=b.size()-1;
if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";} | a.cc: In function 'int main()':
a.cc:5:3: error: 'd' was not declared in this scope
5 | d=a.size()-1;e=b.size()-1;
| ^
a.cc:5:16: error: 'e' was not declared in this scope
5 | d=a.size()-1;e=b.size()-1;
| ^
|
s705811308 | p03729 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a, b, c;
cin >> a >> b >> c;
if(a[a.lenght()-1] == b[0] && b[b.length()-1] == c[0]){
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:10: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
10 | if(a[a.lenght()-1] == b[0] && b[b.length()-1] == c[0]){
| ^~~~~~
| length
|
s731223609 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >>C;
if(A[A.size()-1] == B[0] && B[Bsize()-1] == C[0]){
cout << "YES" << endl;
}else{
cout << "NO"<< endl;
}
} | a.cc: In function 'int main()':
a.cc:6:39: error: 'Bsize' was not declared in this scope; did you mean 'dysize'?
6 | if(A[A.size()-1] == B[0] && B[Bsize()-1] == C[0]){
| ^~~~~
| dysize
|
s118559322 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >>C;
if(A[A.size()] == B[0] && B[Bsize()] == C[0]){
cout << 'YES' << endl;
}else{
cout << 'NO' << endl;
}
} | a.cc:7:25: warning: multi-character character constant [-Wmultichar]
7 | cout << 'YES' << endl;
| ^~~~~
a.cc:9:25: warning: multi-character character constant [-Wmultichar]
9 | cout << 'NO' << endl;
| ^~~~
a.cc: In funct... |
s457358974 | p03729 | C | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main(void)
{
char a[100];
char b[100];
char c[100];
scanf("%s", &a);
scanf("%s", &b);
scanf("%s",&c);
int d = strlen(a);
int e = strlen(b);
if (a[d-1]==b[0]&&b[e-1]==c[0])
{
printf("YES");
}
else
{
pri... | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s489257091 | p03729 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<numeric>
#include<utility>
#pragma region _define
#define f(i,a,b) for(LL i=a;i<b;i++)
#define f_vI(v,n) f(i,0,n)cin>>v[i]
#define f_v2I(v1,v2,n) f(i,0,n)ci... | a.cc: In function 'int main()':
a.cc:73:15: error: 'strlen' was not declared in this scope
73 | if (a[strlen(a) - 1] == b[0] && b[strlen(b) - 1]==c[0]) {
| ^~~~~~
a.cc:12:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
11 | #i... |
s498738093 | p03729 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main(void)
{
char a[100];
char b[100];
char c[100];
cin >> a >> b >> c;
int d = strlen(a);
int e = strlen(b);
if (a[d-1]==b[0]&&b[e-1]==c[0])
{
cout << "YES";
}
else
{
cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:17: error: 'strlen' was not declared in this scope
12 | int d = strlen(a);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stdlib.h>
+++ |+#include <cs... |
s004653585 | p03729 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main(void)
{
char a[10];
char b[10];
char c[10];
cin >> a >> b >> c;
int d = strlen(a);
int e = strlen(b);
if (a[d-1]==b[0]&&b[e-1]==c[0])
{
cout << "YES";
}
else
{
cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:17: error: 'strlen' was not declared in this scope
12 | int d = strlen(a);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stdlib.h>
+++ |+#include <cs... |
s262420100 | p03729 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
int main(void)
{
char a[10];
char b[10];
char c[10];
std::cin >> a >> b >> c;
int d = strlen(a);
int e = strlen(b);
if (a[d-1]==b[0]&&b[e-1]==c[0])
{
std::cout << "YES";
}
else
{
std::cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'strlen' was not declared in this scope
11 | int d = strlen(a);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stdlib.h>
+++ |+#include <cs... |
s678529780 | p03729 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
int main(void)
{
char a[10];
char b[10];
char c[10];
int d=strlen(a);
int e=strlen(b);
std::cin >> a >> b >> c;
if (a[d-1]==b[0]&&b[e-1]==c[0])
{
std::cout << "YES";
}
else
{
std::cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:15: error: 'strlen' was not declared in this scope
10 | int d=strlen(a);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stdlib.h>
+++ |+#include <cstrin... |
s353567532 | p03729 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
int main(void)
{
char a[10];
char b[10];
char c[10];
std::cin >> a >> b >> c;
if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
{
std::cout << "YES";
}
else
{
std::cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:15: error: 'strlen' was not declared in this scope
11 | if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <std... |
s968510553 | p03729 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
int main(void)
{
char a[10];
char b[10];
char c[10];
std::cin >> a >> b >> c;
if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
{
std::cout << "YES";
}
else
{
std::cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:15: error: 'strlen' was not declared in this scope
10 | if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <ios... |
s438278185 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
bool X=false
if (A[A.size()-1]==B[0] && B[B.size()-1]==C[0]) X=true
if (X) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'if'
9 | if (A[A.size()-1]==B[0] && B[B.size()-1]==C[0]) X=true
| ^~
a.cc:11:5: error: 'else' without a previous 'if'
11 | else cout << "NO" << endl;
| ^~~~
|
s547379123 | p03729 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String b = sc.nextLine();
String c = sc.nextLine();
if(a.charAt(a.length()-1)==b.charAt(0)&&b.charAt(b.length()-1)==c.charAt(0)){
... | Main.java:17: error: class, interface, enum, or record expected
}
^
1 error
|
s881184639 | p03729 | C++ | #include<iostream>
#inclede<string>
using namespace std;
int main(){
string a,b,c;
cin >>a >>b>>c;
if(a[a.size()-1] == b[0] && b[b.size()-1]==c[0])cout <<"YES" <<endl;
else cout <<"NO"<<endl;
} | a.cc:2:2: error: invalid preprocessing directive #inclede; did you mean #include?
2 | #inclede<string>
| ^~~~~~~
| include
|
s862007960 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
int main() {
//cout.precision(10);
string a, b, c;
cin >> a >> b >> c;
string ans = "YES";
if((a.back() != b[0]) || (b.back() != c[0] )){
ans = ... | a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:10:12: note: to match this '{'
10 | int main() {
| ^
|
s217248828 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
int main() {
//cout.precision(10);
string a, b, c;
cin >> a >> b >> c;
string ans = "YES"
if((a.back() != b[0]) || (b.back() != c[0] )){
ans = "... | a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'if'
15 | if((a.back() != b[0]) || (b.back() != c[0] )){
| ^~
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:10:12: note: to match this '{'
10 | int main() {
| ^
|
s964294159 | p03729 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main() {
char a[10], b[10], c[10];
cin >> a;
cin >> b;
cin >> c;
int ta = strlen(a);
int tb = strlen(b);
int tc = strlen(c);
if (a[ta - 1] == b[0] && b[tb - 1] == c[0]) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:18: error: 'strlen' was not declared in this scope
11 | int ta = strlen(a);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ |+#include <... |
s775138199 | p03729 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tup... | a.cc: In function 'int main()':
a.cc:19:8: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
19 | if(s1[s1.end()] == s2[s2.begin()] && s2[s2.end()] == s3[s3.begin()]){
| ^
In file included from /... |
s108112566 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define print(a) cout << a << endl
#define V vector
typedef string str;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
V<str> s(3);
bool chk=true;
rep(i,3){
cin >> s.at(i);
if(i>0){
if(s.at(i).at(0)!=s.at(i-1).at(s.at(i-1).size()))chk==... | a.cc: In function 'int main()':
a.cc:5:23: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
5 | #define print(a) cout << a << endl
| ~~~~ ^~
| |
| ... |
s538568209 | p03729 | Java | import java.util.*;
// cin=sc.nextInt();
// List<Integer> a = new ArrayList<Integer>(n);
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();
int d = a.length();
int e = b.length();
... | Main.java:13: error: array required, but String found
if(a[d-1] == b[0] && b[e-1] == c[0]){
^
Main.java:13: error: array required, but String found
if(a[d-1] == b[0] && b[e-1] == c[0]){
^
Main.java:13: error: array required, but String found
if(a[d-1] == b[0] && b[e-1] == c[0]){
... |
s045411419 | p03729 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[11],b[11],c[11];
scanf("%s %s %s",a,b,c);
if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0]){
prentf("YES");
}else printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'prentf'; did you mean 'printf'? [-Wimplicit-function-declaration]
7 | prentf("YES");
| ^~~~~~
| printf
|
s683530081 | p03729 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[11],b[11],c[11];
scanf("%s %s %s",a,b,c);
if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){
prentf("YES");
}else printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:6:21: error: called object 'b' is not a function or function pointer
6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){
| ^
main.c:4:14: note: declared here
4 | char a[11],b[11],c[11];
| ^
main.c:6:42: error: called object 'c' is... |
s010675550 | p03729 | C | #include <stdio.h>
#include <string.h>
int main(void){
char a[11],b[11],c[11];
scanf("%s %s %s",a,b,c);
if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){
prentf("YES");
}else printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:6:21: error: called object 'b' is not a function or function pointer
6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){
| ^
main.c:4:14: note: declared here
4 | char a[11],b[11],c[11];
| ^
main.c:6:42: error: called object 'b' is... |
s755918508 | p03729 | C++ | #include<stdio.h>
int main(void){
int A,B,C;
int i;
scanf("%d %d %d",&A,&B,&C);
for(i=1;i<=100;i++){
if(A*i%B==C){
printf("Yes/n");
break;
}
else{
printf("No/n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
15 | }
| ^
a.cc:2:15: note: to match this '{'
2 | int main(void){
| ^
|
s117558998 | p03729 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B,C,i=1,x;
cin >> A >> B >> C >> i >> x;
while(true);
x = A*i;
if(A + x % B == C){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
}
| a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s010402575 | p03729 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B,C,i=1,x;
cin >> A >> B >> C >> i >> x;
while(true)
x = A*i
if(A + x % B == C){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'if'
10 | x = A*i
| ^
| ;
11 |
12 | if(A + x % B == C){
| ~~
a.cc:15:3: error: 'else' without a previous 'if'
15 | else{
| ^~~~
a.cc: At global scope:
a.cc:19:1: error: e... |
s158708485 | p03729 | C++ | const std::vector<int> x = {1,2};
int n = x.size(); | a.cc:1:12: error: 'vector' in namespace 'std' does not name a template type
1 | const std::vector<int> x = {1,2};
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
+++ |+#include <vector>
1 | const std::vector<int> x... |
s217683984 | p03729 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
(a[array_size-1]==b[0]&&b[array_size-1]-1]==c[0])"YES":"NO";
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:6: error: 'array_size' was not declared in this scope
8 | (a[array_size-1]==b[0]&&b[array_size-1]-1]==c[0])"YES":"NO";
| ^~~~~~~~~~
a.cc:8:44: error: expected ')' before ']' token
8 | (a[array_size-1]==b[0]&&b[array_size-1]-1]==c[0])"YES":"NO";
| ~ ... |
s848632784 | p03729 | C | #include<stdio.h>
int len(*s){
int len;
while(s){
len++;
}
return len;
}
int main(){
char a[11], b[11], c[11];
int alen, blen, clen;
scanf("%s %s %s", a, b, c);
alen = len(a);
blen = len(b);
clen = len(c);
if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){
printf("YES\n");
} ... | main.c:3:9: error: expected declaration specifiers or '...' before '*' token
3 | int len(*s){
| ^
main.c: In function 'main':
main.c:18:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration]
18 | alen = len(a);
| ^~~
|
s685332107 | p03729 | C | #include<stdio.h>
int len(*s){
int len;
while(s){
len++;
}
return len;
}
int main(){
int a[11], b[11], c[11], alen, blen, clen;
scanf("%s %s %s", a, b, c);
alen = len(a);
blen = len(b);
clen = len(c);
if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){
printf("YES\n");
} else {
... | main.c:3:9: error: expected declaration specifiers or '...' before '*' token
3 | int len(*s){
| ^
main.c: In function 'main':
main.c:17:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration]
17 | alen = len(a);
| ^~~
|
s484692601 | p03729 | C | #include<stdio.h>
int len(*s){
int len;
while(s){
len++;
}
return len;
}
int main(){
int a[11], b[11], c[11], alen, blen, clen;
scanf("%s %s %s", &a, &b, &c);
alen = len(a);
blen = len(b);
clen = len(c);
if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){
printf("YES\n");
} else... | main.c:3:9: error: expected declaration specifiers or '...' before '*' token
3 | int len(*s){
| ^
main.c: In function 'main':
main.c:17:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration]
17 | alen = len(a);
| ^~~
|
s356128862 | p03729 | C | #include<stdio.h>
int len(*s){
int len;
while(s){
len++;
}
return len;
}
int main(){
int a[11], b[11], c[11], alen, blen, clen;
scanf("%d %d %d", &a, &b, &c);
alen = len(a);
blen = len(b);
clen = len(c);
if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){
printf("YES\n");
} else... | main.c:3:9: error: expected declaration specifiers or '...' before '*' token
3 | int len(*s){
| ^
main.c: In function 'main':
main.c:17:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration]
17 | alen = len(a);
| ^~~
|
s535044541 | p03729 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
static const int MAX = 200000;
int main()
{
string s0, s1, s2;
cin >> s0 >> s1 >> s2;
if (s0.back() == s1[0] && s1.back == s2[0]) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:43: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to binary 'operator=='
13 | if (s0.back() == s1[0] && s1.back == s2[0]) {
|
s920144661 | p03729 | C++ | #include<bits/stadc++.h>
using namespace std;
int main() {
string s1, s2, s3;
cin >> s1 >> s2 >> s3;
if (s1[s1.size() - 1] == s2[0] && s2[s2.size() - 1] == s3[0]) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
return 0;
} | a.cc:1:9: fatal error: bits/stadc++.h: No such file or directory
1 | #include<bits/stadc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s077420086 | p03729 | C++ | #include<bits/stdc++.h>
#define MAX_N 100001
#define INF_INT 2147483647
#define INF_LL 9223372036854775807
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
const int MOD = 1000000007;
int main()
{
string A,B,C;
cin >> A >> B >> C;
cout << (A[A.siz... | a.cc: In function 'int main()':
a.cc:15:75: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
15 | cout << (A[A.size()-1] == B[0] && B[B.size()-1] == C[0]) ? "YES" : "NO" << endl;
| ... |
s629337852 | p03729 | C |
#include <stdio.h>
int main()
{
long int n,k,max=0,count=0,i,j,min=9999;
char a[100000],b[100000],c[100000];
gets(a);
gets(b);
gets(c);
if(a[strlen(a)-1]==b[0] b[strlen(b)-1]==c[0])
{
printf("YES");
}else{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:8:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | gets(a);
| ^~~~
| fgets
main.c:11:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
11 | if(a[strlen(a)-1... |
s914920620 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
if(a.at(a,size()-1) == b.at(0) && b.at(b.size()-1) == c.at(0)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:17: error: no matching function for call to 'size()'
6 | if(a.at(a,size()-1) == b.at(0) && b.at(b.size()-1) == c.at(0)){
| ~~~~^~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from... |
s752200333 | p03729 | C++ | /*input
async layered coding
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
#... | a.cc: In function 'int main()':
a.cc:61:20: error: 'C' was not declared in this scope
61 | cin>>a>>b>>C;
| ^
a.cc:65:24: error: expected ';' before 'return'
65 | else cout<<"NO"
| ^
| ;
66 | return 0;
... |
s842841546 | p03729 | C | #include<bits/stdc++.h>
using namespace std;
string a,b,c;
int main()
{
cin>>a>>b>>c;
if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0])
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
| main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s267184880 | p03729 | C++ | #include <stdio.h>
#include <string.h>
int main(){
char a[11], b[11], c[11];
scanf("%s",a);
scanf("%s",b);
scanf("%s",c);
int la, lb, lc;
la=strlen(a);
lb=strlen(b);
//lc=strlen(c);
if(a[la-1]==b[0] && b[lb-1]==c[0])
printf("YES\n")
else
printf("NO\n");
}
| a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before 'else'
14 | printf("YES\n")
| ^
| ;
15 | else
| ~~~~
|
s471244855 | p03729 | C++ | #include<stdio.h>
int main()
{
char ar[100],br[100],cr[100];
scanf ("%s %s %s",ar,br,cr);
int p,q,r;
p=strlen(ar);
q=strlen(br);
r=strlen(cr);
if (ar[p-1]==br[0] && br[q-1]==cr[0])
{
printf ("YES\n");
}
else if (ar[p-1]!=br[0] || br[q-1]!=cr[0])
{
printf ("NO... | a.cc: In function 'int main()':
a.cc:7:7: error: 'strlen' was not declared in this scope
7 | p=strlen(ar);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<stdio.h>
+++ |+#include <cstring>
2 | int main... |
s954159145 | p03729 | C++ | #include<stdio.h>
#include<string.h>
int main(){
char ara[10000];
gets(ara);
int f=0;
int n=strlen(ara);
for(int i=0;i<n;i++){
if(ara[i]==' '){
if(ara[i-1]!=ara[i+1]){
f=1;
break;
}
}
}
if(f==0) printf("YES\n... | a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(ara);
| ^~~~
| getw
|
s390953977 | p03729 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include <cassert>
#include<string>
using namespace std;
int main(){
int a = 0, b = 0, c=0, d[100000], e[100000],f=0,g=0,h=0, count = 0;
char rikka,toka[100000];
string mado[100000],saya;
cin >> mado[0]>>mado[1]>>mado[2];
if (mado[0].back()==mado[1].front()&&m... | a.cc: In function 'int main()':
a.cc:12:60: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and '<unresolved overloaded function type>' to binary 'operator=='
12 | if (mado[0].back()==mado[1].front()&&mado[1].back()==mado[2].front) {
| ... |
s413648356 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl;
} | a.cc: In function 'int main()':
a.cc:7:45: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_string<char>::iterator' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl;
... |
s289106213 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string A, B, C;
int H, W;
cin >> A >> B >> C;
if (A[A.length() - 1] == B[B.length() - 1] && B[B.length() - 1] == C[C.length() - 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:86: error: expected ']' before ')' token
10 | if (A[A.length() - 1] == B[B.length() - 1] && B[B.length() - 1] == C[C.length() - 1)
| ^
| ... |
s113069172 | p03729 | C | #include<bits/stdc++.h>
using namespace std;
string a,b,c;
int main(){
cin>>a>>b>>c;
if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]) puts("YES");
else puts("NO");
return 0;
} | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s786744296 | p03729 | Java | import com.sun.applet2.AppletParameters;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scan... | Main.java:1: error: package com.sun.applet2 does not exist
import com.sun.applet2.AppletParameters;
^
1 error
|
s855968309 | p03729 | C++ | #include <iostream>
#include <string>
int main()
{
string A, B, C;
std::cin >> A >> B >> C;
if(A.back() == B.front() && B.back() == C.front()){
std::cout << "YES";
}else{
std::cout << "NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
6 | string A, B, C;
| ^~~~~~
a.cc:6:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/includ... |
s789294795 | p03729 | C | #include <stdio.h>
#include <string.h>
int main(void){
char s[3][11];
int i;
for(i=0;i<3;i++) scanf("%s",s[i]);
if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES");
else printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:7:14: error: request for member 'strlen' in something not a structure or union
7 | if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES");
| ^
main.c:7:44: error: request for member 'strlen' in something not a structure or union
7 | if(... |
s802255694 | p03729 | C | #include <stdio.h>
#include <string.h>
int main(void){
char s[3][11];
int i;
for(i=0;i<3;i++) scanf("%s",s[i]);
if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES");
else printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:7:14: error: request for member 'strlen' in something not a structure or union
7 | if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES");
| ^
main.c:7:46: error: request for member 'strlen' in something not a structure or union
7 | ... |
s462369583 | p03729 | C | #include <stdio.h>
int main(void){
char s[3][11];
int i;
for(i=0;i<3;i++) scanf("%s",s[i]);
if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES");
else printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:6:14: error: request for member 'length' in something not a structure or union
6 | if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES");
| ^
main.c:6:44: error: request for member 'length' in something not a structure or union
6 | if(... |
s366573964 | p03729 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main() {
char a[32], b[32], c[32];
int sa, sb,
scanf("%s", a);
scanf("%s", b);
scanf("%s", c);
sa = strlen(a) - 1;
sb = strlen(b) - 1;
if (a[sa] == b[0] && b[sb] == c[0])
cout << "YES" << endl;
else
cout << "NO" << endl;
... | a.cc: In function 'int main()':
a.cc:10:22: error: expression list treated as compound expression in initializer [-fpermissive]
10 | scanf("%s", a);
| ^
a.cc:10:22: error: invalid conversion from 'char*' to 'int' [-fpermissive]
10 | scanf("%s", a);
| ... |
s053165843 | p03729 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
| ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
8 | if(a[a.size()-1] =... |
s268984489 | p03729 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
cout << "YES" << endl;
}
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
| ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
8 | if(a[a.size()-1] == b[0] && b[b.size()-1... |
s672155119 | p03729 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a[a.size()-1] && b[0]){
if(b[b.size()-1] && c[0]){
}
cout << "YES" << endl;
}
else cout << "NO" << endl;
... | a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
8 | if(a[a.size()-1] && b[0]){
| ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
8 | if(a[a.size()-1] && b[0]){
| ^
a.c... |
s691896306 | p03729 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a[a.size()-1] && b[0]){
if(b[b.size()-1] && c[0]){
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
else c... | a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
8 | if(a[a.size()-1] && b[0]){
| ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
8 | if(a[a.size()-1] && b[0]){
| ^
a.c... |
s027422072 | p03729 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a[a.size()-1] && b[0]){
if(b[b.size()-1] && c[0]{
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
else co... | a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
8 | if(a[a.size()-1] && b[0]){
| ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
8 | if(a[a.size()-1] && b[0]){
| ^
a.c... |
s914126233 | p03729 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a[a.size()-1] && b[0]){
if(b[b.size()-1] && c[0]{
cout << "YES" << endl;
}
}
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
8 | if(a[a.size()-1] && b[0]){
| ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
8 | if(a[a.size()-1] && b[0]){
| ^
a.c... |
s128442672 | p03729 | C++ | #員cぅで<びts・stdc++.h>インtまいん(){
}std::st林gあ、b,c;std::シン>>ア>>b>>c;std::こうt<(あ。場ck()==b【0】||b.場ck()==c【0】)?”YES" : "NO" << std::endl; | a.cc:2:1: error: extended character 、 is not valid in an identifier
2 | }std::st林gあ、b,c;std::シン>>ア>>b>>c;std::こうt<(あ。場ck()==b【0】||b.場ck()==c【0】)?”YES" : "NO" << std::endl;
| ^
a.cc:2:1: error: extended character 。 is not valid in an identifier
a.cc:2:1: error: extended character 【 is not valid in an identifie... |
s149983638 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a.back()==b.front()&&b.back()==c.front()){cout<<"YES"<<endl;}
else{cout<<"NO"<<endl:}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ':' token
8 | else{cout<<"NO"<<endl:}
| ^
| ;
|
s993607079 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a, b, c;
int lena = (int)a.size();
int lemb = (int)b.size();
if(a[lena] == b[0] && b[lenb] == c[0]) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:29: error: 'lenb' was not declared in this scope; did you mean 'lemb'?
10 | if(a[lena] == b[0] && b[lenb] == c[0]) cout << "YES" << endl;
| ^~~~
| lemb
|
s114749903 | p03729 | C++ | #include<iosream>
#include<string>
using namespace std;
int main(void){
string s1,s2,s3;
cin>>s1>>s2>>s3;
if(s1[0]==s2[0]==s3[0])cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
}
| a.cc:1:9: fatal error: iosream: No such file or directory
1 | #include<iosream>
| ^~~~~~~~~
compilation terminated.
|
s158035948 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 1<<30
#define LINF 1ll<<60ll
#define MOD 1000000007
#define pb(a) push_back(a)
#define vi vector<int>
#define vl vector<long long>
#define vvi vector<vi>
#define P pair<int,int>
#define all(vec) (vec.begin()),(vec.end())
typedef long long ll;
typedef unsigned ... | a.cc: In function 'int main()':
a.cc:16:15: error: expected unqualified-id before '(' token
16 | #define sz(x) ((int)(x).size())
| ^
a.cc:29:24: note: in definition of macro 'YES'
29 | #define YES(n) cout<<((n)?"YES":"NO")<<endl
| ^
a.cc:39:13: note: in expansion o... |
s986531353 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a[a.size-1]==b[0]&&b[b.size-1]==c[0]) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:12: 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 unsign... |
s079813282 | p03729 | C++ | #include<iostream>
using namaespace std;
int main()
{
string a,b,c;
if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0])
cout<<"YES";
else
cout<<"NO";
} | a.cc:2:7: error: expected nested-name-specifier before 'namaespace'
2 | using namaespace std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
5 | string a,b,c;
| ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/incl... |
s706017849 | p03729 | C++ | #include <cstdio>
#include <cstring>
using namespace std;
int main(void){
char a[128], b[128], c[128];
scanf("%s%s%s",a,b,c);
puts(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])? "YES":"NO");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:29: error: cannot convert 'bool' to 'const char*'
7 | puts(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])? "YES":"NO");
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
| |
| bool
In file included ... |
s543023147 | p03729 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
string a, b, c;
cin >> a >> b >> c;
if (a.end() == b.begin() && b.end() == c.begin()) cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc:6:3: error: expected initializer before 'string'
6 | string a, b, c;
| ^~~~~~
a.cc:7:9: error: 'cin' does not name a type
7 | cin >> a >> b >> c;
| ^~~
a.cc:9:9: error: expected unqualified-id before 'if'
9 | if (a.end() == b.begin() && b.end() == c.begin()) cout... |
s218295995 | p03729 | C++ | #include <iostream>
int main() {
std::String A, B, C;
std::cin >> A >> B >> C;
if (A.back == B.front && B.back == C.front) {
std::cout << "YES" <<std::endl;
} else {
std::cout << "NO" <<std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:13: error: 'String' is not a member of 'std'; did you mean 'string'?
3 | std::String A, B, C;
| ^~~~~~
| string
a.cc:4:20: error: 'A' was not declared in this scope
4 | std::cin >> A >> B >> C;
| ^
... |
s582521947 | p03729 | C++ | #include <iostream>
int main() {
std::string A, B, C;
std::cin >> A >> B >> C;
if (A.back == B.front && B.back == C.front) {
std::cout << "YES" <<std::endl;
} else {
std::cout << "NO" <<std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:15: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
5 | if (A.back == B.front && B.back == C.front) {
| ~~~~~~ ^~ ~~~~~~~
| | |
| |... |
s640494374 | p03729 | C++ | #include <iostream>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
if (a.back()) == b.front() && b.back() == c.front()){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before '==' token
7 | if (a.back()) == b.front() && b.back() == c.front()){
| ^~
|
s053707900 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
if(a.at(a.size() - 1)==b.at(1){
if(b.at(b.size() - 1)==c.at(1){
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:7:33: error: expected ';' before '{' token
7 | if(a.at(a.size() - 1)==b.at(1){
| ^
| ;
a.cc:13:23: error: expected ')' before ';' token
13 | cout << "NO" << endl;
| ^
... |
s312450072 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b, c;
cin >> a;
cin >> b;
cin >> c;
char d, e, f, g;
int h, i, j;
h = a.size();
i = b.size();
j = c.size();
d = a.at(g-1);
e = b.at(h-1);
f = b.at(1);
g = c.at(1);
if(e == j){
if(f == k){
cout << "YES" << endl;
... | a.cc: In function 'int main()':
a.cc:19:13: error: 'k' was not declared in this scope
19 | if(f == k){
| ^
|
s731489682 | p03729 | C++ | #include <bits/stdc++.h>
#define o(output) cout << output << endl
using namespace std;
string s,t,u;
int a,b,c,d;
int l[13]={0,1,3,1,2,1,2,1,1,2,1,2,1};
char A,B;
priority_queue<int,vector<int>,greater<int> >small;
int main(){
cin >> s >> t >>u;
if(s.back()==t.front()&&t.back()==u.front())o("YES")
else o("NO"... | a.cc: In function 'int main()':
a.cc:16:3: error: expected ';' before 'else'
16 | else o("NO");
| ^~~~
|
s672012222 | p03729 | C++ | #include <bits/stdc++.h>
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a.at(a.size())==b.at(b.size())==c.at(c.size()))
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
3 | string a,b,c;
| ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-li... |
s261659882 | p03729 | C++ | //#include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define INF 93193111451418101
#define MIN -93193111451418101
using namespace s... | a.cc: In function 'int main()':
a.cc:29:5: error: expected initializer before 'ab'
29 | ab=a[a.length()-1];
| ^~
a.cc:32:5: error: 'cf' was not declared in this scope; did you mean 'bf'?
32 | cf=c[0];
| ^~
| bf
a.cc:38:9: error: no match for 'operator<' (operand types are 'st... |
s801873290 | p03729 | C++ |
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
return 0;
}
| a.cc:12:59: error: extended character ” is not valid in an identifier
12 | cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
| ^
a.cc:12:59: error: extended character ” is not valid in an identifier
a.cc:12:65: error: extended chara... |
s100305953 | p03729 | C++ | use std::env;
use std::io::*;
use std::str::*;
fn read<T: FromStr>() -> T {
let stdin = stdin();
let s = stdin.bytes().map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect::<String>();
s.parse::<T>().ok().unwrap()
}
fn main() {... | a.cc:1:1: error: 'use' does not name a type
1 | use std::env;
| ^~~
a.cc:2:1: error: 'use' does not name a type
2 | use std::io::*;
| ^~~
a.cc:3:1: error: 'use' does not name a type
3 | use std::str::*;
| ^~~
a.cc:5:1: error: 'fn' does not name a type
5 | fn read<T: FromStr>() -> T {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.