submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s332431634
p03729
C++
#include<iostream> #include<string> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[length(a)-1]==b[0]&&b[length(b)-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:7:8: error: 'length' was not declared in this scope 7 | if(a[length(a)-1]==b[0]&&b[length(b)-1]==c[0]) | ^~~~~~
s504963953
p03729
C++
#include<iostream> #include<string> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[len(a)-1]==b[0]&&b[len(b)-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:7:8: error: 'len' was not declared in this scope; did you mean 'mblen'? 7 | if(a[len(a)-1]==b[0]&&b[len(b)-1]==c[0]) | ^~~ | mblen
s442741506
p03729
C++
#include<iostream> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[len(a)-1]==b[0]&&b[len(b)-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:6:8: error: 'len' was not declared in this scope; did you mean 'mblen'? 6 | if(a[len(a)-1]==b[0]&&b[len(b)-1]==c[0]) | ^~~ | mblen
s116390683
p03729
C++
#include <iostream> #include <string> using namespace std; int main() { string x,y,z,a,b; cin>>x>>y>>z; a=x.size()-1; b=y.size()-1; if(x[a]==y[0] && y[b]==z[0]) cout<<"YES\n"; else cout<<"NO\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:13: 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>'}) 10 | if(x[a]==y[0] && y[b]==z[0]) cout<<"YES\n"; | ^ 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::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:10:27: 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>'}) 10 | if(x[a]==y[0] && y[b]==z[0]) cout<<"YES\n"; | ^ /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) | ~~~~~~~~~~^~~~~
s153991603
p03729
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <typeindex> #include <type_traits> #include <unordered_map> #include <unordered_set> #endif using namespace std; int main() { string a,b,c; cin >>a>>b>>c; if (a[a.length() - 1] == b[0] && b[b.length() - 1] == c[0]) { cout << "YES" << endl; } else cout << "NO" << endl;
a.cc: In function 'int main()': a.cc:63:35: error: expected '}' at end of input 63 | else cout << "NO" << endl; | ^ a.cc:57:12: note: to match this '{' 57 | int main() { | ^
s762210385
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:5:8: error: expected unqualified-id before ',' token 5 | string, a, b, c; | ^
s477057806
p03729
Java
import java.util.Scanner; import java.util.List; import java.util.ArrayList; import java.util.Collections; import java.util.List; 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(); String af=a.substring(a.length()-1,); String bb=b.substring(0,1); String bf=b.substring(b.length()-1,); String cb=c.substring(0,1); if (af.equals(bb) && bf.equals(cb)){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:12: error: illegal start of expression String af=a.substring(a.length()-1,); ^ Main.java:14: error: illegal start of expression String bf=b.substring(b.length()-1,); ^ 2 errors
s095873786
p03729
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF (int)1e9+7 #define rep(i,a,b) for(int i=a;i<b;++i) #define rrep(i,a,b) for(int i=a;i>=b;--i) #define vi vector<int> #define vl vector<ll> #define vvi vector<vector<int>> #define vvl vector<vector<long long>> #define pii pair<int,int> #define pll pair<long,long> #define vpii vector<pii> #define vpll vector<pll> #define N 100005 #define pb push_back #define mp make_pair #define PI 3.1415926535897932384626433832795 ll no_of_div(ll a) { ll cnt=0,i; if (a==2)return 1; for(i=2;i*i<a;i++) { if(a%i==0)cnt+=2; } if(i*i==a)cnt++; return cnt; } //vl a(1001); ll powM(ll a,ll b,ll m ) { a%=m; ll ans=1; while(b>0) { if(b&1)ans=ans*a%m; a=a*a%m; b>>=1; } return ans; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string a,b,c; cin>>a>>b>>c; if(a[a.end()-1]==b[b.begin()]&&b[b.end()-1]==c[c.begin()])cout<<"YES"<<"\n"; else cout<<"NO"<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:61:7: 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> >') 61 | if(a[a.end()-1]==b[b.begin()]&&b[b.end()-1]==c[c.begin()])cout<<"YES"<<"\n"; | ^ 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 '__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:61:21: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 61 | if(a[a.end()-1]==b[b.begin()]&&b[b.end()-1]==c[c.begin()])cout<<"YES"<<"\n"; | ^ /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:61:35: 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> >') 61 | if(a[a.end()-1]==b[b.begin()]&&b[b.end()-1]==c[c.begin()])cout<<"YES"<<"\n"; | ^ /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:61:49: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator') 61 | if(a[a.end()-1]==b[b.begin()]&&b[b.end()-1]==c[c.begin()])cout<<"YES"<<"\n"; | ^ /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) | ~~~~~~~~~~^~~~~
s997069910
p03729
C++
#include <iostream> #include <bitset> #include <vector> #include <string> #include <algorithm> #include <set> #include <map> #include <cmath> #include <regex> using namespace std; using ll = long long int; using dd = long double; const ll MOD = 1e9 + 7; vector<string> dfs(string s, ll depth, vector<char> symbol) { vector<string> ret; if (depth == 0) { ret.push_back(s); return ret; } for (ll i = 0; i < symbol.size(); i++) { auto vec = dfs(s + symbol[i], depth - 1, symbol); for (auto &&e : vec) { ret.push_back(e); } } return ret; } ll gcd(ll a, ll b) { if (a % b == 0) { return b; } return gcd(b, a % b); } int main() { string a, b, c; cin >> a >> b >> c; bool ok = (a.back() == b.front()) && b.back() == c.front()); cout << (ok ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:49:63: error: expected ',' or ';' before ')' token 49 | bool ok = (a.back() == b.front()) && b.back() == c.front()); | ^
s129931556
p03729
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string a, b, c; cin >> a >> b >> c; string ar = reverse(a.begin(), a.end()); string br = reverse(b.begin(), b.end()); if (ar.at(0) == b.at(0) && br.at(0) == c.at(0)) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:22: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 8 | string ar = reverse(a.begin(), a.end()); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~ a.cc:9:22: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 9 | string br = reverse(b.begin(), b.end()); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~
s523799668
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a, b, c; cin >> a >> b >> c; if(a.at(size() - 1) == b.at(0) && b.at(size() - 1) == c.at(0)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: no matching function for call to 'size()' 8 | if(a.at(size() - 1) == b.at(0) && b.at(size() - 1) == c.at(0)) | ~~~~^~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 262 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided a.cc:8:46: error: no matching function for call to 'size()' 8 | if(a.at(size() - 1) == b.at(0) && b.at(size() - 1) == c.at(0)) | ~~~~^~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 262 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ /usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided
s840334974
p03729
Java
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String a = sc.nextString(); String b = sc.nextString(); String c = sc.nextString(); if (a.charAt(a.length() - 1) == b.charAt(0)) { if (b.charAt(b.length() - 1) == c.charAt(0)) { System.out.println("YES"); } } System.out.println("NO"); } }
Main.java:6: error: cannot find symbol String a = sc.nextString(); ^ symbol: method nextString() location: variable sc of type Scanner Main.java:7: error: cannot find symbol String b = sc.nextString(); ^ symbol: method nextString() location: variable sc of type Scanner Main.java:8: error: cannot find symbol String c = sc.nextString(); ^ symbol: method nextString() location: variable sc of type Scanner 3 errors
s643512168
p03729
C++
a, b, c = input().split() print("YES" if a[-1] == b[0] and b[-1] == c[0] else "NO")
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = input().split() | ^
s652387642
p03729
C++
include <iostream>; using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; cout<<(a[a.size()-1]==b[0]&&b[b.size()]==c[0]?"YES":"NO")<<endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream>; | ^~~~~~~ a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | string a,b,c; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | include <iostream>; a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin>>a>>b>>c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | include <iostream>; a.cc:5:8: error: 'a' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:5:11: error: 'b' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:5:14: error: 'c' was not declared in this scope 5 | cin>>a>>b>>c; | ^ a.cc:6:3: error: 'cout' was not declared in this scope 6 | cout<<(a[a.size()-1]==b[0]&&b[b.size()]==c[0]?"YES":"NO")<<endl; | ^~~~ a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:6:62: error: 'endl' was not declared in this scope 6 | cout<<(a[a.size()-1]==b[0]&&b[b.size()]==c[0]?"YES":"NO")<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | include <iostream>;
s497009435
p03729
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; if (a.at(a.aize() - 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:7:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'aize'; did you mean 'size'? 7 | if (a.at(a.aize() - 1) == b.at(0) && b.at(b.size() - 1) == c.at(0)) { | ^~~~ | size
s416605335
p03729
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const long long MOD=1e9+7; int main() { string a,b,c; cin>>a>>b>>c; int la=a.size(),lb=b.size(),lc=c.size(); if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:11:8: error: 'ia' was not declared in this scope; did you mean 'la'? 11 | if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl; | ^~ | la
s759556529
p03729
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const long long MOD=1e9+7; int main() { string a,b,s; cin>>a>>b>>c; int la=a.size(),lb=b.size(),lc=c.size(); if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:9:14: error: 'c' was not declared in this scope 9 | cin>>a>>b>>c; | ^ a.cc:11:8: error: 'ia' was not declared in this scope; did you mean 'la'? 11 | if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl; | ^~ | la
s876662260
p03729
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const long long MOD=1e9+7; int main() { string a,b,s; cin>>a>>b>>c; int la=a.size(),lb=b.size(),lc=c.size(); if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl; else coutNN"NO"<<endl; }
a.cc: In function 'int main()': a.cc:9:14: error: 'c' was not declared in this scope 9 | cin>>a>>b>>c; | ^ a.cc:11:8: error: 'ia' was not declared in this scope; did you mean 'la'? 11 | if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl; | ^~ | la a.cc:12:8: error: 'coutNN' was not declared in this scope 12 | else coutNN"NO"<<endl; | ^~~~~~
s097767164
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin>>A>>B>>C; int N=A.size(); int M=B.size(); if(A.at(N-1)!=B.at(0)) cout<<"NO"<<endl; ellse{ if(B.at(M-1)!=C.at(0)) cout<<"NO"<<endl; else cout<<"YES"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'ellse' was not declared in this scope 10 | ellse{ | ^~~~~
s659891239
p03729
C++
#include <iostream> #include <stirng> using namespace std; int main() { string a,b,c; cin >> a >> b >> c; if(a[a.length()] == b[0] and b[b.length()] == c[0]){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc:2:10: fatal error: stirng: No such file or directory 2 | #include <stirng> | ^~~~~~~~ compilation terminated.
s966873842
p03729
C++
a,b,c=input().split() if a[len(a)-1]==b[0] and b[len(b)-1]==c[0]: print("YES") else: print("NO")
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c=input().split() | ^
s549809681
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin>>A>>B>>C; a=A.size(); if(A.at(a-1)==B.at(0)&&B.at(0)==C.at(0)){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:4: error: 'a' was not declared in this scope 7 | a=A.size(); | ^
s660520959
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin>>A>>B>>C; int a; int a=A.size(); if(A.at(a-1)==B.at(0)&&B.at(0)==C.at(0)){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:7: error: redeclaration of 'int a' 7 | int a=A.size(); | ^ a.cc:6:7: note: 'int a' previously declared here 6 | int a; | ^
s995797261
p03729
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s,t,u; cin >> s >> y >> u; if(s[s.size()-1]==t[0]&&t[t.size()-1]==u[0]){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:15: error: 'y' was not declared in this scope 7 | cin >> s >> y >> u; | ^
s661727738
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(); if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1)==c.charAt(0)) System.out.println("Yes"); }else{ System.out.println("No"); } } }
Main.java:12: error: illegal start of type }else{ ^ Main.java:16: error: class, interface, enum, or record expected } ^ 2 errors
s764957512
p03729
C++
#include <bits/stdc++.h> using ll = long long; #define FOR(i, k, n) for(ll i = (k); i < (n); i++) #define FORe(i, k, n) for(ll i = (k); i <= (n); i++) #define FORr(i, k, n) for(ll i = (k)-1; i > (n); i--) #define FORre(i, k, n) for(ll i = (k)-1; i >= (n); i--) #define REP(i, n) FOR(i, 0, n) #define REPr(i, n) FORre(i, n, 0) #define ALL(x) (x).begin(), (x).end() #define ALLr(x) (x).rbegin(), (x).rend() #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) using namespace std; const int INF = 1001001001; int main(void){ string a, b, c; cin >> a >> b >> c; if(a.back == b[0] && b.back == c[0]) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:20:13: 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==' 20 | if(a.back == b[0] && b.back == c[0]) cout << "YES" << endl; a.cc:20:31: 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==' 20 | if(a.back == b[0] && b.back == c[0]) cout << "YES" << endl;
s037097712
p03729
C
#include<stdio.h> #include<string.h> int main() { char* a = new char[11]; char* b = new char[11]; char* c = new char[11]; scanf("%s %s %s", a, b, 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:6:15: error: 'new' undeclared (first use in this function) 6 | char* a = new char[11]; | ^~~ main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in main.c:6:19: error: expected ',' or ';' before 'char' 6 | char* a = new char[11]; | ^~~~ main.c:7:19: error: expected ',' or ';' before 'char' 7 | char* b = new char[11]; | ^~~~ main.c:8:19: error: expected ',' or ';' before 'char' 8 | char* c = new char[11]; | ^~~~
s113492189
p03729
C
#include<cstdio> #include<cstring> int main() { char* a = new char[11]; char* b = new char[11]; char* c = new char[11]; scanf("%s %s %s", a, b, c); if((a[strlen(a) - 1] == b[0]) && (b[strlen(b) - 1] == c[0])) { printf("YES"); } else { printf("NO"); } return 0; }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s671435414
p03729
C
#include <stdio.h> 2 #include <string.h> 3 int main() 4 { 5 char a[11],b[11],c[11]; 6 7 scanf("%s%s%s",a,b,c); 8 int anagasa = strlen(a); 9 int bnagasa = strlen(b); 10 11 if(a[anagasa-1]==b[0] && b[bnagasa-1]==c[0]) 12 printf("YES\n"); 13 else 14 printf("NO\n"); 15 return 0; 16 }
main.c:2:3: error: expected identifier or '(' before numeric constant 2 | 2 #include <string.h> | ^ main.c:2:5: error: stray '#' in program 2 | 2 #include <string.h> | ^
s951377807
p03729
C++
#include <stdio.h> 2 #include <string.h> 3 int main() 4 { 5 char a[11],b[11],c[11]; 6 7 scanf("%s%s%s",a,b,c); 8 int anagasa = strlen(a); 9 int bnagasa = strlen(b); 10 11 if(a[anagasa-1]==b[0] && b[bnagasa-1]==c[0]) 12 printf("YES\n"); 13 else 14 printf("NO\n"); 15 return 0; 16 }
a.cc:2:5: error: stray '#' in program 2 | 2 #include <string.h> | ^ a.cc:2:3: error: expected unqualified-id before numeric constant 2 | 2 #include <string.h> | ^
s586759918
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); int ae = strlen(A); //Aの文字数 int be = strlen(B); //Bの文字数 if (A[ae-1]==b[0] && b[be-1]==c[0]) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:13:22: error: 'b' was not declared in this scope 13 | if (A[ae-1]==b[0] && b[be-1]==c[0]) | ^ a.cc:13:39: error: 'c' was not declared in this scope 13 | if (A[ae-1]==b[0] && b[be-1]==c[0]) | ^
s506846804
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); int ae = strlen(A); //Aの文字数 int be = strlen(B); //Bの文字数 if (A[ae-1]==b[0] && b[be-1]==c[0]) printf("YES\n") else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:13:22: error: 'b' undeclared (first use in this function) 13 | if (A[ae-1]==b[0] && b[be-1]==c[0]) | ^ main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in main.c:13:39: error: 'c' undeclared (first use in this function) 13 | if (A[ae-1]==b[0] && b[be-1]==c[0]) | ^ main.c:14:32: error: expected ';' before 'else' 14 | printf("YES\n") | ^ | ; 15 | else | ~~~~
s101930402
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); int ae = strlen(A); //Aの文字数 int be = strlen(B); //Bの文字数 if (A[ae-1]==b[0] && b[be-1]==c[0]) printf("YES\n") else printf("NO\n"); return 0; } ~
main.c: In function 'main': main.c:13:22: error: 'b' undeclared (first use in this function) 13 | if (A[ae-1]==b[0] && b[be-1]==c[0]) | ^ main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in main.c:13:39: error: 'c' undeclared (first use in this function) 13 | if (A[ae-1]==b[0] && b[be-1]==c[0]) | ^ main.c:14:32: error: expected ';' before 'else' 14 | printf("YES\n") | ^ | ; 15 | else | ~~~~ main.c: At top level: main.c:20:1: error: expected identifier or '(' before '~' token 20 | ~ | ^
s393331006
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]))) printf("YES\n") else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:10:19: error: expected ';' before 'else' 10 | printf("YES\n") | ^ | ; 11 | else printf("NO\n"); | ~~~~
s734360333
p03729
C
#include<stdio.h> #include<string.h> int main(void) { char a[11],b[11],c[11]; int ar,br,cr; scanf("%s%s%s",a,b,c); ar=strlen(a); br=strlen(b); cr=strlen(c); if((a[ar-1]==b[0])&&(b[br-1]==c[0])) printf("Yes\n"); else printf("No\n"); return 0; } ~
main.c:17:1: error: expected identifier or '(' before '~' token 17 | ~ | ^
s501320398
p03729
C++
#include<stdio.h> #include<string.h> int main(void) { char A[10],B[10],C[10]; int a,b; scanf("%s%s%s",A,B,C); a = strlen(A); b = strlen(B); if((A[a-1] == B[0])&&(B[b-1] == C[0])) printf("YES\n"); else printf("NO\n"); retun 0; }
a.cc: In function 'int main()': a.cc:15:3: error: 'retun' was not declared in this scope 15 | retun 0; | ^~~~~
s008308378
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])) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:9:35: error: expected identifier before '(' token 9 | if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0])) | ^
s766729757
p03729
C
#include<stdio.h> int main() { char A[11],B[11],C[11]; scanf("%s%s%s",A,B,C); if((A[10]==B[0])&&(B[10]==C[0])) printf("YES") else printf("NO"); return 0; }
main.c: In function 'main': main.c:8:20: error: expected ';' before 'else' 8 | printf("YES") | ^ | ; 9 | else | ~~~~
s272834348
p03729
C
#include <stdio.h> #include <string.h> int main() { int i,j; char A[11],B[11],C[11]; scanf("%s%s%s",A,B,C); i=strlen(A)-1; j=strlen(B)-1; if(A[i]==B[0]&&B[j]==C[0]) printf("YES\n"); else printf("NO\n"); return 0; } ~
main.c:16:1: error: expected identifier or '(' before '~' token 16 | ~ | ^
s767921665
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])) printf("YES\n") else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:9:35: error: expected identifier before '(' token 9 | if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0])) | ^
s950276442
p03729
C
#include<stdio.h> int main() { char A[11],B[11],C[11]; scanf("%s%s%s",A,B,C); if((A[9]==B[0])&&(B[9]==C[0])) printf("YES") else printf("NO"); }
main.c: In function 'main': main.c:8:20: error: expected ';' before 'else' 8 | printf("YES") | ^ | ; 9 | else | ~~~~
s015366582
p03729
C
#include <stdio.h> #include <string.h> int main(void) { char A[11],B[11],C[11]; int a,b; scanf("%s%s%s", A, B, C); a=strlen(A); b=strlen(B); if((A[a-1]==B[0])&&(B[b-1]==c[0])) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:13:33: error: 'c' undeclared (first use in this function) 13 | if((A[a-1]==B[0])&&(B[b-1]==c[0])) | ^ main.c:13:33: note: each undeclared identifier is reported only once for each function it appears in
s200882457
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] ) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: expected primary-expression before ']' token 8 | scanf("%s%s%s",a[],b[],c[]); | ^ a.cc:8:25: error: expected primary-expression before ']' token 8 | scanf("%s%s%s",a[],b[],c[]); | ^ a.cc:8:29: error: expected primary-expression before ']' token 8 | scanf("%s%s%s",a[],b[],c[]); | ^
s340955395
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])) printf("Yes\n"); else printf("No\n"); return 0; }
main.c: In function 'main': main.c:9:35: error: expected identifier before '(' token 9 | if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0])) | ^
s517310194
p03729
C++
#include<stdio.h> #include<string.h> int mailn(void){ char A[100],B[100],C[100]; scanf("%s%s%s",A,B,C); x=strlen(A); y=strlen(b); z=strlen(C); if(A[x-1]==B[0] && B[y-1]==C[0]) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int mailn()': a.cc:6:2: error: 'x' was not declared in this scope 6 | x=strlen(A); | ^ a.cc:7:2: error: 'y' was not declared in this scope 7 | y=strlen(b); | ^ a.cc:7:11: error: 'b' was not declared in this scope 7 | y=strlen(b); | ^ a.cc:8:2: error: 'z' was not declared in this scope 8 | z=strlen(C); | ^
s977497210
p03729
C
#include<stdio.h> int main() { char A[11],B[11],C[11]; scanf("%s%s%s",A,B,C); if((A[9]==B[0])&&(B[9]==C[0])) printf("Yes"); else printf("No"); return 0; } ~
main.c:13:1: error: expected identifier or '(' before '~' token 13 | ~ | ^
s894556557
p03729
C
#include <stdio.h> #include <string.h> int main(void) { char A[11],B[11],C[11]; int a,b,c; scanf("%s%s%s",A,B,C); a=strlen(A); b=strlen(B); c=strlen(C); if((A[a-1]==B[0])&&(B[b-1]==c[0])) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:13:34: error: subscripted value is neither array nor pointer nor vector 13 | if((A[a-1]==B[0])&&(B[b-1]==c[0])) | ^
s941968278
p03729
C
int main(void) { char A[11],B[11],C[11]; int a,b,c; scanf("%s%s%s",A,B,C); a=strlen(A); b=strlen(B); c=strlen(C); if((A[a]==B[0])&&(B[b]==c[0])) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:6:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%s%s%s",A,B,C); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void) main.c:6:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 6 | scanf("%s%s%s",A,B,C); | ^~~~~ main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 8 | a=strlen(A); b=strlen(B); c=strlen(C); | ^~~~~~ main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen' +++ |+#include <string.h> 1 | int main(void) main.c:8:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 8 | a=strlen(A); b=strlen(B); c=strlen(C); | ^~~~~~ main.c:8:7: note: include '<string.h>' or provide a declaration of 'strlen' main.c:10:30: error: subscripted value is neither array nor pointer nor vector 10 | if((A[a]==B[0])&&(B[b]==c[0])) | ^ main.c:11:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 11 | printf("YES\n"); | ^~~~~~ main.c:11:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:11:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 13 | printf("NO\n"); | ^~~~~~ main.c:13:7: note: include '<stdio.h>' or provide a declaration of 'printf'
s217478992
p03729
C++
int main(void) { char A[11],B[11],C[11]; int a,b,c; scanf("%s%s%s",A,B,C); a=strlen(A); b=strlen(B); c=strlen(C); if((A[a]==B[0])&&(B[b]==c[0])) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'scanf' was not declared in this scope 6 | scanf("%s%s%s",A,B,C); | ^~~~~ a.cc:8:7: error: 'strlen' was not declared in this scope 8 | a=strlen(A); b=strlen(B); c=strlen(C); | ^~~~~~ a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' +++ |+#include <cstring> 1 | int main(void) a.cc:10:30: error: invalid types 'int[int]' for array subscript 10 | if((A[a]==B[0])&&(B[b]==c[0])) | ^ a.cc:11:7: error: 'printf' was not declared in this scope 11 | printf("YES\n"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main(void) a.cc:13:7: error: 'printf' was not declared in this scope 13 | printf("NO\n"); | ^~~~~~ a.cc:13:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
s591309853
p03729
C
#include <stdio.h> #include <string.h> int main(void) { char A[11],B[11],C[11]; int a,b,c; scanf("%s%s%s",&A,&B,&C); a=strlen(A); b=strlen(B); c=strlen(C); if((A[a]==B[0])&&(B[b]==c[0])) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:13:30: error: subscripted value is neither array nor pointer nor vector 13 | if((A[a]==B[0])&&(B[b]==c[0])) | ^
s023383526
p03729
C
#include<stdio.h> #include<string.h> int main(void) { int a,b; char A[11],B[11],C[11]; scanf("%s%s%s", &A, &B, &C); a=strlen(chat *A); b=strlen(chat *B); if((A[a]==B[0]) && (B[b]==C[0])) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:11:13: error: 'chat' undeclared (first use in this function); did you mean 'char'? 11 | a=strlen(chat *A); | ^~~~ | char main.c:11:13: note: each undeclared identifier is reported only once for each function it appears in
s550866055
p03729
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String A=sc.next(),B=sc.next(),C=sc.next(); if(A.charAt((A.length()-1)==B.charAt(0)) && (B.charAt(B.length()-1)==C.charAt(0))){ System.out.println("YES"); }else{ System.out.println("No"); } } }
Main.java:7: error: incompatible types: boolean cannot be converted to int if(A.charAt((A.length()-1)==B.charAt(0)) && (B.charAt(B.length()-1)==C.charAt(0))){ ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s660974606
p03729
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1e18; const ll MOD = 1e9 + 7; #define all(v) v.begin(), v.end() #define repi(i, n, init) for (ll i = init; i < (n); i++) #define repd(i, n, init) for (ll i = (n); i >= init; i--) #define repm(i, m) for (auto i = m.begin(); i != m.end(); i++) int main() { string A, B, C; cin >> A >> B >> C; cout << (A.at(A.length() - 1) == B.at(0) && B.at(B.length() - 1) == C.at(0)) ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:97: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 15 | cout << (A.at(A.length() - 1) == B.at(0) && B.at(B.length() - 1) == C.at(0)) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s332423864
p03729
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1e18; const ll MOD = 1e9 + 7; #define all(v) v.begin(), v.end() #define repi(i, n, init) for (ll i = init; i < (n); i++) #define repd(i, n, init) for (ll i = (n); i >= init; i--) #define repm(i, m) for (auto i = m.begin(); i != m.end(); i++) int main() { string A, B, C; sin >> A >> B >> C; cout << (A.at(A.length() - 1) == B.at(0) && B.at(B.length() - 1) == C.at(0)) ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: no match for 'operator>>' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 14 | sin >> A >> B >> C; | ~~~~^~~~ 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:4064:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]' 4064 | operator>>(basic_istream<char>& __is, basic_string<char>& __str); | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4059:48: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>&' 4059 | operator>>(basic_istream<_CharT, _Traits>& __is, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:14:12: note: cannot convert 'std::sin' (type '<unresolved overloaded function type>') to type 'std::byte' 14 | sin >> A >> B >> C; | ^ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::bitset<_Nb>' In file included from /usr/include/c++/14/istream:1109, 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/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: couldn't deduce template parameter '_Traits' /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: couldn't deduce template parameter '_Traits' /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: couldn't deduce template parameter '_Traits' /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: mismatched types '_CharT*' and 'std::__cxx11::basic_string<char>' /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: couldn't deduce template parameter '_Traits' /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<char, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: couldn't deduce template parameter '_Traits' /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: a.cc:14:12: note: couldn't deduce template parameter '_Istream' 14 | sin >> A >> B >> C; | ^ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::complex<_Tp>' In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'float(float)' 14 | sin >> A >> B >> C; | ^ a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'long double(long double)' a.cc:14:12: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'double(double) noexcept' a.cc:14:12: note: couldn't deduce template parameter '_CharT' /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:14:12: note: mis
s059727946
p03729
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:10: error: request for member 'length' in 'a', which is of non-class type 'int' 6 | if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){ | ^~~~~~ a.cc:6:24: error: invalid types 'int[int]' for array subscript 6 | if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){ | ^ a.cc:6:35: error: request for member 'length' in 'b', which is of non-class type 'int' 6 | if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){ | ^~~~~~ a.cc:6:49: error: invalid types 'int[int]' for array subscript 6 | if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){ | ^
s485578777
p03729
C++
// include // ------------------------------------------------ #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <math.h> using namespace std; // func // ------------------------------------------------ int CalcSumOfDigit(int n); // 各桁の和を計算する。 string upper(string str); // 英字を大文字に変換する。 string lower(string str); // 英字を小文字に変換する。 // define // ------------------------------------------------ #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define pb push_back #define sz(a) int((a).size()) #define rep(i,n) for(int(i)=0;(i)<(n);(i)++) #define repe(i,n) for(int(i)=0;(i)<=(n);(i)++) #define vsort(v) sort((v).begin(),(v).end()) #define rvsort(v) sort(rall((v))) #define vi vector<int> const int INF = 1e9; // code // ------------------------------------------------ int main() { string a,b,c; bool b = false; if((a[sz(a)] == b[0]) && (b[sz(b)] == c[0]) ) cout << "YES" << endl; else { cout <<"NO" << endl; } return 0; } // funcの実体 // ------------------------------------------------ int CalcSumOfDigit(int n) { int s = 0; while(n) { s += n % 10; n = n / 10; } return s; } string upper(string str) { for(auto itr = str.begin();itr != str.end() ; itr++) { if(97 <= *itr && *itr <= 122) { *itr = *itr - 32; } } return str; } string lower(string str) { for(auto itr = str.begin();itr != str.end() ; itr++) { if(65 <= *itr && *itr <= 90) { *itr = *itr + 32; } } return str; }
a.cc: In function 'int main()': a.cc:36:8: error: conflicting declaration 'bool b' 36 | bool b = false; | ^ a.cc:34:12: note: previous declaration as 'std::string b' 34 | string a,b,c; | ^
s355174250
p03729
C++
#include <iostream> #include <vector> #include <string> #include <math.h> #include <algorithm> #include <set> #include <iomanip> #include <stdio.h> #include <sstream> #include <string> using namespace std; int main(void){ int a, b, c; cin>>a>>b>>c; if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:15:10: error: request for member 'length' in 'a', which is of non-class type 'int' 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^~~~~~ a.cc:15:24: error: invalid types 'int[int]' for array subscript 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^ a.cc:15:33: error: request for member 'length' in 'b', which is of non-class type 'int' 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^~~~~~ a.cc:15:47: error: invalid types 'int[int]' for array subscript 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^
s576435512
p03729
C++
#include <iostream> #include <vector> #include <string> #include <math.h> #include <algorithm> #include <set> #include <iomanip> #include <stdio.h> #include <sstream> #include <string> using namespace std; int main(void){ int a, b, c; cin>>a>>b>>C; if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:14:14: error: 'C' was not declared in this scope 14 | cin>>a>>b>>C; | ^ a.cc:15:10: error: request for member 'length' in 'a', which is of non-class type 'int' 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^~~~~~ a.cc:15:24: error: invalid types 'int[int]' for array subscript 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^ a.cc:15:33: error: request for member 'length' in 'b', which is of non-class type 'int' 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^~~~~~ a.cc:15:47: error: invalid types 'int[int]' for array subscript 15 | if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){ | ^
s523704891
p03729
C++
// 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから // ぜったいあきらめない #if defined(DAIJOBU) #include "/home/ichigo/includes.hpp" #include "/home/ichigo/debug.hpp" #define deb(x...) cerr << "[" << #x << "] = ["; _print(x) #else #include <bits/stdc++.h> #define deb(x...) #endif #define FIO {ios::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);} using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int main(){ FIO string s1, s2, s3; cin >> s1 >> s2 >> s3; if(s1[s1.size() - 1] == s2[0] && s2[s2.size() - 1] == s3[0])puts("YES"); else puts("NO")'' return 0; }
a.cc:23:24: error: empty character constant 23 | else puts("NO")'' | ^~ a.cc: In function 'int main()': a.cc:23:24: error: expected ';' before '\x0' 23 | else puts("NO")'' | ^~ | ;
s297763639
p03729
C++
#include <bits/stdc++.h> using namespace std; int main() { string A,B,C; cin >>A>>B>>C; if(A.at(A.size())==B.at(0) && B.at(A.size())==C.at(0)) cout<<"YES"<<endl; else cout<<"NO"<<endl; }#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:8:5: error: stray '#' in program 8 | }#include <bits/stdc++.h> | ^ a.cc:8:6: error: 'include' does not name a type 8 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:10:6: error: redefinition of 'int main()' 10 | int main() { | ^~~~ a.cc:3:6: note: 'int main()' previously defined here 3 | int main() { | ^~~~
s990059459
p03729
C++
a, b, c = input().split() if a[-1] == b[0] and b[-1] == c[0]: print("Yes") else: print("No"
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = input().split() | ^
s347716059
p03729
C++
#include <bits/stdc++.h> #include <math.h> #define REP(i, n) for(int i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; typedef pair<int, int> P; const int INF = 1001001001; const int mINF = -1001001001; int main() { char a[10],b[10],c[10]; cin >> a >> b >> c; int a_num = strlen(a); int b_num = strlen(b); int ans ="NO"; if(a[a_num-1]==b[0]&&b[b_num-1]==c[0]) ans="YES"; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:10: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 17 | int ans ="NO"; | ^~~~ | | | const char* a.cc:18:44: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 18 | if(a[a_num-1]==b[0]&&b[b_num-1]==c[0]) ans="YES"; | ^~~~~ | | | const char*
s639874482
p03729
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Scanner; 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(); if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(length()-1) == c.charAt(0)){ System.out.print("YES"); }else{ System.out.print("NO"); } } }
Main.java:13: error: cannot find symbol if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(length()-1) == c.charAt(0)){ ^ symbol: method length() location: class Main 1 error
s341077222
p03729
C++
#include <iostream> #include <cmath> #include <algorithm> #include <cstring> #include <string> #include <cstdio> #include <cstdlib> #include <cctype> using namespace std; int main() { long long a, b, c; cin >> a >> b >> c; if (a == 1) { cout << "YES" << endl; return 0; } for (int i = 2; i <= 1000; i+ { if ((a * i % b == c)) { cout << "YES" << endl return 0; } } cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:20:5: error: expected primary-expression before '{' token 20 | { | ^ a.cc:19:34: error: expected ')' before '{' token 19 | for (int i = 2; i <= 1000; i+ | ~ ^ | ) 20 | { | ~ a.cc:23:34: error: expected ';' before 'return' 23 | cout << "YES" << endl | ^ | ; 24 | return 0; | ~~~~~~
s991788659
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"; else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:7:13: 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]' 7 | if(a[a.size]==b[0] && b[b.size]==c[0])cout<<"YES"; | ^ 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:7:32: 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]' 7 | if(a[a.size]==b[0] && b[b.size]==c[0])cout<<"YES"; | ^ /usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here 1076 | size() const _GLIBCXX_NOEXCEPT | ^~~~
s548077880
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 if { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:12:11: error: expected '(' before '{' token 12 | else if { | ^ | (
s892774031
p03729
C++
#include<bits/stdc++.h> #include <math.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define lper(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define mp make_pair #define all(x) (x).begin(),(x).end() #define CST(x) cout<<fixed<<setprecision(x) using ll=long long; using vl=vector<ll>; using vvl=vector<vector<ll>>; using pl=pair<ll,ll>; const ll MOD=1000000007; const ll MOD9=998244353; const int inf=1e9; const ll INF=4e18; const ll dy[4]={1,0,-1,0}; const ll dx[4]={0,-1,0,1}; int main() { string a; string b; string c; cin >>a>>b>>c>>; int x=a.size()-1; int y=b.size()-1; int z=c.size()-1; if((a.at(x)==b.at(0)) && (b.at(y)==c.at(0))) { cout <<"YES" << endl; } else { cout <<"NO" << endl; } }
a.cc: In function 'int main()': a.cc:27:18: error: expected primary-expression before ';' token 27 | cin >>a>>b>>c>>; | ^
s091358647
p03729
C++
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; typedef long long ll; 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"<<nedl; return 0; }
a.cc: In function 'int main()': a.cc:10:20: error: 'nedl' was not declared in this scope 10 | else cout<<"NO"<<nedl; | ^~~~
s491295960
p03729
C++
#include <bits/stdc++.h> using namespace std; #define pp pair<int,int> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ll long long #define ld long double #define all(a) (a).begin(),(a).end() #define mk make_pair ll MOD=1000000007; ll mod=998244353; int inf=1000001000; ll INF=1e18+5; int main() { string a,b,c; cin >> a >> b >> c; if (a[a.size()-1]==b[0] && b[s.size()-1]==c[0]) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:18:31: error: 's' was not declared in this scope 18 | if (a[a.size()-1]==b[0] && b[s.size()-1]==c[0]) cout << "YES" << endl; | ^
s811408874
p03729
C++
#include <bits/stdc++.h> using namespace std; int main() string a; string b; string c; cin >>a >> b >>c; int x=a.size(); int y=b.size(); int z=c.size(); if ((a.at(x) ==b.at(0)) && (b.at(y)==c.at(0))) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:6:3: error: expected initializer before 'string' 6 | string a; | ^~~~~~ a.cc:9:1: error: 'cin' does not name a type 9 | cin >>a >> b >>c; | ^~~ a.cc:10:7: error: 'a' was not declared in this scope 10 | int x=a.size(); | ^ a.cc:13:1: error: expected unqualified-id before 'if' 13 | if ((a.at(x) ==b.at(0)) && (b.at(y)==c.at(0))) { | ^~ a.cc:16:1: error: expected unqualified-id before 'else' 16 | else { | ^~~~ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s595538657
p03729
C++
//{{{ #include <bits/stdc++.h> using namespace std; const string truename = "YES"; const string falsename = "NO"; struct IoSetup { IoSetup(){ cin.tie(nullptr); // ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); }; } ioSetup; //{{{ rep rrep loop #define repX(a,b,c,d,x,...) x #define repN(a) repX a #define rep(...) repN((__VA_ARGS__,rep4,rep3,rep2,loop))(__VA_ARGS__) #define rrep(...) repN((__VA_ARGS__,rrep4,rrep3,rrep2))(__VA_ARGS__) #define loop(n) rep2(i_,n) #define rep2(i,n) rep3(i,0,n) #define rep3(i,begin,end) for(ll i=(ll)(begin),i##_end=(ll)(end);i<i##_end;++i) #define rep4(i,begin,end,step) for(ll i=(ll)(begin),i##_end=(ll)(end);i<i##_end;i+=step) #define rrep2(i,n) rrep3(i,0,n) #define rrep3(i,begin,end) for(ll i=(ll)(end-1),i##_end=(ll)(begin);i>=i##_end;--i) #define rrep4(i,begin,end,step) for(ll i=(ll)(end-1),i##_end=(ll)(begin);i>=i##_end;i-=step) //}}} #define each(x,a) for(auto&x:a) #define sz(x) ((ll)(x).size()) //{{{ Type using ull = unsigned long long; using ll = long long; using pii = pair<ll, ll>; using vp = vector<pii>; using vs = vector<string>; using vi = vector<ll>; using vvi = vector<vi>; #define v(T) vector<T> #define vv(T) v(v(T)) template<class T> vector<T> Vector(size_t a, T val){return vector<T>(a, val);} template<class... Tail> auto Vector(size_t a, Tail... tail){ return vector<decltype(Vector(tail...))>(a, Vector(tail...)); } //}}} //{{{ STL overload template<class T, class Compare>inline void sort(T&a, Compare comp) { sort(a.begin(), a.end(), comp); } template<class T> inline void sort(T&a) { sort(a.begin(), a.end()); } template<class T> inline void rsort(T&a) { sort(a.rbegin(), a.rend()); } template<class T> inline void reverse(T&a) { reverse(a.begin(), a.end()); } template<class T> inline bool next_permutation(T&a) { return next_permutation(a.begin(), a.end()); } template<class T, class U>inline bool binary_search(T&a, const U&v) { return binary_search(a.begin(), a.end(), v); } template<class T, class U>inline auto lower_bound(T&a, const U&v) { return lower_bound(a.begin(), a.end(), v); } template<class T, class U>inline auto upper_bound(T&a, const U&v) { return upper_bound(a.begin(), a.end(), v); } //}}} //{{{ Functions template<class T> inline T Sum(vector<T>&a){ return accumulate(a.begin(), a.end(), (T)0); } template<class T> inline T Max(vector<T>&a){ return *max_element(a.begin(), a.end()); } template<class T> inline T Min(vector<T>&a){ return *min_element(a.begin(), a.end()); } template<class T, class U> inline bool chmax(T&a, const U&b){ return (b > a) ? (a = b, true) : false; } template<class T, class U> inline bool chmin(T&a, const U&b){ return (b < a) ? (a = b, true) : false; } ll gcd(const ll a, const ll b){ return b ? gcd(b, a % b) : a; } ll lcm(const ll a, const ll b){ return a / gcd(a, b) * b; } ll ceil(const ll a, const ll b){ return (a + b - 1) / b; } ll popcount(ll a){ a -= ((a >> 1) & 0x5555555555555555LL); a = (a & 0x3333333333333333LL) + ((a >> 2) & 0x3333333333333333LL); a = (a + (a >> 4)) & 0x0f0f0f0f0f0f0f0fLL; a += (a >> 8); a += (a >> 16); a += (a >> 32); return a & 0x7f; } //}}} //{{{ in class in { int n, m; public: in() : n(0), m(0){} in(int n) : n(n), m(0){}; in(int n, int m) : n(n), m(m){}; template <class T> operator T() {assert(n==0); assert(m==0); T ret; cin >> ret; return ret; } template <class T> operator vector<T>() {assert(n>0); assert(m==0); vector<T> ret(n); for(ll i=0;i<(ll)n;++i) cin>>ret[i]; return ret; } template <class T> operator vector<vector<T>>() {assert(n>0); assert(m>0); vector<vector<T>> ret(n, vector<T>(m)); for(ll i=0;i<(ll)n;++i) for(ll j=0;j<(ll)m;++j) cin>>ret[i][j]; return ret; } }; //}}} //{{{ << overload template<class T,class U>ostream &operator<<(ostream &o,const pair<T,U>&j){o<<"{"<<j.first<<", "<<j.second<<"}";return o;} template<class T,class U>ostream &operator<<(ostream &o,const map<T,U>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;} template<class T>ostream &operator<<(ostream &o,const set<T>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;} template<class T>ostream &operator<<(ostream &o,const multiset<T>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;} template<class T>ostream &operator<<(ostream &o,const vector<T>&j){o<<"{";for(ll i=0;i<(ll)j.size();++i)o<<(i>0?", ":"")<<j[i];o<<"}";return o;} //}}} //{{{ print / out template<class T> int print(const T& a){ cout << a; return 0; } inline int out(bool f){ cout << (f ? truename : falsename) << '\n'; return 0; } inline int out(){ cout << '\n'; return 0; } template<class T> inline int out(const T& t){ print(t); cout << '\n'; return 0; } template<class Head, class... Tail> inline int out(const Head& head, const Tail&... tail){ print(head); cout << " "; out(tail...); return 0; } //}}} //{{{ debug_print / debug_out #ifdef LOCAL #if 1 // Colorize #include "console_color.hpp" #else #define setColor(...) #endif template<class T> int debug_print(const T& a){ cerr << a; return 0; } inline int debug_out(bool f){ cerr << (f ? truename : falsename) << '\n'; return 0; } inline int debug_out(){ cerr << '\n'; return 0; } template<class T> inline int debug_out(const T& t){ debug_print(t); cerr << '\n'; return 0; } template<class Head, class... Tail> inline int debug_out(const Head& head, const Tail&... tail){ debug_print(head); cerr << " "; debug_out(tail...); return 0; } #define debug(...) do{ setColor(COL_WHITE, COL_DARK_BLUE); cerr << "[L." << __LINE__ << "] " << #__VA_ARGS__ << ":"; setColor(); cerr << " "; debug_out(__VA_ARGS__); }while(0) #else #define debug_print(...) #define debug_out(...) #define debug(...) #endif //}}} //{{{ Modular template <std::int_fast64_t Mod> class Modular { using u64 = std::uint_fast64_t; public: u64 a; constexpr Modular(std::int_fast64_t x = 0) noexcept : a(x % Mod + (x < 0 ? Mod : 0)) {} constexpr u64 val() const noexcept { return a; } constexpr Modular operator+(const Modular rhs) const noexcept { return Modular(*this) += rhs; } constexpr Modular operator-(const Modular rhs) const noexcept { return Modular(*this) -= rhs; } constexpr Modular operator*(const Modular rhs) const noexcept { return Modular(*this) *= rhs; } constexpr Modular operator/(const Modular rhs) const noexcept { return Modular(*this) /= rhs; } constexpr bool operator==(const Modular rhs) const noexcept { return Modular(*this).val() == rhs.val(); } Modular &operator+=(const Modular rhs) noexcept { a += rhs.a; if (a >= Mod) a -= Mod; return *this; } Modular &operator-=(const Modular rhs) noexcept { if (a < rhs.a) a += Mod; a -= rhs.a; return *this; } Modular &operator++() noexcept { return *this += 1; } Modular &operator--() noexcept { return *this -= 1; } Modular &operator*=(const Modular rhs) noexcept { a = a * rhs.a % Mod; return *this; } Modular &operator/=(Modular rhs) noexcept { u64 exp = Mod - 2; while(exp){ if(exp % 2) *this *= rhs; rhs *= rhs; exp /= 2; } return *this; } Modular pow(u64 t) const { if(!t) return 1; Modular<Mod> a = pow(t>>1); a *= a; if(t&1) a *= *this; return a; } }; template <std::int_fast64_t Mod> ostream& operator<<(ostream& os, const Modular<Mod>& m){ return os << m.a; } //}}} const double pi=acos(-1); const double eps = 1e-9; const ll inf = 1001001001; const ll mod=(ll)1e9+7; using mint = Modular<mod>; //}}} int main(){ vs ss = in(3); bool ans == ss[0].back() == ss[1][0] && ss[1].back() == ss[2][0]; out(); }
a.cc: In function 'int main()': a.cc:161:12: error: expected initializer before '==' token 161 | bool ans == ss[0].back() == ss[1][0] && ss[1].back() == ss[2][0]; | ^~
s001321480
p03729
C++
#include <algorithm> #include <assert.h> #include <bitset> #include <cfloat> #include <complex> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <string.h> #include <time.h> #include <unordered_map> #include <unordered_set> #include <vector> #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,n) for(int i=1;i<=n;i++) #define ll long long 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; }
a.cc: In function 'int main()': a.cc:43:4: error: expected '}' at end of input 43 | } | ^ a.cc:33:11: note: to match this '{' 33 | int main(){ | ^
s089700580
p03729
C++
#include <algorithm> #include <assert.h> #include <bitset> #include <cfloat> #include <complex> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <string.h> #include <time.h> #include <unordered_map> #include <unordered_set> #include <vector> #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,n) for(int i=1;i<=n;i++) #define ll long long using namespace std; int main(){ string a,b,c; cin >> a >> b >>c; if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ cout << "Yes" <<endl; }else { cout << "No" <<endl; }
a.cc: In function 'int main()': a.cc:38:13: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ~ ^ ~ | | | | | 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 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:38:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ In file included from a.cc:5: /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:38:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:15: note: mismatched types 'const std::complex<_Tp>' and 'int' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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 a.cc:38:39: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ~ ^ ~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} /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:38:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:38:41: note: mismatched types 'const std::complex<_Tp>' and 'int' 38 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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 a.cc:43:4: error: expected '}' at end of input 43 | } | ^ a.cc:33:11: note: to match this '{' 33 | int main(){ | ^
s637626755
p03729
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin >> a >> b >>c; if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ cout << "Yes" <<endl; }else { cout << "No" <<endl; }
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 'int') 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ~ ^ ~ | | | | | 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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ 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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: mismatched types 'const std::complex<_Tp>' and 'int' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ /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:8:15: note: mismatched types 'const std::valarray<_Tp>' and 'int' 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ^ a.cc:8:39: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 8 | if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ | ~ ^
s897955916
p03729
C++
#include<bits/stdc++/h> using namespace std; int main(){ string a,b,c; cin >> a >> b >>c; if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){ cout << "Yes" <<endl; }else { cout << "No" <<endl; }
a.cc:1:9: fatal error: bits/stdc++/h: No such file or directory 1 | #include<bits/stdc++/h> | ^~~~~~~~~~~~~~~ compilation terminated.
s398033476
p03729
C++
#include <iostream> #include <string> #include <algorithm> using std::cin; using std::cout; using std::endl; using std::string; int main() { string a,b,c; cin>>a>>b>>c; if((a.substr(a.end(),1)==b.substr(0,1))&&(b.substr(b.end(),1)==c.substr(0,1))) cout<<a.substr(0,1)<<b.substr(0,1)<<c.substr(0,1); }
a.cc: In function 'int main()': a.cc:13:21: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 13 | if((a.substr(a.end(),1)==b.substr(0,1))&&(b.substr(b.end(),1)==c.substr(0,1))) | ~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator 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:3208:24: note: initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 3208 | substr(size_type __pos = 0, size_type __n = npos) const | ~~~~~~~~~~^~~~~~~~~ a.cc:13:59: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 13 | if((a.substr(a.end(),1)==b.substr(0,1))&&(b.substr(b.end(),1)==c.substr(0,1))) | ~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator /usr/include/c++/14/bits/basic_string.h:3208:24: note: initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 3208 | substr(size_type __pos = 0, size_type __n = npos) const | ~~~~~~~~~~^~~~~~~~~
s499984022
p03729
C++
#include<bits/stdc++.h> using namespace std; int main() { stirng a, b, c; cin>>a>>b>>c; if(a[a.length()-1] == b[0] && b[b.length()-1] == c[0]) cout<<"YES"; else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'stirng' was not declared in this scope 6 | stirng a, b, c; | ^~~~~~ a.cc:7:14: error: 'a' was not declared in this scope 7 | cin>>a>>b>>c; | ^ a.cc:7:17: error: 'b' was not declared in this scope 7 | cin>>a>>b>>c; | ^ a.cc:7:20: error: 'c' was not declared in this scope 7 | cin>>a>>b>>c; | ^
s344799976
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:7:6: error: 'a' was not declared in this scope 7 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]){ | ^ a.cc:7:21: error: 'b' was not declared in this scope 7 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]){ | ^ a.cc:7:44: error: 'c' was not declared in this scope 7 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]){ | ^
s045257143
p03729
Java
import java.util.*; 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(); if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:8: error: cannot find symbol if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){ ^ symbol: variable length location: variable a of type String Main.java:8: error: cannot find symbol if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){ ^ symbol: variable length location: variable b of type String Main.java:8: error: cannot find symbol if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){ ^ symbol: variable length location: variable b of type String Main.java:8: error: cannot find symbol if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){ ^ symbol: variable length location: variable c of type String 4 errors
s271121308
p03729
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ string a,b,c; cin >> a >> b >> c; if(a[a.size()-1]==b[0] && b[d.size()-1]==c[0])cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:12:31: error: 'd' was not declared in this scope 12 | if(a[a.size()-1]==b[0] && b[d.size()-1]==c[0])cout << "YES" << endl; | ^
s450823353
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()){ cout << "YES"; }else{ cout << "NO"; } return 0;}
a.cc: In function 'int main()': a.cc:6:75: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()' 6 | if(A.at(A.size()-1) == B.at(0) && B.at(B.size()-1) == C.at()){ | ~~~~^~ 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: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:7: note: candidate expects 1 argument, 0 provided /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:7: note: candidate expects 1 argument, 0 provided
s717010719
p03729
C++
#include<iostream> #include<string> using namespace std; int main() { string A, B, C; cin >> A >> B >> C; if (A.at(A) == B.at(0) && B.at(B) == C.at(0)) { cout << "YES" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::string&)' 7 | if (A.at(A) == B.at(0) && B.at(B) == C.at(0)) { | ~~~~^~~ 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: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::string' {aka 'std::__cxx11::basic_string<char>'} 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::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1309 | at(size_type __n) | ~~~~~~~~~~^~~ a.cc:7:39: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::string&)' 7 | if (A.at(A) == B.at(0) && B.at(B) == C.at(0)) { | ~~~~^~~ /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::string' {aka 'std::__cxx11::basic_string<char>'} 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::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 1309 | at(size_type __n) | ~~~~~~~~~~^~~
s829158756
p03729
C++
#include<iostream> #include<string> using namespace std; int main() { string A, B, C; cin >> A >> B >> C; if (A.at[A] == B.at[0] && B.at[B] == C.at[0]) { cout << "YES" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if (A.at[A] == B.at[0] && B.at[B] == C.at[0]) { | ^ a.cc:7:28: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 7 | if (A.at[A] == B.at[0] && B.at[B] == C.at[0]) { | ^ a.cc:7:39: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if (A.at[A] == B.at[0] && B.at[B] == C.at[0]) { | ^ a.cc:7:50: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 7 | if (A.at[A] == B.at[0] && B.at[B] == C.at[0]) { | ^
s727841904
p03729
C++
#include<iostream> #include<string> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; if (a.at[a] == b.at[0] && b.at[b] == c.at[0]) { cout << "YES" << endl; } else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if (a.at[a] == b.at[0] && b.at[b] == c.at[0]) { | ^ a.cc:7:28: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 7 | if (a.at[a] == b.at[0] && b.at[b] == c.at[0]) { | ^ a.cc:7:39: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if (a.at[a] == b.at[0] && b.at[b] == c.at[0]) { | ^ a.cc:7:50: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 7 | if (a.at[a] == b.at[0] && b.at[b] == c.at[0]) { | ^
s184922320
p03729
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define co(a) cout<<a<<endl #define sz size() #define bgn begin() #define en end() #define pb push_back #define pp() pop_back() #define V vector #define P pair #define V2(a,b,c) V<V<int>> a(b,V<int>(c)) #define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d)) #define incin(a) int a; cin>>a #define yuko(a) setprecision(a) #define uni(a) a.erase(unique(a.begin(),a.end()),a.end()) #define Q queue #define pri priority_queue #define Pri priority_queue<int,vector<int>,greater<int>> #define PriP priority_queue<P<int,int>,vector<P<int,int>>,greater<P<int,int>>> #define ff first.first #define fs first.second #define sf second.first #define ss second.second #define all(a) (a).begin(),(a).end() #define Pi P<int,int> #define elif else if int low(V<int> a,int b){ decltype(a)::iterator c=lower_bound(a.begin(),a.end(),b); int d=c-a.bgn; return d; } int upp(V<int> a,int b){ decltype(a)::iterator c=upper_bound(a.begin(),a.end(),b); int d=c-a.bgn; return d; } template<class T> void cou(vector<vector<T>> a){ int b=a.size(); int c=a[0].size(); fo(i,b){ fo(j,c){ cout<<a[i][j]; if(j==c-1) cout<<endl; else cout<<' '; } } } int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a){ return a*(a+1)/2; } int gcm(int a,int b){ if(a%b==0) return b; return gcm(b,a%b); } bool prime(int a){ if(a<2) return false; else if(a==2) return true; else if(a%2==0) return false; double b=sqrt(a); for(int i=3;i<=b;i+=2){ if(a%i==0){ return false; } } return true; } struct Union{ vector<int> par; Union(int a){ par=vector<int>(a,-1); } int find(int a){ if(par[a]<0) return a; else return par[a]=find(par[a]); } bool same(int a,int b){ return find(a)==find(b); } int Size(int a){ return -par[find(a)]; } void unite(int a,int b){ a=find(a); b=find(b); if(a==b) return; if(Size(b)>Size(a)) swap<int>(a,b); par[a]+=par[b]; par[b]=a; } }; int ketas(int a){ string b=to_string(a); int c=0; fo(i,keta(a)){ c+=b[i]-'0'; } return c; } int lcm(int a,int b){ return a/gcm(a,b)*b; } bool fe(int a,int b){ a%=10; b%=10; if(a==0) a=10; if(b==0) b=10; if(a>b) return true; else return false; } int INF=1000000007; struct edge{int s,t,d; }; V<int> mojisyu(string a){ V<int> b(26,0); fo(i,a.sz){ b[a[i]-'a']++; } return b; } int wa2(int a){ if(a%2==1) return a/2; return a/2-1; } /*signed main(){ int a,b,c; cin>>a>>b>>c; V<V<edge>> d(a); fo(i,b){ edge e; cin>>e.s>>e.t>>e.d; d[e.s].pb(e); } V<int> e(a,INF); e[c]=0; priority_queue<P<int,int>,V<P<int,int>>,greater<P<int,int>>> f; f.push({0,c}); int h=INF; while(!f.empty()){ P<int,int> g; g=f.top(); f.pop(); int v = g.second, i = g.first; for(edge l : d[v]){ if(e[l.t] > i + l.d){ e[l.t] = i + l.d; f.push({i+l.d , l.t}); } } } fo(i,a){ if(e[i]==INF) cout<<"INF"<<endl; else cout<<e[i]<<endl; } } ?*/ int nCr(int n,int r){ int a=1; r=min(r,n-r); for(int i=n;i>n-r;i--){ a*=i; a/=n-i+1; } return a; } /*void sea(int x,int y){ if(x<0||a<=x||y<0||b<=y||c[x][y]=='#') return; if(d[x][y]) return; d[x][y]++; sea(x+1,y); sea(x-1,y); sea(x,y+1); sea(x,y-1); }*/ int kaijou(int a){ int b=1; fo(i,a) b*=i+1; return b; } int nPr(int a,int b){ int c=1; for(int i=a;i>=b;i--) c*=i; return c; } int MOD=INF; int fac[1000010], finv[1000010], inv[1000010]; // テーブルを作る前処理 //先にCOMinit()で前処理をする //ABC145D void COMinit() { fac[0]=fac[1]=1; finv[0]=finv[1]=1; inv[1]=1; for(int i=2;i<1000010;i++){ fac[i]=fac[i-1]*i%MOD; inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD; finv[i]=finv[i-1]*inv[i]%MOD; } } // 二項係数計算 int COM(int n,int k){ if(n<k) return 0; if(n<0||k<0) return 0; return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD; } bool naka(int a,int b,V<V<char>> c){ return (a>=0&&b>=0&&a<c.sz&&b<c[0].sz); } V<P<int,int>> mawari4={{0,-1},{0,1},{1,0},{-1,0}}; V<P<int,int>> mawari8={{0,-1},{0,1},{1,0},{-1,0},{-1,-1},{1,1},{1,-1},{-1,-1}}; // 最短距離の表:c // スタート:sx,sy // ゴール:gx,gy /*int bfs(V<V<char>> a){ Q<P<int,int>> b; fo(i,a.sz){ fo(j,a[0].sz){ c[i][j]==INF; } } b.push({sx,sy}); c[sx][sy]=0; while(b.sz){ P d=b.front(); b.pop(); if(d=={gx,gy}) break; fo(i,4){ int e=d.fi+mawari4[i],f=d.se+mawari4[i]; if(naka(e,f,a)&&a[e][f]=='.'&&c[e][f]==INF){ b.push({e,f}); c[e][f]==c[d.fi][d.se]+1; } } } return c[gx][gy]; }*/ int inf=1000000000000000007; /* signed main(){ int a,b,c; cin>>a>>b>>c; V<V<edge>> d(a); fo(i,b){ edge e; cin>>e.s>>e.t>>e.d; d[e.s].pb(e); } V<int> e(a,INF); e[c]=0; priority_queue<P<int,int>,V<P<int,int>>,greater<P<int,int>>> f; f.push({0,c}); int h=INF; while(!f.empty()){ P<int,int> g; g=f.top(); f.pop(); int v = g.second, i = g.first; for(edge l : d[v]){ if(e[l.t] > i + l.d){ e[l.t] = i + l.d; f.push({i+l.d , l.t}); } } } fo(i,a){ if(e[i]==INF) cout<<"INF"<<endl; else cout<<e[i]<<endl; } }*/ signed 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:318:10: error: request for member 'size' in 'a', which is of non-class type 'long long int' 318 | if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]) | ^~~~ a.cc:318:22: error: invalid types 'long long int[int]' for array subscript 318 | if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]) | ^ a.cc:318:31: error: request for member 'size' in 'b', which is of non-class type 'long long int' 318 | if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]) | ^~~~ a.cc:318:43: error: invalid types 'long long int[int]' for array subscript 318 | if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]) | ^
s553655889
p03729
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq priority_queue<int> #define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key))) #define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key))) #define tii tuple<int,int,int> signed main(){ string A,B,C,ans="NO"; cin>>A>>B>>C; if(A[A.size()-1]==B[0]&&B[B.size()-1]==C[0]) ans="YES"; cout<<ans>>endl; }
a.cc: In function 'int main()': a.cc:20:12: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 20 | cout<<ans>>endl; | ~~~~~~~~~^~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:20:14: note: couldn't deduce template parameter '_IntegerType' 20 | cout<<ans>>endl; | ^~~~ In file included from /usr/include/c++/14/string:55, 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/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, 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/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: a.cc:20:14: note: couldn't deduce template parameter '_Tp' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)' 237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed: a.cc:20:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 20 | cout<<ans>>endl; | ^~~~ /usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_money<_MoneyT>)' 271 | operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f) | ^~~~~~~~ /usr/include/c++
s509459159
p03729
C++
#include <iostream> #include <string> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(b[b.size()-1]==c[0]&&a[a.size()-1]===b[0]){ cout<<"YES"<<endl; }else{cout<<"NO"<<endl;} }
a.cc: In function 'int main()': a.cc:9:42: error: expected primary-expression before '=' token 9 | if(b[b.size()-1]==c[0]&&a[a.size()-1]===b[0]){ | ^
s091348679
p03729
C++
##include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pii pair<int,int> #define pll pair<long,long> #define vi vector<int> #define vll vector<ll> #define vii vector<pii> #define mi map<int,int> #define mii map<pii,int> #define all(a) (a).begin(),(a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define mod 1000000007 #define rep(i,a,b) for(int i=a;i<b;i++) #define rem(i,a,b) for(int i=a;i>b;i--) #define mp(a,b) make_pair(a,b) #define vvi(a,b,name) vector<vector<int>> name(a,vector<int>(b,-1)) void solve(){ string s1,s2,s3;cin>>s1>>s2>>s3; if(s1[s1.length()-1]==s2[0] && s2[s2.length()-1]==s3[0])cout<<"YES"; else cout<<"NO"; } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); long t=1; //cin>>t; while(t--){ solve(); } return 0; }
a.cc:1:1: error: stray '##' in program 1 | ##include <bits/stdc++.h> | ^~ a.cc:1:3: error: 'include' does not name a type 1 | ##include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'void solve()': a.cc:26:5: error: 'string' was not declared in this scope 26 | string s1,s2,s3;cin>>s1>>s2>>s3; | ^~~~~~ a.cc:26:21: error: 'cin' was not declared in this scope 26 | string s1,s2,s3;cin>>s1>>s2>>s3; | ^~~ a.cc:26:26: error: 's1' was not declared in this scope; did you mean 'sz'? 26 | string s1,s2,s3;cin>>s1>>s2>>s3; | ^~ | sz a.cc:26:30: error: 's2' was not declared in this scope; did you mean 'sz'? 26 | string s1,s2,s3;cin>>s1>>s2>>s3; | ^~ | sz a.cc:26:34: error: 's3' was not declared in this scope; did you mean 'sz'? 26 | string s1,s2,s3;cin>>s1>>s2>>s3; | ^~ | sz a.cc:27:61: error: 'cout' was not declared in this scope 27 | if(s1[s1.length()-1]==s2[0] && s2[s2.length()-1]==s3[0])cout<<"YES"; | ^~~~ a.cc:28:10: error: 'cout' was not declared in this scope 28 | else cout<<"NO"; | ^~~~ a.cc: In function 'int main()': a.cc:32:5: error: 'ios' has not been declared 32 | ios::sync_with_stdio(false); | ^~~ a.cc:33:5: error: 'cin' was not declared in this scope 33 | cin.tie(0); | ^~~ a.cc:34:5: error: 'cout' was not declared in this scope 34 | cout.tie(0); | ^~~~
s520166023
p03729
Java
import java.util.*; 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(); if((A.substring(A.length()-1,A.length)).equals(B.substring(0,1)) && (B.substring(B.length()-1,B.length)).equals(c.substring(0,1)){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:11: error: ')' expected if((A.substring(A.length()-1,A.length)).equals(B.substring(0,1)) && (B.substring(B.length()-1,B.length)).equals(c.substring(0,1)){ ^ 1 error
s733756373
p03729
Java
import java.util.*; 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(); if((A.substring(A.lengt()-1,A.lengtj)).equals(B.substring(0,1)) && (B.substring(B.lengt()-1,B.lengtj)).equals(c.substring(0,1)){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:11: error: ')' expected if((A.substring(A.lengt()-1,A.lengtj)).equals(B.substring(0,1)) && (B.substring(B.lengt()-1,B.lengtj)).equals(c.substring(0,1)){ ^ 1 error
s468583462
p03729
Java
import java.util.*; 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(); aLast = a.substring(a.length() - 1); bFirst = b.substring(0, 1); bLast = b.substring(b.length() - 1); cFirst = c.substring(0, 1); if (aLast.equals(bFirst) && bLast.equals(cFirst)) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:10: error: cannot find symbol aLast = a.substring(a.length() - 1); ^ symbol: variable aLast location: class Main Main.java:11: error: cannot find symbol bFirst = b.substring(0, 1); ^ symbol: variable bFirst location: class Main Main.java:12: error: cannot find symbol bLast = b.substring(b.length() - 1); ^ symbol: variable bLast location: class Main Main.java:13: error: cannot find symbol cFirst = c.substring(0, 1); ^ symbol: variable cFirst location: class Main Main.java:15: error: cannot find symbol if (aLast.equals(bFirst) && bLast.equals(cFirst)) { ^ symbol: variable bFirst location: class Main Main.java:15: error: cannot find symbol if (aLast.equals(bFirst) && bLast.equals(cFirst)) { ^ symbol: variable aLast location: class Main Main.java:15: error: cannot find symbol if (aLast.equals(bFirst) && bLast.equals(cFirst)) { ^ symbol: variable cFirst location: class Main Main.java:15: error: cannot find symbol if (aLast.equals(bFirst) && bLast.equals(cFirst)) { ^ symbol: variable bLast location: class Main 8 errors
s947160572
p03729
C++
#include <bits/stdc++.h> using namespace std; 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; }
a.cc: In function 'int main()': a.cc:7:67: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (a[a.size()-1]==b[0] && b[b.size()-1]==c[0])?"YES":"NO" << endl; | ~~~~~^~~~~~~
s604978689
p03729
C++
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false); cin.tie(0); #define FOR(i,s,n) for(int i = s; i < (n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(n) (n).begin(), (n).end() #define RALL(n) (n).rbegin(), (n).rend() #define ATYN(n) cout << ( (n) ? "Yes":"No") << endl; #define CFYN(n) cout << ( (n) ? "YES":"NO") << endl; using ll = long long; using ull = unsigned long long; using pii = pair<int,int>; int main(void) { IOS string a,b,c; cin >> a >> b >> c; bool ans == false; if (a.back() == b.front() && b.back() == c.front()) ans = true; CFYN(ans); return 0; }
a.cc: In function 'int main()': a.cc:19:14: error: expected initializer before '==' token 19 | bool ans == false; | ^~ a.cc:20:57: error: 'ans' was not declared in this scope; did you mean 'abs'? 20 | if (a.back() == b.front() && b.back() == c.front()) ans = true; | ^~~ | abs a.cc:21:10: error: 'ans' was not declared in this scope; did you mean 'abs'? 21 | CFYN(ans); | ^~~ a.cc:9:28: note: in definition of macro 'CFYN' 9 | #define CFYN(n) cout << ( (n) ? "YES":"NO") << endl; | ^
s202080640
p03729
C++
#include<vector> #include<string> using namespace std; int main(){ string a,b,c; //cin>>n;//読み込み //cout<<n<<endl;//System.out.println 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:13:5: error: 'cin' was not declared in this scope 13 | cin>>a>>b>>c; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<string> +++ |+#include <iostream> 3 | a.cc:16:3: error: 'cout' was not declared in this scope 16 | cout<<"YES"<<endl; | ^~~~ a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:16:16: error: 'endl' was not declared in this scope 16 | cout<<"YES"<<endl; | ^~~~ a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 2 | #include<string> +++ |+#include <ostream> 3 | a.cc:18:7: error: 'cout' was not declared in this scope 18 | cout<<"NO"<<endl; | ^~~~ a.cc:18:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:18:19: error: 'endl' was not declared in this scope 18 | cout<<"NO"<<endl; | ^~~~ a.cc:18:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s875408370
p03729
C++
S = input().split() if S[0][len(S[0])-1] != S[1][0] or S[1][len(S[1])-1] != S[2][0]: print("NO") else: print("YES")
a.cc:1:1: error: 'S' does not name a type 1 | S = input().split() | ^
s649779198
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; return 0; }
a.cc:1:10: fatal error: bits/stdc+.h: No such file or directory 1 | #include <bits/stdc+.h> | ^~~~~~~~~~~~~~ compilation terminated.
s808074385
p03729
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ string a, b, c; cin >> a >> b >> c; if(a.at(a.size()-1)==b.at(0)&&b.at(b.size()-1)==c.at(1))cout<<"YES"<<endl; else{cout <<"NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s900636848
p03729
C++
#include<bits/stdc++> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a[a.size()-1]==b[0]&&b[b.size()-1]==c[0]) cout<<"YES"; else cout<<"NO"; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s860676933
p03729
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:9:8: 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 '()' ?) 9 | (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; | ~~^~~~ | () a.cc:9:28: 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 '()' ?) 9 | (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; | ~~^~~~ | ()
s786668089
p03729
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: request for member 'size' in 'a', which is of non-class type 'int' 9 | (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; | ^~~~ a.cc:9:18: error: invalid types 'int[int]' for array subscript 9 | (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; | ^ a.cc:9:28: error: request for member 'size' in 'b', which is of non-class type 'int' 9 | (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; | ^~~~ a.cc:9:38: error: invalid types 'int[int]' for array subscript 9 | (a[a.size-1]==b[0] &&b[b.size-1]==c[0])? cout<<"YES":cout<<"NO"; | ^