submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s263185320 | p03729 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int strcmp( const char *A, const char *B){
return strcmp (*(char * const *)A, (*(char * const *)B);
}
int main () {
char A[101];
char B[101];
char C[101];
scanf("%s", A);
scanf("%s", B);
scanf("%s", C);
if ( (strcmp (A[si... | main.c: In function 'strcmp':
main.c:6:60: error: expected ')' before ';' token
6 | return strcmp (*(char * const *)A, (*(char * const *)B);
| ~ ^
| )
main.c:6:61: error: expected ';' ... |
s380484370 | p03729 | C | #include <stdio.h>
int main () {
char A[101];
char B[101];
char C[101];
scanf("%s", A);
scanf("%s", B);
scanf("%s", C);
char aux;
//para ser uma cadeia de palavras, última letra de A, tem que ser igual a última
//de b e a primeira de B tem que ser igual a última de C.
for (int i=0; i<... | main.c: In function 'main':
main.c:16:13: error: expected expression before 'int'
16 | if (int strcmp(const char *A, const char *B && const char *B, const char *C));
| ^~~
main.c:17:25: error: 'YES' undeclared (first use in this function)
17 | printf("\n",YES);
| ... |
s518322478 | p03729 | C | #include <stdio.h>
#include <string.h>
int x,y,z;
int strcmp(const char*a,const char*b,const char*c){
a=*((*char)x), b=*((*char)y) ,c=*((*char)z);
return strcmp(a,b,c);
}
int main(){
char a[18],b[25],c[28];
for(int i=0; i < 18;i++){
scanf("%s",a);
}
for(int j=0;j<25;j++){... | main.c:5:9: error: conflicting types for 'strcmp'; have 'int(const char *, const char *, const char *)'
5 | int strcmp(const char*a,const char*b,const char*c){
| ^~~~~~
In file included from main.c:2:
/usr/include/string.h:156:12: note: previous declaration of 'strcmp' with type 'int(const char *,... |
s190043499 | p03729 | C | #include <stdio.h>
int main () {
char A[99], B[99], C[99];
char S[99];
scanf("%s %s %s", A, B, C);
if ((B[1] == A[]) && (C[1] == B[]))
printf("YES\n");
else
printf("NO\n");
return 0;
}
| main.c: In function 'main':
main.c:8:24: error: expected expression before ']' token
8 | if ((B[1] == A[]) && (C[1] == B[]))
| ^
|
s824963531 | p03729 | C | #include<stdio.h>
#include<string>
int main(void){
char a[10], b[10], c[10];
int am, bm, cm;
am = strlen(a);
bm = strlen(b);
cm = strlen(c);
if(a[am - 1] == b[0] && b[bm - 1] == c[0]) {
printf("YES");
}
else {
printf("NO");
}
return 0;
} | main.c:2:9: fatal error: string: No such file or directory
2 | #include<string>
| ^~~~~~~~
compilation terminated.
|
s351526752 | p03729 | C++ | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
if(a,at(a.size()-1) == b.at(0)){
if(b.at(b.size()-1) == c.at(0)){
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:8:6: error: 'at' was not declared in this scope; did you mean 'a'?
8 | if(a,at(a.size()-1) == b.at(0)){
| ^~
| a
|
s999390132 | p03729 | C++ | #include <bits/stdc++.h>
#include <ctype.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 if (a == b && b == c ) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc:6:14: error: extended character is not valid in an identifier
6 | string a,b,c;
| ^
a.cc: In function 'int main()':
a.cc:6:14: error: '\U00003000' was not declared in this scope
6 | string a,b,c;
| ^~
|
s622066912 | p03729 | C++ | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
int main() {
string a,b,c;
cin >> a >> b >> c;
if(a.at(a.size()-1) == b.at(0)){
if(b.at(b.size()-1) == c.at(0)){
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
else cout << "NO" << endl;
}
| a.cc:6:14: error: extended character is not valid in an identifier
6 | string a,b,c;
| ^
a.cc: In function 'int main()':
a.cc:6:14: error: '\U00003000' was not declared in this scope
6 | string a,b,c;
| ^~
|
s753330801 | p03729 | C++ | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
int main() {
string a,b,c;
cin >> a >> b >> c;
if(a,at(a.size()-1) == b.at(0)){
if(b.at(b.size()-1) == c.at(0)){
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
else cout << "NO" << endl;
}
| a.cc:6:14: error: extended character is not valid in an identifier
6 | string a,b,c;
| ^
a.cc: In function 'int main()':
a.cc:6:14: error: '\U00003000' was not declared in this scope
6 | string a,b,c;
| ^~
a.cc:9:6: error: 'at' was not declared in this scope; did you me... |
s265030189 | p03729 | C++ | 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:1:14: error: extended character is not valid in an identifier
1 | string a,b,c;
| ^
a.cc:1:1: error: 'string' does not name a type
1 | string a,b,c;
| ^~~~~~
a.cc:1:14: error: '\U00003000' does not name a type
1 | string a,b,c;
| ^~
a.cc:3:1: error: expe... |
s208920554 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char a[10]=, b[10], c[10];
cin >> a >> b >> c;
if (a[strlen(a)-1]==b[0] && b[strlen(b)-1] == c[0])
cout << "YES";
else cout << "NO";
} | a.cc: In function 'int main()':
a.cc:5:20: error: expected primary-expression before ',' token
5 | char a[10]=, b[10], c[10];
| ^
a.cc:6:15: error: 'b' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
a.cc:6:20: error: 'c' was not declared in this... |
s062900767 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a=="", b="", c="";
cin >> a >> b >> c;
if (a[a.end()-1]==b[0] && b[b.end()-1] == c[0])
cout << "YES";
else cout << "NO";
} | a.cc: In function 'int main()':
a.cc:5:17: error: expected initializer before '==' token
5 | string a=="", b="", c="";
| ^~
a.cc:6:10: error: 'a' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
a.cc:6:15: error: 'b' was not declared in this scope
6 |... |
s410850666 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b ,c;
char X,Y;
string S1,S2,S3;
cin >>S1 >> S2 >> S3;
if(S1[S.size() - 1] == S2[0] && S2[S2.size() - 1] == S3[0]) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:8:11: error: 'S' was not declared in this scope; did you mean 'S3'?
8 | if(S1[S.size() - 1] == S2[0] && S2[S2.size() - 1] == S3[0]) cout << "YES" << endl;
| ^
| S3
|
s674005780 | 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";
} else {
cout << "NO";
}
} | a.cc: In function 'int main()':
a.cc:6:53: error: expected primary-expression before '==' token
6 | if (A.at(A.size()-1)==B.at(0) && B.at(B.size()-1))==C.at(0)){
| ^~
|
s515837671 | 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";
} else {
cout << "NO";
}
} | a.cc: In function 'int main()':
a.cc:6:53: error: expected primary-expression before '=' token
6 | if (A.at(A.size()-1)==B.at(0) && B.at(B.size()-1))=C.at(0)){
| ^
|
s248619372 | p03729 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <numeric>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#d... | a.cc: In function 'int main()':
a.cc:27:31: error: no matching function for call to 'size()'
27 | if(s[s.size()-1]==d[0]&&d[size()-1]==f[0])cout << "YES";
| ~~~~^~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
... |
s538819661 | p03729 | C++ | #include<iostream>
#include<iomanip>
#include<string>
#include<set>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<functional>
using namespace std;
#define LL long long
#define MOD 100000
#define inf 1999999999
typedef string St;
char stb(char c) { return 'A' + (c - 'a'); }
int main()... | a.cc: In function 'int main()':
a.cc:21:26: 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=='
21 | cout << ((a.back == b[0] && b.back == c[0]) ? (St)"YES" : (St)"NO") << endl;
a.... |
s035981898 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
string a,b,c; cin>>a>>b>>c;
if(a[(a.length - 1)]==b[0]){
if(b[(b.length - 1)]==c[0]) cout<<"YES"<<endl;}
else cout<<"NO"<<endl;
}
| a.cc: In function 'int main()':
a.cc:7: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 unsi... |
s797044076 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
string a,b,c; cin>>a>>b>>c;
if(a[a.length - 1]==b[0]){
if(b[b.length - 1]==c[0]) cout<<"YES"<<endl;}
else cout<<"NO"<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:10: 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 unsi... |
s154160710 | 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:68: error: expected ')' before '{' token
6 | if(A.at(A.size() - 1) == B.at(0) && B.at(B.size() - 1 == C.at(0)) {
| ~ ^~
| )
a.cc:11... |
s675086684 | p03729 | C++ | // #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B, C;
cin >> A >> B >> C;
if(A[A.length()-1]==B[0] && B[B.length()-1]==C[0]){
cout << "YES" <<endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
6 | string A, B, C;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 | // #include <bits/stdc++.h>
a.cc... |
s560002556 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int i = length(A);
int j = length(B);
int k = length(C);
char a = a[0];
char b = b[0];
char c = c[0];
if (a[i] == b[0] && b[j] == c[0]){
cout << "YES" << endl;
}
else {
... | a.cc: In function 'int main()':
a.cc:7:13: error: 'length' was not declared in this scope
7 | int i = length(A);
| ^~~~~~
a.cc:11:15: error: invalid types 'char[int]' for array subscript
11 | char a = a[0];
| ^
a.cc:12:15: error: invalid types 'char[int]' for array s... |
s409235209 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int i = len(A);
int j = len(B);
int k = len(C);
char a = a[0];
char b = b[0];
char c = c[0];
if (a[i] == b[0] && b[j] == c[0]){
cout << "YES" << endl;
}
else {
co... | a.cc: In function 'int main()':
a.cc:7:13: error: 'len' was not declared in this scope
7 | int i = len(A);
| ^~~
a.cc:11:15: error: invalid types 'char[int]' for array subscript
11 | char a = a[0];
| ^
a.cc:12:15: error: invalid types 'char[int]' for array subscript
... |
s212080498 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s,t,u;
cin>>s>>t>>u;
if(s[s.size()-1]==t[0]&&t[t.size()-1]==u[0]){
cout<<"YES<<endl;
}
else{
cout<<"NO"<<endl;
}
}
| a.cc:8:11: warning: missing terminating " character
8 | cout<<"YES<<endl;
| ^
a.cc:8:11: error: missing terminating " character
8 | cout<<"YES<<endl;
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: expected primary-expression before '}' token
9 | }
... |
s839141677 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a[a.length-1]==b[0] && b[b.length-1]==c[0])cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:10: 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 unsi... |
s484047257 | p03729 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
using namespace std;
int main(){
int A, B, C; cin >> A >> B >> C;
string ans = "YES";
if(A.back() != B.front()) ans = "NO... | a.cc: In function 'int main()':
a.cc:17:8: error: request for member 'back' in 'A', which is of non-class type 'int'
17 | if(A.back() != B.front()) ans = "NO";
| ^~~~
a.cc:17:20: error: request for member 'front' in 'B', which is of non-class type 'int'
17 | if(A.back() != B.front()) ans = "NO";
... |
s635117616 | p03729 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#define rep(i,n) for(int i=0;i<(n);i++)
#define psortsecond(A,N) sort(A,A+N,[](const pii &a, const pii &b){return a.second<b.second;});
#define psortfirst(A,N) sort(... | a.cc: In function 'int main()':
a.cc:32:15: error: 'strlen' was not declared in this scope
32 | cout <<(X[strlen(X)-1]==Y[0] && Y[strlen(Y)-1]==Z[0] ? "YES" : "NO")<<endl;;
| ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstrin... |
s777618474 | p03729 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#define rep(i,n) for(int i=0;i<(n);i++)
#define psortsecond(A,N) sort(A,A+N,[](const pii &a, const pii &b){return a.second<b.second;});
#define psortfirst(A,N) sort(... | a.cc: In function 'int main()':
a.cc:32:15: error: 'strlen' was not declared in this scope
32 | cout <<(X[strlen(X)-1]==Y[0] && Y[strlen(Y)-1]==Z[0] ? "YES" : "NO")<<endl;;
| ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstrin... |
s417683210 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >>A>>B>>C;
string Al = A[A.size()-1];
string Bf = B[0];
string Bl = B[B.size()-1];
string Cf = C[0];
string ans;
if(Al==Bf&&Bl==Cf) ans = "YES";
else ans = "NO";
cout <<ans<< endl;
} | a.cc: In function 'int main()':
a.cc:8:27: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
8 | string Al = A[A.size()-1];
| ^
a.cc:9:18: error... |
s147573409 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
int main(){
string A, B, C;
cin >> A >> B >> C;
int a = A.size(), b = B.size();
if(A[a - 1] == B[0] && B[b - 1] == C[0]) cout < "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:9:63: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
9 | if(A[a - 1] == B[0] && B[b - 1] == C[0]) cout < "YES" << endl;
| ~~~~~~^~~~~~~
|
s974457871 | 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.at(b.size()-1) == c.at(0))
cout << "YES" << endl;
else
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:7:70: error: expected ';' before 'cout'
7 | if(a.at(a.size()-1) == b.at(0) && b.at(b.at(b.size()-1) == c.at(0))
| ^
| ;
8 |... |
s950938691 | 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";
else
cout<<"NO";
}
| a.cc: In function 'int main()':
a.cc:6:42: 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,
... |
s529206253 | 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";
else
cout<<"NO";
}
| a.cc: In function 'int main()':
a.cc:6:15: 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 /usr/inclu... |
s418314614 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
cin >> a >>b >> c;
int aa,bb;
aa = a.size() -1;
bb =b.size()-1;
if(a.at(aa) == b.at(0) && b.at(bb) == c.at(0)){
cout << YES << endl;
}
else{
cout << NO << endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:13: error: 'YES' was not declared in this scope
11 | cout << YES << endl;
| ^~~
a.cc:14:13: error: 'NO' was not declared in this scope
14 | cout << NO << endl;
| ^~
|
s696968975 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
cin >> a >>b >> c;
int aa,bb;
aa = a.size() -1;
bb =b.size()-1;
if(a.at(aa) == b.at(0) && b.at(bb) == c.at(0){
cout << YES << endl;
}
else{
cout << NO << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:48: error: expected ')' before '{' token
10 | if(a.at(aa) == b.at(0) && b.at(bb) == c.at(0){
| ~ ^
| )
a.cc:16:6: error: expected primary-expression before '}' token
16... |
s866918553 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
cin >> a >>b >> c;
int aa,bb,
aa = a.size() -1;
bb =b.size()-1;
if(a.at(aa) == b.at(0) && b.at(bb) == c.at(0){
cout << YES << endl;
}
else{
cout << NO << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:3: error: redeclaration of 'int aa'
8 | aa = a.size() -1;
| ^~
a.cc:7:7: note: 'int aa' previously declared here
7 | int aa,bb,
| ^~
a.cc:10:48: error: expected ')' before '{' token
10 | if(a.at(aa) == b.at(0) && b.at(bb) == c.at(0){
| ... |
s224489466 | 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:10:9: error: expected primary-expression before ')' token
10 | else () {
| ^
|
s509101843 | 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:15: error: 'B' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:10:9: error: expected primary-expression before ')' token
10 | else () {
| ^
|
s216367407 | 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:15: error: 'B' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:10:9: error: expected primary-expression before ')' token
10 | else () {
| ^
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:4:11: n... |
s183080673 | 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] == C0]) {
cout << "YES" << endl;
}
else () {
cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:6:15: error: 'B' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:7:48: error: 'C0' was not declared in this scope; did you mean 'C'?
7 | if (A[A.size()-1] = B[0] && B[B.size()-1] == C0]) {
| ... |
s915449817 | 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()] == C0]) {
cout << "YES" << endl;
}
else () {
cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:6:15: error: 'B' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:7:44: error: 'C0' was not declared in this scope; did you mean 'C'?
7 | if (A[A.size()] = B[0] && B[B.size()] == C0]) {
| ... |
s493305310 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,b,C;
cin >> A >> B >> C;
if (A[A.size()] = B[B.size()] && B[B.size()] == C[C.size()]) {
cout << "YES" << endl;
}
else () {
cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:6:15: error: 'B' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:10:9: error: expected primary-expression before ')' token
10 | else () {
| ^
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:4:11: n... |
s390681761 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i)
#define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i)
#define per(i,N) for(int i=(N)-1;i>=0;--i)
#define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i)
#define all(arr) (arr).begin(), (arr).end()
#define S... | a.cc: In function 'int main()':
a.cc:37:10: error: request for member 'length' in 'a', which is of non-class type 'int'
37 | if(a[a.length()-1] == b[0] && b[b.length()-1] == c[0])issat = true;
| ^~~~~~
a.cc:37:26: error: invalid types 'int[int]' for array subscript
37 | if(a[a.length()-1] == b[... |
s272557715 | p03729 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <string>
#include <cctype>
#include <cstdio>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(x) sort(x.begin(),x.end())
#define REVE(x) reverse(x.be... | a.cc: In function 'int main()':
a.cc:32:40: error: expected unqualified-id before '[' token
32 | if(a.size()-1==b[0]&&b.size()-1==c.[0]){
| ^
|
s133984441 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
if (*a.rbegin() == b.at(0) && *b.rbegin == c.at(0)) cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:7:38: error: invalid use of member function 'std::__cxx11::basic_string<char>::rbegin' (did you forget the '()' ?)
7 | if (*a.rbegin() == b.at(0) && *b.rbegin == c.at(0)) cout << "YES" << endl;
| ~~^~~~~~
|
s836685040 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s1,s2,s3;
cin >> s1 >> s2 >> s3;
int x = |s1|-1;
int y = |s2|-1;
int z = |s3|-1;
if(s1[x]==s2[0]&&s2[y]==s3[0]) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before '|' token
7 | int x = |s1|-1;
| ^
a.cc:8:11: error: expected primary-expression before '|' token
8 | int y = |s2|-1;
| ^
a.cc:9:11: error: expected primary-expression before '|' token
9 |... |
s980965875 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
signed main(){
int a,b,c;cin>>a>>b>>c;
if(a.back()==b.front()&&b.back()==c.front())cout<<"YES"<<endl;
else cout<<"NO"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:8: error: request for member 'back' in 'a', which is of non-class type 'int'
6 | if(a.back()==b.front()&&b.back()==c.front())cout<<"YES"<<endl;
| ^~~~
a.cc:6:18: error: request for member 'front' in 'b', which is of non-class type 'int'
6 | if(a.back()==b.... |
s573158822 | p03729 | Java | import java.util.Scanner;
public class Main2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String A = scan.next();
String B = scan.next();
String C = scan.next();
if(A.charAt(A.length()-1) == B.charAt(0) && B.charAt(B.length()-1)==C.charAt(... | Main.java:2: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s533697230 | p03729 | Java | import java.util.Scanner;
public class Main2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String A = scan.next();
String B = scan.next();
String C = scan.next();
if(A.charAt(A.length()-1) == B.charAt(0) && B.charAt(B.length()-1)==C.charAt(... | Main.java:12: error: reached end of file while parsing
}
^
1 error
|
s832228764 | p03729 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String A = scan.next();
String B = scan.next();
String C = scan.next();
if(A.charAt(A.length()-1) == B.charAt(0) && B.charAt(B.length()-1)==C.charAt(0... | Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s977300767 | p03729 | Java | import java.util.Scanner;
public class Main2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String A = scan.next();
String B = scan.next();
String C = scan.next();
if(A.charAt(A.length()-1) == B.charAt(0) && B.charAt(B.length()-1)==C.charAt(... | Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s247596196 | p03729 | C++ | include<bits/std.c++>
using namespace std;
int main(){
string a,b,c;cin>>a>>b>>c;
//bool A=a.at(a.size())==b.at(0);
// bool B=b.at(b.size())==c.at(0);
if(A=a.at(a.size())==b.at(0)&&B=b.at(b.size())==c.at(0))
cout<<"YES";
else
cout<<"NO";
}
| a.cc:1:1: error: 'include' does not name a type
1 | include<bits/std.c++>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
4 | string a,b,c;cin>>a>>b>>c;
| ^~~~~~
a.cc:4:16: error: 'cin' was not declared in this scope
4 | string a,b,c;cin>>... |
s825328030 | 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";
}
else {
cout << "NO";
}
} | a.cc: In function 'int main()':
a.cc:7: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... |
s132590980 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ub upper_bound
#define lb upper_bound
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a... | a.cc: In function 'bool solve()':
a.cc:103:18: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::__cxx11::basic_string<char>::iterator')
103 | if (a.back() == b.begin() && b.back() == c.begin()) {
| ~~~~~~~~... |
s579071840 | p03729 | C++ | read a b c;
[ ${a: -1} = ${b:0:1} -a ${b: -1} = ${c:0:1} ] && echo "YES" || echo "NO" | a.cc:1:1: error: 'read' does not name a type
1 | read a b c;
| ^~~~
a.cc:2:1: error: expected unqualified-id before '[' token
2 | [ ${a: -1} = ${b:0:1} -a ${b: -1} = ${c:0:1} ] && echo "YES" || echo "NO"
| ^
a.cc:2:12: error: expected unqualified-id before '=' token
2 | [ ${a: -1} = ${b:0:1} -a ... |
s568609812 | p03729 | C | #include <stdio.h>
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
int c=0;
while(1){
if(a[c]=='\0')break;
c++;
}
x=c;
c=0;
while(1){
if(b[c]=='\0')break;
c++;
}
y=c;
if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'main':
main.c:6:7: error: conflicting types for 'c'; have 'int'
6 | int c=0;
| ^
main.c:4:20: note: previous declaration of 'c' with type 'char[20]'
4 | char a[20],b[20],c[20];
| ^
|
s319697027 | p03729 | C | #include <stdio.h>
int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
//x=cl(a);
//y=cl(b);
if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:18:1: error: expected declaration or statement at end of input
18 | }
| ^
|
s305436417 | p03729 | C | #include <stdio.h>
/*int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
*/
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
x=cl(a);
y=cl(b);
if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'main':
main.c:13:5: error: implicit declaration of function 'cl' [-Wimplicit-function-declaration]
13 | x=cl(a);
| ^~
|
s674498215 | p03729 | C | #include <stdio.h>
int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
//scanf("%s %s %s",a,b,c);
//x=cl(a);
//y=cl(b);
//if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
//else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s464949889 | p03729 | C | #include <stdio.h>
int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
//x=cl(a);
//y=cl(b);
//if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
//else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s034026584 | p03729 | C | #include <stdio.h>
int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
//x=cl(a);
//y=cl(b);
if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s433368438 | p03729 | C | #include <stdio.h>
int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
x=cl(a);
y=cl(b);
if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s304476185 | p03729 | C | #include <stdio.h>
int cl(char *s){
int c=0;
while(1){
if(s[c]=='\0')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
x=cl(a);
y=cl(b);
if(a[x-1]==b[0] && b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s982361314 | p03729 | C | #include <stdio.h>
int cl(char *a){
int c=0;
while(1){
if(a[c]=='\n')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
x=cl(a);
y=cl(b);
if(a[x-1]==b[0])if(b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'cl':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s998154223 | p03729 | C | #include <stdio.h>
int cl(*char a){
int c=0;
while(1){
if(a[c]=='\n')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
x=cl(a);
y=cl(b);
if(a[x-1]==b[0])if(b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c:2:8: error: expected declaration specifiers or '...' before '*' token
2 | int cl(*char a){
| ^
|
s579218759 | p03729 | C | #include <stdio.h>j
int cl(*char a){
int c=0;
while(1){
if(a[c]=='\n')return c;
c++;
}
int main(){
int x,y;
char a[20],b[20],c[20];
scanf("%s %s %s",a,b,c);
x=cl(a);
y=cl(b);
if(a[x-1]==b[0])if(b[y-1]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c:1:19: warning: extra tokens at end of #include directive
1 | #include <stdio.h>j
| ^
main.c:2:8: error: expected declaration specifiers or '...' before '*' token
2 | int cl(*char a){
| ^
|
s563844997 | p03729 | C | #include <stdio.h>
int main(){
int x,y;
char a[],b[],c[];
scanf("%s %s %s",a,b,c);
x=sizeof(a)/sizeof(a[0]);
y=sizeof(b)/sizeof(b[0]);
if(a[x-2]==b[0])if(b[y-2]==c[0])puts("YES");
else puts("NO");
return 0;
} | main.c: In function 'main':
main.c:4:8: error: array size missing in 'a'
4 | char a[],b[],c[];
| ^
main.c:4:12: error: array size missing in 'b'
4 | char a[],b[],c[];
| ^
main.c:4:16: error: array size missing in 'c'
4 | char a[],b[],c[];
| ^
|
s761954088 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.at(str1.size()-1);
char b = str2.at(0);
char c = str2.at(str2.size()-1);
char d = str3.at(0);
if(a == b && c == d){
cout << Y... | a.cc: In function 'int main()':
a.cc:18:15: error: 'YES' was not declared in this scope
18 | cout << YES << endl;
| ^~~
a.cc:21:15: error: 'NO' was not declared in this scope
21 | cout << NO << endl;
| ^~
|
s214102164 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.at(str1.size()-1);
char b = str2.at(0);
char c = str2.at(str2.size()-1);
char d = str3.at(0)+
if(a == b && c == d){
cout << Y... | a.cc: In function 'int main()':
a.cc:17:9: error: expected primary-expression before 'if'
17 | if(a == b && c == d){
| ^~
|
s407800989 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.at(str1.size()-1);
char b = str2.at(0);
char c = str2.at(str2.size()-1);
char d = str3.at(0)
if(a == b && c == d){
cout << YE... | a.cc: In function 'int main()':
a.cc:17:9: error: expected ',' or ';' before 'if'
17 | if(a == b && c == d){
| ^~
a.cc:20:3: error: 'else' without a previous 'if'
20 | else if( a != b || c!= d) {
| ^~~~
a.cc:21:15: error: 'NO' was not declared in this scope
21 | cout << NO... |
s491414756 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.at(str1.size()-1);
char b = str2.at(0);
char c = str2.at(str2.size()-1);
char d = str3.at(0)
if(a == b && c == d){
cout << YE... | a.cc: In function 'int main()':
a.cc:17:9: error: expected ',' or ';' before 'if'
17 | if(a == b && c == d){
| ^~
a.cc:20:3: error: 'else' without a previous 'if'
20 | else {
| ^~~~
a.cc:21:15: error: 'NO' was not declared in this scope
21 | cout << NO << endl;
| ... |
s547488811 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.end();
char b = str2.begin();
char c = str2.end();
char d = str3.begin()
if(a == b && c == d){
cout << YES << endl;
}
e... | a.cc: In function 'int main()':
a.cc:12:20: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization
12 | char a = str1.end();
| ~~~~~~~~^~
| |
| std::__cxx11::basic_string<char>::iterator
a.cc:13:22: error: ca... |
s478628378 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.end();
char b = str2.at(0);
char c = str2.end();
char d = str3.at(0)
if(a == b && c == d){
cout << YES << endl;
}
else ... | a.cc: In function 'int main()':
a.cc:12:20: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization
12 | char a = str1.end();
| ~~~~~~~~^~
| |
| std::__cxx11::basic_string<char>::iterator
a.cc:14:20: error: ca... |
s006219380 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B , C;
cin >> A >> B >> C;
string str1 = A;
string str2 = B;
string str3 = C;
char a = str1.end();
char b = str2.at(0);
char c = str2.end();
char d = str3.at(0)
if(a == b && c == d){
cout << YES << endl;
}
else ... | a.cc: In function 'int main()':
a.cc:12:20: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization
12 | char a = str1.end();
| ~~~~~~~~^~
| |
| std::__cxx11::basic_string<char>::iterator
a.cc:14:20: error: ca... |
s687899174 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s1, s2, s3; cin >> s1 >> s2 >> s3;
cout << (s1.back() == s2.front() %% s2.back() == s3.front() ? "YES" : "NO");
return 0;
} | a.cc: In function 'int main()':
a.cc:8:37: error: expected primary-expression before '%' token
8 | cout << (s1.back() == s2.front() %% s2.back() == s3.front() ? "YES" : "NO");
| ^
|
s622189178 | 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() - ] == c[0]) {
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:50: error: expected primary-expression before ']' token
8 | if ((a[a.size() - 1] == b[0]) && (b[b.size() - ] == c[0]) {
| ^
a.cc:8:60: error: expected ')' before '{' token
8 | if ((a[a.size() - 1] == b[0]) && (b[b.... |
s459107969 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
cin>>a>>b>>c;
if(a.at(a.sise()-1)==b.at(0)&&b.at(b.sise()-1)==c.at(0)){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
7 | if(a.at(a.sise()-1)==b.at(0)&&b.at(b.sise()-1)==c.at(0)){
| ^~~~
| size
a.cc:7:40: error: 'std::string' {aka 'clas... |
s590027709 | p03729 | C++ | # coding: utf-8
# Your code here!
A, B, C = map(str, input().split())
len_A = len(A)
len_B = len(B)
flag = 0
if A[len_A - 1] == B[0]:
if B[len_B - 1] == C[0]:
flag = 1
print("YES")
if flag == 0:
print("NO") | a.cc:1:3: error: invalid preprocessing directive #coding
1 | # coding: utf-8
| ^~~~~~
a.cc:2:3: error: invalid preprocessing directive #Your
2 | # Your code here!
| ^~~~
a.cc:4:1: error: 'A' does not name a type
4 | A, B, C = map(str, input().split())
| ^
|
s210256914 | p03729 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
String c = scan.next();
String message = "NO";
if(a.endsWith(b.charAt(0) + "")) {
if(b.endsWith(c.charAt(0) + "")) {
message... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s460025674 | p03729 | C++ | #include <cstdio>
#include <cstring>
char end(char* s){
int l = strlen(s);
return s[l-1];
}
int main(){
char A[11], B[11], C[11];
scanf("%s %s %s", A, B, C);
if(end(A)==B[0]&&end(B)==C[0]) printf("YES\n")
else printf("NO\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:12:51: error: expected ';' before 'else'
12 | if(end(A)==B[0]&&end(B)==C[0]) printf("YES\n")
| ^
| ;
13 | else printf("NO\n");
| ~~~~ ... |
s598918890 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, N;
cin >> A >> B >> C;
N % A = 0;
for (int i = 0; i < N; i++) {
int x;
0 < x < (N + 1);
if (A * x % B == C) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:7:5: error: lvalue required as left operand of assignment
7 | N % A = 0;
| ~~^~~
|
s612137329 | p03729 | C | #include <stdio.h>
#include <string.h>
int main() {
ch ch;
char str[11];
scanf("%s", str);
ch = str[strlen(str)-1];
scanf("%s", str);
if(ch != str[0]) {
printf("NO\n");
} else {
ch = str[strlen(str)-1];
scanf("%s", str);
if(ch != str[0]) {
printf("NO\n");
} else {
printf("... | main.c: In function 'main':
main.c:5:3: error: unknown type name 'ch'; did you mean 'char'?
5 | ch ch;
| ^~
| char
|
s043029096 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string 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:7:45: error: extended character – is not valid in an identifier
7 | if (a[a.size() - 1] == b[0] && b[b.size() – 1] == c[0]) {
| ^
a.cc: In function 'int main()':
a.cc:7:44: error: expected ']' before '\U00002013'
7 | if (a[a.size() - 1] == b[0] && b[b.s... |
s396688305 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string str 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:7:45: error: extended character – is not valid in an identifier
7 | if (a[a.size() - 1] == b[0] && b[b.size() – 1] == c[0]) {
| ^
a.cc: In function 'int main()':
a.cc:6:14: error: expected initializer before 'a'
6 | string str a, b, c
| ... |
s543556925 | p03729 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <tuple>
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:14:51: error: expected ';' before 'cout'
14 | if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0] cout << "YES" << endl;
| ^~~~~
| ;
a.cc:15:2: error: expected primary-e... |
s676350500 | p03729 | C++ | a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)
| a.cc:3:12: error: extended character ’ is not valid in an identifier
3 | print(’YES’)
| ^
a.cc:3:12: error: extended character ’ is not valid in an identifier
a.cc:5:7: error: extended character ’ is not valid in an identifier
5 | print(’NO’)
| ^
a.cc:5:7: error: extended chara... |
s315566557 | p03729 | C++ | #include<iostream>
#include<string>
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;
}
| a.cc: In function 'int main()':
a.cc:7:41: error: expected ']' before '_1'
7 | if(a[a.size()-1] == b[0] && b[b.size()_1] == c[0])
| ^~
| ]
a.cc:7:41: error: expected ')' before '_1'
7 | if(a[a.size()-1] == b[0] && b[... |
s890828992 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
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;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:61: error: expected ')' before 'cout'
7 | if((a.at(a.size()-1)==b.at(0)&&(b.at(b.size()-1)==c.at(0))
| ~ ^
| )
8 | cout<<"YES"<<endl;
... |
s189637464 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main{
string a, b, c;
cin >> a >> b >> c;
int an= a.size()-1,bn= b.size()-1,cn= c.size()-1;
if(a.at(an) != b.at(0) ){
cout<< "NO" << endl;
}
else if(a.at(bn)!= c.at(0)){
cout << "NO" << endl;
}
else{
cout << "YES" <<endl;
}
return 0;
} | a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main{
| ^~~~
a.cc:6:16: error: expected primary-expression before 'a'
6 | string a, b, c;
| ^
a.cc:6:16: error: expected '}' before 'a'
a.cc:5:9: note: to match this '{'
5 | int main{
| ... |
s430170266 | p03729 | C++ | #include <iostream>
using namespace std;
int main{
string a, b, c;
cin >> a >> b >> c;
int an= a.size()-1,bn= b.size()-1,cn= c.size()-1;
if(a.at(an) != b.at(0) ){
cout<< "NO" << endl;
}
else if(a.at(bn)!= c.at(0)){
cout << "NO" << endl;
}
else{
cout << "YES" <<endl;
}
return 0;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main{
| ^~~~
a.cc:5:16: error: expected primary-expression before 'a'
5 | string a, b, c;
| ^
a.cc:5:16: error: expected '}' before 'a'
a.cc:4:9: note: to match this '{'
4 | int main{
| ... |
s427409337 | p03729 | C++ | #include <iostream>
using namespace std;
int main{
string a, b, c;
cin >> a >> b >> c;
an= a.size()-1;
bn= b.size()-1;
cn= c.size()-1;
if(a.at(an) != b.at(0) ){
cout<< "NO" << endl;
}
else if(a.at(bn)!= c.at(0)){
cout << "NO" << endl;
}
else{cout << "YES" <<endl;
}
return 0;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main{
| ^~~~
a.cc:5:16: error: expected primary-expression before 'a'
5 | string a, b, c;
| ^
a.cc:5:16: error: expected '}' before 'a'
a.cc:4:9: note: to match this '{'
4 | int main{
| ... |
s438830437 | p03729 | C++ | #include <iostream>
using namespace std;
int main{
string a, b, c;
cin >> a >> b >> c;
an= a.size()-1
bn= b.size()-1
cn= c.size()-1
if(a.at(an) != b.at(0) ){
cout<< "NO" << endl;
}
else if(a.at(bn)!= c.at(0)){
cout << "NO" << endl;
}
else{cout << "YES" <<endl;
}
return 0;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main{
| ^~~~
a.cc:5:16: error: expected primary-expression before 'a'
5 | string a, b, c;
| ^
a.cc:5:16: error: expected '}' before 'a'
a.cc:4:9: note: to match this '{'
4 | int main{
| ... |
s970031195 | 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(1)){
cout << "YES";
else {cout << "NO";}
}
| a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
9 | else {cout << "NO";}
| ^~~~
a.cc:7:64: note: to match this '{'
7 | if(A.at(A.size()-1) == B.at(0)&&B.at(B.size()-1) == C.at(1)){
| ^
|
s777615365 | 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(1)){
cout << YES;
else {cout << NO;}
}
| a.cc: In function 'int main()':
a.cc:8:13: error: 'YES' was not declared in this scope
8 | cout << YES;
| ^~~
a.cc:9:5: error: expected '}' before 'else'
9 | else {cout << NO;}
| ^~~~
a.cc:7:64: note: to match this '{'
7 | if(A.at(A.size()-1) == B.at(0)&&B.at(B.size()-... |
s202736789 | p03729 | C++ | #include <iostream>
#include <algorithm>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(){
string a, b, c;
cin>>a>>b>>c;
an = a.size();
bn = b.size();
cn = c.size();
if(a[an-1] == b[0] && b[bn-1] == c[0]){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;... | a.cc: In function 'int main()':
a.cc:10:5: error: 'an' was not declared in this scope; did you mean 'a'?
10 | an = a.size();
| ^~
| a
a.cc:11:5: error: 'bn' was not declared in this scope; did you mean 'b'?
11 | bn = b.size();
| ^~
| b
a.cc:12:5: error: 'cn' was not... |
s517389236 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const int MAX = (int)(1e5 + 5);
const ll INF = (ll)(1e10 + 5);
string a, b, c;
int main(void) {
// Here your code !
cin >> a >> b >> c;
if (a.back() == b[0] && b.back() == c[0]) {
printf("YES\n");
}
else {
printf("NO\n", );
... | a.cc: In function 'int main()':
a.cc:19:20: error: expected primary-expression before ')' token
19 | printf("NO\n", );
| ^
|
s883851382 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a.at(s.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:8:11: error: 's' was not declared in this scope
8 | if(a.at(s.size()-1)==b.at(0)&&b.at(b.size()-1)==c.at(0))
| ^
|
s092466439 | p03729 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a[a.length-1]==b[0]&&b[b.length-1]==c[0])
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:10: 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 unsi... |
s524458735 | 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 {
count << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:11: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [3]' to binary 'operator<<'
9 | count << "NO" << endl;
| ~~~~~~^~~~~~~
|
s522228309 | 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 count << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [3]' to binary 'operator<<'
9 | else count << "NO" << endl;
| ~~~~~~^~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.