submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s477328154
p03729
C++
int main(){ string A, B, C; cin >> A >> B >> C; if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0]){ cout << "YES" << endl; } else count << "NO" << endl; }
a.cc: In function 'int main()': a.cc:2:3: error: 'string' was not declared in this scope 2 | string A, B, C; | ^~~~~~ a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> A >> B >> C; | ^~~ a.cc:3:10: error: 'A' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:3:15: error: 'B' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:3:20: error: 'C' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:5:5: error: 'cout' was not declared in this scope 5 | cout << "YES" << endl; | ^~~~ a.cc:5:22: error: 'endl' was not declared in this scope 5 | cout << "YES" << endl; | ^~~~ a.cc:7:8: error: 'count' was not declared in this scope 7 | else count << "NO" << endl; | ^~~~~ a.cc:7:25: error: 'endl' was not declared in this scope 7 | else count << "NO" << endl; | ^~~~
s746403081
p03729
C++
int main(){ string A, B, C; cin >> A >> B >> C; if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0]){ cout << "YES" << endl; } else count << "NO" << endl; }
a.cc: In function 'int main()': a.cc:2:3: error: 'string' was not declared in this scope 2 | string A, B, C; | ^~~~~~ a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> A >> B >> C; | ^~~ a.cc:3:10: error: 'A' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:3:15: error: 'B' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:3:20: error: 'C' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:5:5: error: 'cout' was not declared in this scope 5 | cout << "YES" << endl; | ^~~~ a.cc:5:22: error: 'endl' was not declared in this scope 5 | cout << "YES" << endl; | ^~~~ a.cc:7:8: error: 'count' was not declared in this scope 7 | else count << "NO" << endl; | ^~~~~ a.cc:7:25: error: 'endl' was not declared in this scope 7 | else count << "NO" << endl; | ^~~~
s078713894
p03729
C++
int main(){ string A, B, C; cin >> A >> B >> C; if(A[A.size()-1] == B[0] && B[B.size()-1] == C[0]){ cout << "YES" << endl; } else count << "NO" << endl; }
a.cc: In function 'int main()': a.cc:2:3: error: 'string' was not declared in this scope 2 | string A, B, C; | ^~~~~~ a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> A >> B >> C; | ^~~ a.cc:3:10: error: 'A' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:3:15: error: 'B' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:3:20: error: 'C' was not declared in this scope 3 | cin >> A >> B >> C; | ^ a.cc:5:5: error: 'cout' was not declared in this scope 5 | cout << "YES" << endl; | ^~~~ a.cc:5:22: error: 'endl' was not declared in this scope 5 | cout << "YES" << endl; | ^~~~ a.cc:7:8: error: 'count' was not declared in this scope 7 | else count << "NO" << endl; | ^~~~~ a.cc:7:25: error: 'endl' was not declared in this scope 7 | else count << "NO" << endl; | ^~~~
s717568318
p03729
C++
#include<iostrem> #include<string> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc:1:9: fatal error: iostrem: No such file or directory 1 | #include<iostrem> | ^~~~~~~~~ compilation terminated.
s920931992
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin >> A >> B >> C; if((A[A.size()]==B[0])&&(B[B.size]==C[0])){ cout << "YES" <<endl }else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:8:35: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 8 | if((A[A.size()]==B[0])&&(B[B.size]==C[0])){ | ^ In file included from /usr/include/c++/14/string:54, 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/basic_string.h:1076:7: note: declared here 1076 | size() const _GLIBCXX_NOEXCEPT | ^~~~ a.cc:9:29: error: expected ';' before '}' token 9 | cout << "YES" <<endl | ^ | ; 10 | }else cout << "NO" <<endl; | ~
s432602637
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin >> A >> B >> C; if((A.end==B.begin)&&(B.end==C.begin)){ cout << "YES" <<endl; }else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:8:18: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator==' 8 | if((A.end==B.begin)&&(B.end==C.begin)){ | ~~~~~^~~~~~~~~ | | | | | <unresolved overloaded function type> | <unresolved overloaded function type> a.cc:8:36: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator==' 8 | if((A.end==B.begin)&&(B.end==C.begin)){ | ~~~~~^~~~~~~~~ | | | | | <unresolved overloaded function type> | <unresolved overloaded function type>
s297281271
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin >> A >> B >> C; if((A.end==B.begin)&&(B.end==C.begin)){ cout << "YES" <<endl }else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:8:18: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator==' 8 | if((A.end==B.begin)&&(B.end==C.begin)){ | ~~~~~^~~~~~~~~ | | | | | <unresolved overloaded function type> | <unresolved overloaded function type> a.cc:8:36: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator==' 8 | if((A.end==B.begin)&&(B.end==C.begin)){ | ~~~~~^~~~~~~~~ | | | | | <unresolved overloaded function type> | <unresolved overloaded function type> a.cc:9:29: error: expected ';' before '}' token 9 | cout << "YES" <<endl | ^ | ; 10 | }else cout << "NO" <<endl; | ~
s916556255
p03729
C
#include<stdio.h> int main() { char A[11],B[11],C[11]; int a,b,i; fgets(A,sizeof(A),stdin); fgets(B,sizeof(B),stdin); fgets(C,sizeof(C),stdin); for(i=0;i<10;i++){ if(A[i]=='\0'){ a=i-1; break; } for(i=0;i<10;i++){ if(B[i]=='\0'){ b=i-1; break; } if(A[a]==B[0]){ if(B[b]==C[0]){ printf("YES"); } }else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:32:1: error: expected declaration or statement at end of input 32 | } | ^ main.c:32:1: error: expected declaration or statement at end of input
s886135525
p03729
C
#include<stido.h> int main() { char A[11],B[11],C[11]; int a,b,c,i; fgets(A,sizeof(A),stdin); fgets(B,sizeof(B),stdin); fgets(C,sizeof(C),stdin); for(i=0;i<10;i++){ if(A[i]=='\0'){ a=i-1; break; } for(i=0;i<10;i++){ if(B[i]=='\0'){ b=i-1; break; } if(A[a]==B[0]){ if(B[b]==C[0]){ printf("YES"); } }else{ printf("NO"); } return 0; }
main.c:1:9: fatal error: stido.h: No such file or directory 1 | #include<stido.h> | ^~~~~~~~~ compilation terminated.
s074262445
p03729
C
#include<stido.h> int main() { char A[11],B[11],C[11]; fgets(A,sizeof(A),stdin); fgets(B,sizeof(B),stdin); fgets(C,sizeof(C),stdin); if(A[9]==B[0]){ if(B[9]==C[0]){ printf("YES"); } }else{ printf("NO"); } return 0; }
main.c:1:9: fatal error: stido.h: No such file or directory 1 | #include<stido.h> | ^~~~~~~~~ compilation terminated.
s940646290
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin>>A>>B>>C; int sizea,sizeb; sizea = sizeof(A); sizeb = sizeof(B) if((A[sizea-1]==B[0])&&(B[sizeb-1]==C[0])){ cout<<"Yes"; }else{ cout<<"No"; } return 0; }
a.cc: In function 'int main()': a.cc:9:20: error: expected ';' before 'if' 9 | sizeb = sizeof(B) | ^ | ; 10 | if((A[sizea-1]==B[0])&&(B[sizeb-1]==C[0])){ | ~~ a.cc:12:4: error: 'else' without a previous 'if' 12 | }else{ | ^~~~
s998397556
p03729
C++
#include <iostream> #include <string> using namespace std; int main(){ stirng A, B, C; cin >> A >> B >> C; cout << ((A.end() == B.begin() && B.end() == C.begin())?"YES":"NO") << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'stirng' was not declared in this scope 7 | stirng A, B, C; | ^~~~~~ a.cc:8:10: error: 'A' was not declared in this scope 8 | cin >> A >> B >> C; | ^ a.cc:8:15: error: 'B' was not declared in this scope 8 | cin >> A >> B >> C; | ^ a.cc:8:20: error: 'C' was not declared in this scope 8 | cin >> A >> B >> C; | ^
s373612167
p03729
Java
#include<stdio.h> #include<string.h> int main(){ char a[100],b[100],c[100]; scanf("%s%s%s",a,b,c); int len1 = strlen(a),len2 = strlen(b); if(a[len1-1]==b[0] && b[len2-1]==c[0])printf("YES\n"); else printf("NO\n"); }
Main.java:1: error: illegal character: '#' #include<stdio.h> ^ Main.java:1: error: class, interface, enum, or record expected #include<stdio.h> ^ Main.java:2: error: illegal character: '#' #include<string.h> ^ Main.java:5: error: class, interface, enum, or record expected scanf("%s%s%s",a,b,c); ^ Main.java:6: error: unnamed classes are a preview feature and are disabled by default. int len1 = strlen(a),len2 = strlen(b); ^ (use --enable-preview to enable unnamed classes) Main.java:7: error: class, interface, enum, or record expected if(a[len1-1]==b[0] && b[len2-1]==c[0])printf("YES\n"); ^ Main.java:8: error: class, interface, enum, or record expected else printf("NO\n"); ^ Main.java:9: error: class, interface, enum, or record expected } ^ 8 errors
s556477753
p03729
C++
#include<iostream> #include<string> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >') 8 | if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:8:27: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >') 8 | if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:8:41: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 8 | if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:8:53: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 8 | if(a[a.end()-1]==b[b.end()-1]&&b[b.end()]==c[c.end()])cout<<"YES"<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~
s070595743
p03729
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); String c = sc.next(); char a = a.charAt(a.length() - 1); char b1 = b.charAt(0); char b2 = b.charAt(b.length() - 1); char c = c.charAt(0); if(a == b1 && b2 == c) { System.out.println("YES"); }else { System.out.println("NO"); } } }
Main.java:8: error: variable a is already defined in method main(String[]) char a = a.charAt(a.length() - 1); ^ Main.java:8: error: char cannot be dereferenced char a = a.charAt(a.length() - 1); ^ Main.java:8: error: char cannot be dereferenced char a = a.charAt(a.length() - 1); ^ Main.java:11: error: variable c is already defined in method main(String[]) char c = c.charAt(0); ^ Main.java:11: error: char cannot be dereferenced char c = c.charAt(0); ^ 5 errors
s097982743
p03729
C++
#include <iostream> #include <string> using namespace std; int main (){ string a, b, c; cin >> a >> b >> c; if(b[0]==a[(int)(a.length())-1] && b[(int)(b.length())-1]==c[0]){ cout << "YES" << endl; }else { cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:12:6: error: expected '}' at end of input 12 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main (){ | ^
s743144866
p03729
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main(void) { string a, b, c; cin >> a >> b >> c; if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) { cout << "YES\n"; } else { cout << "NO\n"; } return 0; }
a.cc: In function 'int main()': a.cc:13:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::__cxx11::basic_string<char>::iterator)' 13 | if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) { | ~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1287 | at(size_type __n) const | ^~ /usr/include/c++/14/bits/basic_string.h:1287:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1287 | at(size_type __n) const | ~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1309 | at(size_type __n) | ^~ /usr/include/c++/14/bits/basic_string.h:1309:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1309 | at(size_type __n) | ~~~~~~~~~~^~~ a.cc:13:34: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::__cxx11::basic_string<char>::iterator)' 13 | if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) { | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1287 | at(size_type __n) const | ^~ /usr/include/c++/14/bits/basic_string.h:1287:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1287 | at(size_type __n) const | ~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1309 | at(size_type __n) | ^~ /usr/include/c++/14/bits/basic_string.h:1309:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1309 | at(size_type __n) | ~~~~~~~~~~^~~ a.cc:13:53: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::__cxx11::basic_string<char>::iterator)' 13 | if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) { | ~~~~^~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1287 | at(size_type __n) const | ^~ /usr/include/c++/14/bits/basic_string.h:1287:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1287 | at(size_type __n) const | ~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1309 | at(size_type __n) | ^~ /usr/include/c++/14/bits/basic_string.h:1309:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1309 | at(size_type __n) | ~~~~~~~~~~^~~ a.cc:13:70: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::__cxx11::basic_string<char>::iterator)' 13 | if (a.at(a.end()) == b.at(b.begin()) && b.at(b.end()) == c.at(c.begin())) { | ~~~~^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1287 | at(size_type __n) const | ^~ /usr/include/c++/14/bits/basic_string.h:1287:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1287 | at(size_type __n) const | ~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1309 | at(size_type __n) | ^~ /usr/include/c++/14/bits/basic_string.h:1309:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1309 | at(size_type __n) | ~~~~~~~~~~^~~
s221783102
p03729
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(void) { string a,b,c; bool judge = true; cin >> a >> b >> c; if(a[a.length() - 1] != b[0] || b[b.length() - 1] != c[0]){judge = false;} cout << if(judge){"YES";}else{"NO";} << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: expected primary-expression before 'if' 12 | cout << if(judge){"YES";}else{"NO";} << endl; | ^~ a.cc:12:30: error: 'else' without a previous 'if' 12 | cout << if(judge){"YES";}else{"NO";} << endl; | ^~~~ a.cc:12:42: error: expected primary-expression before '<<' token 12 | cout << if(judge){"YES";}else{"NO";} << endl; | ^~
s516235889
p03729
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(void) { string a,b,c; bool judge = true; cin >> a >> b >> c; if(a[a.length() - 1] != b[0] || b[b.length() - 1] != c[0]){judge = false;} cout << if(judge){"YES"}else{"NO"} << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: expected primary-expression before 'if' 12 | cout << if(judge){"YES"}else{"NO"} << endl; | ^~ a.cc:12:29: error: 'else' without a previous 'if' 12 | cout << if(judge){"YES"}else{"NO"} << endl; | ^~~~ a.cc:12:38: error: expected ';' before '}' token 12 | cout << if(judge){"YES"}else{"NO"} << endl; | ^ | ; a.cc:12:40: error: expected primary-expression before '<<' token 12 | cout << if(judge){"YES"}else{"NO"} << endl; | ^~
s857641241
p03729
C++
// https://atcoder.jp/contests/ #include <iostream> using namespace std; int main() { /* Magic word */ cin.tie(0); ios::sync_with_stdio(false); /* ---------- */ string a, b, c, r; cin >> a >> b >> c; r = a[a.length - 1] == b[0] && b[b.length - 1] == c[0] ? "YES" : "NO"; cout << r << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:17:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 17 | r = a[a.length - 1] == b[0] && b[b.length - 1] == c[0] ? "YES" : "NO"; | ~~^~~~~~ | () a.cc:17:38: 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 '()' ?) 17 | r = a[a.length - 1] == b[0] && b[b.length - 1] == c[0] ? "YES" : "NO"; | ~~^~~~~~ | ()
s359750202
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c,d,e;cin>>a>>b>>c; d=a.size();e=b.size(); if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";}
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)' 370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)' 379 | operator-(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)' 388 | operator-(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed: a.cc:6:10: note: mismatched types 'const std::complex<_Tp>' and 'int' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)' 465 | operator-(const complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided In file included from /usr/include/c++/14/valarray:605, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:6:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:6:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:6:10: note: mismatched types 'const std::valarray<_Tp>' and 'int' 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ^ a.cc:6:22: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 6 | if(a[d-1]==b[0]&b[e-1]==c[0])cout<<"YES";else cout<<"NO";} | ~^~ |
s517033142
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c,d,e;cin>>a>>b>>c; d=a.size()-1;e=b.size()-1; if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";}
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";} | ^ In file included from /usr/include/c++/14/string:54, 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/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:6:18: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";} | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~
s342497054
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c;cin>>a>>b>>c; d=a.size()-1;e=b.size()-1; if(a[d]==b[0]&b[e]==c[0])cout<<"YES";else cout<<"NO";}
a.cc: In function 'int main()': a.cc:5:3: error: 'd' was not declared in this scope 5 | d=a.size()-1;e=b.size()-1; | ^ a.cc:5:16: error: 'e' was not declared in this scope 5 | d=a.size()-1;e=b.size()-1; | ^
s705811308
p03729
C++
#include<iostream> #include<string> using namespace std; int main(){ string a, b, c; cin >> a >> b >> c; if(a[a.lenght()-1] == b[0] && b[b.length()-1] == c[0]){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:10:10: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'? 10 | if(a[a.lenght()-1] == b[0] && b[b.length()-1] == c[0]){ | ^~~~~~ | length
s731223609
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin >> A >> B >>C; if(A[A.size()-1] == B[0] && B[Bsize()-1] == C[0]){ cout << "YES" << endl; }else{ cout << "NO"<< endl; } }
a.cc: In function 'int main()': a.cc:6:39: error: 'Bsize' was not declared in this scope; did you mean 'dysize'? 6 | if(A[A.size()-1] == B[0] && B[Bsize()-1] == C[0]){ | ^~~~~ | dysize
s118559322
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin >> A >> B >>C; if(A[A.size()] == B[0] && B[Bsize()] == C[0]){ cout << 'YES' << endl; }else{ cout << 'NO' << endl; } }
a.cc:7:25: warning: multi-character character constant [-Wmultichar] 7 | cout << 'YES' << endl; | ^~~~~ a.cc:9:25: warning: multi-character character constant [-Wmultichar] 9 | cout << 'NO' << endl; | ^~~~ a.cc: In function 'int main()': a.cc:6:37: error: 'Bsize' was not declared in this scope; did you mean 'dysize'? 6 | if(A[A.size()] == B[0] && B[Bsize()] == C[0]){ | ^~~~~ | dysize
s457358974
p03729
C
#include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> using namespace std; int main(void) { char a[100]; char b[100]; char c[100]; scanf("%s", &a); scanf("%s", &b); scanf("%s",&c); int d = strlen(a); int e = strlen(b); if (a[d-1]==b[0]&&b[e-1]==c[0]) { printf("YES"); } else { printf("NO"); } return 0; }
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s489257091
p03729
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<cmath> #include<map> #include<iomanip> #include<queue> #include<stack> #include<numeric> #include<utility> #pragma region _define #define f(i,a,b) for(LL i=a;i<b;i++) #define f_vI(v,n) f(i,0,n)cin>>v[i] #define f_v2I(v1,v2,n) f(i,0,n)cin>>v1[i]>>v2[i] #define f_vO(v,n) f(i,0,n)cout<<v[i]<<endl; #define all(a) a.begin(),a.end() #define size(s) s.size() #define endl "\n" #define y() cout<<"Yes"<<endl #define Y() cout<<"YES"<<endl #define n() cout<<"No"<<endl #define N() cout<<"NO"<<endl #pragma endregion #pragma region _using using namespace std; using LL = long long; using st = string; using vi = vector<LL>; using vvi = vector<vi>; using vs = vector<st>; using vb = vector<bool>; using si = stack<LL>; using ss = stack<st>; using pi = pair<LL, LL>; using v_pi = vector<pi>; #pragma endregion #pragma region _graph #define node 50 //グラフの最大位数 適宜変更 //bool graph[node][node]; //bool visited[node] = { false }; #define link(a,b) f(i,0,n){cin>>a[i]>>b[i]; a[i]--; b[i]--; graph[a[i]][b[i]]=graph[b[i]][a[i]]=true;} #pragma endregion LL gcd(LL a, LL b) { LL r; while ((r = a % b) != 0) { a = b; b = r; } return b; } LL lcm(LL a, LL b) { return (a / gcd(a, b)*b); } /************************************************************************/ int main(void) { cin.tie(0); ios::sync_with_stdio(false); char a[20], b[20], c[20]; cin >> a >> b >> c; if (a[strlen(a) - 1] == b[0] && b[strlen(b) - 1]==c[0]) { y(); } else { n(); } return 0; }
a.cc: In function 'int main()': a.cc:73:15: error: 'strlen' was not declared in this scope 73 | if (a[strlen(a) - 1] == b[0] && b[strlen(b) - 1]==c[0]) { | ^~~~~~ a.cc:12:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include<utility> +++ |+#include <cstring> 12 |
s498738093
p03729
C++
#include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> using namespace std; int main(void) { char a[100]; char b[100]; char c[100]; cin >> a >> b >> c; int d = strlen(a); int e = strlen(b); if (a[d-1]==b[0]&&b[e-1]==c[0]) { cout << "YES"; } else { cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: 'strlen' was not declared in this scope 12 | int d = strlen(a); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <stdlib.h> +++ |+#include <cstring> 5 | using namespace std;
s004653585
p03729
C++
#include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> using namespace std; int main(void) { char a[10]; char b[10]; char c[10]; cin >> a >> b >> c; int d = strlen(a); int e = strlen(b); if (a[d-1]==b[0]&&b[e-1]==c[0]) { cout << "YES"; } else { cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: 'strlen' was not declared in this scope 12 | int d = strlen(a); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <stdlib.h> +++ |+#include <cstring> 5 | using namespace std;
s262420100
p03729
C++
#include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> int main(void) { char a[10]; char b[10]; char c[10]; std::cin >> a >> b >> c; int d = strlen(a); int e = strlen(b); if (a[d-1]==b[0]&&b[e-1]==c[0]) { std::cout << "YES"; } else { std::cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: 'strlen' was not declared in this scope 11 | int d = strlen(a); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <stdlib.h> +++ |+#include <cstring> 5 | int main(void)
s678529780
p03729
C++
#include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> int main(void) { char a[10]; char b[10]; char c[10]; int d=strlen(a); int e=strlen(b); std::cin >> a >> b >> c; if (a[d-1]==b[0]&&b[e-1]==c[0]) { std::cout << "YES"; } else { std::cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'strlen' was not declared in this scope 10 | int d=strlen(a); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <stdlib.h> +++ |+#include <cstring> 5 | int main(void)
s353567532
p03729
C++
#include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> int main(void) { char a[10]; char b[10]; char c[10]; std::cin >> a >> b >> c; if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0]) { std::cout << "YES"; } else { std::cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: 'strlen' was not declared in this scope 11 | if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0]) | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <stdlib.h> +++ |+#include <cstring> 5 | int main(void)
s968510553
p03729
C++
#include <stdio.h> #include <iostream> #include <string> int main(void) { char a[10]; char b[10]; char c[10]; std::cin >> a >> b >> c; if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0]) { std::cout << "YES"; } else { std::cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'strlen' was not declared in this scope 10 | if (a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0]) | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |+#include <cstring> 3 | #include <string>
s438278185
p03729
C++
#include <iostream> #include <string> using namespace std; int main(){ string A,B,C; cin >> A >> B >> C; bool X=false if (A[A.size()-1]==B[0] && B[B.size()-1]==C[0]) X=true if (X) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:9:5: error: expected ',' or ';' before 'if' 9 | if (A[A.size()-1]==B[0] && B[B.size()-1]==C[0]) X=true | ^~ a.cc:11:5: error: 'else' without a previous 'if' 11 | else cout << "NO" << endl; | ^~~~
s547379123
p03729
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); String c = sc.nextLine(); if(a.charAt(a.length()-1)==b.charAt(0)&&b.charAt(b.length()-1)==c.charAt(0)){ System.out.print("YES"); }else{ System.out.print("NO"); } } } }
Main.java:17: error: class, interface, enum, or record expected } ^ 1 error
s881184639
p03729
C++
#include<iostream> #inclede<string> using namespace std; int main(){ string a,b,c; cin >>a >>b>>c; if(a[a.size()-1] == b[0] && b[b.size()-1]==c[0])cout <<"YES" <<endl; else cout <<"NO"<<endl; }
a.cc:2:2: error: invalid preprocessing directive #inclede; did you mean #include? 2 | #inclede<string> | ^~~~~~~ | include
s862007960
p03729
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; int main() { //cout.precision(10); string a, b, c; cin >> a >> b >> c; string ans = "YES"; if((a.back() != b[0]) || (b.back() != c[0] )){ ans = "NO"; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:10:12: note: to match this '{' 10 | int main() { | ^
s217248828
p03729
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; int main() { //cout.precision(10); string a, b, c; cin >> a >> b >> c; string ans = "YES" if((a.back() != b[0]) || (b.back() != c[0] )){ ans = "NO"; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:5: error: expected ',' or ';' before 'if' 15 | if((a.back() != b[0]) || (b.back() != c[0] )){ | ^~ a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:10:12: note: to match this '{' 10 | int main() { | ^
s964294159
p03729
C++
#include<iostream> #include<algorithm> using namespace std; int main() { char a[10], b[10], c[10]; cin >> a; cin >> b; cin >> c; int ta = strlen(a); int tb = strlen(b); int tc = strlen(c); if (a[ta - 1] == b[0] && b[tb - 1] == c[0]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: 'strlen' was not declared in this scope 11 | int ta = strlen(a); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> +++ |+#include <cstring> 3 |
s775138199
p03729
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <map> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> plglg; typedef pair<double, ll> pdlg; typedef tuple<int, int, int> tiii; typedef tuple<ll, ll, ll> tlglglg; typedef tuple<double, double, double> tddd; static const int giga = pow(10,9); int main(void){ string s1,s2,s3; if(s1[s1.end()] == s2[s2.begin()] && s2[s2.end()] == s3[s3.begin()]){ cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:19:8: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 19 | if(s1[s1.end()] == s2[s2.begin()] && s2[s2.end()] == s3[s3.begin()]){ | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:19:24: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 19 | if(s1[s1.end()] == s2[s2.begin()] && s2[s2.end()] == s3[s3.begin()]){ | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:19:42: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 19 | if(s1[s1.end()] == s2[s2.begin()] && s2[s2.end()] == s3[s3.begin()]){ | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~ a.cc:19:58: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 19 | if(s1[s1.end()] == s2[s2.begin()] && s2[s2.end()] == s3[s3.begin()]){ | ^ /usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]' 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT | ~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]' 1265 | operator[](size_type __pos) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1265 | operator[](size_type __pos) | ~~~~~~~~~~^~~~~
s108112566
p03729
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define print(a) cout << a << endl #define V vector typedef string str; #define rep(i,n) for(int i=0;i<n;i++) int main() { V<str> s(3); bool chk=true; rep(i,3){ cin >> s.at(i); if(i>0){ if(s.at(i).at(0)!=s.at(i-1).at(s.at(i-1).size()))chk==false; } } if(chk){ print("YES"); }else{ print("NO"); } print(s); return 0; }
a.cc: In function 'int main()': a.cc:5:23: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 5 | #define print(a) cout << a << endl | ~~~~ ^~ | | | std::ostream {aka std::basic_ostream<char>} a.cc:24:9: note: in expansion of macro 'print' 24 | print(s); | ^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'const void*' 301 | operat
s538568209
p03729
Java
import java.util.*; // cin=sc.nextInt(); // List<Integer> a = new ArrayList<Integer>(n); public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); String c = sc.next(); int d = a.length(); int e = b.length(); if(a[d-1] == b[0] && b[e-1] == c[0]){ System.out.println("Yes"); } else{ System.out.println("No"); } } }
Main.java:13: error: array required, but String found if(a[d-1] == b[0] && b[e-1] == c[0]){ ^ Main.java:13: error: array required, but String found if(a[d-1] == b[0] && b[e-1] == c[0]){ ^ Main.java:13: error: array required, but String found if(a[d-1] == b[0] && b[e-1] == c[0]){ ^ Main.java:13: error: array required, but String found if(a[d-1] == b[0] && b[e-1] == c[0]){ ^ 4 errors
s045411419
p03729
C
#include <stdio.h> #include <string.h> int main(void){ char a[11],b[11],c[11]; scanf("%s %s %s",a,b,c); if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0]){ prentf("YES"); }else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:5: error: implicit declaration of function 'prentf'; did you mean 'printf'? [-Wimplicit-function-declaration] 7 | prentf("YES"); | ^~~~~~ | printf
s683530081
p03729
C
#include <stdio.h> #include <string.h> int main(void){ char a[11],b[11],c[11]; scanf("%s %s %s",a,b,c); if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){ prentf("YES"); }else printf("NO"); return 0; }
main.c: In function 'main': main.c:6:21: error: called object 'b' is not a function or function pointer 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){ | ^ main.c:4:14: note: declared here 4 | char a[11],b[11],c[11]; | ^ main.c:6:42: error: called object 'c' is not a function or function pointer 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){ | ^ main.c:4:20: note: declared here 4 | char a[11],b[11],c[11]; | ^ main.c:6:46: error: expected ']' before ')' token 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){ | ^ | ] main.c:6:46: error: expected ']' before ')' token 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==c(0)){ | ^ | ] main.c:7:5: error: implicit declaration of function 'prentf'; did you mean 'printf'? [-Wimplicit-function-declaration] 7 | prentf("YES"); | ^~~~~~ | printf
s010675550
p03729
C
#include <stdio.h> #include <string.h> int main(void){ char a[11],b[11],c[11]; scanf("%s %s %s",a,b,c); if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){ prentf("YES"); }else printf("NO"); return 0; }
main.c: In function 'main': main.c:6:21: error: called object 'b' is not a function or function pointer 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){ | ^ main.c:4:14: note: declared here 4 | char a[11],b[11],c[11]; | ^ main.c:6:42: error: called object 'b' is not a function or function pointer 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){ | ^ main.c:4:14: note: declared here 4 | char a[11],b[11],c[11]; | ^ main.c:6:46: error: expected ']' before ')' token 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){ | ^ | ] main.c:6:46: error: expected ']' before ')' token 6 | if(a[strlen(a)-1==b(0)&&b[strlen(b)-1==b(0)){ | ^ | ] main.c:7:5: error: implicit declaration of function 'prentf'; did you mean 'printf'? [-Wimplicit-function-declaration] 7 | prentf("YES"); | ^~~~~~ | printf
s755918508
p03729
C++
#include<stdio.h> int main(void){ int A,B,C; int i; scanf("%d %d %d",&A,&B,&C); for(i=1;i<=100;i++){ if(A*i%B==C){ printf("Yes/n"); break; } else{ printf("No/n"); } return 0; }
a.cc: In function 'int main()': a.cc:15:4: error: expected '}' at end of input 15 | } | ^ a.cc:2:15: note: to match this '{' 2 | int main(void){ | ^
s117558998
p03729
C++
#include<iostream> using namespace std; int main(){ int A,B,C,i=1,x; cin >> A >> B >> C >> i >> x; while(true); x = A*i; if(A + x % B == C){ cout << "YES" << endl; } else{ cout << "NO" << endl; } } }
a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s010402575
p03729
C++
#include<iostream> using namespace std; int main(){ int A,B,C,i=1,x; cin >> A >> B >> C >> i >> x; while(true) x = A*i if(A + x % B == C){ cout << "YES" << endl; } else{ cout << "NO" << endl; } } }
a.cc: In function 'int main()': a.cc:10:12: error: expected ';' before 'if' 10 | x = A*i | ^ | ; 11 | 12 | if(A + x % B == C){ | ~~ a.cc:15:3: error: 'else' without a previous 'if' 15 | else{ | ^~~~ a.cc: At global scope: a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s158708485
p03729
C++
const std::vector<int> x = {1,2}; int n = x.size();
a.cc:1:12: error: 'vector' in namespace 'std' does not name a template type 1 | const std::vector<int> x = {1,2}; | ^~~~~~ a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' +++ |+#include <vector> 1 | const std::vector<int> x = {1,2}; a.cc:2:9: error: 'x' was not declared in this scope 2 | int n = x.size(); | ^
s217683984
p03729
C++
#include<iostream> #include<string.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; (a[array_size-1]==b[0]&&b[array_size-1]-1]==c[0])"YES":"NO"; return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: 'array_size' was not declared in this scope 8 | (a[array_size-1]==b[0]&&b[array_size-1]-1]==c[0])"YES":"NO"; | ^~~~~~~~~~ a.cc:8:44: error: expected ')' before ']' token 8 | (a[array_size-1]==b[0]&&b[array_size-1]-1]==c[0])"YES":"NO"; | ~ ^ | )
s848632784
p03729
C
#include<stdio.h> int len(*s){ int len; while(s){ len++; } return len; } int main(){ char a[11], b[11], c[11]; int alen, blen, clen; scanf("%s %s %s", a, b, c); alen = len(a); blen = len(b); clen = len(c); if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){ printf("YES\n"); } else { printf("NO\n"); } return 0; }
main.c:3:9: error: expected declaration specifiers or '...' before '*' token 3 | int len(*s){ | ^ main.c: In function 'main': main.c:18:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration] 18 | alen = len(a); | ^~~
s685332107
p03729
C
#include<stdio.h> int len(*s){ int len; while(s){ len++; } return len; } int main(){ int a[11], b[11], c[11], alen, blen, clen; scanf("%s %s %s", a, b, c); alen = len(a); blen = len(b); clen = len(c); if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){ printf("YES\n"); } else { printf("NO\n"); } return 0; }
main.c:3:9: error: expected declaration specifiers or '...' before '*' token 3 | int len(*s){ | ^ main.c: In function 'main': main.c:17:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration] 17 | alen = len(a); | ^~~
s484692601
p03729
C
#include<stdio.h> int len(*s){ int len; while(s){ len++; } return len; } int main(){ int a[11], b[11], c[11], alen, blen, clen; scanf("%s %s %s", &a, &b, &c); alen = len(a); blen = len(b); clen = len(c); if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){ printf("YES\n"); } else { printf("NO\n"); } return 0; }
main.c:3:9: error: expected declaration specifiers or '...' before '*' token 3 | int len(*s){ | ^ main.c: In function 'main': main.c:17:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration] 17 | alen = len(a); | ^~~
s356128862
p03729
C
#include<stdio.h> int len(*s){ int len; while(s){ len++; } return len; } int main(){ int a[11], b[11], c[11], alen, blen, clen; scanf("%d %d %d", &a, &b, &c); alen = len(a); blen = len(b); clen = len(c); if(a[alen - 1] == b[0] && b[blen - 1] == c[0]){ printf("YES\n"); } else { printf("NO\n"); } return 0; }
main.c:3:9: error: expected declaration specifiers or '...' before '*' token 3 | int len(*s){ | ^ main.c: In function 'main': main.c:17:10: error: implicit declaration of function 'len' [-Wimplicit-function-declaration] 17 | alen = len(a); | ^~~
s535044541
p03729
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; static const int MAX = 200000; int main() { string s0, s1, s2; cin >> s0 >> s1 >> s2; if (s0.back() == s1[0] && s1.back == s2[0]) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:43: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to binary 'operator==' 13 | if (s0.back() == s1[0] && s1.back == s2[0]) {
s920144661
p03729
C++
#include<bits/stadc++.h> using namespace std; int main() { string s1, s2, s3; cin >> s1 >> s2 >> s3; if (s1[s1.size() - 1] == s2[0] && s2[s2.size() - 1] == s3[0]) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc:1:9: fatal error: bits/stadc++.h: No such file or directory 1 | #include<bits/stadc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s077420086
p03729
C++
#include<bits/stdc++.h> #define MAX_N 100001 #define INF_INT 2147483647 #define INF_LL 9223372036854775807 #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; typedef long long int ll; typedef pair<ll,ll> P; const int MOD = 1000000007; int main() { string A,B,C; cin >> A >> B >> C; cout << (A[A.size()-1] == B[0] && B[B.size()-1] == C[0]) ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:75: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 15 | cout << (A[A.size()-1] == B[0] && B[B.size()-1] == C[0]) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s629337852
p03729
C
#include <stdio.h> int main() { long int n,k,max=0,count=0,i,j,min=9999; char a[100000],b[100000],c[100000]; gets(a); gets(b); gets(c); if(a[strlen(a)-1]==b[0] b[strlen(b)-1]==c[0]) { printf("YES"); }else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:8:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(a); | ^~~~ | fgets main.c:11:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 11 | if(a[strlen(a)-1]==b[0] b[strlen(b)-1]==c[0]) | ^~~~~~ main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen' 2 | #include <stdio.h> +++ |+#include <string.h> 3 | main.c:11:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 11 | if(a[strlen(a)-1]==b[0] b[strlen(b)-1]==c[0]) | ^~~~~~ main.c:11:9: note: include '<string.h>' or provide a declaration of 'strlen' main.c:11:27: error: expected ')' before 'b' 11 | if(a[strlen(a)-1]==b[0] b[strlen(b)-1]==c[0]) | ~ ^ ~ | )
s914920620
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin >> a >> b >> c; if(a.at(a,size()-1) == b.at(0) && b.at(b.size()-1) == c.at(0)){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:17: error: no matching function for call to 'size()' 6 | if(a.at(a,size()-1) == b.at(0) && b.at(b.size()-1) == c.at(0)){ | ~~~~^~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /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
s752200333
p03729
C++
/*input async layered coding */ #include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef pair<double,double> pdd; #define IOS ios_base::sync_with_stdio(0); cin.tie(0) #define ALL(a) a.begin(),a.end() #define SZ(a) ((int)a.size()) #define F first #define S second #define REP(i,n) for(int i=0;i<((int)n);i++) #define pb push_back #define MP(a,b) make_pair(a,b) #define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end())))) #define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin()) #ifdef leowang #define debug(...) do{\ fprintf(stderr,"%s - %d : (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\ _DO(__VA_ARGS__);\ }while(0) template<typename I> void _DO(I&&x){cerr<<x<<endl;} template<typename I,typename...T> void _DO(I&&x,T&&...tail){cerr<<x<<", ";_DO(tail...);} #else #define debug(...) #endif template<typename T1,typename T2> ostream& operator<<(ostream& out,pair<T1,T2> P){ out<<'('<<P.F<<','<<P.S<<')'; return out; } //}}} const ll maxn=300005; const ll maxlg=__lg(maxn)+2; const ll INF64=8000000000000000000LL; const int INF=0x3f3f3f3f; const ll MOD=ll(1e9+7); const double PI=acos(-1); //const ll p=880301; //const ll P=31; ll mypow(ll a,ll b){ ll res=1LL; while(b){ if(b&1) res=res*a%MOD; a=a*a%MOD; b>>=1; } return res; } int main() { IOS; string a,b,c; cin>>a>>b>>C; if(a.back()==b[0]&&b.back()==c[0]){ cout<<"YES\n"; } else cout<<"NO" return 0; }
a.cc: In function 'int main()': a.cc:61:20: error: 'C' was not declared in this scope 61 | cin>>a>>b>>C; | ^ a.cc:65:24: error: expected ';' before 'return' 65 | else cout<<"NO" | ^ | ; 66 | return 0; | ~~~~~~
s842841546
p03729
C
#include<bits/stdc++.h> using namespace std; string a,b,c; int main() { cin>>a>>b>>c; if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s267184880
p03729
C++
#include <stdio.h> #include <string.h> int main(){ char a[11], b[11], c[11]; scanf("%s",a); scanf("%s",b); scanf("%s",c); int la, lb, lc; la=strlen(a); lb=strlen(b); //lc=strlen(c); if(a[la-1]==b[0] && b[lb-1]==c[0]) printf("YES\n") else printf("NO\n"); }
a.cc: In function 'int main()': a.cc:14:24: error: expected ';' before 'else' 14 | printf("YES\n") | ^ | ; 15 | else | ~~~~
s471244855
p03729
C++
#include<stdio.h> int main() { char ar[100],br[100],cr[100]; scanf ("%s %s %s",ar,br,cr); int p,q,r; p=strlen(ar); q=strlen(br); r=strlen(cr); if (ar[p-1]==br[0] && br[q-1]==cr[0]) { printf ("YES\n"); } else if (ar[p-1]!=br[0] || br[q-1]!=cr[0]) { printf ("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'strlen' was not declared in this scope 7 | p=strlen(ar); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<stdio.h> +++ |+#include <cstring> 2 | int main()
s954159145
p03729
C++
#include<stdio.h> #include<string.h> int main(){ char ara[10000]; gets(ara); int f=0; int n=strlen(ara); for(int i=0;i<n;i++){ if(ara[i]==' '){ if(ara[i-1]!=ara[i+1]){ f=1; break; } } } if(f==0) printf("YES\n"); else printf("NO\n"); }
a.cc: In function 'int main()': a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(ara); | ^~~~ | getw
s390953977
p03729
C++
#include<iostream> #include<cmath> #include<algorithm> #include <cassert> #include<string> using namespace std; int main(){ int a = 0, b = 0, c=0, d[100000], e[100000],f=0,g=0,h=0, count = 0; char rikka,toka[100000]; string mado[100000],saya; cin >> mado[0]>>mado[1]>>mado[2]; if (mado[0].back()==mado[1].front()&&mado[1].back()==mado[2].front) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:60: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and '<unresolved overloaded function type>' to binary 'operator==' 12 | if (mado[0].back()==mado[1].front()&&mado[1].back()==mado[2].front) { | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | | | | | <unresolved overloaded function type> | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
s413648356
p03729
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:7:45: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_string<char>::iterator' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ~~~~~~~ ^~ ~~~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} | std::__cxx11::basic_string<char>::iterator 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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ 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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::pair<_T1, _T2>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ 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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ /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:7:56: note: 'std::__cxx11::basic_string<char>::iterator' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << (a.back() == b.front() && b.end() == c.front() ? "YES" : "NO") << endl; | ^ 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: cand
s289106213
p03729
C++
#include <iostream> #include <string> using namespace std; int main() { string A, B, C; int H, W; cin >> A >> B >> C; if (A[A.length() - 1] == B[B.length() - 1] && B[B.length() - 1] == C[C.length() - 1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:86: error: expected ']' before ')' token 10 | if (A[A.length() - 1] == B[B.length() - 1] && B[B.length() - 1] == C[C.length() - 1) | ^ | ]
s113069172
p03729
C
#include<bits/stdc++.h> using namespace std; string a,b,c; int main(){ cin>>a>>b>>c; if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]) puts("YES"); else puts("NO"); return 0; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s786744296
p03729
Java
import com.sun.applet2.AppletParameters; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; import java.math.MathContext; import java.util.*; public class Main { public static void main(String[] args) throws IOException { Scanner scanner = new Scanner(System.in); String s1 = scanner.next(); String s2 = scanner.next(); String s3 = scanner.next(); if(s1.charAt(s1.length() - 1) == s2.charAt(0) && s2.charAt(s2.length() - 1) == s3.charAt(0)){ System.out.println("YES"); } else System.out.println("NO"); } }
Main.java:1: error: package com.sun.applet2 does not exist import com.sun.applet2.AppletParameters; ^ 1 error
s855968309
p03729
C++
#include <iostream> #include <string> int main() { string A, B, C; std::cin >> A >> B >> C; if(A.back() == B.front() && B.back() == C.front()){ std::cout << "YES"; }else{ std::cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'string' was not declared in this scope 6 | string A, B, C; | ^~~~~~ a.cc:6:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:7:21: error: 'A' was not declared in this scope 7 | std::cin >> A >> B >> C; | ^ a.cc:7:26: error: 'B' was not declared in this scope 7 | std::cin >> A >> B >> C; | ^ a.cc:7:31: error: 'C' was not declared in this scope 7 | std::cin >> A >> B >> C; | ^
s789294795
p03729
C
#include <stdio.h> #include <string.h> int main(void){ char s[3][11]; int i; for(i=0;i<3;i++) scanf("%s",s[i]); if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:14: error: request for member 'strlen' in something not a structure or union 7 | if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES"); | ^ main.c:7:44: error: request for member 'strlen' in something not a structure or union 7 | if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES"); | ^
s802255694
p03729
C
#include <stdio.h> #include <string.h> int main(void){ char s[3][11]; int i; for(i=0;i<3;i++) scanf("%s",s[i]); if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:14: error: request for member 'strlen' in something not a structure or union 7 | if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES"); | ^ main.c:7:46: error: request for member 'strlen' in something not a structure or union 7 | if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES"); | ^
s462369583
p03729
C
#include <stdio.h> int main(void){ char s[3][11]; int i; for(i=0;i<3;i++) scanf("%s",s[i]); if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:6:14: error: request for member 'length' in something not a structure or union 6 | if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES"); | ^ main.c:6:44: error: request for member 'length' in something not a structure or union 6 | if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES"); | ^
s366573964
p03729
C++
#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int main() { char a[32], b[32], c[32]; int sa, sb, scanf("%s", a); scanf("%s", b); scanf("%s", c); sa = strlen(a) - 1; sb = strlen(b) - 1; if (a[sa] == b[0] && b[sb] == c[0]) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:10:22: error: expression list treated as compound expression in initializer [-fpermissive] 10 | scanf("%s", a); | ^ a.cc:10:22: error: invalid conversion from 'char*' to 'int' [-fpermissive] 10 | scanf("%s", a); | ^ | | | char* a.cc:11:14: error: 'scanf' cannot be used as a function 11 | scanf("%s", b); | ~~~~~^~~~~~~~~ a.cc:12:14: error: 'scanf' cannot be used as a function 12 | scanf("%s", c); | ~~~~~^~~~~~~~~
s053165843
p03729
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int' 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl; | ^~~~ a.cc:8:26: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl; | ^ a.cc:8:37: error: request for member 'size' in 'b', which is of non-class type 'int' 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl; | ^~~~ a.cc:8:51: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl; | ^
s268984489
p03729
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){ cout << "YES" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int' 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){ | ^~~~ a.cc:8:26: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){ | ^ a.cc:8:37: error: request for member 'size' in 'b', which is of non-class type 'int' 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){ | ^~~~ a.cc:8:51: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){ | ^
s672155119
p03729
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a[a.size()-1] && b[0]){ if(b[b.size()-1] && c[0]){ } cout << "YES" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int' 8 | if(a[a.size()-1] && b[0]){ | ^~~~ a.cc:8:26: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] && b[0]){ | ^ a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int' 9 | if(b[b.size()-1] && c[0]){ | ^~~~ a.cc:9:30: error: invalid types 'int[int]' for array subscript 9 | if(b[b.size()-1] && c[0]){ | ^
s691896306
p03729
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a[a.size()-1] && b[0]){ if(b[b.size()-1] && c[0]){ cout << "YES" << endl; } else cout << "NO" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int' 8 | if(a[a.size()-1] && b[0]){ | ^~~~ a.cc:8:26: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] && b[0]){ | ^ a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int' 9 | if(b[b.size()-1] && c[0]){ | ^~~~ a.cc:9:30: error: invalid types 'int[int]' for array subscript 9 | if(b[b.size()-1] && c[0]){ | ^
s027422072
p03729
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a[a.size()-1] && b[0]){ if(b[b.size()-1] && c[0]{ cout << "YES" << endl; } else cout << "NO" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int' 8 | if(a[a.size()-1] && b[0]){ | ^~~~ a.cc:8:26: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] && b[0]){ | ^ a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int' 9 | if(b[b.size()-1] && c[0]{ | ^~~~ a.cc:9:30: error: invalid types 'int[int]' for array subscript 9 | if(b[b.size()-1] && c[0]{ | ^ a.cc:12:9: error: expected primary-expression before 'else' 12 | else cout << "NO" << endl; | ^~~~ a.cc:11:10: error: expected ')' before 'else' 11 | } | ^ | ) 12 | else cout << "NO" << endl; | ~~~~ a.cc:9:11: note: to match this '(' 9 | if(b[b.size()-1] && c[0]{ | ^
s914126233
p03729
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a[a.size()-1] && b[0]){ if(b[b.size()-1] && c[0]{ cout << "YES" << endl; } } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int' 8 | if(a[a.size()-1] && b[0]){ | ^~~~ a.cc:8:26: error: invalid types 'int[int]' for array subscript 8 | if(a[a.size()-1] && b[0]){ | ^ a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int' 9 | if(b[b.size()-1] && c[0]{ | ^~~~ a.cc:9:30: error: invalid types 'int[int]' for array subscript 9 | if(b[b.size()-1] && c[0]{ | ^ a.cc:9:33: error: expected ')' before '{' token 9 | if(b[b.size()-1] && c[0]{ | ~ ^ | ) a.cc:12:5: error: expected primary-expression before '}' token 12 | } | ^
s128442672
p03729
C++
#員cぅで<びts・stdc++.h>インtまいん(){ }std::st林gあ、b,c;std::シン>>ア>>b>>c;std::こうt<(あ。場ck()==b【0】||b.場ck()==c【0】)?”YES" : "NO" << std::endl;
a.cc:2:1: error: extended character 、 is not valid in an identifier 2 | }std::st林gあ、b,c;std::シン>>ア>>b>>c;std::こうt<(あ。場ck()==b【0】||b.場ck()==c【0】)?”YES" : "NO" << std::endl; | ^ a.cc:2:1: error: extended character 。 is not valid in an identifier a.cc:2:1: error: extended character 【 is not valid in an identifier a.cc:2:1: error: extended character 】 is not valid in an identifier a.cc:2:1: error: extended character 【 is not valid in an identifier a.cc:2:1: error: extended character 】 is not valid in an identifier a.cc:2:1: error: extended character ” is not valid in an identifier a.cc:2:138: warning: missing terminating " character 2 | }std::st林gあ、b,c;std::シン>>ア>>b>>c;std::こうt<(あ。場ck()==b【0】||b.場ck()==c【0】)?”YES" : "NO" << std::endl; | ^ a.cc:2:138: error: missing terminating " character 2 | }std::st林gあ、b,c;std::シン>>ア>>b>>c;std::こうt<(あ。場ck()==b【0】||b.場ck()==c【0】)?”YES" : "NO" << std::endl; | ^~~~~~~~~~~~~~~ a.cc:1:1: error: '\U0000ff03\U000054e1c\U00003045\U00003067\U0000ff1c\U00003073\U0000ff54\U0000ff53\U000030fb\U0000ff53\U0000ff54\U0000ff44\U0000ff43\U0000ff0b\U0000ff0b\U0000ff0e\U0000ff48\U0000ff1e\U000030a4\U000030f3t\U0000307e\U00003044\U00003093\U0000ff08\U0000ff09\U0000ff5b' does not name a type 1 | #員cぅで<びts・stdc++.h>インtまいん(){ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s149983638
p03729
C++
#include <iostream> #include <string> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a.back()==b.front()&&b.back()==c.front()){cout<<"YES"<<endl;} else{cout<<"NO"<<endl:} return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: expected ';' before ':' token 8 | else{cout<<"NO"<<endl:} | ^ | ;
s993607079
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a, b, c; int lena = (int)a.size(); int lemb = (int)b.size(); if(a[lena] == b[0] && b[lenb] == c[0]) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:29: error: 'lenb' was not declared in this scope; did you mean 'lemb'? 10 | if(a[lena] == b[0] && b[lenb] == c[0]) cout << "YES" << endl; | ^~~~ | lemb
s114749903
p03729
C++
#include<iosream> #include<string> using namespace std; int main(void){ string s1,s2,s3; cin>>s1>>s2>>s3; if(s1[0]==s2[0]==s3[0])cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc:1:9: fatal error: iosream: No such file or directory 1 | #include<iosream> | ^~~~~~~~~ compilation terminated.
s158035948
p03729
C++
#include <bits/stdc++.h> using namespace std; #define INF 1<<30 #define LINF 1ll<<60ll #define MOD 1000000007 #define pb(a) push_back(a) #define vi vector<int> #define vl vector<long long> #define vvi vector<vi> #define P pair<int,int> #define all(vec) (vec.begin()),(vec.end()) typedef long long ll; typedef unsigned long long ull; #define sz(x) ((int)(x).size()) #define in(x) int x;cin>>x #define bit(n) (1<<(n)) #define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define REPR(i, n) for(int i = n;i >= 0;--i) #define REP3(i, m, n) for(int i = m, i##_len=(n);i < i##_len;++i) #define FORVEC(i, v) for(int i = 0;i < sz(v);++i) template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;} template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;} #define fil0(i,n) cout<<swet(n)<<setfill('0')<<i<<resetiosflags(ios_base::floatfield) #define YES(n) cout<<((n)?"YES":"NO")<<endl #define Yes(n) cout<<((n)?"Yes":"No")<<endl #define yes(n) cout<<((n)?"yes":"no")<<endl #define possible(n) cout<<((n)?"possible":"impossible")<<endl #define Possible(n) cout<<((n)?"Possible":"Impossible")<<endl int main(){ string a,b,c; cin>>a>>b>>c; YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); return 0; }
a.cc: In function 'int main()': a.cc:16:15: error: expected unqualified-id before '(' token 16 | #define sz(x) ((int)(x).size()) | ^ a.cc:29:24: note: in definition of macro 'YES' 29 | #define YES(n) cout<<((n)?"YES":"NO")<<endl | ^ a.cc:39:13: note: in expansion of macro 'sz' 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^~ a.cc:16:17: error: expected primary-expression before 'int' 16 | #define sz(x) ((int)(x).size()) | ^~~ a.cc:29:24: note: in definition of macro 'YES' 29 | #define YES(n) cout<<((n)?"YES":"NO")<<endl | ^ a.cc:39:13: note: in expansion of macro 'sz' 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^~ a.cc:16:17: error: expected ')' before 'int' 16 | #define sz(x) ((int)(x).size()) | ~^~~ a.cc:29:24: note: in definition of macro 'YES' 29 | #define YES(n) cout<<((n)?"YES":"NO")<<endl | ^ a.cc:39:13: note: in expansion of macro 'sz' 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^~ a.cc:39:46: error: expected ']' before ';' token 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^ a.cc:39:46: error: expected ')' before ';' token a.cc:29:23: note: to match this '(' 29 | #define YES(n) cout<<((n)?"YES":"NO")<<endl | ^ a.cc:39:5: note: in expansion of macro 'YES' 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^~~ a.cc:39:46: error: expected ')' before ';' token 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^ a.cc:29:22: note: to match this '(' 29 | #define YES(n) cout<<((n)?"YES":"NO")<<endl | ^ a.cc:39:5: note: in expansion of macro 'YES' 39 | YES(a[a.sz()-1]==b[0]&&b[b.sz()-1]==c[0]); | ^~~
s986531353
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[a.size-1]==b[0]&&b[b.size-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:6:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 6 | if(a[a.size-1]==b[0]&&b[b.size-1]==c[0]) cout<<"YES"<<endl; | ~~^~~~ | () a.cc:6:31: 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 '()' ?) 6 | if(a[a.size-1]==b[0]&&b[b.size-1]==c[0]) cout<<"YES"<<endl; | ~~^~~~ | ()
s079813282
p03729
C++
#include<iostream> using namaespace std; int main() { string a,b,c; if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]) cout<<"YES"; else cout<<"NO"; }
a.cc:2:7: error: expected nested-name-specifier before 'namaespace' 2 | using namaespace std; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:5:1: error: 'string' was not declared in this scope 5 | string a,b,c; | ^~~~~~ a.cc:5:1: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:4: error: 'a' was not declared in this scope 6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]) | ^ a.cc:6:19: error: 'b' was not declared in this scope 6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]) | ^ a.cc:6:42: error: 'c' was not declared in this scope 6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]) | ^ a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<"YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout<<"NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s706017849
p03729
C++
#include <cstdio> #include <cstring> using namespace std; int main(void){ char a[128], b[128], c[128]; scanf("%s%s%s",a,b,c); puts(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])? "YES":"NO"); return 0; }
a.cc: In function 'int main()': a.cc:7:29: error: cannot convert 'bool' to 'const char*' 7 | puts(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])? "YES":"NO"); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ | | | bool In file included from /usr/include/c++/14/cstdio:42, from a.cc:1: /usr/include/stdio.h:714:30: note: initializing argument 1 of 'int puts(const char*)' 714 | extern int puts (const char *__s); | ~~~~~~~~~~~~^~~
s543023147
p03729
C++
#include<iostream> #include<string> using namespace std; int main(void) string a, b, c; cin >> a >> b >> c; if (a.end() == b.begin() && b.end() == c.begin()) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc:6:3: error: expected initializer before 'string' 6 | string a, b, c; | ^~~~~~ a.cc:7:9: error: 'cin' does not name a type 7 | cin >> a >> b >> c; | ^~~ a.cc:9:9: error: expected unqualified-id before 'if' 9 | if (a.end() == b.begin() && b.end() == c.begin()) cout << "YES" << endl; | ^~ a.cc:10:9: error: expected unqualified-id before 'else' 10 | else cout << "NO" << endl; | ^~~~ a.cc:11:1: error: expected declaration before '}' token 11 | } | ^
s218295995
p03729
C++
#include <iostream> int main() { std::String A, B, C; std::cin >> A >> B >> C; if (A.back == B.front && B.back == C.front) { std::cout << "YES" <<std::endl; } else { std::cout << "NO" <<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:3:13: error: 'String' is not a member of 'std'; did you mean 'string'? 3 | std::String A, B, C; | ^~~~~~ | string a.cc:4:20: error: 'A' was not declared in this scope 4 | std::cin >> A >> B >> C; | ^ a.cc:4:25: error: 'B' was not declared in this scope 4 | std::cin >> A >> B >> C; | ^ a.cc:4:30: error: 'C' was not declared in this scope 4 | std::cin >> A >> B >> C; | ^
s582521947
p03729
C++
#include <iostream> int main() { std::string A, B, C; std::cin >> A >> B >> C; if (A.back == B.front && B.back == C.front) { std::cout << "YES" <<std::endl; } else { std::cout << "NO" <<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:15: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator==' 5 | if (A.back == B.front && B.back == C.front) { | ~~~~~~ ^~ ~~~~~~~ | | | | | <unresolved overloaded function type> | <unresolved overloaded function type> a.cc:5:36: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator==' 5 | if (A.back == B.front && B.back == C.front) { | ~~~~~~ ^~ ~~~~~~~ | | | | | <unresolved overloaded function type> | <unresolved overloaded function type>
s640494374
p03729
C++
#include <iostream> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; if (a.back()) == b.front() && b.back() == c.front()){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:23: error: expected primary-expression before '==' token 7 | if (a.back()) == b.front() && b.back() == c.front()){ | ^~
s053707900
p03729
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; if(a.at(a.size() - 1)==b.at(1){ if(b.at(b.size() - 1)==c.at(1){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:33: error: expected ';' before '{' token 7 | if(a.at(a.size() - 1)==b.at(1){ | ^ | ; a.cc:13:23: error: expected ')' before ';' token 13 | cout << "NO" << endl; | ^ | ) a.cc:7:5: note: to match this '(' 7 | if(a.at(a.size() - 1)==b.at(1){ | ^
s312450072
p03729
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a; cin >> b; cin >> c; char d, e, f, g; int h, i, j; h = a.size(); i = b.size(); j = c.size(); d = a.at(g-1); e = b.at(h-1); f = b.at(1); g = c.at(1); if(e == j){ if(f == k){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:19:13: error: 'k' was not declared in this scope 19 | if(f == k){ | ^
s731489682
p03729
C++
#include <bits/stdc++.h> #define o(output) cout << output << endl using namespace std; string s,t,u; int a,b,c,d; int l[13]={0,1,3,1,2,1,2,1,1,2,1,2,1}; char A,B; priority_queue<int,vector<int>,greater<int> >small; int main(){ cin >> s >> t >>u; if(s.back()==t.front()&&t.back()==u.front())o("YES") else o("NO"); }
a.cc: In function 'int main()': a.cc:16:3: error: expected ';' before 'else' 16 | else o("NO"); | ^~~~
s672012222
p03729
C++
#include <bits/stdc++.h> int main(){ string a,b,c; cin>>a>>b>>c; if(a.at(a.size())==b.at(b.size())==c.at(c.size())) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:3:3: error: 'string' was not declared in this scope 3 | string a,b,c; | ^~~~~~ a.cc:3:3: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:4:8: error: 'a' was not declared in this scope 4 | cin>>a>>b>>c; | ^ a.cc:4:11: error: 'b' was not declared in this scope 4 | cin>>a>>b>>c; | ^ a.cc:4:14: error: 'c' was not declared in this scope 4 | cin>>a>>b>>c; | ^ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<"YES"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<"YES"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout<<"NO"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | cout<<"NO"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s261659882
p03729
C++
//#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<vector> #include<stack> #include<queue> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define pb push_back #define INF 93193111451418101 #define MIN -93193111451418101 using namespace std; typedef long long ll;//int64 typedef unsigned long long ull; ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; //----------program from here---------- string a,b,c; int main(){ cin>>a>>b>>c; string ab,bf,bb,cf ab=a[a.length()-1]; bf=b[0]; bb=b[b.length()-1]; cf=c[0]; if(ab==bf && bb==cf){ cout<<"YES"; return 0; } cout<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:29:5: error: expected initializer before 'ab' 29 | ab=a[a.length()-1]; | ^~ a.cc:32:5: error: 'cf' was not declared in this scope; did you mean 'bf'? 32 | cf=c[0]; | ^~ | bf a.cc:38:9: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 38 | cout<"NO"; | ~~~~^~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:38:10: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 38 | cout<"NO"; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:38:10: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:6: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::vector<_Tp, _Alloc>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/deque:66, from /usr/include/c++/14/stack:62, from a.cc:7: /usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' 2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::deque<_Tp, _Alloc>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/stack:63: /usr/include/c++/14/bits/stl_stack.h:373:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const stack<_Tp, _Seq>&, const stack<_Tp, _Seq>&)' 373 | operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_stack.h:373:5: note: template argument deduction/substitution failed: a.cc:38:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::stack<_Tp, _Seq>' 38 | cout<"NO"; | ^~~~ In file included from /usr/include/c++/14/queue:66, from a.cc:8: /usr/include/c++/14/bits/stl_queue.h:397:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)' 397 | operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) | ^~~~~~~~ /usr/inclu
s801873290
p03729
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”); return 0; }
a.cc:12:59: error: extended character ” is not valid in an identifier 12 | cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”); | ^ a.cc:12:59: error: extended character ” is not valid in an identifier a.cc:12:65: error: extended character ” is not valid in an identifier 12 | cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”); | ^ a.cc:12:65: error: extended character ” is not valid in an identifier a.cc: In function 'int main()': a.cc:12:59: error: '\U0000201dYES\U0000201d' was not declared in this scope 12 | cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”); | ^~~~~ a.cc:12:65: error: '\U0000201dNO\U0000201d' was not declared in this scope 12 | cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”); | ^~~~
s100305953
p03729
C++
use std::env; use std::io::*; use std::str::*; fn read<T: FromStr>() -> T { let stdin = stdin(); let s = stdin.bytes().map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::<String>(); s.parse::<T>().ok().unwrap() } fn main() { // main の引数 /* 引数なしのときargs.len() = 1; */ let args: Vec<String> = env::args().collect(); let S1 = read::<String>(); let S1 = S1.chars().collect::<Vec<char>>(); let S2 = read::<String>(); let S2 = S2.chars().collect::<Vec<char>>(); let S3 = read::<String>(); let S3 = S3.chars().collect::<Vec<char>>(); if S1[S1.len()-1] == S2[0] && S2[S2.len()-1] == S3[0] { println!("YES"); }else { println!("NO"); } }
a.cc:1:1: error: 'use' does not name a type 1 | use std::env; | ^~~ a.cc:2:1: error: 'use' does not name a type 2 | use std::io::*; | ^~~ a.cc:3:1: error: 'use' does not name a type 3 | use std::str::*; | ^~~ a.cc:5:1: error: 'fn' does not name a type 5 | fn read<T: FromStr>() -> T { | ^~ a.cc:14:1: error: 'fn' does not name a type 14 | fn main() { | ^~