criyle/codenet-compile-errors huggingface dataset:
Language: Java

import com.sun.applet2.AppletParameters;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.next();
        String s2 = scanner.next();
        String s3 = scanner.next();
        if(s1.charAt(s1.length() - 1) == s2.charAt(0) && s2.charAt(s2.length() - 1) == s3.charAt(0)){
            System.out.println("YES");
        }
        else System.out.println("NO");
    }

}



Compiler output:
Main.java:1: error: package com.sun.applet2 does not exist
import com.sun.applet2.AppletParameters;
                      ^
1 error
Language: C++

#include <iostream>
#include <string>

int main()
{
  	string A, B, C;
  	std::cin >> A >> B >> C;
  	if(A.back() == B.front() && B.back() == C.front()){
      	std::cout << "YES";
    }else{
      	std::cout << "NO";
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string A, B, C;
      |         ^~~~~~
a.cc:6:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:21: error: 'A' was not declared in this scope
    7 |         std::cin >> A >> B >> C;
      |                     ^
a.cc:7:26: error: 'B' was not declared in this scope
    7 |         std::cin >> A >> B >> C;
      |                          ^
a.cc:7:31: error: 'C' was not declared in this scope
    7 |         std::cin >> A >> B >> C;
      |                               ^
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
 char s[3][11];
 int i;
 for(i=0;i<3;i++) scanf("%s",s[i]);
 if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES");
 else printf("NO");
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: request for member 'strlen' in something not a structure or union
    7 |  if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES");
      |              ^
main.c:7:44: error: request for member 'strlen' in something not a structure or union
    7 |  if(s[0][s[0].strlen]==s[1][0] && s[1][s[1].strlen]==s[2][0]) printf("YES");
      |                                            ^
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
 char s[3][11];
 int i;
 for(i=0;i<3;i++) scanf("%s",s[i]);
 if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES");
 else printf("NO");
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: request for member 'strlen' in something not a structure or union
    7 |  if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES");
      |              ^
main.c:7:46: error: request for member 'strlen' in something not a structure or union
    7 |  if(s[0][s[0].strlen-1]==s[1][0] && s[1][s[1].strlen-1]==s[2][0]) printf("YES");
      |                                              ^
Language: C

#include <stdio.h>
int main(void){
 char s[3][11];
 int i;
 for(i=0;i<3;i++) scanf("%s",s[i]);
 if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES");
 else printf("NO");
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:14: error: request for member 'length' in something not a structure or union
    6 |  if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES");
      |              ^
main.c:6:44: error: request for member 'length' in something not a structure or union
    6 |  if(s[0][s[0].length]==s[1][0] && s[1][s[1].length]==s[2][0]) printf("YES");
      |                                            ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;

int main() {
	char a[32], b[32], c[32];
	int sa, sb,

	scanf("%s", a);
	scanf("%s", b);
	scanf("%s", c);

	sa = strlen(a) - 1;
	sb = strlen(b) - 1;
	
	if (a[sa] == b[0] && b[sb] == c[0])
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expression list treated as compound expression in initializer [-fpermissive]
   10 |         scanf("%s", a);
      |                      ^
a.cc:10:22: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   10 |         scanf("%s", a);
      |                      ^
      |                      |
      |                      char*
a.cc:11:14: error: 'scanf' cannot be used as a function
   11 |         scanf("%s", b);
      |         ~~~~~^~~~~~~~~
a.cc:12:14: error: 'scanf' cannot be used as a function
   12 |         scanf("%s", c);
      |         ~~~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int a,b,c;
    cin >>a>>b>>c;
    if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
    else cout << "NO" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
      |            ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
      |                          ^
a.cc:8:37: error: request for member 'size' in 'b', which is of non-class type 'int'
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
      |                                     ^~~~
a.cc:8:51: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]) cout << "YES" << endl;
      |                                                   ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int a,b,c;
    cin >>a>>b>>c;
    if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
        cout << "YES" << endl;
        }
    else cout << "NO" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
      |            ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
      |                          ^
a.cc:8:37: error: request for member 'size' in 'b', which is of non-class type 'int'
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
      |                                     ^~~~
a.cc:8:51: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] == b[0] && b[b.size()-1] == c[0]){
      |                                                   ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int a,b,c;
    cin >>a>>b>>c;
    if(a[a.size()-1] && b[0]){
        if(b[b.size()-1] && c[0]){
                    }
        cout << "YES" << endl;
        }
    else cout << "NO" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
    8 |     if(a[a.size()-1] && b[0]){
      |            ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] && b[0]){
      |                          ^
a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int'
    9 |         if(b[b.size()-1] && c[0]){
      |                ^~~~
a.cc:9:30: error: invalid types 'int[int]' for array subscript
    9 |         if(b[b.size()-1] && c[0]){
      |                              ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int a,b,c;
    cin >>a>>b>>c;
    if(a[a.size()-1] && b[0]){
        if(b[b.size()-1] && c[0]){
            cout << "YES" << endl;
        }
        else cout << "NO" << endl;
    }
    else cout << "NO" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
    8 |     if(a[a.size()-1] && b[0]){
      |            ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] && b[0]){
      |                          ^
a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int'
    9 |         if(b[b.size()-1] && c[0]){
      |                ^~~~
a.cc:9:30: error: invalid types 'int[int]' for array subscript
    9 |         if(b[b.size()-1] && c[0]){
      |                              ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int a,b,c;
    cin >>a>>b>>c;
    if(a[a.size()-1] && b[0]){
        if(b[b.size()-1] && c[0]{
            cout << "YES" << endl;
        }
        else cout << "NO" << endl;
    }
    else cout << "NO" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
    8 |     if(a[a.size()-1] && b[0]){
      |            ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] && b[0]){
      |                          ^
a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int'
    9 |         if(b[b.size()-1] && c[0]{
      |                ^~~~
a.cc:9:30: error: invalid types 'int[int]' for array subscript
    9 |         if(b[b.size()-1] && c[0]{
      |                              ^
a.cc:12:9: error: expected primary-expression before 'else'
   12 |         else cout << "NO" << endl;
      |         ^~~~
a.cc:11:10: error: expected ')' before 'else'
   11 |         }
      |          ^
      |          )
   12 |         else cout << "NO" << endl;
      |         ~~~~
a.cc:9:11: note: to match this '('
    9 |         if(b[b.size()-1] && c[0]{
      |           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int a,b,c;
    cin >>a>>b>>c;
    if(a[a.size()-1] && b[0]){
        if(b[b.size()-1] && c[0]{
            cout << "YES" << endl;
        }
    }
    else cout << "NO" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: request for member 'size' in 'a', which is of non-class type 'int'
    8 |     if(a[a.size()-1] && b[0]){
      |            ^~~~
a.cc:8:26: error: invalid types 'int[int]' for array subscript
    8 |     if(a[a.size()-1] && b[0]){
      |                          ^
a.cc:9:16: error: request for member 'size' in 'b', which is of non-class type 'int'
    9 |         if(b[b.size()-1] && c[0]{
      |                ^~~~
a.cc:9:30: error: invalid types 'int[int]' for array subscript
    9 |         if(b[b.size()-1] && c[0]{
      |                              ^
a.cc:9:33: error: expected ')' before '{' token
    9 |         if(b[b.size()-1] && c[0]{
      |           ~                     ^
      |                                 )
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
Language: C++

＃員cぅで＜びｔｓ・ｓｔｄｃ＋＋．ｈ＞インtまいん（）｛
｝std：：st林gあ、ｂ，ｃ；std：：シン＞＞ア＞＞b＞＞ｃ；std：：こうｔ＜（あ。場ck（）＝＝b【０】｜｜b．場ck（）＝＝c【０】）？”YES" : "NO" << std::endl;

Compiler output:
a.cc:2:1: error: extended character 、 is not valid in an identifier
    2 | ｝std：：st林gあ、ｂ，ｃ；std：：シン＞＞ア＞＞b＞＞ｃ；std：：こうｔ＜（あ。場ck（）＝＝b【０】｜｜b．場ck（）＝＝c【０】）？”YES" : "NO" << std::endl;
      | ^
a.cc:2:1: error: extended character 。 is not valid in an identifier
a.cc:2:1: error: extended character 【 is not valid in an identifier
a.cc:2:1: error: extended character 】 is not valid in an identifier
a.cc:2:1: error: extended character 【 is not valid in an identifier
a.cc:2:1: error: extended character 】 is not valid in an identifier
a.cc:2:1: error: extended character ” is not valid in an identifier
a.cc:2:138: warning: missing terminating " character
    2 | ｝std：：st林gあ、ｂ，ｃ；std：：シン＞＞ア＞＞b＞＞ｃ；std：：こうｔ＜（あ。場ck（）＝＝b【０】｜｜b．場ck（）＝＝c【０】）？”YES" : "NO" << std::endl;
      |                                                                                                                                          ^
a.cc:2:138: error: missing terminating " character
    2 | ｝std：：st林gあ、ｂ，ｃ；std：：シン＞＞ア＞＞b＞＞ｃ；std：：こうｔ＜（あ。場ck（）＝＝b【０】｜｜b．場ck（）＝＝c【０】）？”YES" : "NO" << std::endl;
      |                                                                                                                                          ^~~~~~~~~~~~~~~
a.cc:1:1: error: '\U0000ff03\U000054e1c\U00003045\U00003067\U0000ff1c\U00003073\U0000ff54\U0000ff53\U000030fb\U0000ff53\U0000ff54\U0000ff44\U0000ff43\U0000ff0b\U0000ff0b\U0000ff0e\U0000ff48\U0000ff1e\U000030a4\U000030f3t\U0000307e\U00003044\U00003093\U0000ff08\U0000ff09\U0000ff5b' does not name a type
    1 | ＃員cぅで＜びｔｓ・ｓｔｄｃ＋＋．ｈ＞インtまいん（）｛
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string a,b,c;
  cin>>a>>b>>c;
  if(a.back()==b.front()&&b.back()==c.front()){cout<<"YES"<<endl;}
  else{cout<<"NO"<<endl:}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ':' token
    8 |   else{cout<<"NO"<<endl:}
      |                        ^
      |                        ;
Language: C++

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

int main(){

    string a, b, c;
    int lena = (int)a.size();
    int lemb = (int)b.size();

    if(a[lena] == b[0] && b[lenb] == c[0]) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: 'lenb' was not declared in this scope; did you mean 'lemb'?
   10 |     if(a[lena] == b[0] && b[lenb] == c[0]) cout << "YES" << endl;
      |                             ^~~~
      |                             lemb
Language: C++

#include<iosream>
#include<string>
using namespace std;
int main(void){
  string s1,s2,s3;
  cin>>s1>>s2>>s3;
  if(s1[0]==s2[0]==s3[0])cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  return 0;
}
  

Compiler output:
a.cc:1:9: fatal error: iosream: No such file or directory
    1 | #include<iosream>
      |         ^~~~~~~~~
compilation terminated.
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:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |     if(a[a.size-1]==b[0]&&b[b.size-1]==c[0]) cout<<"YES"<<endl;
      |          ~~^~~~
      |                ()
a.cc:6:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |     if(a[a.size-1]==b[0]&&b[b.size-1]==c[0]) cout<<"YES"<<endl;
      |                             ~~^~~~
      |                                   ()
Language: C++

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaespace'
    2 | using namaespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string a,b,c;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:4: error: 'a' was not declared in this scope
    6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0])
      |    ^
a.cc:6:19: error: 'b' was not declared in this scope
    6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0])
      |                   ^
a.cc:6:42: error: 'c' was not declared in this scope
    6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0])
      |                                          ^
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout<<"YES";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | cout<<"NO";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <cstdio>
#include <cstring>
using namespace std;
int main(void){
  char a[128], b[128], c[128];
  scanf("%s%s%s",a,b,c);
  puts(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])? "YES":"NO");
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: cannot convert 'bool' to 'const char*'
    7 |   puts(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])? "YES":"NO");
      |        ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                             |
      |                             bool
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

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

int main(void) 
  string a, b, c;
	cin >> a >> b >> c;

	if (a.end() == b.begin() && b.end() == c.begin()) cout << "YES" << endl;
	else cout << "NO" << endl;
}

Compiler output:
a.cc:6:3: error: expected initializer before 'string'
    6 |   string a, b, c;
      |   ^~~~~~
a.cc:7:9: error: 'cin' does not name a type
    7 |         cin >> a >> b >> c;
      |         ^~~
a.cc:9:9: error: expected unqualified-id before 'if'
    9 |         if (a.end() == b.begin() && b.end() == c.begin()) cout << "YES" << endl;
      |         ^~
a.cc:10:9: error: expected unqualified-id before 'else'
   10 |         else cout << "NO" << endl;
      |         ^~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

    #include <iostream>
     int main() {
       std::String A, B, C;
       std::cin >> A >> B >> C;
       if (A.back == B.front && B.back == C.front) {
         std::cout << "YES" <<std::endl;
       } else {
         std::cout << "NO" <<std::endl;
       }
       
       
       return 0;
       
       
     }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: 'String' is not a member of 'std'; did you mean 'string'?
    3 |        std::String A, B, C;
      |             ^~~~~~
      |             string
a.cc:4:20: error: 'A' was not declared in this scope
    4 |        std::cin >> A >> B >> C;
      |                    ^
a.cc:4:25: error: 'B' was not declared in this scope
    4 |        std::cin >> A >> B >> C;
      |                         ^
a.cc:4:30: error: 'C' was not declared in this scope
    4 |        std::cin >> A >> B >> C;
      |                              ^
Language: C++

#include <iostream>
 int main() {
   std::string A, B, C;
   std::cin >> A >> B >> C;
   if (A.back == B.front && B.back == C.front) {
     std::cout << "YES" <<std::endl;
   } else {
     std::cout << "NO" <<std::endl;
   }
   
   
   return 0;
   
   
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
    5 |    if (A.back == B.front && B.back == C.front) {
      |        ~~~~~~ ^~ ~~~~~~~
      |          |         |
      |          |         <unresolved overloaded function type>
      |          <unresolved overloaded function type>
a.cc:5:36: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
    5 |    if (A.back == B.front && B.back == C.front) {
      |                             ~~~~~~ ^~ ~~~~~~~
      |                               |         |
      |                               |         <unresolved overloaded function type>
      |                               <unresolved overloaded function type>
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before '==' token
    7 |         if (a.back()) == b.front() && b.back() == c.front()){
      |                       ^~
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(1){
     if(b.at(b.size() - 1)==c.at(1){
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected ';' before '{' token
    7 |   if(a.at(a.size() - 1)==b.at(1){
      |                                 ^
      |                                 ;
a.cc:13:23: error: expected ')' before ';' token
   13 |   cout << "NO" << endl;
      |                       ^
      |                       )
a.cc:7:5: note: to match this '('
    7 |   if(a.at(a.size() - 1)==b.at(1){
      |     ^
Language: C++

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

int main() {
  string a, b, c;
  cin >> a;
  cin >> b;
  cin >> c;
  char d, e, f, g;
  int h, i, j;
  h = a.size();
  i = b.size();
  j = c.size();
  d = a.at(g-1);
  e = b.at(h-1);
  f = b.at(1);
  g = c.at(1);
  if(e == j){
    if(f == k){
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'k' was not declared in this scope
   19 |     if(f == k){
      |             ^
Language: C++

#include <bits/stdc++.h>

#define o(output) cout << output << endl

using namespace std;

string s,t,u;
int a,b,c,d;
int l[13]={0,1,3,1,2,1,2,1,1,2,1,2,1};
char A,B;
priority_queue<int,vector<int>,greater<int> >small;

int main(){
  cin >> s >> t >>u;
  if(s.back()==t.front()&&t.back()==u.front())o("YES")
  else o("NO");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ';' before 'else'
   16 |   else o("NO");
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
int main(){
  string a,b,c;
  cin>>a>>b>>c;
  if(a.at(a.size())==b.at(b.size())==c.at(c.size()))
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string a,b,c;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>a>>b>>c;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:8: error: 'a' was not declared in this scope
    4 |   cin>>a>>b>>c;
      |        ^
a.cc:4:11: error: 'b' was not declared in this scope
    4 |   cin>>a>>b>>c;
      |           ^
a.cc:4:14: error: 'c' was not declared in this scope
    4 |   cin>>a>>b>>c;
      |              ^
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout<<"YES"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout<<"YES"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<"NO"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<"NO"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++


#include<iostream>
#include<algorithm>
#include<string>
#include<vector>

using namespace std;

int main() {
	string a, b, c;
	cin >> a >> b >> c;
    cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
       return 0;
}


Compiler output:
a.cc:12:59: error: extended character ” is not valid in an identifier
   12 |     cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
      |                                                           ^
a.cc:12:59: error: extended character ” is not valid in an identifier
a.cc:12:65: error: extended character ” is not valid in an identifier
   12 |     cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
      |                                                                 ^
a.cc:12:65: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:12:59: error: '\U0000201dYES\U0000201d' was not declared in this scope
   12 |     cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
      |                                                           ^~~~~
a.cc:12:65: error: '\U0000201dNO\U0000201d' was not declared in this scope
   12 |     cout<<(a.back() == b.front() && b.back()==c.front() ? ”YES”:”NO”);
      |                                                                 ^~~~
Language: C++

use std::env;
use std::io::*;
use std::str::*;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let s = stdin.bytes().map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok().unwrap()
}

fn main() {
    // main の引数
    /*
        引数なしのときargs.len() = 1;
    */
    let args: Vec<String> = env::args().collect();


        let S1 = read::<String>();
        let S1 = S1.chars().collect::<Vec<char>>();

        let S2 = read::<String>();
        let S2 = S2.chars().collect::<Vec<char>>();

        let S3 = read::<String>();
        let S3 = S3.chars().collect::<Vec<char>>();

        if S1[S1.len()-1] == S2[0] && S2[S2.len()-1] == S3[0] {
            println!("YES");
        }else {
            println!("NO");
        }
}


Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::env;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::io::*;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::str::*;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn read<T: FromStr>() -> T {
      | ^~
a.cc:14:1: error: 'fn' does not name a type
   14 | fn main() {
      | ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |   x = strlen(a);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:9:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   y = strlen(b);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: Java

import java.util.scanner;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    String c = sc.next();
    if(a.charAt(a.length() - 1) == b.charAt(0)&&b.charAt(b.length() - 1) == c.charAt(0)){
      System.out.println("YES");
    }
    else System.out.println("NO");
  }
}

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:46: error: expected ';' before 'std'
    6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]
      |                                              ^
      |                                              ;
    7 | std::cout << "YES" << std::endl;
      | ~~~                                           
a.cc:8:1: error: expected primary-expression before 'else'
    8 | else
      | ^~~~
a.cc:7:33: error: expected ')' before 'else'
    7 | std::cout << "YES" << std::endl;
      |                                 ^
      |                                 )
    8 | else
      | ~~~~                             
a.cc:6:3: note: to match this '('
    6 | if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]
      |   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	char A[10],B[10],C[10],i=0;
	cin >> A >> B >> C;
	while(A[i]!='\0') i++;
  	if(A[i-1]==B[0]){
      i=0;
      while(B[i]!='\0') i++;
      if(B[i-1]==C[0]) cout << "YES" << endl;
      else << cout << "NO" << endl;
    }
  	else cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected primary-expression before '<<' token
   12 |       else << cout << "NO" << endl;
      |            ^~
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    String c = sc.next();
    Char a2 = a.charAt(a.length()-1);
    Char b1 = b.charAt(0);
    Char b2 = b.charAt(b.length()-1);
    Char c1 = c.charAt(0);
    if(a2 == b1 && b2 == c1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    Char a2 = a.charAt(a.length()-1);
    ^
  symbol:   class Char
  location: class Main
Main.java:9: error: cannot find symbol
    Char b1 = b.charAt(0);
    ^
  symbol:   class Char
  location: class Main
Main.java:10: error: cannot find symbol
    Char b2 = b.charAt(b.length()-1);
    ^
  symbol:   class Char
  location: class Main
Main.java:11: error: cannot find symbol
    Char c1 = c.charAt(0);
    ^
  symbol:   class Char
  location: class Main
4 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    String c = sc.next();
    String a2 = a.charAt(a.length()-1);
    String b1 = b.charAt(0);
    String b2 = b.charAt(b.length()-1);
    String c1 = c.charAt(0);
    if(a2 == b1 && b2 == c1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
}

Compiler output:
Main.java:8: error: incompatible types: char cannot be converted to String
    String a2 = a.charAt(a.length()-1);
                        ^
Main.java:9: error: incompatible types: char cannot be converted to String
    String b1 = b.charAt(0);
                        ^
Main.java:10: error: incompatible types: char cannot be converted to String
    String b2 = b.charAt(b.length()-1);
                        ^
Main.java:11: error: incompatible types: char cannot be converted to String
    String c1 = c.charAt(0);
                        ^
4 errors
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:91: error: expected ';' before 'cout'
    7 |     if(a[a.length() - 1] == a[0] && b[b.length() - 1] == b[0] && c[c.length() - 1] == c[0]
      |                                                                                           ^
      |                                                                                           ;
    8 |        cout << "YES" << endl;
      |        ~~~~                                                                                
a.cc:9:8: error: expected primary-expression before '}' token
    9 |        }else{
      |        ^
a.cc:8:30: error: expected ')' before '}' token
    8 |        cout << "YES" << endl;
      |                              ^
      |                              )
    9 |        }else{
      |        ~                      
a.cc:7:7: note: to match this '('
    7 |     if(a[a.length() - 1] == a[0] && b[b.length() - 1] == b[0] && c[c.length() - 1] == c[0]
      |       ^
a.cc:9:8: error: expected primary-expression before '}' token
    9 |        }else{
      |        ^
a.cc: At global scope:
a.cc:9:9: error: expected unqualified-id before 'else'
    9 |        }else{
      |         ^~~~
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] == [0] && c[c,length() - 1] == c[0]
       cout << "YES" << endl;
       }else{
       cout << "NO" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'length' was not declared in this scope
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |            ^~~~~~
a.cc:7:59: error: expected identifier before numeric constant
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |                                                           ^
a.cc: In lambda function:
a.cc:7:62: error: expected '{' before '&&' token
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |                                                              ^~
a.cc: In function 'int main()':
a.cc:9:8: error: expected primary-expression before '}' token
    9 |        }else{
      |        ^
a.cc:8:30: error: expected ')' before '}' token
    8 |        cout << "YES" << endl;
      |                              ^
      |                              )
    9 |        }else{
      |        ~                      
a.cc:7:7: note: to match this '('
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |       ^
a.cc:9:8: error: expected primary-expression before '}' token
    9 |        }else{
      |        ^
a.cc: At global scope:
a.cc:9:9: error: expected unqualified-id before 'else'
    9 |        }else{
      |         ^~~~
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] == [0] && c[c,length() - 1] == c[0]
       cout << "YES" << endl;
       }else{
       cout << "NO" << endl;
    cin >> a >> b >> c;
    if()
     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'length' was not declared in this scope
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |            ^~~~~~
a.cc:7:59: error: expected identifier before numeric constant
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |                                                           ^
a.cc: In lambda function:
a.cc:7:62: error: expected '{' before '&&' token
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |                                                              ^~
a.cc: In function 'int main()':
a.cc:9:8: error: expected primary-expression before '}' token
    9 |        }else{
      |        ^
a.cc:8:30: error: expected ')' before '}' token
    8 |        cout << "YES" << endl;
      |                              ^
      |                              )
    9 |        }else{
      |        ~                      
a.cc:7:7: note: to match this '('
    7 |     if(a[a,length() - 1] == b[0] && b[b,length() - 1] == [0] && c[c,length() - 1] == c[0]
      |       ^
a.cc:9:8: error: expected primary-expression before '}' token
    9 |        }else{
      |        ^
a.cc: At global scope:
a.cc:9:9: error: expected unqualified-id before 'else'
    9 |        }else{
      |         ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
 
using namespace std;
 
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define pb push_back

struct link{
    int num;
    struct link *before, *next;
};

struct link *nil;
const int MAX_N = 100010;

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:30:54: error: extended character 　 is not valid in an identifier
   30 |     if(a[a.length() - 1] == b[0] && b[b.length() - 1]　== c[0]){
      |                                                      ^
a.cc: In function 'int main()':
a.cc:30:54: error: expected ')' before '\U00003000'
   30 |     if(a[a.length() - 1] == b[0] && b[b.length() - 1]　== c[0]){
      |       ~                                              ^~
      |                                                      )
Language: C++

#include<math.h>
#include<limits.h>
#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<sstream>
#include<list>
#include<queue>
#include<algorithm>
#include<functional>
#include<map>
#include<set>
#include<utility>
#include<initializer_list>
#include<tuple>
#include<regex>
using namespace std;
#define ull unsigned long long
#define ll long long
#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define all(t) t.begin(), t.end()
#define mat(type, row, col, init) vector<vector<type>>(row, vector<type>(col, init));

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





Compiler output:
a.cc: In function 'int main()':
a.cc:28:26: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'first'
   28 |         if(a.back() == b.first() && b.back() == c.first()) cout<<"YES";
      |                          ^~~~~
a.cc:28:51: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'first'
   28 |         if(a.back() == b.first() && b.back() == c.first()) cout<<"YES";
      |                                                   ^~~~~
Language: C++

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

int main(){
  string A,B,C ;
  getline(cin,A);getline(cin,B);getline(cin,C);

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |   if (A[strlen(A) - 1] == B[0] &&
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:11:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   11 |       B[strlen(B) - 1] == C[0]){
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

int main(){
  string A,B,C ;
  getline(cin,A);getline(cin,B);getline(cin,C);

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:64: error: expected ';' before 'std'
    6 | if(a[a.size()-1]==b[b.size()-1] && b[b.size()-1]==c[c.size()-1]
      |                                                                ^
      |                                                                ;
    7 | std::cout << "YES" << std::endl;
      | ~~~                                                             
a.cc:8:1: error: expected primary-expression before 'else'
    8 | else
      | ^~~~
a.cc:7:33: error: expected ')' before 'else'
    7 | std::cout << "YES" << std::endl;
      |                                 ^
      |                                 )
    8 | else
      | ~~~~                             
a.cc:6:3: note: to match this '('
    6 | if(a[a.size()-1]==b[b.size()-1] && b[b.size()-1]==c[c.size()-1]
      |   ^
Language: C++

#include <cstdio>
#include <string>
using namespace std;
int main(){
  char A[10],B[10],C[10];
  scanf("%s %s %s",&A,&B,&C);
  if(A[strlen(A)-1]==B[0]&&B[strlen(B)-1]==C[0]){
    printf("YES\n");
  } else ("NO\n");
  return 0;
}


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

use std::io;

fn main() {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();

    let v: Vec<_> = buf.split_whitespace().collect();
    for i in 0..2 {
        if v[i].chars().last() != v[i+1].chars().nth(0) {
            println!("NO");
            return
        }
    }

    println!("YES");
}


Compiler output:
a.cc:8:14: error: too many decimal points in number
    8 |     for i in 0..2 {
      |              ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn main() {
      | ^~
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;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before 'endl'
    7 |                 cout << "YES" endl;
      |                              ^~~~~
      |                              ;