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

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

int i,j,k,m,n;
string a[1010];

int main(){
	scanf("%d",&n);
	cin>>a[1];
	for(i=2;i<=n;i++){
		cin>>a[i];
		char h=a[i][0],t=a[i-1][a[1].size()-1];
		for(j=1;j<i;j++){
			if(!a[j].compare(a[i])){
				printf("No");
				return 0;
			}
		}
		h=a[i][0];
		if(h!=t)
			printf("No");
			return 0;
		}
	}
	printf("Yes");
	return 0;
}

Compiler output:
a.cc:25:15: error: expected constructor, destructor, or type conversion before '(' token
   25 |         printf("Yes");
      |               ^
a.cc:26:9: error: expected unqualified-id before 'return'
   26 |         return 0;
      |         ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void)
{
    int num;
    string x;
    cin >> num;
    string y;
    
    for(int i = 0;i < num;i++)
    {
        cin >> x[i];
        y = x[i];
        if(y.substr(y.length()) ==y.substr(1))
        {
            continue;
        }
        else
        {
            cout << "No" << endl;
            return 0;
        }
        if(y.substr(y.length()) == )
    }
    
    for(int m = 0;m < num;m++)
    {
        for(int n = 0;n < m;n++)
        {
            if(x[m] == x[n])
            {
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: expected primary-expression before ')' token
   24 |         if(y.substr(y.length()) == )
      |                                    ^
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
Language: C++

    #include<stdio.h> 
   #include<string.h>
        int main(void)
        {
    char a[100][10];
    int b;
    scanf("%d",&b);
    char last;
    int out==0;
    for (int i=0;i<b;i++)
    {
    scanf("%s",a[i]);
    if(a[i][0]!=last)out=1;
    for (int j=0;j<i;j++)
    {
    if(strcmp(a[i],a[j])==0) out=1;
    }
    for (int j=0;j<100;j++)
    {
    if(a[i][j]=='\0')
    {
    last=a[i][j-1];
    break;
    }
    }
    }
        if(out==1)printf("Yes");
        else printf("No");
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected initializer before '==' token
    9 |     int out==0;
      |            ^~
a.cc:13:22: error: 'out' was not declared in this scope
   13 |     if(a[i][0]!=last)out=1;
      |                      ^~~
a.cc:16:30: error: 'out' was not declared in this scope
   16 |     if(strcmp(a[i],a[j])==0) out=1;
      |                              ^~~
a.cc:27:12: error: 'out' was not declared in this scope
   27 |         if(out==1)printf("Yes");
      |            ^~~
Language: C++

#include<stdio.h>
    int main(void)
    {
char a[100][10];
int b;
scanf("%d",&b);
char last;
int out==0;
for (int i=0;i<b;i++)
{
scanf("%s",a[i]);
if(a[i][0]!=last)out=1;
for (int j=0;j<i;j++)
{
if(strcmp(a[i],a[j])==0) out=1;
}
for (int j=0;j<100;j++)
{
if(a[i][j]=='\0')
{
last=a[i][j-1];
break;
}
}
}
    if(out==1)printf("Yes");
    else printf("No");
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected initializer before '==' token
    8 | int out==0;
      |        ^~
a.cc:12:18: error: 'out' was not declared in this scope
   12 | if(a[i][0]!=last)out=1;
      |                  ^~~
a.cc:15:4: error: 'strcmp' was not declared in this scope
   15 | if(strcmp(a[i],a[j])==0) out=1;
      |    ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 |     int main(void)
a.cc:15:26: error: 'out' was not declared in this scope
   15 | if(strcmp(a[i],a[j])==0) out=1;
      |                          ^~~
a.cc:26:8: error: 'out' was not declared in this scope
   26 |     if(out==1)printf("Yes");
      |        ^~~
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <conio.h>
char search(const char strings[100][10],int j,int k) {
	for (int t = 0; t < k; t++) {
		if (strings[j] == strings[t] && j != t)
			return -1;
	}
	return 0;
}
int main() {
	int n,flag = 0;
	int s_length[100];
	char string[100][10];
	
	scanf("%d",&n);
	for(int i = 0; i < n; i++){
		scanf("%s",string[i]);
		s_length[i] = strlen(string[i]);
		if (i >= 2) {
			if (string[i][s_length[i]] == string[i - 1][s_length[i - 1]]) {
				if (search(string, i, n) == -1)
					flag = 1;
			}
		}
	}

	if (flag == 0)
		printf("Yes\n");
	else
		printf("No\n");
}

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

#include <iostream>
using namespace std;

int main(){

int a;
string str[100];

cin >> a;

for(int i=0;i<a;i++) cin >> str[i] ;

for(int i=0;i<a;i++){
    for(int j=i+1;j<a;j++){
        if(str[i] == str[j]) cout << "No";
    }
}

 for(int i=0;i<a-1;i++){
         if(str[i].back() =! str[i+1].front()) cout << "No";
    }
 }

cout << "Yes";
return 0;
}

Compiler output:
a.cc:24:1: error: 'cout' does not name a type
   24 | cout << "Yes";
      | ^~~~
a.cc:25:1: error: expected unqualified-id before 'return'
   25 | return 0;
      | ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

int main() {
	int n;
	int flg = 1;
	char w[100][100];

	cin >> n;
	cin >> w[0];
	for (int i = 1; i < n; i++) {
		cin >> w[i];
		if (w[i - 1][strlen(w[i - 1]) - 1] != w[i][0]) flg = 0;
	}

	for (int i = 0; i < n; i++) {
		for (int j = n - 1; j > i; j--) {
			if (strcmp(w[i], w[j]) == 0) flg = 0;
		}
	}

	if (flg == 1) cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: 'strlen' was not declared in this scope
   15 |                 if (w[i - 1][strlen(w[i - 1]) - 1] != w[i][0]) flg = 0;
      |                              ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc:20:29: error: 'strcmp' was not declared in this scope
   20 |                         if (strcmp(w[i], w[j]) == 0) flg = 0;
      |                             ^~~~~~
a.cc:20:29: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main() {
	int n;
	int flg = 1;
	char w[100][100];

	cin >> n;
	cin >> w[0];
	for (int i = 1; i < n; i++) {
		cin >> w[i];
		if (w[i - 1][strlen(w[i - 1]) - 1] != w[i][0]) flg = 0;
	}

	for (int i = 0; i < n; i++) {
		for (int j = n - 1; j > i; j--) {
			if (strcmp(w[i], w[j]) == 0) flg = 0;
		}
	}

	if (flg == 1) cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: 'strlen' was not declared in this scope
   14 |                 if (w[i - 1][strlen(w[i - 1]) - 1] != w[i][0]) flg = 0;
      |                              ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:19:29: error: 'strcmp' was not declared in this scope
   19 |                         if (strcmp(w[i], w[j]) == 0) flg = 0;
      |                             ^~~~~~
a.cc:19:29: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C

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

int main()
{
int N = 0,long = 0,ans = 0;
char s1[100],s2[200];
scanf("%d",&N);

scanf("%s",s1);

for(int i = 1;i <= N-1;i++)
{
scanf("%s",s2);
if(strrchr(s1,1) != strchr(s2,1))
{
ans = 1;
}
s1 = s2;
}

if(ans = 0)
{
printf("Yes\n");
}else{
printf("No\n");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:11: error: expected identifier or '(' before 'long'
    6 | int N = 0,long = 0,ans = 0;
      |           ^~~~
main.c:17:1: error: 'ans' undeclared (first use in this function)
   17 | ans = 1;
      | ^~~
main.c:17:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:4: error: assignment to expression with array type
   19 | s1 = s2;
      |    ^
Language: C

#include <stdio.h>
int main(){
int N;
int a=0;

char W[128][16];
scanf("%d",&N);
for(int i = 0; i<N; i++){
scanf("%s",W[i]);
}

for(int i = 0; i<N; i++){
int x=0;
for(int j = 0; j<N; j++)
int y=0;
for(int n = 0; n<16; n++){
if (W[i][n]==W[j][n]){y++;}
}
if(y==16){x++;}
}
}

if(x<>N){a=1;}
int x=0;
for(int i = 0; i<N; i++){
for(int j = 0; j<16; j++){
if(W[i][j]==""){break;}
}
if(W[i][k]==W[i+1][0]){}else{
x++;
if(x==1){a=1;}
}
}

if(a==0){printf("Yes");}
if(a==1){printf("No");}
}

Compiler output:
main.c: In function 'main':
main.c:15:1: error: expected expression before 'int'
   15 | int y=0;
      | ^~~
main.c:17:16: error: 'j' undeclared (first use in this function)
   17 | if (W[i][n]==W[j][n]){y++;}
      |                ^
main.c:17:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:23: error: 'y' undeclared (first use in this function)
   17 | if (W[i][n]==W[j][n]){y++;}
      |                       ^
main.c: At top level:
main.c:23:1: error: expected identifier or '(' before 'if'
   23 | if(x<>N){a=1;}
      | ^~
main.c:25:1: error: expected identifier or '(' before 'for'
   25 | for(int i = 0; i<N; i++){
      | ^~~
main.c:25:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   25 | for(int i = 0; i<N; i++){
      |                 ^
main.c:25:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   25 | for(int i = 0; i<N; i++){
      |                      ^~
main.c:35:1: error: expected identifier or '(' before 'if'
   35 | if(a==0){printf("Yes");}
      | ^~
main.c:36:1: error: expected identifier or '(' before 'if'
   36 | if(a==1){printf("No");}
      | ^~
main.c:37:1: error: expected identifier or '(' before '}' token
   37 | }
      | ^
Language: C++

#include<cstdio>
#include<string>

int main(void){
  int N, i, j;
  std::string W[100];
  for(scanf("%d", &N)i=0; i<N; ++i){
  	scanf("%s", W[i].c_str());
    for(j=0; j<i; ++j){
    	if(W[j]==W[i]){puts("No");return(0);}
    }
  }
  puts("Yes");
  return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before 'i'
    7 |   for(scanf("%d", &N)i=0; i<N; ++i){
      |                      ^
      |                      ;
Language: C++

#include<iostream>
#inlude<unordered_map>
#include<vector>
#include<string>

using namespace std;

int main(){
  int n;
  cin>>n;
  unordered_map <string,int> m;
  vector<string> v;
  int i=0;
  bool f=true;
  while(n--){
    string s;
    cin>>s;
    if(m.count(s)==1){
      cout<<"No"<<endl;
      f=false;
      break;
    }
    m[s]=1;
    v[i]=s;
    if(i==0){
      continue;
      i++;
    }
    int x=v[i-1].size();
    int y=s.size();
    if(v[i-1][x-1]!=s[y-1]){
      cout<<"No"<<endl;
      f=false;
      break;
    }
    i++;
  }
  if(f){
    cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlude; did you mean #include?
    2 | #inlude<unordered_map>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:11:3: error: 'unordered_map' was not declared in this scope
   11 |   unordered_map <string,int> m;
      |   ^~~~~~~~~~~~~
a.cc:4:1: note: 'std::unordered_map' is defined in header '<unordered_map>'; this is probably fixable by adding '#include <unordered_map>'
    3 | #include<vector>
  +++ |+#include <unordered_map>
    4 | #include<string>
a.cc:11:24: error: expected primary-expression before ',' token
   11 |   unordered_map <string,int> m;
      |                        ^
a.cc:11:25: error: expected primary-expression before 'int'
   11 |   unordered_map <string,int> m;
      |                         ^~~
a.cc:18:8: error: 'm' was not declared in this scope
   18 |     if(m.count(s)==1){
      |        ^
a.cc:23:5: error: 'm' was not declared in this scope
   23 |     m[s]=1;
      |     ^
Language: C++

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

int main() 
{
  int i,j,N,char W[i][]={""};
  cin>>N>>W[0][];
  
  for(i=1;i<N;i++)
  {
    cin>>Wi[W[i][].size];
    if(W[i-1][W[i-1][].size()]/=w[i][1])
    {
      return 0;
    }
    
  }
  

}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected unqualified-id before 'char'
    6 |   int i,j,N,char W[i][]={""};
      |             ^~~~
a.cc:7:11: error: 'W' was not declared in this scope
    7 |   cin>>N>>W[0][];
      |           ^
a.cc:7:16: error: expected primary-expression before ']' token
    7 |   cin>>N>>W[0][];
      |                ^
a.cc:11:10: error: 'Wi' was not declared in this scope; did you mean 'i'?
   11 |     cin>>Wi[W[i][].size];
      |          ^~
      |          i
a.cc:11:18: error: expected primary-expression before ']' token
   11 |     cin>>Wi[W[i][].size];
      |                  ^
a.cc:12:22: error: expected primary-expression before ']' token
   12 |     if(W[i-1][W[i-1][].size()]/=w[i][1])
      |                      ^
a.cc:12:33: error: 'w' was not declared in this scope
   12 |     if(W[i-1][W[i-1][].size()]/=w[i][1])
      |                                 ^
Language: C++

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

using namespace std;

int main(){
    int N;
    cin >> N;
    vector<string> words;
    char front,back;
    bool f = true;
    for(int i=0;i<N;i++){
        string word;
        cin >> word;
        if(i==0){
            back = word[word.size()-1];
        } else{
            vector<string>::iterator itr = find(words.begin(),words.end(),word);
            if(back==word[0] && itr == words.end()){
                front = word[0];
                back = word[word.size()-1];
            } else{
                f = false;
                break;
            }
        }
        words.push_back(word);
    }

    if(f) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##include <bits/stdc++.h>
      | ^~
a.cc:1:3: error: 'include' does not name a type
    1 | ##include <bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N;
      |     ^~~
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<string> words;
      |     ^~~~~~
a.cc:8:12: error: 'string' was not declared in this scope
    8 |     vector<string> words;
      |            ^~~~~~
a.cc:8:20: error: 'words' was not declared in this scope
    8 |     vector<string> words;
      |                    ^~~~~
a.cc:12:15: error: expected ';' before 'word'
   12 |         string word;
      |               ^~~~~
      |               ;
a.cc:13:16: error: 'word' was not declared in this scope
   13 |         cin >> word;
      |                ^~~~
a.cc:17:29: error: '::iterator' has not been declared
   17 |             vector<string>::iterator itr = find(words.begin(),words.end(),word);
      |                             ^~~~~~~~
a.cc:18:33: error: 'itr' was not declared in this scope
   18 |             if(back==word[0] && itr == words.end()){
      |                                 ^~~
a.cc:29:11: error: 'cout' was not declared in this scope
   29 |     if(f) cout << "Yes" << endl;
      |           ^~~~
a.cc:29:28: error: 'endl' was not declared in this scope
   29 |     if(f) cout << "Yes" << endl;
      |                            ^~~~
a.cc:30:10: error: 'cout' was not declared in this scope
   30 |     else cout << "No" << endl;
      |          ^~~~
a.cc:30:26: error: 'endl' was not declared in this scope
   30 |     else cout << "No" << endl;
      |                          ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int n,i,j,k;
  bool flg;
  string w[100];
  cin>>n;
  k=0;
  for(i=1;i<n;i++)
  {
    j=1;
    cin>>w[i];
    if(i>1)
    {
      if(w[i-1].back==w[i].front)	flg=true;
      for(j=1;j<i;;j++)
      {
        if(w[i]==w[j]) flg=true;
      }
    }
  }
  if(flg==true) cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator=='
   17 |       if(w[i-1].back==w[i].front)       flg=true;
      |          ~~~~~~~~~~~^~~~~~~~~~~~
      |                 |          |
      |                 |          <unresolved overloaded function type>
      |                 <unresolved overloaded function type>
a.cc:18:19: error: expected primary-expression before ';' token
   18 |       for(j=1;j<i;;j++)
      |                   ^
a.cc:18:19: error: expected ')' before ';' token
   18 |       for(j=1;j<i;;j++)
      |          ~        ^
      |                   )
a.cc:18:23: error: expected ';' before ')' token
   18 |       for(j=1;j<i;;j++)
      |                       ^
      |                       ;
Language: C

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

char search(const char strings[100][10],int j,int k) {
	for (int t = 0; t < k; t++) {
		if (strings[j] == strings[t])
			return false;
	}
	return true;
}
int main() {
	int n,flag = 0;
	int s_length[100];
	char string[100][10];
	
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		scanf("%s", string[i]);
		s_length[i] = strlen(string[i]);
		if (i >= 2) {
			if (string[i][s_length[i]] == string[i - 1][s_length[i - 1]]) {
				if (search(string, i, n) == -1)
					flag = 1;
			}
		}
	}
	if (flag == 0)
		printf("Yes\n");
	else
		printf("No\n");

}

Compiler output:
main.c: In function 'search':
main.c:8:32: error: 'false' undeclared (first use in this function)
    8 |                         return false;
      |                                ^~~~~
main.c:4:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <string.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c:8:32: note: each undeclared identifier is reported only once for each function it appears in
    8 |                         return false;
      |                                ^~~~~
main.c:10:16: error: 'true' undeclared (first use in this function)
   10 |         return true;
      |                ^~~~
main.c:10:16: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
    int N;
    cin >> N;
    vector<string> words;
    char front,back;
    bool f = true;
    for(int i=0;i<N;i++){
        string word;
        cin >> word;
        if(i==0){
            back = word[word.size()-1];
        } else{
            vector<string>::iterator itr = find(words.begin(),words.end(),word);
            if(back==word[0] && itr == words.end()){
                front = word[0];
                back = word[word.size()-1];
            } else{
                f = false;
                break;
            }
        }
        words.push_back(word);
    }

    if(f) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:48: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   18 |             vector<string>::iterator itr = find(words.begin(),words.end(),word);
      |                                            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:18:48: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   18 |             vector<string>::iterator itr = find(words.begin(),words.end(),word);
      |                                            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a[110];
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	  cin>>a[i];
	for(int i=1;i<=n;i++)
	{
		if(strcmp(a[i],a[i+1])!=0)
		{
			cout<<"Yes";
			return 0;
		}
	}
	cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   12 |                 if(strcmp(a[i],a[i+1])!=0)
      |                           ~~~^
      |                              |
      |                              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:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
Language: Java

import java.util.*;
public class Atcoder {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		ArrayList<String> words = new ArrayList<String>();
		for(int i=0;i<N;i++){
			String w = sc.next();
			if(i !=0 ){
				String lastword = words.get(i-1);
				int wordcnt = lastword.length(); 
				Character initial = w.charAt(0);
				if(words.indexOf(w) != -1 || !(initial.equals(lastword.charAt(wordcnt-1)))){
				System.out.println("No");
				return;
				}
			}
			words.add(w);
		}
		System.out.println("Yes");
	}
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
	char a[110][11];
	int time;
	bool flag=false;
	//int index=0;
	scanf("%d",&time);
	gets(a[0]);
	for(int i=1;i<=time;i++){
		scanf("%s",a[i]);
		if(a[i][0]==a[i-1][strlen(a[i-1])]){
			flag=true;
	//		index=1;
		}
		for(int j=0;j<i;j++){
			if(strcmp(a[i],a[j])==0){
				flag=true;
	//			index=2;
			}
		}
	}
	//if(index==1){
	//	printf("first");
	//}else{
	//	printf("same");
	//}
	if(flag==true){
		printf("No");
	}else{
		printf("Yes");
	}
	return 0;
}

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

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

int main(void)
{
	int x,y,z,a,b,c,len,not = 0;
	char list[101][10];
	for(x=0;x<z;x++)
	scanf("%d",&z);
	for(x=0;x<z;x++) 
	{
		scanf("%s",list[x]);
		if (x)
		{
			for(y=0;y<x;y++)
			{
				if(strcmp(list[x],list[y])==0) not = 1;
			}
			len = strlen(list[x-1]);
			if (list[x-1][len-1] != list[x][0]) 
			{
				not  = 1;
			}
		}
	}
	if (not) printf("No");
	else printf("Yes");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: expected unqualified-id before 'not' token
    6 |         int x,y,z,a,b,c,len,not = 0;
      |                             ^~~
a.cc:17:36: error: 'strcmp' was not declared in this scope
   17 |                                 if(strcmp(list[x],list[y])==0) not = 1;
      |                                    ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | //#include <string.h>
a.cc:17:68: error: expected primary-expression before '=' token
   17 |                                 if(strcmp(list[x],list[y])==0) not = 1;
      |                                                                    ^
a.cc:19:31: error: 'strlen' was not declared in this scope
   19 |                         len = strlen(list[x-1]);
      |                               ^~~~~~
a.cc:19:31: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:22:38: error: expected primary-expression before '=' token
   22 |                                 not  = 1;
      |                                      ^
a.cc:26:16: error: expected primary-expression before ')' token
   26 |         if (not) printf("No");
      |                ^
Language: C++

#include <iostream>
using namespace std;
string S[1000];
int N;
int main(){
  cin >> N;
  bool judge = true;
  for(int i=0;i<N;i++){
	cin >> S[i];
    if(i>=1){
		if(S[i][0]!=S[i-1][S[i-1].size()-1]) judge = false;
    }
  }
  for(int i=0;i<N-1;i++){
	for(int j=i+1;j<N;j++){
      if(S[i]==S[j]) judge = false;
  }
  cout << (judge? "Yes":"No") << endl;
}
  


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

#include <iostream>
#include <vector>
using namespace std;
#define ll long long

int main(){
  
  int n;
  cin >> n;
  
  vector<string> vec;
  for (int i=0;i<n;i++){
    cin >> vec[i];
  }
  
  for (int i=1;i<n;i++){
    string str1 = vec[i-1];
    string str2 = vec[i];
    if (str1[str1.size()-1]!=str2[0]){
      cout << "No";
      return 0;
    }
    
    for (int j=0;j<i;j++){
      if (vec[i]==vec[j]){
        cout << "No";
      return 0;
      }
    }
    
  }
  
  cout << "Yes";
  
  return 0;


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

#include <iostream>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main(){
	char a[110][11];
	int time;
	bool flag=false;
	//int index=0;
	scanf("%d",&time);
	gets(a[0]);
	for(int i=1;i<=time;i++){
		scanf("%s",a[i]);
		if(a[i][0]==a[i-1][strlen(a[i-1])]){
			flag=true;
	//		index=1;
		}
		for(int j=0;j<i;j++){
			if(strcmp(a[i],a[j])==0){
				flag=true;
	//			index=2;
			}
		}
	}
	//if(index==1){
	//	printf("first");
	//}else{
	//	printf("same");
	//}
	if(flag==true){
		printf("No");
	}else{
		printf("Yes");
	}
	return 0;
}

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

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	int n;
	string w[100];
	cin>>n>>w[100];
	for(int i=0;i<n;i++){
		for(int j=0;j<i;j++){
			if(w[j]!=w[i]){}
			else {
				cout<<"No"<<endl;
				return 0;
			}
		}
		if(i>0){
			if(w[i][0]==w[i-1].size()){}
		    else {
				cout<<"No"<<endl;
				return 0;
			}
		}
	}
    cout<<"Yes"<<endl;
	}

	return 0;
}


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

#include <iostream>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <cstdio>
using namespace std;
int main(){
	char a[110][11];
	int time;
	bool flag=false;
	//int index=0;
	scanf("%d",&time);
	gets(a[0]);
	for(int i=1;i<=time;i++){
		scanf("%s",a[i]);
		if(a[i][0]==a[i-1][strlen(a[i-1])]){
			flag=true;
	//		index=1;
		}
		for(int j=0;j<i;j++){
			if(strcmp(a[i],a[j])==0){
				flag=true;
	//			index=2;
			}
		}
	}
	//if(index==1){
	//	printf("first");
	//}else{
	//	printf("same");
	//}
	if(flag==true){
		printf("No");
	}else{
		printf("Yes");
	}
	return 0;
}

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


int main()
{
    int N;
    cin >> N;
    string w[N];
    
    cin >> w[0];
    int y = 0;
    for(int i = 0; i<N-1;i++){
        cin >> w[i+1];
        
        if(w[i].back()!=w[i+1].front()){
            
            y = 1;
            break;
        }
      for(int j = 0;j<=i;j++){
          if(w[j]==w[i+1]){
              
              y = 1;
              break;
          }
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> N;
      |     ^~~
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string w[N];
      |     ^~~~~~
a.cc:8:12: error: 'w' was not declared in this scope
    8 |     cin >> w[0];
      |            ^
a.cc:24:8: error: expected '}' at end of input
   24 |       }
      |        ^
a.cc:10:30: note: to match this '{'
   10 |     for(int i = 0; i<N-1;i++){
      |                              ^
a.cc:24:8: error: expected '}' at end of input
   24 |       }
      |        ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
string S[102];
char ch;
set <string> ss;
int main()
{
cin >> n;
for(ll i= 0 ; i < n; i++)cin >> S[i];
for(ll i = 0; i < n; i++)ss.insert(S[i]);
if(ss.length() != n)
{
cout << "No";
return 0;
}
for(ll i =0 ; i < n; i++)
{
if(i==0)
{
ch = S[i][S.length()-1];
continue;
}
if(ch != S[i][0])
{
cout << "No";
return 0;
}
}
cout << "Yes";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'length'
   13 | if(ss.length() != n)
      |       ^~~~~~
a.cc:22:13: error: request for member 'length' in 'S', which is of non-class type 'std::string [102]' {aka 'std::__cxx11::basic_string<char> [102]'}
   22 | ch = S[i][S.length()-1];
      |             ^~~~~~
Language: C++

#[allow(unused_imports)]
use std::cmp;
use std::collections::BTreeSet;

// Input macro from https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
  (source = $s:expr, $($r:tt)*) => {
    let mut iter = $s.split_whitespace();
    input_inner!{iter, $($r)*}
  };
  ($($r:tt)*) => {
    #[allow(unused_mut)]
    let mut s = {
      use std::io::Read;
      let mut s = String::new();
      std::io::stdin().read_to_string(&mut s).unwrap();
      s
    };
    let mut iter = s.split_whitespace();
    input_inner!{iter, $($r)*}
  };
}

macro_rules! input_inner {
  ($iter:expr) => {};
  ($iter:expr, ) => {};

  ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
    let $var = read_value!($iter, $t);
    input_inner!{$iter $($r)*}
  };
}

macro_rules! read_value {
  ($iter:expr, ( $($t:tt),* )) => {
    ( $(read_value!($iter, $t)),* )
  };

  ($iter:expr, [ $t:tt ; $len:expr ]) => {
    (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
  };

  ($iter:expr, chars) => {
    read_value!($iter, String).chars().collect::<Vec<char>>()
  };

  ($iter:expr, usize1) => {
    read_value!($iter, usize) - 1
  };

  ($iter:expr, $t:ty) => {
    $iter.next().unwrap().parse::<$t>().expect("Parse error")
  };
}

fn main() {
  input!{
    n: usize,
    ws: [chars; n]
  }
  let mut set = BTreeSet::new();
  for w in &ws {
    set.insert(w.clone());
  }
  if set.len() != n {
    println!("No");
    return;
  }
  for i in 0..n-1 {
    if ws[i].last() != ws[i+1].first() {
      println!("No");
      return;
    }
  }
  println!("Yes");
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_imports)]
      |  ^
a.cc:12:6: error: invalid preprocessing directive #[
   12 |     #[allow(unused_mut)]
      |      ^
a.cc:40:6: error: too many decimal points in number
   40 |     (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
      |      ^~~~~~~
a.cc:69:12: error: too many decimal points in number
   69 |   for i in 0..n-1 {
      |            ^~~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::cmp;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::collections::BTreeSet;
      | ^~~
a.cc:6:1: error: 'macro_rules' does not name a type
    6 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:24:1: error: 'macro_rules' does not name a type
   24 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:34:1: error: 'macro_rules' does not name a type
   34 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:56:1: error: 'fn' does not name a type
   56 | fn main() {
      | ^~
Language: C++

#include<cstdio>
using namespace std;
int main(void)
{
int N=0,a=0;
scanf("%d",&N);
char W[N+1]={0};
for(i=1;i<=N;i++)
{if(a==1){break;}else{
	scanf("%s",&W[i]);for(int j=i-1;j>0;j--)
    {if(W[i]==W[j]){printf("No\n");a=1;}
    }}
 if(a!=1){printf("Yes\n");}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'i' was not declared in this scope
    8 | for(i=1;i<=N;i++)
      |     ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <math.h>
#include <string.h>
using namespace std;
int main(){
	char a[110][11];
	int time;
	bool flag=false;
	//int index=0;
	scanf("%d",&time);
	gets(a[0]);
	for(int i=1;i<=time;i++){
		gets(a[i]);
		if(a[i][0]==a[i-1][strlen(a[i-1])]){
			flag=true;
	//		index=1;
		}
		for(int j=0;j<i;j++){
			if(strcmp(a[i],a[j])==0){
				flag=true;
	//			index=2;
			}
		}
	}
	//if(index==1){
	//	printf("first");
	//}else{
	//	printf("same");
	//}
	if(flag==true){
		printf("No");
	}else{
		printf("Yes");
	}
	return 0;
}

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

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

int main(void)
{
	int x,y,z,a,b,c,len,not = 0;
	char list[101][10];
	for(x=0;x<z;x++)
	scanf("%d",&z);
	for(x=0;x<z;x++) 
	{
		scanf("%s",list[x]);
		if (x)
		{
			for(y=0;y<x;y++)
			{
				if(strcmp(list[x],list[y])==0) not = 1;
			}
			len = strlen(list[x-1]);
//			printf("%d",len);
//			printf("%c %c\n",list[x-1][len-1],list[x][0]);
			if (list[x-1][len-1] != list[x][0]) 
			{
				not  = 1;
			}
		}
	}
	if (not) printf("No");
	else printf("Yes");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: expected unqualified-id before 'not' token
    6 |         int x,y,z,a,b,c,len,not = 0;
      |                             ^~~
a.cc:17:68: error: expected primary-expression before '=' token
   17 |                                 if(strcmp(list[x],list[y])==0) not = 1;
      |                                                                    ^
a.cc:24:38: error: expected primary-expression before '=' token
   24 |                                 not  = 1;
      |                                      ^
a.cc:28:16: error: expected primary-expression before ')' token
   28 |         if (not) printf("No");
      |                ^
Language: C

# include <bits/stdc++.h>
const int N =200+50; 
int main ()
{
	char s[N][N],p[N];
	int flag=0,n;
    scanf ("%d",&n);
	gets(p);
	for (int i=1;i<=n;++i)
	   if (gets(s[i])==0)
	     break;
    for (int i=1;i<=n;++i)
       {
       	 for (int j=i+1;j<=n;++j)
       	    if (strcmp(s[i],s[j])==0)
				 flag=1;	
		if (flag==1)
		    break; 
	   }
	if (flag==1)
	   printf ("No\n");
	else
	  printf ("Yes\n");
	return 0;
} 

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

# include <bits/stdc++.h>
using namespace std;
const int N =200+50; 
int main ()
{
	char s[N][N],p[N];
	int flag=0,n;
	cin>>n; 
	gets(p);
	for (int i=1;i<=n;++i)
	   if (gets(s[i])==0)
	     break;
    for (int i=1;i<=n;++i)
       {
       	 for (int j=i+1;j<=n;++j)
       	    if (strcmp(s[i],s[j])==0)
				 flag=1;	
		if (flag==1)
		    break; 
	   }
	if (flag==1)
	   printf ("No\n");
	else
	  printf ("Yes\n");
	return 0;
} 

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

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

using namespace std;

int main(){
	int n,f=1,s;
	cin >> n;
	vector<string> w;
	string t;
	for(int i=0;i<n;i++){
		cin >> t;
		w.push_back(t);
	}
	for(int i=1;i<n;i++){
		if(w[i][0] != w[i-1][w[i-1].size()-1]){
			f = 0;
		}
	}

	if(f == 0){
		cout << "No" << endl;
		return 0;
	}

	s = w.size();

	sort(w.begin(),w.end());
	w.erase(unique(w.begin(),w.end()),w.end());
	if(s != w.size()){
		cout << "No" << endl;
	}else{
		cout << "Yes" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |         sort(w.begin(),w.end());
      |         ^~~~
      |         short
a.cc:30:17: error: 'unique' was not declared in this scope
   30 |         w.erase(unique(w.begin(),w.end()),w.end());
      |                 ^~~~~~
Language: C++

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

int main()
{
	int a;
	bool b = false;
	vector<string>str;
	cin >> a;
	for (int i = 0; i < a; i++)
	{
		string s;
		cin >> s;
		if (find(str.begin(), str.end(), s) != str.end())
		{
			b = true;
		}
		str.push_back(s);
	}
	if (b)
	{
		cout << "No" << endl;
		return 0;
	}
	for (int i = 0; i < a; i++)
	{
		if (i > 0)
		{
			if (str[i - 1][str[i - 1].size() - 1] != str[i][0])
			{
				cout << "No" << endl;
				return 0;
			}
		}
	}
	cout << "Yes" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   16 |                 if (find(str.begin(), str.end(), s) != str.end())
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:16:25: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   16 |                 if (find(str.begin(), str.end(), s) != str.end())
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

<?php
//Request Question
function getq($get_word=null){
	if($get_word===null){
		return str_replace("\n","",fgets(STDIN));
	}else if($get_word===1){
		return explode(" ",str_replace("\n","",fgets(STDIN)));
	}
}
$s = getq();
$moji=array();
for($i=0;$i<$s;$i++){
	array_push($moji,getq());
}
for($i=0;$i<$s;$i++){
	for($j=0;$j<$s;$j++){
		if($i!=$j){
		if($moji[$i]==$moji[$j]){
			echo "No\n";
			exit(0);
		}
		}
	}
}
for($i=1;$i<$s;$i++){
	//echo($moji[$i][0] ."-". $moji[$i-1][strlen($moji[$i-1])-1]);
	if($moji[$i][0] != $moji[$i-1][strlen($moji[$i-1])-1]){
		echo "No\n";
		exit(0);
	}
}
echo "Yes\n";
?>

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:10:1: error: '$s' does not name a type
   10 | $s = getq();
      | ^~
a.cc:11:1: error: '$moji' does not name a type
   11 | $moji=array();
      | ^~~~~
a.cc:12:1: error: expected unqualified-id before 'for'
   12 | for($i=0;$i<$s;$i++){
      | ^~~
a.cc:12:10: error: '$i' does not name a type
   12 | for($i=0;$i<$s;$i++){
      |          ^~
a.cc:12:16: error: '$i' does not name a type
   12 | for($i=0;$i<$s;$i++){
      |                ^~
a.cc:15:1: error: expected unqualified-id before 'for'
   15 | for($i=0;$i<$s;$i++){
      | ^~~
a.cc:15:10: error: '$i' does not name a type
   15 | for($i=0;$i<$s;$i++){
      |          ^~
a.cc:15:16: error: '$i' does not name a type
   15 | for($i=0;$i<$s;$i++){
      |                ^~
a.cc:25:1: error: expected unqualified-id before 'for'
   25 | for($i=1;$i<$s;$i++){
      | ^~~
a.cc:25:10: error: '$i' does not name a type
   25 | for($i=1;$i<$s;$i++){
      |          ^~
a.cc:25:16: error: '$i' does not name a type
   25 | for($i=1;$i<$s;$i++){
      |                ^~
a.cc:32:1: error: 'echo' does not name a type
   32 | echo "Yes\n";
      | ^~~~
a.cc:33:1: error: expected unqualified-id before '?' token
   33 | ?>
      | ^
Language: C++

#include<cstdio>
int main(void){char N,W[100][11],i,j,k;for(scanf("%d",&N),i=0;i<N;++i){scanf("%s",W[i]);for(j=0;j<i;++j){for(k=0;(W[i][k]==W[j][k])&&(W[i][k]!=0);++k);if(W[i][k]==W[j][k]&&W[i][k]==0){puts("No");return(0);})}}puts("Yes");return(0);}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:207: error: expected primary-expression before ')' token
    2 | int main(void){char N,W[100][11],i,j,k;for(scanf("%d",&N),i=0;i<N;++i){scanf("%s",W[i]);for(j=0;j<i;++j){for(k=0;(W[i][k]==W[j][k])&&(W[i][k]!=0);++k);if(W[i][k]==W[j][k]&&W[i][k]==0){puts("No");return(0);})}}puts("Yes");return(0);}
      |                                                                                                                                                                                                               ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;
  string w[100];
  bool a= true ;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>w[i];
  }
  for(int i=0;i<n;i++){
    if(i){
      if(w[i].front!=w[i-1].back)a=false;
    }
    for(int j=0;j<i;j++){
        if(w[i]==w[j])a=false;
    }
  }
  if(a)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator!='
   13 |       if(w[i].front!=w[i-1].back)a=false;
      |          ~~~~~~~~~~^~~~~~~~~~~~~
      |               |             |
      |               |             <unresolved overloaded function type>
      |               <unresolved overloaded function type>
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	int n;
	string w[100];
	cin>>n>>w[100];
	int c=1;
	for(int i=0;i<n;i++){
		for(int j=0;j<i;j++){
			if(w[j]!=w[i]){}
			else {
				cout<<"No"<<endl;
				return 0;
			}
		}
		if(i>0){
			if(w[i][0]==w[i-1].size())c++;
		    else {
				cout<<"No"<<endl;
				return0;
			}
		}
	}
	if(w[n]==w[c]){
		cout<<"Yes"<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: 'return0' was not declared in this scope
   21 |                                 return0;
      |                                 ^~~~~~~
Language: Java

import java.util.*;
import java.math.*;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int N = sc.nextInt();
        String[] W = new String[N];
        for (int i = 0; i < N; i++) W[i] = sc.nextLine();

        List<String> history = new ArrayList<>();
        for (int i = 0; i < W.length; i++) {
            String word = W[i];

            if (history.contains(word) || (i != 0 && !history.get(i - 1).endsWith(word.get(0)))) {
                System.out.println("No");
                return;
            }

            history.add(word);
        }
        
        System.out.println("Yes");
    }

}

Compiler output:
Main.java:17: error: cannot find symbol
            if (history.contains(word) || (i != 0 && !history.get(i - 1).endsWith(word.get(0)))) {
                                                                                      ^
  symbol:   method get(int)
  location: variable word of type String
1 error
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define l_ength size

int main(void){
int n,i,c,j,l;
bool flag=true;
string w[111];
cin >> n;
for(i=0; i<n; ++i){
cin >> w[i];
}
for(i=0;i<n;++i){
c=0;
for(j=0;j<n;++j){
if(w[i]==w[j]){
++c;
}
}
if(c>1){
flag = false;
}
}
for(i=1;i<n;++i){
l=w[i-1].l_ength();
if(w[i-1][l-1] != w[i][0]){
flag = False;
}
}
cout << ((flag)?"Yes":"No") << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:8: error: 'False' was not declared in this scope
   27 | flag = False;
      |        ^~~~~
Language: C++

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

int main()
{
	int N;
	std::cin >> N;

	std::vector<std::string> words;
	words.resize(N);

	for (int i = 0; i < N; ++i)
	{
		std::cin >> words[i];
	}

	for (auto& word : words)
	{
		auto count = std::count(words.cbegin(), words.cend(), word);
		if (count > 1)
		{
			std::cout << "No" << std::endl;
			return 0;
		}
	}

	for (int i = 0; i < N - 1; ++i)
	{
		bool ok = words[i][words[i].size() - 1] == words[i + 1][0];
		if (!ok)
		{
			std::cout << "No" << std::endl;
			return 0;
		}
	}

	std::cout << "Yes" << std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:35: error: 'count' is not a member of 'std'; did you mean 'cout'?
   20 |                 auto count = std::count(words.cbegin(), words.cend(), word);
      |                                   ^~~~~
      |                                   cout
Language: C++

#include<cstdio>
int main(void){char N,W[100][11],i,j,k;for(scanf("%d",&N),i=0;i<N;++i){scanf("%s",w[i]);for(j=0;j<i;++j){for(k=0;(w[i][k]==w[j][k])&&(w[i][k]!=0);++k);if(w[i][k]==w[j][k]&&w[i][k]==0){puts("No");return(0);})}}puts("Yes");return(0);}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:83: error: 'w' was not declared in this scope
    2 | int main(void){char N,W[100][11],i,j,k;for(scanf("%d",&N),i=0;i<N;++i){scanf("%s",w[i]);for(j=0;j<i;++j){for(k=0;(w[i][k]==w[j][k])&&(w[i][k]!=0);++k);if(w[i][k]==w[j][k]&&w[i][k]==0){puts("No");return(0);})}}puts("Yes");return(0);}
      |                                                                                   ^
a.cc:2:207: error: expected primary-expression before ')' token
    2 | int main(void){char N,W[100][11],i,j,k;for(scanf("%d",&N),i=0;i<N;++i){scanf("%s",w[i]);for(j=0;j<i;++j){for(k=0;(w[i][k]==w[j][k])&&(w[i][k]!=0);++k);if(w[i][k]==w[j][k]&&w[i][k]==0){puts("No");return(0);})}}puts("Yes");return(0);}
      |                                                                                                                                                                                                               ^