criyle/codenet-compile-errors huggingface dataset:
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,s;
  cin>>a>>b>>c;
  int la=a.size(),lb=b.size(),lc=c.size();
  if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'c' was not declared in this scope
    9 |   cin>>a>>b>>c;
      |              ^
a.cc:11:8: error: 'ia' was not declared in this scope; did you mean 'la'?
   11 |   if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl;
      |        ^~
      |        la
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,s;
  cin>>a>>b>>c;
  int la=a.size(),lb=b.size(),lc=c.size();
  if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl;
  else coutNN"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'c' was not declared in this scope
    9 |   cin>>a>>b>>c;
      |              ^
a.cc:11:8: error: 'ia' was not declared in this scope; did you mean 'la'?
   11 |   if(a[ia-1]==b[0] && b[lb-1]==c[0]) cout<<"YES"<<endl;
      |        ^~
      |        la
a.cc:12:8: error: 'coutNN' was not declared in this scope
   12 |   else coutNN"NO"<<endl;
      |        ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
  cin>>A>>B>>C;
  int N=A.size();
  int M=B.size();
  if(A.at(N-1)!=B.at(0))
    cout<<"NO"<<endl;
  ellse{
  if(B.at(M-1)!=C.at(0))
    cout<<"NO"<<endl;
    else
      cout<<"YES"<<endl;
  }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'ellse' was not declared in this scope
   10 |   ellse{
      |   ^~~~~
Language: C++

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

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

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

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
  cin>>A>>B>>C;

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: 'a' was not declared in this scope
    7 |    a=A.size();
      |    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
  cin>>A>>B>>C;
  int a;
  int a=A.size();
  if(A.at(a-1)==B.at(0)&&B.at(0)==C.at(0)){
  cout<<"YES"<<endl;
  }
  else{
  cout<<"NO"<<endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int a'
    7 |   int a=A.size();
      |       ^
a.cc:6:7: note: 'int a' previously declared here
    6 |   int a;
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'y' was not declared in this scope
    7 |   cin >> s >> y >> u;
      |               ^
Language: Java

import java.util.*;

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


Compiler output:
Main.java:12: error: illegal start of type
    }else{
     ^
Main.java:16: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

#include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for(ll i = (k); i < (n); i++)
#define FORe(i, k, n) for(ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for(ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for(ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre(i, n, 0)
#define ALL(x) (x).begin(), (x).end()
#define ALLr(x) (x).rbegin(), (x).rend()
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;

const int INF = 1001001001;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to binary 'operator=='
   20 |   if(a.back == b[0] && b.back == c[0]) cout << "YES" << endl;
a.cc:20:31: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to binary 'operator=='
   20 |   if(a.back == b[0] && b.back == c[0]) cout << "YES" << endl;
Language: C

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

int main()
{
    char* a = new char[11];
    char* b = new char[11];
    char* c = new char[11];

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

    if((a[strlen(a) - 1] == b[0]) && (b[strlen(b) - 1] == c[0])) {
        printf("YES");
    } else {
        printf("NO");
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'new' undeclared (first use in this function)
    6 |     char* a = new char[11];
      |               ^~~
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:19: error: expected ',' or ';' before 'char'
    6 |     char* a = new char[11];
      |                   ^~~~
main.c:7:19: error: expected ',' or ';' before 'char'
    7 |     char* b = new char[11];
      |                   ^~~~
main.c:8:19: error: expected ',' or ';' before 'char'
    8 |     char* c = new char[11];
      |                   ^~~~
Language: C

#include<cstdio>
#include<cstring>

int main()
{
    char* a = new char[11];
    char* b = new char[11];
    char* c = new char[11];

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

    if((a[strlen(a) - 1] == b[0]) && (b[strlen(b) - 1] == c[0])) {
        printf("YES");
    } else {
        printf("NO");
    }

    return 0;
}

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

#include <stdio.h>
  2 #include <string.h>
  3 int main()
  4 {
  5    char a[11],b[11],c[11];
  6 
  7    scanf("%s%s%s",a,b,c);
  8    int anagasa = strlen(a);
  9    int bnagasa = strlen(b);
 10 
 11    if(a[anagasa-1]==b[0] && b[bnagasa-1]==c[0])
 12       printf("YES\n");
 13    else
 14       printf("NO\n");
 15    return 0;                                                                
 16       }


Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2 #include <string.h>
      |   ^
main.c:2:5: error: stray '#' in program
    2 |   2 #include <string.h>
      |     ^
Language: C++

#include <stdio.h>
  2 #include <string.h>
  3 int main()
  4 {
  5    char a[11],b[11],c[11];
  6 
  7    scanf("%s%s%s",a,b,c);
  8    int anagasa = strlen(a);
  9    int bnagasa = strlen(b);
 10 
 11    if(a[anagasa-1]==b[0] && b[bnagasa-1]==c[0])
 12       printf("YES\n");
 13    else
 14       printf("NO\n");
 15    return 0;                                                                
 16       }


Compiler output:
a.cc:2:5: error: stray '#' in program
    2 |   2 #include <string.h>
      |     ^
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2 #include <string.h>
      |   ^
Language: C++

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

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

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

        int ae = strlen(A); //Aの文字数
        int be = strlen(B); //Bの文字数

        if (A[ae-1]==b[0] && b[be-1]==c[0])
                printf("YES\n");
        else
                printf("NO\n");

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'b' was not declared in this scope
   13 |         if (A[ae-1]==b[0] && b[be-1]==c[0])
      |                      ^
a.cc:13:39: error: 'c' was not declared in this scope
   13 |         if (A[ae-1]==b[0] && b[be-1]==c[0])
      |                                       ^
Language: C

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

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

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

        int ae = strlen(A); //Aの文字数
        int be = strlen(B); //Bの文字数

        if (A[ae-1]==b[0] && b[be-1]==c[0])
                printf("YES\n")
        else
                printf("NO\n");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:22: error: 'b' undeclared (first use in this function)
   13 |         if (A[ae-1]==b[0] && b[be-1]==c[0])
      |                      ^
main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:39: error: 'c' undeclared (first use in this function)
   13 |         if (A[ae-1]==b[0] && b[be-1]==c[0])
      |                                       ^
main.c:14:32: error: expected ';' before 'else'
   14 |                 printf("YES\n")
      |                                ^
      |                                ;
   15 |         else
      |         ~~~~
Language: C

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

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

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

        int ae = strlen(A); //Aの文字数
        int be = strlen(B); //Bの文字数

        if (A[ae-1]==b[0] && b[be-1]==c[0])
                printf("YES\n")
        else
                printf("NO\n");

return 0;
}
~                  

Compiler output:
main.c: In function 'main':
main.c:13:22: error: 'b' undeclared (first use in this function)
   13 |         if (A[ae-1]==b[0] && b[be-1]==c[0])
      |                      ^
main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:39: error: 'c' undeclared (first use in this function)
   13 |         if (A[ae-1]==b[0] && b[be-1]==c[0])
      |                                       ^
main.c:14:32: error: expected ';' before 'else'
   14 |                 printf("YES\n")
      |                                ^
      |                                ;
   15 |         else
      |         ~~~~                    
main.c: At top level:
main.c:20:1: error: expected identifier or '(' before '~' token
   20 | ~
      | ^
Language: C

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

int main(void)
{
   char a[11],b[11],c[11];

   scanf("%s%s%s",a,b,c);
   if (((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0])))
   printf("YES\n")
   else printf("NO\n");
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:19: error: expected ';' before 'else'
   10 |    printf("YES\n")
      |                   ^
      |                   ;
   11 |    else printf("NO\n");
      |    ~~~~
Language: C

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

int main(void)
{
   char a[11],b[11],c[11];
   int ar,br,cr;

   scanf("%s%s%s",a,b,c);
   ar=strlen(a);
   br=strlen(b);
   cr=strlen(c);
   if((a[ar-1]==b[0])&&(b[br-1]==c[0])) printf("Yes\n");
   else printf("No\n");
   return 0;
}
~                   

Compiler output:
main.c:17:1: error: expected identifier or '(' before '~' token
   17 | ~
      | ^
Language: C++

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

int main(void)
{
  char A[10],B[10],C[10];
  int a,b;
  scanf("%s%s%s",A,B,C);
  a = strlen(A);
  b = strlen(B);
  if((A[a-1] == B[0])&&(B[b-1] == C[0]))
    printf("YES\n");
  else
    printf("NO\n");
  retun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'retun' was not declared in this scope
   15 |   retun 0;
      |   ^~~~~
Language: C

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

int main(void)
{
   char a[11],b[11],c[11];

   scanf("%s%s%s",a,b,c);
   if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0]))
   printf("YES\n");
   else printf("NO\n");
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:35: error: expected identifier before '(' token
    9 |    if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0]))
      |                                   ^
Language: C

#include<stdio.h>

int main()
{
   char A[11],B[11],C[11];
   scanf("%s%s%s",A,B,C);
   if((A[10]==B[0])&&(B[10]==C[0]))
      printf("YES")
   else
      printf("NO");
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected ';' before 'else'
    8 |       printf("YES")
      |                    ^
      |                    ;
    9 |    else
      |    ~~~~
Language: C

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

int main()
{
        int i,j;
        char A[11],B[11],C[11];
        scanf("%s%s%s",A,B,C);
        i=strlen(A)-1;
        j=strlen(B)-1;
        if(A[i]==B[0]&&B[j]==C[0])
        printf("YES\n");
        else printf("NO\n");
        return 0;
}
~                                  

Compiler output:
main.c:16:1: error: expected identifier or '(' before '~' token
   16 | ~
      | ^
Language: C

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

int main(void)
{
   char a[11],b[11],c[11];

   scanf("%s%s%s",a,b,c);
   if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0]))
   printf("YES\n")
   else printf("NO\n");
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:35: error: expected identifier before '(' token
    9 |    if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0]))
      |                                   ^
Language: C

#include<stdio.h>

int main()
{
   char A[11],B[11],C[11];
   scanf("%s%s%s",A,B,C);
   if((A[9]==B[0])&&(B[9]==C[0]))
      printf("YES")
   else
      printf("NO");
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected ';' before 'else'
    8 |       printf("YES")
      |                    ^
      |                    ;
    9 |    else
      |    ~~~~
Language: C

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

int main(void)
{
    char A[11],B[11],C[11];
    int a,b;

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

    a=strlen(A); b=strlen(B);

    if((A[a-1]==B[0])&&(B[b-1]==c[0]))
      printf("YES\n");
    else
      printf("NO\n");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:33: error: 'c' undeclared (first use in this function)
   13 |     if((A[a-1]==B[0])&&(B[b-1]==c[0]))
      |                                 ^
main.c:13:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(void)
{
   char a[11],b[11],c[11];

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

   if( a[strlen(a)-1] == b[0] && b[strlen(b)-1] == c[0] ) printf("YES\n");
   else                                                   printf("NO\n");

   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected primary-expression before ']' token
    8 |    scanf("%s%s%s",a[],b[],c[]);
      |                     ^
a.cc:8:25: error: expected primary-expression before ']' token
    8 |    scanf("%s%s%s",a[],b[],c[]);
      |                         ^
a.cc:8:29: error: expected primary-expression before ']' token
    8 |    scanf("%s%s%s",a[],b[],c[]);
      |                             ^
Language: C

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

int main(void)
{
   char a[11],b[11],c[11];

   scanf("%s%s%s",a,b,c);
   if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0]))
    printf("Yes\n");
   else printf("No\n");
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:35: error: expected identifier before '(' token
    9 |    if ((a[strlen(a)-1])==(b[0]))&&((b[strlen(b)-1])==(c[0]))
      |                                   ^
Language: C++

#include<stdio.h>
#include<string.h>
int mailn(void){
 char A[100],B[100],C[100];
 scanf("%s%s%s",A,B,C);
 x=strlen(A);
 y=strlen(b);
 z=strlen(C);
 if(A[x-1]==B[0] && B[y-1]==C[0])
  printf("YES\n");
  else
   printf("NO\n");
return 0;
}


Compiler output:
a.cc: In function 'int mailn()':
a.cc:6:2: error: 'x' was not declared in this scope
    6 |  x=strlen(A);
      |  ^
a.cc:7:2: error: 'y' was not declared in this scope
    7 |  y=strlen(b);
      |  ^
a.cc:7:11: error: 'b' was not declared in this scope
    7 |  y=strlen(b);
      |           ^
a.cc:8:2: error: 'z' was not declared in this scope
    8 |  z=strlen(C);
      |  ^
Language: C

#include<stdio.h>

int main()
{
   char A[11],B[11],C[11];
   scanf("%s%s%s",A,B,C);
   if((A[9]==B[0])&&(B[9]==C[0]))
      printf("Yes");
   else
      printf("No");
   return 0;
}
~     

Compiler output:
main.c:13:1: error: expected identifier or '(' before '~' token
   13 | ~
      | ^
Language: C

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

int main(void)
{
    char A[11],B[11],C[11];
    int a,b,c;

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

    a=strlen(A); b=strlen(B); c=strlen(C);

    if((A[a-1]==B[0])&&(B[b-1]==c[0]))
      printf("YES\n");
    else
      printf("NO\n");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:34: error: subscripted value is neither array nor pointer nor vector
   13 |     if((A[a-1]==B[0])&&(B[b-1]==c[0]))
      |                                  ^
Language: C

int main(void)
{
    char A[11],B[11],C[11];
    int a,b,c;

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

    a=strlen(A); b=strlen(B); c=strlen(C);

    if((A[a]==B[0])&&(B[b]==c[0]))
      printf("YES\n");
    else
      printf("NO\n");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |     scanf("%s%s%s",A,B,C);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:6:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |     scanf("%s%s%s",A,B,C);
      |     ^~~~~
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |     a=strlen(A); b=strlen(B); c=strlen(C);
      |       ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | int main(void)
main.c:8:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |     a=strlen(A); b=strlen(B); c=strlen(C);
      |       ^~~~~~
main.c:8:7: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:10:30: error: subscripted value is neither array nor pointer nor vector
   10 |     if((A[a]==B[0])&&(B[b]==c[0]))
      |                              ^
main.c:11:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |       printf("YES\n");
      |       ^~~~~~
main.c:11:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:11:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   13 |       printf("NO\n");
      |       ^~~~~~
main.c:13:7: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

int main(void)
{
    char A[11],B[11],C[11];
    int a,b,c;

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

    a=strlen(A); b=strlen(B); c=strlen(C);

    if((A[a]==B[0])&&(B[b]==c[0]))
      printf("YES\n");
    else
      printf("NO\n");

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%s%s%s",A,B,C);
      |     ^~~~~
a.cc:8:7: error: 'strlen' was not declared in this scope
    8 |     a=strlen(A); b=strlen(B); c=strlen(C);
      |       ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(void)
a.cc:10:30: error: invalid types 'int[int]' for array subscript
   10 |     if((A[a]==B[0])&&(B[b]==c[0]))
      |                              ^
a.cc:11:7: error: 'printf' was not declared in this scope
   11 |       printf("YES\n");
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
a.cc:13:7: error: 'printf' was not declared in this scope
   13 |       printf("NO\n");
      |       ^~~~~~
a.cc:13:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C

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

int main(void)
{
    char A[11],B[11],C[11];
    int a,b,c;

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

    a=strlen(A); b=strlen(B); c=strlen(C);

    if((A[a]==B[0])&&(B[b]==c[0]))
      printf("YES\n");
    else
      printf("NO\n");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:30: error: subscripted value is neither array nor pointer nor vector
   13 |     if((A[a]==B[0])&&(B[b]==c[0]))
      |                              ^
Language: C

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

int main(void)
{
   int a,b;
   char A[11],B[11],C[11];
   
   scanf("%s%s%s", &A, &B, &C);

   a=strlen(chat *A);
   b=strlen(chat *B);

   if((A[a]==B[0]) && (B[b]==C[0]))
      printf("YES");
   else
      printf("NO");

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:13: error: 'chat' undeclared (first use in this function); did you mean 'char'?
   11 |    a=strlen(chat *A);
      |             ^~~~
      |             char
main.c:11:13: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String A=sc.next(),B=sc.next(),C=sc.next();
    if(A.charAt((A.length()-1)==B.charAt(0)) && (B.charAt(B.length()-1)==C.charAt(0))){
      System.out.println("YES");
    }else{
      System.out.println("No");
    }
  }
}



Compiler output:
Main.java:7: error: incompatible types: boolean cannot be converted to int
    if(A.charAt((A.length()-1)==B.charAt(0)) && (B.charAt(B.length()-1)==C.charAt(0))){
                              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const ll MOD = 1e9 + 7;
#define all(v) v.begin(), v.end()
#define repi(i, n, init) for (ll i = init; i < (n); i++)
#define repd(i, n, init) for (ll i = (n); i >= init; i--)
#define repm(i, m) for (auto i = m.begin(); i != m.end(); i++)

int main()
{
    string A, B, C;
    cin >> A >> B >> C;
    cout << (A.at(A.length() - 1) == B.at(0) && B.at(B.length() - 1) == C.at(0)) ? "YES" : "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:97: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   15 |     cout << (A.at(A.length() - 1) == B.at(0) && B.at(B.length() - 1) == C.at(0)) ? "YES" : "NO" << endl;
      |                                                                                            ~~~~~^~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: request for member 'length' in 'a', which is of non-class type 'int'
    6 |   if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){
      |          ^~~~~~
a.cc:6:24: error: invalid types 'int[int]' for array subscript
    6 |   if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){
      |                        ^
a.cc:6:35: error: request for member 'length' in 'b', which is of non-class type 'int'
    6 |   if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){
      |                                   ^~~~~~
a.cc:6:49: error: invalid types 'int[int]' for array subscript
    6 |   if(a[a.length-1] == b[0] && b[b.length-1] == c[0]){
      |                                                 ^
Language: C++

// include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

// func
// ------------------------------------------------
int CalcSumOfDigit(int n);      // 各桁の和を計算する。
string upper(string str);       // 英字を大文字に変換する。
string lower(string str);       // 英字を小文字に変換する。

// define
// ------------------------------------------------
#define all(a)        (a).begin(),(a).end()
#define rall(a)       (a).rbegin(),(a).rend()
#define pb            push_back
#define sz(a)         int((a).size())
#define rep(i,n)      for(int(i)=0;(i)<(n);(i)++)
#define repe(i,n)     for(int(i)=0;(i)<=(n);(i)++)
#define vsort(v)      sort((v).begin(),(v).end())
#define rvsort(v)     sort(rall((v)))
#define vi            vector<int>

const int INF = 1e9;

// code
// ------------------------------------------------
int main() {

  string a,b,c;

  bool b = false;

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



  return 0;
}

// funcの実体
// ------------------------------------------------
int CalcSumOfDigit(int n)
{
  int s = 0;
  while(n)
  {
    s += n % 10;
    n = n / 10;
  }
  return s;
}

string upper(string str)
{
  for(auto itr = str.begin();itr != str.end() ; itr++)
  {
    if(97 <= *itr && *itr <= 122)
    {
      *itr = *itr - 32;
    }
  }
  return str;
}

string lower(string str)
{
  for(auto itr = str.begin();itr != str.end() ; itr++)
  {
    if(65 <= *itr && *itr <= 90)
    {
      *itr = *itr + 32;
    }
  }
  return str;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:8: error: conflicting declaration 'bool b'
   36 |   bool b = false;
      |        ^
a.cc:34:12: note: previous declaration as 'std::string b'
   34 |   string a,b,c;
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
#include <set>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <string>
using namespace std;
int main(void){
  int a, b, c;
  cin>>a>>b>>c;
  if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: request for member 'length' in 'a', which is of non-class type 'int'
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |          ^~~~~~
a.cc:15:24: error: invalid types 'int[int]' for array subscript
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |                        ^
a.cc:15:33: error: request for member 'length' in 'b', which is of non-class type 'int'
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |                                 ^~~~~~
a.cc:15:47: error: invalid types 'int[int]' for array subscript
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |                                               ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
#include <set>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <string>
using namespace std;
int main(void){
  int a, b, c;
  cin>>a>>b>>C;
  if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'C' was not declared in this scope
   14 |   cin>>a>>b>>C;
      |              ^
a.cc:15:10: error: request for member 'length' in 'a', which is of non-class type 'int'
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |          ^~~~~~
a.cc:15:24: error: invalid types 'int[int]' for array subscript
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |                        ^
a.cc:15:33: error: request for member 'length' in 'b', which is of non-class type 'int'
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |                                 ^~~~~~
a.cc:15:47: error: invalid types 'int[int]' for array subscript
   15 |   if(a[a.length()-1]==b[0]&&b[b.length()-1]==c[0]){
      |                                               ^
Language: C++

// 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
// ぜったいあきらめない
#if defined(DAIJOBU)
#include "/home/ichigo/includes.hpp"
#include "/home/ichigo/debug.hpp"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif
#define FIO {ios::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);}

using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


int main(){
	FIO
	
	string s1, s2, s3;
	cin >> s1 >> s2 >> s3;
	if(s1[s1.size() - 1] == s2[0] && s2[s2.size() - 1] == s3[0])puts("YES");
	else puts("NO")''
	return 0;
}


Compiler output:
a.cc:23:24: error: empty character constant
   23 |         else puts("NO")''
      |                        ^~
a.cc: In function 'int main()':
a.cc:23:24: error: expected ';' before '\x0'
   23 |         else puts("NO")''
      |                        ^~
      |                        ;
Language: C++

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

Compiler output:
a.cc:8:5: error: stray '#' in program
    8 |    }#include <bits/stdc++.h>
      |     ^
a.cc:8:6: error: 'include' does not name a type
    8 |    }#include <bits/stdc++.h>
      |      ^~~~~~~
a.cc:10:6: error: redefinition of 'int main()'
   10 |  int main() {
      |      ^~~~
a.cc:3:6: note: 'int main()' previously defined here
    3 |  int main() {
      |      ^~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
char a[10],b[10],c[10];
cin >> a >> b  >> c;
int a_num = strlen(a);
int b_num = strlen(b);
int ans ="NO";
if(a[a_num-1]==b[0]&&b[b_num-1]==c[0]) ans="YES";
cout << ans << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   17 | int ans ="NO";
      |          ^~~~
      |          |
      |          const char*
a.cc:18:44: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   18 | if(a[a_num-1]==b[0]&&b[b_num-1]==c[0]) ans="YES";
      |                                            ^~~~~
      |                                            |
      |                                            const char*
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;

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



Compiler output:
Main.java:13: error: cannot find symbol
        if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(length()-1) == c.charAt(0)){
                                                             ^
  symbol:   method length()
  location: class Main
1 error
Language: C++

#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cctype>
using namespace std;
int main()
{
    long long a, b, c;
    cin >> a >> b >> c;
    if (a == 1)
    {
        cout << "YES" << endl;
        return 0;
    }
    for (int i = 2; i <= 1000; i+
    {
        if ((a * i % b == c))
        {
            cout << "YES" << endl
            return 0;
        }
    }
    cout << "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: expected primary-expression before '{' token
   20 |     {
      |     ^
a.cc:19:34: error: expected ')' before '{' token
   19 |     for (int i = 2; i <= 1000; i+
      |         ~                        ^
      |                                  )
   20 |     {
      |     ~                             
a.cc:23:34: error: expected ';' before 'return'
   23 |             cout << "YES" << endl
      |                                  ^
      |                                  ;
   24 |             return 0;
      |             ~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
    7 |         if(a[a.size]==b[0] && b[b.size]==c[0])cout<<"YES";
      |             ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
a.cc:7:32: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
    7 |         if(a[a.size]==b[0] && b[b.size]==c[0])cout<<"YES";
      |                                ^
/usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
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 if {
    cout << "NO" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected '(' before '{' token
   12 |   else if {
      |           ^
      |           (
Language: C++

#include<bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define lper(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9;
const ll INF=4e18;
const ll dy[4]={1,0,-1,0};
const ll dx[4]={0,-1,0,1};
int main() {
string a;
  string b;
  string c;
  cin >>a>>b>>c>>;
  int x=a.size()-1;
  int y=b.size()-1;
  int z=c.size()-1;
  if((a.at(x)==b.at(0)) && (b.at(y)==c.at(0))) {
cout <<"YES" << endl;
  }
else {
cout <<"NO" << endl;
}
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: expected primary-expression before ';' token
   27 |   cin >>a>>b>>c>>;
      |                  ^
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'nedl' was not declared in this scope
   10 |   else cout<<"NO"<<nedl;
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;


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


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

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

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

Compiler output:
a.cc:6:3: error: expected initializer before 'string'
    6 |   string a;
      |   ^~~~~~
a.cc:9:1: error: 'cin' does not name a type
    9 | cin >>a >> b >>c;
      | ^~~
a.cc:10:7: error: 'a' was not declared in this scope
   10 | int x=a.size();
      |       ^
a.cc:13:1: error: expected unqualified-id before 'if'
   13 | if ((a.at(x) ==b.at(0)) && (b.at(y)==c.at(0)))  {
      | ^~
a.cc:16:1: error: expected unqualified-id before 'else'
   16 | else {
      | ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define ll long long
using namespace std;




int main(){

  string a,b,c;
  cin >> a >> b >>c;
  
  if(a.back() == b.front() && b.back() == c.front()){
    cout << "Yes" <<endl;
  }else {

    cout << "No" <<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:43:4: error: expected '}' at end of input
   43 |   }
      |    ^
a.cc:33:11: note: to match this '{'
   33 | int main(){
      |           ^
Language: C++

#include<bits/stdc++/h>
using namespace std;
int main(){

  string a,b,c;
  cin >> a >> b >>c;
  
  if(a.at(a - 1) == b.at(0) && b.at(b - 1) == c.at(0)){
    cout << "Yes" <<endl;
  }else {

    cout << "No" <<endl;
  }

Compiler output:
a.cc:1:9: fatal error: bits/stdc++/h: No such file or directory
    1 | #include<bits/stdc++/h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main() {
  
  string a,b,c;
  cin>>a>>b>>c;
  
  if((a.substr(a.end(),1)==b.substr(0,1))&&(b.substr(b.end(),1)==c.substr(0,1)))
  
  cout<<a.substr(0,1)<<b.substr(0,1)<<c.substr(0,1);
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   13 |   if((a.substr(a.end(),1)==b.substr(0,1))&&(b.substr(b.end(),1)==c.substr(0,1)))
      |                ~~~~~^~
      |                     |
      |                     std::__cxx11::basic_string<char>::iterator
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
a.cc:13:59: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   13 |   if((a.substr(a.end(),1)==b.substr(0,1))&&(b.substr(b.end(),1)==c.substr(0,1)))
      |                                                      ~~~~~^~
      |                                                           |
      |                                                           std::__cxx11::basic_string<char>::iterator
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'stirng' was not declared in this scope
    6 |         stirng a, b, c;
      |         ^~~~~~
a.cc:7:14: error: 'a' was not declared in this scope
    7 |         cin>>a>>b>>c;
      |              ^
a.cc:7:17: error: 'b' was not declared in this scope
    7 |         cin>>a>>b>>c;
      |                 ^
a.cc:7:20: error: 'c' was not declared in this scope
    7 |         cin>>a>>b>>c;
      |                    ^
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:7:6: error: 'a' was not declared in this scope
    7 |   if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]){
      |      ^
a.cc:7:21: error: 'b' was not declared in this scope
    7 |   if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]){
      |                     ^
a.cc:7:44: error: 'c' was not declared in this scope
    7 |   if(a[a.size()-1]==b[0] && b[b.size()-1]==c[0]){
      |                                            ^
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.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

  }
  

  
}


Compiler output:
Main.java:8: error: cannot find symbol
    if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){
                                 ^
  symbol:   variable length
  location: variable a of type String
Main.java:8: error: cannot find symbol
    if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){
                                                                           ^
  symbol:   variable length
  location: variable b of type String
Main.java:8: error: cannot find symbol
    if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){
                                                                                                                ^
  symbol:   variable length
  location: variable b of type String
Main.java:8: error: cannot find symbol
    if(a.substring(a.length()-1,a.length).equals(b.substring(b.length()-1,b.length))&&b.substring(b.length()-1,b.length).equals(c.substring(c.length()-1,c.length))){
                                                                                                                                                          ^
  symbol:   variable length
  location: variable c of type String
4 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
typedef long long ll;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: 'd' was not declared in this scope
   12 |   if(a[a.size()-1]==b[0] && b[d.size()-1]==c[0])cout << "YES" << endl;
      |                               ^
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()){
                    cout << "YES";
                }else{
                    cout << "NO";
                }
    return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:75: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
    6 |                 if(A.at(A.size()-1) == B.at(0) && B.at(B.size()-1) == C.at()){
      |                                                                       ~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:7: note:   candidate expects 1 argument, 0 provided