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

#include <bits/stdc++.h>
#include <windows.h>

using namespace std;

//#define FILE_IO

struct Value
{
    int x;
    Value *prv, *nxt;

    Value()
    {
        x = 0;
        prv = nxt = 0;
    }

    Value(int _x, Value *_prv, Value *_nxt) { x = _x; prv = _prv; nxt = _nxt; }
};

int N;

void erasePosition(Value *V)
{
    Value *lft = V -> prv, *rgt = V -> nxt;
    lft -> nxt = V -> nxt;
    rgt -> prv = V -> prv;
    delete V;
}

void insertValue(int x, Value *&V)
{
    Value *newV = new Value(x, V, V -> nxt);
    newV -> nxt -> prv = newV;
    newV -> prv -> nxt = newV;
}

void uniteValues(Value *&lft, Value *&rgt)
{
    lft -> nxt = rgt;
    rgt -> prv = lft;
}

void print(Value *&S, Value *&F)
{
    if(S == F) { cerr << "\n"; return; }
    cerr << S -> x << " ";
    print(S -> nxt, F);
}

void make_test()
{
    srand(time(0));

    int N = 200000;

    vector <int> prm;
    for(int i = 1; i <= N; i++)
        prm.push_back(i);

    random_shuffle(prm.begin(), prm.end());

    printf("%d\n", N);
    for(auto x: prm)
        printf("%d ", x);
    exit(0);
}

int main()
{
    #ifdef FILE_IO
    freopen("1.out", "r", stdin);
    freopen("1.in", "w", stdout);
    #endif

    //make_test();

    int N;
    scanf("%d", &N);

    Value *S, *F;
    S = new Value(0, 0, 0);
    F = new Value(0, 0, 0);
    S -> nxt = F; F -> prv = S;

    for(int i = 1; i <= N; i++)
    {
        int x;
        scanf("%d", &x);
        insertValue(x, F -> prv);
    }

    int ans = 0;
    int K = N;
    while(K)
    {
        while(K && F -> prv -> x == K)
        {
            K--;
            erasePosition(F -> prv);
        }


        if(!K)  break;

        ans++;
        Value *stS, *stF, *drS, *drF;
        stS = new Value(0, 0, 0);
        stF = new Value(0, 0, 0);
        stS -> nxt = stF; stF -> prv = stS;
        drS = new Value(0, 0, 0);
        drF = new Value(0, 0, 0);
        drS -> nxt = drF; drF -> prv = drS;

        int mx = 0;
        for(Value *V = S -> nxt; V != F; V = V -> nxt)
        {
            int x = V -> x;
            if(x > mx)
            {
                insertValue(x, drF -> prv);
                mx = x;
                if(x == K)
                {
                    Value *lft = V -> nxt;
                    if(lft == F)    break;
                    uniteValues(stF -> prv, lft);
                    uniteValues(F -> prv, stF);
                    break;
                }
            }
            else
            {
                insertValue(x, stF -> prv);
            }
        }

        uniteValues(stF -> prv, drS -> nxt);
        S = stS; F = drF;
        //Sleep(1000);
    }

    printf("%d\n", ans);


    return 0;
}


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

#include <vector> 
#include <list> 
#include <map> 
#include <set> 
#include <deque> 
#include <queue> 
#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> 

using namespace std;

#define _int64 long long

int a[11000000];
int next1[11000000];
int pre[11000000];
int ma;
char s[100];

void out1(int head,int last)
{
  int i;
  for (i=head;;)
  {
    printf("%d ",a[i]);
    if (i==last) break;
    i=next1[i];
  }
  printf("%d\n",ma);
  gets(s);
}

int main()
{
  int head,last,i,n,tmp,ll,ans,cur;
  scanf("%d",&n);
  for (i=0;i<n;i++)
  {
    scanf("%d",&a[i]);
    next1[i]=i+1;
    pre[i]=i-1;
  }
  next1[n-1]=-1;
  pre[0]=-1;
  last=n-1;
  head=0;
  ma=n;
  ans=0;
  for (;;)
  {
    //out1(head,last);
    while ((ma>=1)&&(a[last]==ma))
    {
      ma--;
      last=pre[last];
    }
    //out1(head,last);
    if (ma==0) break;
    ans++;
    tmp=head;
    ll=last;
    cur=-1;
    while(1)
    {
      if (a[tmp]>cur)
      {
        cur=a[tmp];
        next1[last]=last+1;
        pre[last+1]=last;
        last++;
        a[last]=cur;
        if (tmp==head)
        {
          head=next1[head];
        }
        else
        {
          next1[pre[tmp]]=next1[tmp];
          pre[next1[tmp]]=pre[tmp];
        }
      }
      if (tmp==ll) break;
      else tmp=next1[tmp];
    }
  }
  printf("%d\n",ans);
  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
   11 |   if(a(d-1)==b(0)&&b(e-1)==c(0)){
      |      ~^~~~~
a.cc:11:15: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
   11 |   if(a(d-1)==b(0)&&b(e-1)==c(0)){
      |              ~^~~
a.cc:11:21: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
   11 |   if(a(d-1)==b(0)&&b(e-1)==c(0)){
      |                    ~^~~~~
a.cc:11:29: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
   11 |   if(a(d-1)==b(0)&&b(e-1)==c(0)){
      |                            ~^~~
Language: C++

#include <iostream>
#include <algorythm>
#include <string>
#include <set>
#include <regex>
#include <locale>
using namespace std;

int main () {
  string a, b, c;
  cin >> a >> b >> c;
  
  cout << ((reverse(a.begin(),a.end()), a[0] == b[0]) && (reverse(b.begin(),b.end()), b[0] == c[0]) ? "YES" : "NO") << endl;
}

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

#include <iostream>
#include <string>
#include <set>
#include <regex>
#include <locale>
using namespace std;

int main () {
  string a, b, c;
  cin >> a >> b >> c;
  
  cout << (a.reverse()[0] == b[0] && b.reverse()[0] == c[0] ? "YES" : "NO") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
   12 |   cout << (a.reverse()[0] == b[0] && b.reverse()[0] == c[0] ? "YES" : "NO") << endl;
      |              ^~~~~~~
      |              reserve
a.cc:12:40: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
   12 |   cout << (a.reverse()[0] == b[0] && b.reverse()[0] == c[0] ? "YES" : "NO") << endl;
      |                                        ^~~~~~~
      |                                        reserve
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a[10],b[10],c[10];
  scanf("%s %s %s",&a,&b,&c);
  int d,e,f;
  d=strlen(a[]);
  e=strlen(b[]);
  f=strlen(c[]);
  if(a[d-1]==b[0]&&b[e-1]==c[0])
    printf("YES");
  else 
    printf("NO");
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected expression before ']' token
    7 |   d=strlen(a[]);
      |              ^
main.c:8:14: error: expected expression before ']' token
    8 |   e=strlen(b[]);
      |              ^
main.c:9:14: error: expected expression before ']' token
    9 |   f=strlen(c[]);
      |              ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  string A, B, C;
  cin >> A >> B >> C;
  if ((A[A.length()-1]==B[0]) && (B[B.lengtj()-1]==C[0])) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lengtj'; did you mean 'length'?
    8 |   if ((A[A.length()-1]==B[0]) && (B[B.lengtj()-1]==C[0])) {
      |                                       ^~~~~~
      |                                       length
Language: C++

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: expected primary-expression before ')' token
    9 |   else if(b.at(b.size()-1)!=c.at(0)))cout << "NO";
      |                                     ^
Language: C++

#include <iostream>
#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <math.h>
#define int long long
using namespace std;
signed main() {
	string A,B,C;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:42:39: error: expected ']' before numeric constant
   42 |     if(A[A.size()-1]==B[0]&&B[B.size()1]==C[0]){
      |                                       ^
      |                                       ]
a.cc:42:39: error: expected ')' before numeric constant
   42 |     if(A[A.size()-1]==B[0]&&B[B.size()1]==C[0]){
      |       ~                               ^
      |                                       )
a.cc:42:40: error: expected primary-expression before ']' token
   42 |     if(A[A.size()-1]==B[0]&&B[B.size()1]==C[0]){
      |                                        ^
Language: C++

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

int main() {
	// your code goes here
	string a, b, c; cin >> a >> b >> c;
	if (a[-1] == b[0]) && (b[-1] == c[0]) {
	    cout << "YES";
	} else {
	    cout << "NO";
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: expected identifier before '(' token
    8 |         if (a[-1] == b[0]) && (b[-1] == c[0]) {
      |                               ^
Language: 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.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:8: error: cannot find symbol
    if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
                ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
    if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
       ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
    if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
                                 ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
    if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
                                                         ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
    if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
                                                ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
    if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
                                                                          ^
  symbol:   variable c
  location: class Main
6 errors
Language: 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"<<ednl;}
  else{cout<<"NO"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'ednl' was not declared in this scope
    7 |     cout<<"YES"<<ednl;}
      |                  ^~~~
Language: C

#include<stdio.h>
int main()
{

    char a[11],b[11],c[11];
    int a , b, c;

    scanf("%s",x);
    scanf("%s",y);
    scanf("%s",z);

    a=strlen(x)-1;
    b=strlen(y)-1;
    c=strlen(z)-1;

        if((x[a]==y[0])&&(y[b]==z[0]))
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: conflicting types for 'a'; have 'int'
    6 |     int a , b, c;
      |         ^
main.c:5:10: note: previous declaration of 'a' with type 'char[11]'
    5 |     char a[11],b[11],c[11];
      |          ^
main.c:6:13: error: conflicting types for 'b'; have 'int'
    6 |     int a , b, c;
      |             ^
main.c:5:16: note: previous declaration of 'b' with type 'char[11]'
    5 |     char a[11],b[11],c[11];
      |                ^
main.c:6:16: error: conflicting types for 'c'; have 'int'
    6 |     int a , b, c;
      |                ^
main.c:5:22: note: previous declaration of 'c' with type 'char[11]'
    5 |     char a[11],b[11],c[11];
      |                      ^
main.c:8:16: error: 'x' undeclared (first use in this function)
    8 |     scanf("%s",x);
      |                ^
main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:16: error: 'y' undeclared (first use in this function)
    9 |     scanf("%s",y);
      |                ^
main.c:10:16: error: 'z' undeclared (first use in this function)
   10 |     scanf("%s",z);
      |                ^
main.c:12:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   12 |     a=strlen(x)-1;
      |       ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main()
main.c:12:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   12 |     a=strlen(x)-1;
      |       ^~~~~~
main.c:12:7: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,N) for(int i=0; i<N; i++){ ;
int main() {
    string A,B,C;
    if(A.at(A.size()-1)==B.ay(0)&&B.at(B.size()-1)==C.at(0)){
        cout<<"YES"<<endl;
    }
    else 
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'ay'; did you mean 'at'?
    7 |     if(A.at(A.size()-1)==B.ay(0)&&B.at(B.size()-1)==C.at(0)){
      |                            ^~
      |                            at
Language: 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;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: expected primary-expression before ')' token
    6 |   if(a[a.size()+1]==b[0]&&b[b.size()+1]==c[0]&){
      |                                               ^
Language: C++

#include <bits/stdc++.h>
#define cinf(n,x) for(int i=0;i<(n);i++)cin>>x[i];
#define ft first
#define sc second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(),(v).end()
#define LB(a,x) lb(all(a),x)-a.begin()
#define UB(a,x) ub(all(a),x)-a.begin()
#define mod 1000000007
#define FS fixed<<setprecision(15)
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<n;i++)
const double pi=3.141592653589793;
template<class T> using V=vector<T>;
using Graph = vector<vector<int>>;
using P=pair<ll,ll>;
typedef unsigned long long ull;
typedef long double ldouble;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

const ll INF=1e18;

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    string a,b,c;
    cin>>a>>b>>c;
    if(a[s.size()-1]==b[0]&&b[b.size()-1]==c[0])cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}
//ペナルティ出しても焦らない　ACできると信じろ！！！
//どうしてもわからないときはサンプルで実験　何か見えてくるかも
//頭で考えてダメなら紙におこせ！！
/*
V,P(大文字)使用不可
乗算などの際にオーバーフローに注意せよ！
(適切にmodをとれ　にぶたんで途中で切り上げろ)
制約をよく読め！
{
    ・全探索できるなら全探索しろ
    ・異常な制約ならそこに注目
}
stringの計算量(扱い)注意
コーナー注意！(特に数値が小さいものについては要検証)
N行出力のときは'¥n'
グリッド上では行先が範囲内におさまるかif文で確認(RE注意)
if文ではちゃんと比較演算子==を使え('='でもエラー出ない)
配列(vector)の大きさが0か1以上かで場合分けせよ(RE注意)
(vector<int> a(m)でm==0というものはできない)
modはなるべく最後に取れ！
doubleを扱うときには(abs)ではなく'fabs'!!!
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:31:10: error: 's' was not declared in this scope
   31 |     if(a[s.size()-1]==b[0]&&b[b.size()-1]==c[0])cout<<"YES"<<endl;
      |          ^
Language: C++

# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, C = input().split()
if A[-1] == B[0] and B[-1] == C[0]:
    print("YES")
else:
    print("NO")


Compiler output:
a.cc:1:3: error: invalid preprocessing directive ##
    1 | # # Make IO faster
      |   ^
a.cc:2:3: warning: #import is a deprecated GCC extension [-Wdeprecated]
    2 | # import sys
      |   ^~~~~~
a.cc:2:10: error: #import expects "FILENAME" or <FILENAME>
    2 | # import sys
      |          ^~~
a.cc:3:3: error: invalid preprocessing directive #input
    3 | # input = sys.stdin.readline
      |   ^~~~~
a.cc:5:3: error: invalid preprocessing directive ##
    5 | # # get single (or) multiple str
      |   ^
a.cc:6:3: error: invalid preprocessing directive #X
    6 | # X = input()
      |   ^
a.cc:8:3: error: invalid preprocessing directive ##
    8 | # # get single int
      |   ^
a.cc:9:3: error: invalid preprocessing directive #N
    9 | # N = int(input())
      |   ^
a.cc:10:3: error: invalid preprocessing directive ##
   10 | # # get multiple int (e.g., 2)
      |   ^
a.cc:11:3: error: invalid preprocessing directive #X
   11 | # X, Y = map(int, input().split())
      |   ^
a.cc:12:3: error: invalid preprocessing directive ##
   12 | # # get multiple int (e.g., 2) for N lines
      |   ^
a.cc:13:3: error: invalid preprocessing directive #XY
   13 | # XY = [list(map(int, input().split())) for _ in range(N)]
      |   ^~
a.cc:15:3: error: invalid preprocessing directive #from
   15 | # from IPython import embed; embed(); exit();
      |   ^~~~
a.cc:17:3: error: invalid preprocessing directive #\U00005168\U000090e8\U00005165\U0000308a
   17 | # 全部入り
      |   ^~~~~~~~
a.cc:36:13: warning: multi-character character constant [-Wmultichar]
   36 | INF = float('inf')
      |             ^~~~~
a.cc:18:1: error: 'import' does not name a type
   18 | import sys, re
      | ^~~~~~
a.cc:18:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'strlen' was not declared in this scope
    6 |         int lastCharA = strlen(A) - 1;
      |                         ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <strings.h>
  +++ |+#include <cstring>
    3 | int main() {
Language: C++

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

int main() {
    char A[12], B[12], C[12];
    A[12] = 'a' - 'z'
    B[12] = 'a' - 'z'
    C[12] = 'a' - 'z'
    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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before 'B'
    6 |     A[12] = 'a' - 'z'
      |                      ^
      |                      ;
    7 |     B[12] = 'a' - 'z'
      |     ~
Language: C++

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

int main() {
    char A[15], B[15], C[15];
    A[15] = 'a' - 'z'
    B[15] = 'a' - 'z'
    C[15] = 'a' - 'z'
    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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before 'B'
    6 |     A[15] = 'a' - 'z'
      |                      ^
      |                      ;
    7 |     B[15] = 'a' - 'z'
      |     ~
Language: C++

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

int main()
{
 char a[255];
 char b[255];
 char c[255];
 scanf("%s %s %s", a, b, c);
 int len = strlen(a);
 int n = strlen(b);
 int s = strlen(c);
 if (a[len - 1] == b[0] && b[n - 1] == c[0]){
  puts("YES");
 }
 else puts("NO");
}
	
	return 0;
}

Compiler output:
a.cc:19:9: error: expected unqualified-id before 'return'
   19 |         return 0;
      |         ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <stdio.h>
#include <String.h>
int main(){
 	char A[15],B[15],C[15];
 	scanf("%s %s %s",&A,&B,&C);
 	int lenA=strlen(A);
 	int lenB=strlen(B);
 	
 	if(A[lenA-1]==B[0]&&B[lenB-1]==C[0]){
 		printf("YES");
	 }
	 else{
	 	printf("NO");
	 }
 	
	return 0;	
	}

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

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

int main (){

    char A[12],B[12],C[12];
    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;
}

Compiler output:
a.cc:10:5: error: expected unqualified-id before 'if'
   10 |     if (A[strlen(A)-1] == B[0] && B[strlen(B)-1] == C[0]){
      |     ^~
a.cc:12:6: error: expected unqualified-id before 'else'
   12 |     }else {
      |      ^~~~
a.cc:17:5: error: expected unqualified-id before 'return'
   17 |     return 0;
      |     ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

int main () {
	char a [10];
	char b[10];
	char c[10];
	scanf ("%s %s %s",&a,&b,&c);
		int len1 = strlen(a);
	int len2 = strlen(b);
	int len3 = strlen(c);
	if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
	
	if (a[len1-1] == b[0] && b[len2-1] == c[0]) {
		printf("YES");
	}
	else printf ("NO");}
	else printf ("NO");
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
      |             ~^~~~~
a.cc:12:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
      |                       ~^~~~~
a.cc:12:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
      |                                 ~^~~~~
a.cc:12:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
      |                                          ~^~~~~
a.cc:12:52: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
      |                                                   ~^~~~~
a.cc:12:61: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
      |                                                            ~^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:53: error: 'V' was not declared in this scope
    9 |         if( A[strlen(A)-1]==B[0] && B[strlen(B)-1]==V[0]){
      |                                                     ^
Language: C++

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


 int main()
 {
   int flag=0;
   char a[10],b[10],c[10];

   gets(a);
   gets(b);
   gets(c);

   if(a[strlen(a)-1]==b[0]){flag=1;}
    else {flag=0;}

    if(b[strlen(b)-1]==c[0]){flag=1;}
     else {flag=0;}

     if(flag==0){printf("NO");}
     else {printf("YES");}
 }


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

#include<bits/stdc++.h>
using namespace std;

 int main()
 {
   int i,j,flag=0,x,y;
   char a[10],b[10],c[10];

   gets(a);
   gets(b);
   gets(c);

   if(a[strlen(a)-1]==b[0]){flag=1;}
    else {flag=0;}

    if(b[strlen(b)-1]==c[0]){flag=1;}
     else {flag=0;}

     if(flag==0){cout<<"NO"<<endl;}
     else {cout<<"YES"<<endl;}
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |    gets(a);
      |    ^~~~
      |    getw
Language: 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;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected unqualified-id before '[' token
    8 |   if (A.[A.size()-1] == B[0] && B[B.size()-1] == C[0]) {
      |         ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;
 
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
  string S,T,U;
  cin>>S>>T>>U;
  int A=S.size();
  int B=T.size();
  string S="NO";
  if(S[A-1]==T[0]&&T[B-1]==U[0]) S="YES";
  cout<<S;
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:10: error: redeclaration of 'std::string S'
   52 |   string S="NO";
      |          ^
a.cc:48:10: note: 'std::string S' previously declared here
   48 |   string S,T,U;
      |          ^
Language: Java

import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String a = scan.next();
		String b = scan.next();
		String c = scan.next();
		
		System.out.println(b.startsWith(a.charAt(a.length()-1).toString()) && c.startsWith(b.charAt(b.length()-1).toString()) ? "YES" : "NO");
	}
}


Compiler output:
Main.java:10: error: char cannot be dereferenced
		System.out.println(b.startsWith(a.charAt(a.length()-1).toString()) && c.startsWith(b.charAt(b.length()-1).toString()) ? "YES" : "NO");
		                                                      ^
Main.java:10: error: char cannot be dereferenced
		System.out.println(b.startsWith(a.charAt(a.length()-1).toString()) && c.startsWith(b.charAt(b.length()-1).toString()) ? "YES" : "NO");
		                                                                                                         ^
2 errors
Language: Java

import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String a = scan.next();
		String b = scan.next();
		String c = scan.next();
		
		System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.length()-1)) ? "YES" : "NO");
	}
}


Compiler output:
Main.java:10: error: incompatible types: char cannot be converted to String
		System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.length()-1)) ? "YES" : "NO");
		                                        ^
Main.java:10: error: incompatible types: char cannot be converted to String
		System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.length()-1)) ? "YES" : "NO");
		                                                                                ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String a = scan.next();
		String b = scan.next()
		String c = scan.next();
		
		System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.length()-1)) ? "YES" : "NO");
	}
}


Compiler output:
Main.java:7: error: ';' expected
		String b = scan.next()
		                      ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid use of member function 'std::__cxx11::basic_string<char>::at' (did you forget the '()' ?)
    7 |   if(a.at.size()==b.at(0)&&b.at.size()==c.at(0)){
      |      ~~^~
a.cc:7:11: error: expected ')' before 'size'
    7 |   if(a.at.size()==b.at(0)&&b.at.size()==c.at(0)){
      |     ~     ^~~~
      |           )
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  string A,B,C;
  cin >> A >> B >> C;
  int D==A.size();
  int E==B.size();
  if(A.at(D)==B.at(0)&&B.at(E)==C.at(0)){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '==' token
    7 |   int D==A.size();
      |        ^~
a.cc:8:8: error: expected initializer before '==' token
    8 |   int E==B.size();
      |        ^~
a.cc:9:11: error: 'D' was not declared in this scope
    9 |   if(A.at(D)==B.at(0)&&B.at(E)==C.at(0)){
      |           ^
a.cc:9:29: error: 'E' was not declared in this scope
    9 |   if(A.at(D)==B.at(0)&&B.at(E)==C.at(0)){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid use of member function 'std::__cxx11::basic_string<char>::at' (did you forget the '()' ?)
    7 |   if(A.at.size()==B.at(0)&&B.at.size()==C.at(0)){
      |      ~~^~
a.cc:7:11: error: expected ')' before 'size'
    7 |   if(A.at.size()==B.at(0)&&B.at.size()==C.at(0)){
      |     ~     ^~~~
      |           )
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:15: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    6 |   if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
      |               ^
      |               |
      |               char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:6:7: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
      |       ^
main.c:6:23: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
      |                       ^
main.c:6:37: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    6 |   if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
      |                                     ^
      |                                     |
      |                                     char
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:6:29: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
      |                             ^
main.c:6:45: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
      |                                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string a,b,c;cin>>a>>b>>c;
  if (a[a.length()-1] == b[0] %% b[b.length()-1] == c[0]) cout << "YES" << endl;
  else cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:32: error: expected primary-expression before '%' token
    6 |   if (a[a.length()-1] == b[0] %% b[b.length()-1] == c[0]) cout << "YES" << endl;
      |                                ^
Language: 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;
}


Compiler output:
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])
      |        ^~~~~~
Language: 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;
}


Compiler output:
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
Language: 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;
}

Compiler output:
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
Language: 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;
	


Compiler output:
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() {
      |            ^
Language: 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;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected unqualified-id before ',' token
    5 |  string, a, b, c;
      |        ^
Language: 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");
    }
  }
}

Compiler output:
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
Language: 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;
}

Compiler output:
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());
      |                                                               ^
Language: 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;
}

Compiler output:
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());
      |               ~~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: 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;
}

Compiler output:
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
Language: 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");
  }
}

Compiler output:
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
Language: 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;
}

Compiler output:
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>;
Language: 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;
  }
}


Compiler output:
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
Language: 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;
}

Compiler output:
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