criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace std;
int main()
{
    char a[],b[],c[];
    cin >> a >> b >> c;
    if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: storage size of 'a' isn't known
    5 |     char a[],b[],c[];
      |          ^
a.cc:5:14: error: storage size of 'b' isn't known
    5 |     char a[],b[],c[];
      |              ^
a.cc:5:18: error: storage size of 'c' isn't known
    5 |     char a[],b[],c[];
      |                  ^
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;
int main()
{
    string a,b,c;
    cin >> a >> b>> c;
    if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;
int main()
{
    string a,b,c;
    cin >> a >> b>>c;
    if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,m;
    cin >> n >> m;
    if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |        ^
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:7:24: error: 'b' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |                        ^
a.cc:7:48: error: 'c' was not declared in this scope
    7 |     if(a[strlen(a)-2]==b[0] && b[strlen(b)-2]==c[0]){
      |                                                ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,m;
    cin >> n >> m;
    if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |     if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0]){
      |        ^
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |     if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0]){
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:7:24: error: 'b' was not declared in this scope
    7 |     if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0]){
      |                        ^
a.cc:7:48: error: 'c' was not declared in this scope
    7 |     if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0]){
      |                                                ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,m;
    cin >> n >> m;
    if(a[a.length-2]==b[0] && b[b.length-2]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |     if(a[a.length-2]==b[0] && b[b.length-2]==c[0]){
      |        ^
a.cc:7:23: error: 'b' was not declared in this scope
    7 |     if(a[a.length-2]==b[0] && b[b.length-2]==c[0]){
      |                       ^
a.cc:7:46: error: 'c' was not declared in this scope
    7 |     if(a[a.length-2]==b[0] && b[b.length-2]==c[0]){
      |                                              ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,m;
    cin >> n >> m;
    if(a[a.length-1]==b[0] && b[b.length-1]==c[0]){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |     if(a[a.length-1]==b[0] && b[b.length-1]==c[0]){
      |        ^
a.cc:7:23: error: 'b' was not declared in this scope
    7 |     if(a[a.length-1]==b[0] && b[b.length-1]==c[0]){
      |                       ^
a.cc:7:46: error: 'c' was not declared in this scope
    7 |     if(a[a.length-1]==b[0] && b[b.length-1]==c[0]){
      |                                              ^
Language: C++

#include<iostream>
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";        
    }
    else{
        cout<<"NO";
    }

    cout <<(n-1)*(m-1)<< endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |     if(a[a.length-1]==b[0] && b[b.length-1]==c[0]){
      |          ~~^~~~~~
      |                  ()
a.cc:7:35: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |     if(a[a.length-1]==b[0] && b[b.length-1]==c[0]){
      |                                 ~~^~~~~~
      |                                         ()
a.cc:14:13: error: 'n' was not declared in this scope
   14 |     cout <<(n-1)*(m-1)<< endl;
      |             ^
a.cc:14:19: error: 'm' was not declared in this scope
   14 |     cout <<(n-1)*(m-1)<< endl;
      |                   ^
Language: C

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>

#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) (signed)((a).size())
#define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;

const int MOD = 1000000007;

#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")"  << " " << __FILE__ << endl;

signed main(void) {
    ios::sync_with_stdio(false);
    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(10);
    cin.tie(0);

    VS a(3);
    REP(i,3){
        cin >> a[i];
    }
    FOR(i, 1, 3) {
        if (a[i - 1][SZ(a[i-1]) - 1] != a[i][0]) {
            cout << "NO" << endl;
            return 0;
        }
    }

    cout << "YES" << endl;
    return 0;
}


Compiler output:
main.c:1:10: fatal error: vector: No such file or directory
    1 | #include <vector>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string ALP = "abcdefghijklmnopqrstuvwxyz";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int main(){
  string a,b,c;
  cin >> a >> b >> c;
  puts((a.back()==b.front()&&b.back()==c.front())?"YES":"NO")
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:62: error: expected ';' before 'return'
   16 |   puts((a.back()==b.front()&&b.back()==c.front())?"YES":"NO")
      |                                                              ^
      |                                                              ;
   17 |   return 0;
      |   ~~~~~~
Language: C

#include<stdio.h>
int main(void){
        int i;
        char A[10],B[10],C[10],d,e;
        scanf("%s %s %s",A,B,C);
        for(i=0;i<10;i++){
            if(a[i]=='\0'){
              d=a[i-1];
              break;
            }
        }
        for(i=0;i<10;i++){
            if(b[i]=='\0'){
              e=b[i-1];
              break;
            }
        }
        if(d==b[0]&&e==c[0]){
          printf("YES\n");
        }
        else{
          printf("NO\n");
        }
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: 'a' undeclared (first use in this function)
    7 |             if(a[i]=='\0'){
      |                ^
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:16: error: 'b' undeclared (first use in this function)
   13 |             if(b[i]=='\0'){
      |                ^
main.c:18:24: error: 'c' undeclared (first use in this function)
   18 |         if(d==b[0]&&e==c[0]){
      |                        ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	/*int a,b;
	cin>>a>>b;
	cout<<b-a%b<<endl;*/
	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;


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected '}' at end of input
   11 |         return 0;
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

using namespace std;
int main()
{
    string a; cin>>a;
    string b; cin>>b;
    string c; cin>>c;
    int x=a.size();
    int y=b.size();
    
    if(a[x-1]==b[0])
        if(b[y-1]==c[0])
            cout<<"YES";
        else cout<<"NO";
    else cout<<"NO";
    
    
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string a; cin>>a;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:4:15: error: 'cin' was not declared in this scope
    4 |     string a; cin>>a;
      |               ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:4:20: error: 'a' was not declared in this scope
    4 |     string a; cin>>a;
      |                    ^
a.cc:5:11: error: expected ';' before 'b'
    5 |     string b; cin>>b;
      |           ^~
      |           ;
a.cc:5:20: error: 'b' was not declared in this scope
    5 |     string b; cin>>b;
      |                    ^
a.cc:6:11: error: expected ';' before 'c'
    6 |     string c; cin>>c;
      |           ^~
      |           ;
a.cc:6:20: error: 'c' was not declared in this scope
    6 |     string c; cin>>c;
      |                    ^
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |             cout<<"YES";
      |             ^~~~
a.cc:12:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:14: error: 'cout' was not declared in this scope
   13 |         else cout<<"NO";
      |              ^~~~
a.cc:13:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:10: error: 'cout' was not declared in this scope
   14 |     else cout<<"NO";
      |          ^~~~
a.cc:14:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#define loop(i,n) for(int i = 0; i < n; i++)
#define FOR(x,y,z) for(int x = y; x < z; x++)
#define INF 999999999;
#define VEC vector<int>
#define in push_back
#define ans(x) cout<<x<<endl
#define ll long long int 

using namespace std;

int main()
{
	string a, b, c;
	cin >> a >> b >> c;
	if (a.end == b.begin&&b.end == c.begin)ans("YES");
	else ans("NO");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
   20 |         if (a.end == b.begin&&b.end == c.begin)ans("YES");
      |             ~~~~~ ^~ ~~~~~~~
      |               |        |
      |               |        <unresolved overloaded function type>
      |               <unresolved overloaded function type>
a.cc:20:37: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
   20 |         if (a.end == b.begin&&b.end == c.begin)ans("YES");
      |                               ~~~~~ ^~ ~~~~~~~
      |                                 |        |
      |                                 |        <unresolved overloaded function type>
      |                                 <unresolved overloaded function type>
Language: C++

    #include<iostream>
    #include<string>
    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\n" : "NO\n";)
     return 0;
    }



Compiler output:
a.cc: In function 'int main()':
a.cc:7:84: error: expected ')' before ';' token
    7 |      cout << (a[a.size() - 1] == b[0] && b[b.size() - 1] == c[0] ? "YES\n" : "NO\n";)
      |              ~                                                                     ^
      |                                                                                    )
a.cc:7:85: error: expected primary-expression before ')' token
    7 |      cout << (a[a.size() - 1] == b[0] && b[b.size() - 1] == c[0] ? "YES\n" : "NO\n";)
      |                                                                                     ^
Language: C++

#include<iostream>
#include<string>
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\n" : "NO\n";
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:80: error: expected ')' before ';' token
    7 |  cout << (a[a.size() - 1] == b[0] && b[b.size() - 1] == c[0] ? "YES\n" : "NO\n";
      |          ~                                                                     ^
      |                                                                                )
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
	if(a[a.size-1]==b[0] && b[b.size-1]==c[0]){
	cout<<"YES"<<endl;
	}
	else cout<<"NO"<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |         if(a[a.size-1]==b[0] && b[b.size-1]==c[0]){
      |              ~~^~~~
      |                    ()
a.cc:7:37: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |         if(a[a.size-1]==b[0] && b[b.size-1]==c[0]){
      |                                   ~~^~~~
      |                                         ()
Language: C

#include <stdio.h>
#include <string.h>    

void main(){
    int n;
    int t;
    scanf("%d %d",&n &t);
     
    int i;
    int[] tn;
    for(i =0; i <n; i++){
    scanf("%d", &tn[i]);
    }
     
    int x;
     
    for(i=0; i<n; i++){
    x += t;
    if(tn[i] < t){
    x += t-tn[i];
    }
    }
     
    printf("%d",x);
     
    }

Compiler output:
main.c: In function 'main':
main.c:7:22: error: invalid operands to binary & (have 'int *' and 'int')
    7 |     scanf("%d %d",&n &t);
      |                   ~~ ^
      |                   |
      |                   int *
main.c:10:8: error: expected identifier or '(' before '[' token
   10 |     int[] tn;
      |        ^
main.c:12:18: error: 'tn' undeclared (first use in this function); did you mean 't'?
   12 |     scanf("%d", &tn[i]);
      |                  ^~
      |                  t
main.c:12:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

a,b,c = map(str,input().split())
if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c = map(str,input().split())
      | ^
Language: C++

#include <iosteam>
#include <string> 
using namespace std;

int main(){
    string a, b, c;
    cin >> a >> b >> c;
    if(a[a.size() - 1] == b[0] && b[b.size() - 1] == c[0]) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Compiler output:
a.cc:1:10: fatal error: iosteam: No such file or directory
    1 | #include <iosteam>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
    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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |     if(a[a.size()-1]==b[0] && b[b.size-1]==c[0]) cout<<"YES"<<endl;
      |                                 ~~^~~~
      |                                       ()
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
  char s[10];
   gets(s);
   int flag1=0,flag2=0;
    for(int i=0;s[i]!='\0';i++){
        if(s[i]==' '&&s[i-1]==s[i+1]) {flag1=1;if(flag1==1) flag2=1;}

    }
    if(flag1&&flag2) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |    gets(s);
      |    ^~~~
      |    getw
Language: C++

#include <iostream>
using namespace std;
typedef unsigned long long ll;
#define rep(i,a,n) for(ll i = (a);i < (n);i++)
#define lp(i,a,n) for(ll i = (a);i <= (n);i++)
#define MAX 50000000000000ull

int main(){
  ll a,b,c;
  cin >> a >> b >> c;
  if(a == b && c != 0){
    cout << "NO" << endl;
    return 0;
  }else if(a == i){
    cout << "YES" << endl;
    return 0;
  }
  rep(i,1,MAX){
    if(a * i % b == c){
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'i' was not declared in this scope
   14 |   }else if(a == i){
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string a,b,c;
  cin >> a >> b >> c;
  if(a[a.sz-1] == b[0] && b[b.sz-1] == c[0])
    cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sz'; did you mean 'size'?
    7 |   if(a[a.sz-1] == b[0] && b[b.sz-1] == c[0])
      |          ^~
      |          size
a.cc:7:31: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sz'; did you mean 'size'?
    7 |   if(a[a.sz-1] == b[0] && b[b.sz-1] == c[0])
      |                               ^~
      |                               size
Language: C++

mo=input()
list=mo.split()
a=str(list[0])
b=str(list[1])
c=str(list[2])
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")


Compiler output:
a.cc:1:1: error: 'mo' does not name a type
    1 | mo=input()
      | ^~
Language: C++

moji=input()
list=moji.split()
a=str(list[0])
b=str(list[1])
c=str(list[2])
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")

Compiler output:
a.cc:1:1: error: 'moji' does not name a type
    1 | moji=input()
      | ^~~~
Language: C++

moji=input()
list=moji.split()
a=str(list[0])
b=str(list[1])
c=str(list[2])
if a[-1]==b[0] and b[-1]==c[0]:
    print("yes")
else:
    print("no")


Compiler output:
a.cc:1:1: error: 'moji' does not name a type
    1 | moji=input()
      | ^~~~
Language: Java

public class A-Shiritori{
	public void checkChar(String a, String b, String c){
		char[] ac = a.toCharArray();
		char[] bc = b.toCharArray();
		char[] cc = c.toCharArray();

		if((ac[ac.length - 1] == bc[0] )&& (bc[bc.length - 1] == cc[0])){
			System.out.println("true");
		}else{
		System.out.println("No");
		}
	}
}

Compiler output:
Main.java:1: error: '{' expected
public class A-Shiritori{
              ^
1 error
Language: Java

public class A - Shiritori{
	public void checkChar(String a, String b, String c){
		char[] ac = a.toCharArray();
		char[] bc = b.toCharArray();
		char[] cc = c.toCharArray();

		if((ac[ac.length - 1] == bc[0] )&& (bc[bc.length - 1] == cc[0])){
			System.out.println("true");
		}else{
		System.out.println("No");
		}
	}
}

Compiler output:
Main.java:1: error: '{' expected
public class A - Shiritori{
              ^
1 error
Language: Java

public class Shiritori{
	public void checkChar(String a, String b, String c){
		char[] ac = a.toCharArray();
		char[] bc = b.toCharArray();
		char[] cc = c.toCharArray();

		if((ac[ac.length - 1] == bc[0] )&& (bc[bc.length - 1] == cc[0])){
			System.out.println("true");
		}else{
		System.out.println("No");
		}
	}
}

Compiler output:
Main.java:1: error: class Shiritori is public, should be declared in a file named Shiritori.java
public class Shiritori{
       ^
1 error
Language: Java

public void A-Shiritorir(String a, String b, String c){
		char[] ac = a.toCharArray();
		char[] bc = b.toCharArray();
		char[] cc = c.toCharArray();

		if((ac[ac.length - 1] == bc[0] )&& (bc[bc.length - 1] == cc[0])){
			System.out.println("true");
		}else{
		System.out.println("No");
		}
	}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
public void A-Shiritorir(String a, String b, String c){
       ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
		char[] bc = b.toCharArray();
		^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
		if((ac[ac.length - 1] == bc[0] )&& (bc[bc.length - 1] == cc[0])){
		^
Main.java:8: error: class, interface, enum, or record expected
		}else{
		^
Main.java:10: error: class, interface, enum, or record expected
		}
		^
5 errors
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
char a[10],b[10],c[10];
scanf_n("%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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'scanf_n' was not declared in this scope; did you mean 'scanf'?
    6 | scanf_n("%s %s %s",a,b,c);
      | ^~~~~~~
      | scanf
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string X, Y;
	cin >> X >> Y;
	int A;
	A = X.size();
	char t = X[A-1];
	char s = Y[0];

	cout << "文字列Xの末尾の文字は" << t << endl;
	cout << "文字列Yの先頭の文字は" << s << endl;
	
	if (t == s)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(void) {
    string A, B, C;
    cin >> A >> B >> C;
    if (A[A.size())] == B[0] && B[B.size()] == C[C.size]()) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ']' before ')' token
    9 |     if (A[A.size())] == B[0] && B[B.size()] == C[C.size]()) cout << "YES" << endl;
      |                   ^
      |                   ]
a.cc:9:20: error: expected primary-expression before ']' token
    9 |     if (A[A.size())] == B[0] && B[B.size()] == C[C.size]()) cout << "YES" << endl;
      |                    ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(void) {
    string A, B, C;
    if (A[A.size())] == B[0] && B[B.size()] == C[C.size]()) cout << "YES";
    else cout << "NO";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ']' before ')' token
    8 |     if (A[A.size())] == B[0] && B[B.size()] == C[C.size]()) cout << "YES";
      |                   ^
      |                   ]
a.cc:8:20: error: expected primary-expression before ']' token
    8 |     if (A[A.size())] == B[0] && B[B.size()] == C[C.size]()) cout << "YES";
      |                    ^
Language: Java

    import java.util.Scanner;
 
      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");
          }
    }
}

Compiler output:
Main.java:11: error: unexpected type
          if(A.charAt(A.length() - 1) = B.charAt(0) && B.charAt(B.length() - 1) = C.charAt(0)) {
                     ^
  required: variable
  found:    value
Main.java:11: error: bad operand types for binary operator '&&'
          if(A.charAt(A.length() - 1) = B.charAt(0) && B.charAt(B.length() - 1) = C.charAt(0)) {
                                                    ^
  first type:  char
  second type: char
2 errors
Language: Java

    import java.util.Scanner;
 
      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");
          }
    }
}

Compiler output:
Main.java:11: error: unexpected type
          if(A.charAt(A.length()-1) = B.charAt(0) && B.charAt(B.length()-1) = C.charAt(0)) {
                     ^
  required: variable
  found:    value
Main.java:11: error: bad operand types for binary operator '&&'
          if(A.charAt(A.length()-1) = B.charAt(0) && B.charAt(B.length()-1) = C.charAt(0)) {
                                                  ^
  first type:  char
  second type: char
2 errors
Language: Java

    import java.util.Scanner;
 
      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 Ab = A.charAt(A.length()-1);
          String Ba = B.charAt(0);
          String Bb = B.charAt(B.length()-1);
          String Ca = C.charAt(0);
 
          if(Ab = Ba && Bb = Ca) {
              System.out.println("YES");
          } else {
              System.out.println("NO");
          }
    }
}

Compiler output:
Main.java:11: error: incompatible types: char cannot be converted to String
          String Ab = A.charAt(A.length()-1);
                              ^
Main.java:12: error: incompatible types: char cannot be converted to String
          String Ba = B.charAt(0);
                              ^
Main.java:13: error: incompatible types: char cannot be converted to String
          String Bb = B.charAt(B.length()-1);
                              ^
Main.java:14: error: incompatible types: char cannot be converted to String
          String Ca = C.charAt(0);
                              ^
Main.java:16: error: bad operand types for binary operator '&&'
          if(Ab = Ba && Bb = Ca) {
                     ^
  first type:  String
  second type: String
Main.java:16: error: incompatible types: String cannot be converted to boolean
          if(Ab = Ba && Bb = Ca) {
                ^
6 errors
Language: Java

    import java.util.Scanner;
 
      class Main {
        public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
 
          String A = sc.next();
          String B = sc.next();
          String C = sc.next();
 
          char Ab = A.charAt(A.length()-1);
          char Ba = B.charAt(0);
          char Bb = B.charAt(B.length()-1);
          char Ca = C.charAt(0);
 
          if(Ab = Ba && Bb = Ca) {
              System.out.println("YES");
          } else {
              System.out.println("NO");
          }
    }
}

Compiler output:
Main.java:16: error: bad operand types for binary operator '&&'
          if(Ab = Ba && Bb = Ca) {
                     ^
  first type:  char
  second type: char
Main.java:16: error: incompatible types: char cannot be converted to boolean
          if(Ab = Ba && Bb = Ca) {
                ^
2 errors
Language: Java

    import java.util.Scanner;
 
      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();
 
          A = A.charAt(A.length-1);
          String B1 = B.charAt(0);
          String B2 = B.charAt(B.length-1);
          C = C.charAt(0);
 
          if(A = B1 && B2 = C) {
              System.out.println("Yes");
          } else {
              System.out.println("No");
          }
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
          A = A.charAt(A.length-1);
                        ^
  symbol:   variable length
  location: variable A of type String
Main.java:12: error: incompatible types: char cannot be converted to String
          String B1 = B.charAt(0);
                              ^
Main.java:13: error: cannot find symbol
          String B2 = B.charAt(B.length-1);
                                ^
  symbol:   variable length
  location: variable B of type String
Main.java:14: error: incompatible types: char cannot be converted to String
          C = C.charAt(0);
                      ^
Main.java:16: error: bad operand types for binary operator '&&'
          if(A = B1 && B2 = C) {
                    ^
  first type:  String
  second type: String
Main.java:16: error: incompatible types: String cannot be converted to boolean
          if(A = B1 && B2 = C) {
               ^
6 errors
Language: Java

    import java.util.Scanner;
 
      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();
 
          A = A.charAt(A.length-1);
          String B1 = B.charAt(0);
          String B2 = B.charAt(B.length-1);
          C = C.charAt(0);
 
          if(A = B1 && B2 = C) {
              System.out.println("Yes");
          } else {
              System.out.println("No")
          }
    }
}

Compiler output:
Main.java:19: error: ';' expected
              System.out.println("No")
                                      ^
1 error
Language: Java

     import java.util.Scanner;

      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();

          A = A.charAt(A.length-1);
          String B1 = B.charAt(0);
          String B2 = B.charAt(B.length-1);
          C = C.charAt(0);
 
          if(A = B1 && B2 = C) {
              System.out.println("Yes");
          } else {
              System.out.println("No");

Compiler output:
Main.java:19: error: reached end of file while parsing
              System.out.println("No");
                                       ^
1 error
Language: C

#include <stdio.h>
#include <string.h>
 
int main()
{
    char A[20], B[20], C[20];
 
    scanf("%s %s %s", A, B, C);
 
    int la = strlen(A), lb = strlen(B);
 
    if(A[la-1] == B[0] && B[lb-1] == C[0])
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }
 
    return 0;
}

Compiler output:
main.c:3:1: error: stray '\302' in program
    3 | <U+00A0>
      | ^~~~~~~~
main.c: In function 'main':
main.c:7:1: error: stray '\302' in program
    7 | <U+00A0>
      | ^~~~~~~~
main.c:9:1: error: stray '\302' in program
    9 | <U+00A0>
      | ^~~~~~~~
main.c:11:1: error: stray '\302' in program
   11 | <U+00A0>
      | ^~~~~~~~
main.c:20:1: error: stray '\302' in program
   20 | <U+00A0>
      | ^~~~~~~~
Language: C

#include<stdio.h>
 
int main(void) {
  char a[],b[],c[];
  int wa,wb;
  scanf("%s %s %s",a,b,c);
  wa = sizeof(a) - 1;
  wb = sizeof(b) - 1;
  if(a[wa] == b[0] && b[wb] == c[0]) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 'a'
    4 |   char a[],b[],c[];
      |        ^
main.c:4:12: error: array size missing in 'b'
    4 |   char a[],b[],c[];
      |            ^
main.c:4:16: error: array size missing in 'c'
    4 |   char a[],b[],c[];
      |                ^
Language: C++

#include<string>

using namespace std;

int main(void) {

	string A, B, C;

	cin >> A >> B >> C;

	if (A[A.length() - 1] == B[0]) {
		if (B[B.length() - 1] == C[0]) {
			cout << "YES" << endl;
		}
	}
	else {
		cout << "NO" << endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> A >> B >> C;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | 
a.cc:13:25: error: 'cout' was not declared in this scope
   13 |                         cout << "YES" << endl;
      |                         ^~~~
a.cc:13:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:42: error: 'endl' was not declared in this scope
   13 |                         cout << "YES" << endl;
      |                                          ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | 
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout << "NO" << endl;
      |                 ^~~~
a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:33: error: 'endl' was not declared in this scope
   17 |                 cout << "NO" << endl;
      |                                 ^~~~
a.cc:17:33: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include <stdio.h>
#include <string.h>

int main()
{
    char A[20], B[20], C[20];

    scanf("%s %s %s", A, B, C);

    int la = strlen(A), lb = strlen(B);

    if(A[la-1] == B[0] && B[lb-1] == C[0])
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: Java

public class Sw {

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}

Compiler output:
Main.java:1: error: class Sw is public, should be declared in a file named Sw.java
public class Sw {
       ^
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Sw
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Sw
3 errors
Language: Java

public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

package sw;

import java.util.Scanner;

public class Sw.java {

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}


Compiler output:
Main.java:5: error: '{' expected
public class Sw.java {
               ^
1 error
Language: Java

package sw;

import java.util.Scanner;
 class Sw.java {

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}


Compiler output:
Main.java:4: error: '{' expected
 class Sw.java {
         ^
1 error
Language: Java

package sw;

import java.util.Scanner;

public class Sw {

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}


Compiler output:
Main.java:5: error: class Sw is public, should be declared in a file named Sw.java
public class Sw {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Sw {

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}

Compiler output:
Main.java:3: error: class Sw is public, should be declared in a file named Sw.java
public class Sw {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Sw .java{

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}

Compiler output:
Main.java:3: error: '{' expected
public class Sw .java{
               ^
1 error
Language: Java


package sw;

import java.util.Scanner;

public class Sw {

    public static void main(String[] args) {
       String a, b, c;
        Scanner sc = new Scanner(System.in);
        a = sc.nextLine();
        b = sc.nextLine();
        c = sc.nextLine();
        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");
        }
    }
    
}


Compiler output:
Main.java:6: error: class Sw is public, should be declared in a file named Sw.java
public class Sw {
       ^
1 error
Language: C++

#include <iostream>  
#include <cstdio>  
#include <algorithm>
#include <vector>
#include <string.h>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <stack>
#include <math.h>
#include <sstream>
#include <xfunctional>
using namespace std;
#define lld long long

int main() {
	string a, b, c;
	cin >> a >> b >> c;
	if (a.size() == 0 || b.size() == 0 || c.size() == 0)
		cout << "NO" << endl;
	if (a[(int)a.size() - 1] == b[0] && b[(int)b.size() - 1] == c[0])
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	//system("pause");
	return 0;
}

Compiler output:
a.cc:12:10: fatal error: xfunctional: No such file or directory
   12 | #include <xfunctional>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class TaskA {

	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)) {
			System.out.println("NO");
		} else if (b.charAt(b.length() - 1) != c.charAt(0)) {
			System.out.println("NO");
		} else {
			System.out.println("YES");
		}
	}
}

Compiler output:
Main.java:3: error: class TaskA is public, should be declared in a file named TaskA.java
public class TaskA {
       ^
1 error
Language: C++

using System;
public class Hello{
    public static void Main(){
        string[] input = Console.ReadLine().Split(' ');
        bool flag = true;
        for(int x = 0;x < input.Length - 1;x++){
            if(input[x].Substring(input[x].Length - 1,1) != input[x + 1].Substring(0,1)){
                flag = false;
                break;
            }
        }
        if(flag == true){
            Console.WriteLine("YES");
        }else{
            Console.WriteLine("NO");
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Hello{
      | ^~~~~~
Language: C

#include<stdio.h>
int main(){
  char strA[10],strB[10],strC[10];
  scanf("%10s %10s %10s",strA,atrB,strC);
  int i,j;
  for (i=0;strA[i] != '\0';i++);
  if(strA[i]==strB[0]){
    for (i = 0;strB[i] != '\0';i++);
    if(strB[i]==strC[0]){
      printf("YES");
    }else{
      printf("NO");
    }
  }else{
    printf("NO");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:31: error: 'atrB' undeclared (first use in this function); did you mean 'strB'?
    4 |   scanf("%10s %10s %10s",strA,atrB,strC);
      |                               ^~~~
      |                               strB
main.c:4:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>

int main()
{
	char* A = new char[11];
	char* B = new char[11];;
	char* C = new char[11];;

	std::cin >> A;
	std::cin >> B;
	std::cin >> C;

	if (A[strlen(A) - 1] == B[0] &&
		B[strlen(B) - 1] == C[0]) {
		std::cout << "YES" << std::endl;
	}
	else {
		std::cout << "NO" << std::endl;
	}

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'strlen' was not declared in this scope
   13 |         if (A[strlen(A) - 1] == B[0] &&
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

int main()
{
	char* A = new char[11];
	char* B = new char[11];;
	char* C = new char[11];;

	std::cin >> A;
	std::cin >> B;
	std::cin >> C;

	if (A[std::strlen(A) - 1] == B[0] &&
		B[std::strlen(B) - 1] == C[0]) {
		std::cout << "YES" << std::endl;
	}
	else {
		std::cout << "NO" << std::endl;
	}

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
   15 |         if (A[std::strlen(A) - 1] == B[0] &&
      |                    ^~~~~~
      |                    mbrlen
a.cc:16:24: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
   16 |                 B[std::strlen(B) - 1] == C[0]) {
      |                        ^~~~~~
      |                        mbrlen
Language: C++

#include <iostream>

using namespace std;

int main()
{
	char* A = new char[11];
	char* B = new char[11];;
	char* C = new char[11];;

	std::cin >> A;
	std::cin >> B;
	std::cin >> C;

	if (A[strlen(A) - 1] == B[0] &&
		B[strlen(B) - 1] == C[0]) {
		std::cout << "YES" << std::endl;
	}
	else {
		std::cout << "NO" << std::endl;
	}

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'strlen' was not declared in this scope
   15 |         if (A[strlen(A) - 1] == B[0] &&
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include "stdafx.h"
#include <iostream>

using namespace std;

int main()
{
	char* A = new char[11];
	char* B = new char[11];;
	char* C = new char[11];;

	std::cin >> A;
	std::cin >> B;
	std::cin >> C;

	if (A[strlen(A) - 1] == B[0] &&
		B[strlen(B) - 1] == C[0]) {
		std::cout << "YES" << std::endl;
	}
	else {
		std::cout << "NO" << std::endl;
	}

    return 0;
}



Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.