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[sizeof(A)],B[0]) ==0 ) && (strcmp (B[sizeof(B)],C[0])==0) ){ printf("YES"); } else { printf("NO"); } return 0; }
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 ';' before '}' token 6 | return strcmp (*(char * const *)A, (*(char * const *)B); | ^ | ; 7 | } | ~ main.c: In function 'main': main.c:22:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 22 | if ( (strcmp (A[sizeof(A)],B[0]) ==0 ) && (strcmp (B[sizeof(B)],C[0])==0) ){ | ~^~~~~~~~~~~ | | | char main.c:5:25: note: expected 'const char *' but argument is of type 'char' 5 | int strcmp( const char *A, const char *B){ | ~~~~~~~~~~~~^ main.c:22:33: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 22 | if ( (strcmp (A[sizeof(A)],B[0]) ==0 ) && (strcmp (B[sizeof(B)],C[0])==0) ){ | ~^~~ | | | char main.c:5:40: note: expected 'const char *' but argument is of type 'char' 5 | int strcmp( const char *A, const char *B){ | ~~~~~~~~~~~~^ main.c:22:57: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 22 | if ( (strcmp (A[sizeof(A)],B[0]) ==0 ) && (strcmp (B[sizeof(B)],C[0])==0) ){ | ~^~~~~~~~~~~ | | | char main.c:5:25: note: expected 'const char *' but argument is of type 'char' 5 | int strcmp( const char *A, const char *B){ | ~~~~~~~~~~~~^ main.c:22:70: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 22 | if ( (strcmp (A[sizeof(A)],B[0]) ==0 ) && (strcmp (B[sizeof(B)],C[0])==0) ){ | ~^~~ | | | char main.c:5:40: note: expected 'const char *' but argument is of type 'char' 5 | int strcmp( const char *A, const char *B){ | ~~~~~~~~~~~~^
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<100; i++){ if (int strcmp(const char *A, const char *B && const char *B, const char *C)); printf("\n",YES); } if else{ printf ("\n", NO); } return 0; }
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); | ^~~ main.c:17:25: note: each undeclared identifier is reported only once for each function it appears in main.c:19:8: error: expected '(' before 'else' 19 | if else{ | ^~~~ | (
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++){ scanf("%s",b); } for (int k=0;k<28;k++){ scanf("%s",c); } if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ printf("YES\n"); } else{ printf("NO\n"); } return 0; }
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 *, const char *)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ^~~~~~ main.c: In function 'strcmp': main.c:6:11: error: expected expression before 'char' 6 | a=*((*char)x), b=*((*char)y) ,c=*((*char)z); | ^~~~ main.c:6:16: error: expected ')' before 'x' 6 | a=*((*char)x), b=*((*char)y) ,c=*((*char)z); | ~ ^ | ) main.c:6:26: error: expected expression before 'char' 6 | a=*((*char)x), b=*((*char)y) ,c=*((*char)z); | ^~~~ main.c:6:31: error: expected ')' before 'y' 6 | a=*((*char)x), b=*((*char)y) ,c=*((*char)z); | ~ ^ | ) main.c:6:41: error: expected expression before 'char' 6 | a=*((*char)x), b=*((*char)y) ,c=*((*char)z); | ^~~~ main.c:6:46: error: expected ')' before 'z' 6 | a=*((*char)x), b=*((*char)y) ,c=*((*char)z); | ~ ^ | ) main.c: In function 'main': main.c:29:23: error: 'n' undeclared (first use in this function) 29 | if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ | ^ main.c:29:23: note: each undeclared identifier is reported only once for each function it appears in main.c:29:29: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 29 | if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ | ~^~~ | | | char main.c:5:40: note: expected 'const char *' but argument is of type 'char' 5 | int strcmp(const char*a,const char*b,const char*c){ | ~~~~~~~~~~~^ main.c:29:14: error: too few arguments to function 'strcmp' 29 | if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ | ^~~~~~ main.c:5:9: note: declared here 5 | int strcmp(const char*a,const char*b,const char*c){ | ^~~~~~ main.c:29:51: error: 'j' undeclared (first use in this function) 29 | if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ | ^ main.c:29:57: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 29 | if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ | ~^~~ | | | char main.c:5:40: note: expected 'const char *' but argument is of type 'char' 5 | int strcmp(const char*a,const char*b,const char*c){ | ~~~~~~~~~~~^ main.c:29:42: error: too few arguments to function 'strcmp' 29 | if ((strcmp(a[n-1],b[1])==0) && (strcmp(b[j-1],c[1])==0)){ | ^~~~~~ main.c:5:9: note: declared here 5 | int strcmp(const char*a,const char*b,const char*c){ | ^~~~~~
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 mean 'a'? 9 | if(a,at(a.size()-1) == b.at(0)){ | ^~ | a
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: expected unqualified-id before 'if' 3 | if(a.end() == b.begin() && b.end() == c.begin())cout << "YES" << endl; | ^~ a.cc:4:1: error: expected unqualified-id before 'else' 4 | else cout << "NO" << endl; | ^~~~
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 scope 6 | cin >> a >> b >> c; | ^
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 | cin >> a >> b >> c; | ^ a.cc:6:20: error: 'c' was not declared in this scope 6 | cin >> a >> b >> c; | ^
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) #define Repone(j,n) for(int j=1;j<(int)(n);++j) #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v).rend() #define int long long #define pb(a) push_back(a) #define eraser(v,i) (v).erase(v.begin()+(i)) #define pbpair(a,b) push_back(make_pair(a,b)) #define MOD 1000000007 #define INF 9223372036854775807 #define pairint pair<int,int> int num[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; bool uru(int checkyear){if(checkyear%4==0){if(checkyear%100!=0||checkyear%400==0)return true;}return false;} int gcd( int x, int y ){return y ? gcd(y, x%y) : x;} signed main() { int x=0,y=0,z=0,w=0,n=0,m=0; string s,d,f; cin>>s>>d>>f; if(s[s.size()-1]==d[0]&&d[size()-1]==f[0])cout << "YES"; else cout<< "NO"; }
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, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 262 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided
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() { St a, b, c; cin >> a >> b >> c; cout << ((a.back == b[0] && b.back == c[0]) ? (St)"YES" : (St)"NO") << endl; return 0; }
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.cc:21:44: 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;
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 unsigned int]' (did you forget the '()' ?) 7 | if(a[(a.length - 1)]==b[0]){ | ~~^~~~~~ | () a.cc:8:12: 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 unsigned int]' (did you forget the '()' ?) 8 | if(b[(b.length - 1)]==c[0]) cout<<"YES"<<endl;} | ~~^~~~~~ | ()
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 unsigned int]' (did you forget the '()' ?) 7 | if(a[a.length - 1]==b[0]){ | ~~^~~~~~ | () a.cc:8: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 unsigned int]' (did you forget the '()' ?) 8 | if(b[b.length - 1]==c[0]) cout<<"YES"<<endl;} | ~~^~~~~~ | ()
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:1: error: expected primary-expression before '}' token 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:7:5: error: 'cin' was not declared in this scope 7 | cin >> A >> B >> C; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | // #include <bits/stdc++.h> a.cc:7:12: error: 'A' was not declared in this scope 7 | cin >> A >> B >> C; | ^ a.cc:7:17: error: 'B' was not declared in this scope 7 | cin >> A >> B >> C; | ^ a.cc:7:22: error: 'C' was not declared in this scope 7 | cin >> A >> B >> C; | ^ a.cc:10:9: error: 'cout' was not declared in this scope 10 | cout << "YES" <<endl; | ^~~~ a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:25: error: 'endl' was not declared in this scope 10 | cout << "YES" <<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | // #include <bits/stdc++.h> a.cc:13:9: error: 'cout' was not declared in this scope 13 | cout << "NO" << endl; | ^~~~ a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:25: error: 'endl' was not declared in this scope 13 | cout << "NO" << endl; | ^~~~ a.cc:13:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
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 { cout << "NO" << endl; } }
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 subscript 12 | char b = b[0]; | ^ a.cc:13:15: error: invalid types 'char[int]' for array subscript 13 | char c = c[0]; | ^ a.cc:15:10: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^ a.cc:15:18: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^ a.cc:15:26: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^ a.cc:15:34: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^
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 { cout << "NO" << endl; } }
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 12 | char b = b[0]; | ^ a.cc:13:15: error: invalid types 'char[int]' for array subscript 13 | char c = c[0]; | ^ a.cc:15:10: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^ a.cc:15:18: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^ a.cc:15:26: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^ a.cc:15:34: error: invalid types 'char[int]' for array subscript 15 | if (a[i] == b[0] && b[j] == c[0]){ | ^
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 unsigned int]' (did you forget the '()' ?) 7 | if(a[a.length-1]==b[0] && b[b.length-1]==c[0])cout<<"Yes"<<endl; | ~~^~~~~~ | () a.cc:7:33: 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 unsigned int]' (did you forget the '()' ?) 7 | if(a[a.length-1]==b[0] && b[b.length-1]==c[0])cout<<"Yes"<<endl; | ~~^~~~~~ | ()
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"; if(B.back() != C.front()) ans = "NO"; cout << ans << endl; }
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"; | ^~~~~ a.cc:18:8: error: request for member 'back' in 'B', which is of non-class type 'int' 18 | if(B.back() != C.front()) ans = "NO"; | ^~~~ a.cc:18:20: error: request for member 'front' in 'C', which is of non-class type 'int' 18 | if(B.back() != C.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,A+N,[](const pii &a, const pii &b){return a.first<b.first;}); #define All(x) (x).begin(),(x).end() using namespace std; using pii = pair<int,int>; long long gcd(long long a, long long b){return (b == 0 ? a : gcd(b, a%b));} long long lcm(long long a, long long b){return a*b/gcd(a,b);} typedef long long ll; #define MOD 1000000007 #define EPS 10e-8 // int main() { // ll A[6]; // rep(i,3){ // cin >> A[i]; // } // //sort(A,A+3); // cout << (A[2]>=A[0] && A[2]<=A[1] ? "Yes" : "No") << endl; // } int main(){ char X[108],Y[108],Z[108];cin >> X >> Y >> Z; cout <<(X[strlen(X)-1]==Y[0] && Y[strlen(Y)-1]==Z[0] ? "YES" : "NO")<<endl;; }
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 <cstring>' 8 | #include <functional> +++ |+#include <cstring> 9 | #define rep(i,n) for(int i=0;i<(n);i++)
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,A+N,[](const pii &a, const pii &b){return a.first<b.first;}); #define All(x) (x).begin(),(x).end() using namespace std; using pii = pair<int,int>; long long gcd(long long a, long long b){return (b == 0 ? a : gcd(b, a%b));} long long lcm(long long a, long long b){return a*b/gcd(a,b);} typedef long long ll; #define MOD 1000000007 #define EPS 10e-8 // int main() { // ll A[6]; // rep(i,3){ // cin >> A[i]; // } // //sort(A,A+3); // cout << (A[2]>=A[0] && A[2]<=A[1] ? "Yes" : "No") << endl; // } int main(){ char X[108],Y[108],Z[108];cin >> X >> Y >> Z; cout <<(X[strlen(X)-1]==Y[0] && Y[strlen(Y)-1]==Z[0] ? "YES" : "NO")<<endl;; }
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 <cstring>' 8 | #include <functional> +++ |+#include <cstring> 9 | #define rep(i,n) for(int i=0;i<(n);i++)
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: 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 9 | string Bf = B[0]; | ^ a.cc:10: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 10 | string Bl = B[B.size()-1]; | ^ a.cc:11:18: 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 11 | string Cf = C[0]; | ^
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 | cout << "YES" << endl; | ~~~~ a.cc:9:3: error: expected primary-expression before 'else' 9 | else | ^~~~ a.cc:8:27: error: expected ')' before 'else' 8 | cout << "YES" << endl; | ^ | ) 9 | else | ~~~~ a.cc:7:5: note: to match this '(' 7 | if(a.at(a.size()-1) == b.at(0) && b.at(b.at(b.size()-1) == c.at(0)) | ^
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, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 262 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided
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/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 262 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided 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)) | ~~~~^~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 262 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided
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){ | ~ ^ | ) a.cc:16:6: error: expected primary-expression before '}' token 16 | } | ^
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: note: to match this '{' 4 | int main(){ | ^
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]) { | ^~ | C a.cc:7:50: error: expected ')' before ']' token 7 | if (A[A.size()-1] = B[0] && B[B.size()-1] == C0]) { | ~ ^ | ) a.cc:7:50: error: expected primary-expression before ']' token 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: note: to match this '{' 4 | int main(){ | ^
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]) { | ^~ | C a.cc:7:46: error: expected ')' before ']' token 7 | if (A[A.size()] = B[0] && B[B.size()] == C0]) { | ~ ^ | ) a.cc:7:46: error: expected primary-expression before ']' token 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: note: to match this '{' 4 | int main(){ | ^
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: note: to match this '{' 4 | int main(){ | ^
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 SP << " " << #define SPF << " " #define SPEEDUP cin.tie(0);ios::sync_with_stdio(false); #define MAX_I INT_MAX //1e9 #define MIN_I INT_MIN //-1e9 #define MAX_UI UINT_MAX //1e9 #define MAX_LL LLONG_MAX //1e18 #define MIN_LL LLONG_MIN //-1e18 #define MAX_ULL ULLONG_MAX //1e19 typedef long long ll; typedef pair<int,int> PII; typedef pair<char,char> PCC; typedef pair<ll,ll> PLL; typedef pair<char,int> PCI; typedef pair<int,char> PIC; typedef pair<ll,int> PLI; typedef pair<int,ll> PIL; typedef pair<ll,char> PLC; typedef pair<char,ll> PCL; inline void YesNo(bool b){ cout << (b?"Yes" : "No") << endl;} inline void YESNO(bool b){ cout << (b?"YES" : "NO") << endl;} inline void Yay(bool b){ cout << (b?"Yay!" : ":(") << endl;} int main(void){ SPEEDUP cout << setprecision(15); int a,b,c;cin >> a >> b >> c; bool issat = false; if(a[a.length()-1] == b[0] && b[b.length()-1] == c[0])issat = true; YESNO(issat); return 0; }
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[0] && b[b.length()-1] == c[0])issat = true; | ^ a.cc:37:37: error: request for member 'length' in 'b', 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:53: error: invalid types 'int[int]' for array subscript 37 | if(a[a.length()-1] == b[0] && b[b.length()-1] == c[0])issat = true; | ^
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.begin(),x.end()) #define all(x) (x).begin(),(x).end() #define fst first #define mp make_pair #define pb push_back #define eb emplace_back #define pob pop_back #define sw swap #define UP(x) transform(x.begin(),x.end(),x.begin() ,::toupper); #define down(x) transform(x.begin(),x.end(),x.begin() ,::tolower); using LL = long long; using ULL = unsigned long long; #define FOR(i, m, n) for(int i = m;i < n;i++) template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;} template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} int main(){ string n,a,b,c; cin >> a >>b >> c; if(a.size()-1==b[0]&&b.size()-1==c.[0]){ cout <<"YES"; }else{ cout <<"NO"; } }
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 | int z = |s3|-1; | ^
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.front()&&b.back()==c.front())cout<<"YES"<<endl; | ^~~~~ a.cc:6:29: error: request for member 'back' in 'b', which is of non-class type 'int' 6 | if(a.back()==b.front()&&b.back()==c.front())cout<<"YES"<<endl; | ^~~~ a.cc:6:39: error: request for member 'front' in 'c', which is of non-class type 'int' 6 | if(a.back()==b.front()&&b.back()==c.front())cout<<"YES"<<endl; | ^~~~~
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(0)){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
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(0)){ System.out.println("YES"); }else{ System.out.println("NO"); }
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)){ System.out.println("YES"); }else{ System.out.println("NO"); } }
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(0)){ System.out.println("YES"); }else{ System.out.println("NO"); } }
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>>a>>b>>c; | ^~~ a.cc:4:21: error: 'a' was not declared in this scope 4 | string a,b,c;cin>>a>>b>>c; | ^ a.cc:4:24: error: 'b' was not declared in this scope 4 | string a,b,c;cin>>a>>b>>c; | ^ a.cc:4:27: error: 'c' was not declared in this scope 4 | string a,b,c;cin>>a>>b>>c; | ^ a.cc:7:6: error: 'A' was not declared in this scope 7 | if(A=a.at(a.size())==b.at(0)&&B=b.at(b.size())==c.at(0)) | ^ a.cc:7:33: error: 'B' was not declared in this scope 7 | if(A=a.at(a.size())==b.at(0)&&B=b.at(b.size())==c.at(0)) | ^ a.cc:8:5: error: 'cout' was not declared in this scope 8 | cout<<"YES"; | ^~~~ a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout<<"NO"; | ^~~~
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 unsigned int]' (did you forget the '()' ?) 7 | if(a[a.size-1]==b[0] && b[b.size-1]==c[0]) { | ~~^~~~ | () a.cc:7:33: 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 unsigned int]' (did you forget the '()' ?) 7 | if(a[a.size-1]==b[0] && b[b.size-1]==c[0]) { | ~~^~~~ | ()
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).rbegin(),(a).rend() #define SORT(c) sort((c).begin(),(c).end()) #define ve vector #define vi vector<int> #define vp vector<pair<int,int>> #define vvi vector<vector<int>> typedef long long ll; const ll INF = LLONG_MAX - 100; const ll mod = 1e9 + 7; const int MAX_N = 2e5 + 5; int dx[] = {-1,0,1,0}, dy[] = {0,1,0,-1}; vector<ll> prime; int fac[MAX_N], inv[MAX_N]; template <class T = ll> T in() {T x; cin >> x; return (x);} void DEBUG(vector<int> a) {for(int i=0;i<a.size();i++)cout<<a[i]<<" ";cout<<endl;} ll GCD(ll a, ll b) {ll c; while (b != 0) {c = a % b; a = b; b = c;}return a;} ll LCM(ll a, ll b) {return a * b / GCD(a, b);} ll POW(ll a, ll b, bool usemod = true) {ll c = 1LL; while (b > 0) {if (b & 1LL) {if(!usemod)c*=a;else c = a * c%mod;}if (!usemod) a*=a;else a = a * a%mod; b >>= 1LL;}return c;} void _nCr() {fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) {fac[i] = fac[i - 1LL] * i%mod;}for (int i = 0; i < MAX_N; i++) {inv[i] = POW(fac[i], mod - 2);}} ll nCr(ll n, ll r) {return (fac[n] * inv[r] % mod)*inv[n - r] % mod;} void PRI(ll n) {bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) {a[i] = 1LL;}for (int i = 2; i < n + 1LL; i++) {if (a[i]) {prime.pb(i); ll b = i; while (b <= n) {a[b] = 0; b += i;}}}} template <typename T> T chmin(T& a, T b) {if(a>b)a=b;return a;} template <typename T> T chmax(T& a, T b) {if(a<b)a=b;return b;} class LazySegTree { public: int p = 2; vector<int> node, lazy; vector<bool> islazy; LazySegTree(vector<int> &A) { while (A.size() > p) p *= 2; node = vector<int>(2*p-1,INF); lazy = vector<int>(2*p-1,INF); islazy = vector<bool>(2*p-1,false); for (int i = 0;i < A.size();i++) { node[p-1+i] = A[i]; } for (int i = p - 2;i >= 0;i--) { node[i] = min(node[i*2+1],node[i*2+2]); } } void eval(int k, int l, int r) { //値の伝播 if (islazy[k]) { node[k] = min(node[k],lazy[k]); if (r - l > 1) { lazy[k*2+1] = lazy[k*2+2] = lazy[k]; islazy[k*2+1] = islazy[k*2+1] = true; } islazy[k] = false; lazy[k] = INF; } } void update(int L, int R, ll x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = p; //k番ノードに遅延評価 eval(k, l, r); if (R <= l || r <= L) return; if (L <= l && r <= R) { islazy[k] = true; lazy[k] = min(lazy[k],x); eval(k,l,r); } else { update(L, R, x, 2*k+1, l, (l+r)/2); update(L, R, x, 2*k+2, (l+r)/2, r); node[k] = min(node[2*k+1],node[2*k+2]); } } int getval(int start,int end,int k = 0,int l = 0,int r = -1) { if (r < 0) r = p; if (start <= l && r <= end) {return node[k];} if (r <= start || end <= l) {return INF;} int L,R; L = getval(start,end,k*2+1,l,(l+r)/2); R = getval(start,end,k*2+2,(l+r)/2,r); return {min(L,R)}; } }; bool solve() { string a,b,c;cin >> a >> b >> c; if (a.back() == b.begin() && b.back() == c.begin()) { cout << "YES" << endl; } else { cout << "NO" << endl; } } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
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()) { | ~~~~~~~~ ^~ ~~~~~~~~~ | | | | | std::__cxx11::basic_string<char>::iterator | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:103:29: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:103:29: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 103 | if (a.back() == b.begin() && b.back() == c.begin()) { | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:103:29: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_typ
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 ${b: -1} = ${c:0:1} ] && echo "YES" || echo "NO" | ^ a.cc:2:23: 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:35: 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:46: error: expected unqualified-id before ']' token 2 | [ ${a: -1} = ${b:0:1} -a ${b: -1} = ${c:0:1} ] && echo "YES" || echo "NO" | ^
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 << YES << endl; } else if( a != b || c!= d) { cout << NO << endl; } }
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 << YES << endl; } else if( a != b || c!= d) { cout << NO << endl; } }
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 << YES << endl; } else if( a != b || c!= d) { cout << NO << endl; } } }
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 << endl; | ^~ a.cc: At global scope: a.cc:28:1: error: expected declaration before '}' token 28 | } | ^
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 << YES << endl; } else { cout << NO << endl; } } }
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; | ^~ a.cc: At global scope: a.cc:28:1: error: expected declaration before '}' token 28 | } | ^
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; } else { cout << NO << endl; } } }
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: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization 13 | char b = str2.begin(); | ~~~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator a.cc:14:20: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization 14 | char c = str2.end(); | ~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator a.cc:15:22: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization 15 | char d = str3.begin() | ~~~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator 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; | ^~ a.cc: At global scope: a.cc:28:1: error: expected declaration before '}' token 28 | } | ^
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 { cout << NO << endl; } }
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: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization 14 | char c = str2.end(); | ~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator 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; | ^~
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 { cout << NO << endl; } } }
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: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'char' in initialization 14 | char c = str2.end(); | ~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator 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; | ^~ a.cc: At global scope: a.cc:28:1: error: expected declaration before '}' token 28 | } | ^
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.size() - ] == c[0]) { | ~ ^~ | ) a.cc:14:1: error: expected primary-expression before '}' token 14 | } | ^
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 '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
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 = "YES"; } } System.out.println(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("YES\n"); } } return 0; }
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.size() – 1] == c[0]) { | ^~ | ] a.cc:7:44: error: expected ')' before '\U00002013' 7 | if (a[a.size() - 1] == b[0] && b[b.size() – 1] == c[0]) { | ~ ^~ | ) a.cc:7:48: error: expected primary-expression before ']' token 7 | if (a[a.size() - 1] == b[0] && b[b.size() – 1] == c[0]) { | ^
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 | ^ a.cc:9:5: error: 'else' without a previous 'if' 9 | } else { | ^~~~
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-expression before 'else' 15 | else cout << "NO" << endl; | ^~~~ a.cc:14:74: error: expected ')' before 'else' 14 | if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0] cout << "YES" << endl; | ~ ^ | ) 15 | else cout << "NO" << endl; | ~~~~
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 character ’ is not valid in an identifier a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = input().split() | ^
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[b.size()_1] == c[0]) | ~ ^~ | ) a.cc:7:43: error: expected primary-expression before ']' token 7 | if(a[a.size()-1] == b[0] && b[b.size()_1] == c[0]) | ^
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; | ~~~~ a.cc:8:22: error: expected ')' before ';' token 8 | cout<<"YES"<<endl; | ^ | ) a.cc:7:5: note: to match this '(' 7 | if((a.at(a.size()-1)==b.at(0)&&(b.at(b.size()-1)==c.at(0)) | ^
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{ | ^ a.cc:7:9: error: 'cin' does not name a type 7 | cin >> a >> b >> c; | ^~~ a.cc:8:17: error: 'a' was not declared in this scope; did you mean 'an'? 8 | int an= a.size()-1,bn= b.size()-1,cn= c.size()-1; | ^ | an a.cc:9:9: error: expected unqualified-id before 'if' 9 | if(a.at(an) != b.at(0) ){ | ^~ a.cc:12:9: error: expected unqualified-id before 'else' 12 | else if(a.at(bn)!= c.at(0)){ | ^~~~ a.cc:15:9: error: expected unqualified-id before 'else' 15 | else{ | ^~~~ a.cc:19:9: error: expected unqualified-id before 'return' 19 | return 0; | ^~~~~~ a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
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{ | ^ a.cc:6:9: error: 'cin' does not name a type 6 | cin >> a >> b >> c; | ^~~ a.cc:7:17: error: 'a' was not declared in this scope; did you mean 'an'? 7 | int an= a.size()-1,bn= b.size()-1,cn= c.size()-1; | ^ | an a.cc:8:9: error: expected unqualified-id before 'if' 8 | if(a.at(an) != b.at(0) ){ | ^~ a.cc:11:9: error: expected unqualified-id before 'else' 11 | else if(a.at(bn)!= c.at(0)){ | ^~~~ a.cc:14:9: error: expected unqualified-id before 'else' 14 | else{ | ^~~~ a.cc:18:9: error: expected unqualified-id before 'return' 18 | return 0; | ^~~~~~ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
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{ | ^ a.cc:6:9: error: 'cin' does not name a type 6 | cin >> a >> b >> c; | ^~~ a.cc:7:9: error: 'an' does not name a type 7 | an= a.size()-1; | ^~ a.cc:8:9: error: 'bn' does not name a type 8 | bn= b.size()-1; | ^~ a.cc:9:9: error: 'cn' does not name a type 9 | cn= c.size()-1; | ^~ a.cc:10:9: error: expected unqualified-id before 'if' 10 | if(a.at(an) != b.at(0) ){ | ^~ a.cc:13:9: error: expected unqualified-id before 'else' 13 | else if(a.at(bn)!= c.at(0)){ | ^~~~ a.cc:16:9: error: expected unqualified-id before 'else' 16 | else{cout << "YES" <<endl; | ^~~~ a.cc:21:9: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
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{ | ^ a.cc:6:9: error: 'cin' does not name a type 6 | cin >> a >> b >> c; | ^~~ a.cc:7:9: error: 'an' does not name a type 7 | an= a.size()-1 | ^~ a.cc:13:9: error: expected unqualified-id before 'else' 13 | else if(a.at(bn)!= c.at(0)){ | ^~~~ a.cc:16:9: error: expected unqualified-id before 'else' 16 | else{cout << "YES" <<endl; | ^~~~ a.cc:21:9: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
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()-1) == C.at(1)){ | ^ a.cc:9:19: error: 'NO' was not declared in this scope 9 | else {cout << NO;} | ^~
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; } return 0; }
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 declared in this scope; did you mean 'c'? 12 | cn = c.size(); | ^~ | c
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", ); } return 0; }
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 unsigned int]' (did you forget the '()' ?) 9 | if(a[a.length-1]==b[0]&&b[b.length-1]==c[0]) | ~~^~~~~~ | () a.cc:9:31: 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 unsigned int]' (did you forget the '()' ?) 9 | if(a[a.length-1]==b[0]&&b[b.length-1]==c[0]) | ~~^~~~~~ | ()
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; | ~~~~~~^~~~~~~