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

#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
#define endl "\n"
#define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main()
{
    IOS
    int n,k=0,f=1;
    cin>>n;
    set<string> s;
    string prev,curr;
    cin>>prev;
    s.insert(prev);
    whie(++k < n)
    {
        cin>>curr;
        if(prev.back() == curr[0])
        {
            s.insert(curr);
            prev = curr;
        }
        else
        {
            f = 0;
            break;
        }
    }
    if(s.size() == n && f)
    {
        cout<<"Yes";
    }
    else
    cout<<"No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'whie' was not declared in this scope
   19 |     whie(++k < n)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

int main()
{
  uint64_t N;
  std::cin >> N;
  
  bool flag = true;
  char end = ' ';
  
  std::string w;
  std::cin >> w;
  
  set.insert(w);
  end = w[w.size() - 1];
  
  std::set<std::string> set;
  for (uint64_t n = 1; n < N; ++n) {
    std::cin >> w;
    
    if (set.find(w) != set.end()) {
      flag = false;
    }
    
    if (w[0] != end) {
      flag = false;
    }
    
    set.insert(w);
    end = w[w.size() - 1];
  }
  
  std::cout << (flag ? "Yes" : "No") << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'set' was not declared in this scope
   14 |   set.insert(w);
      |   ^~~
a.cc:14:3: note: suggested alternatives:
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:96:11: note:   'std::set'
   96 |     class set
      |           ^~~
/usr/include/c++/14/set:87:13: note:   'std::pmr::set'
   87 |       using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>;
      |             ^~~
Language: C++

#include <bits/stdc++.h>

int main()
{
  uint64_t N;
  std::cin >> N;
  
  bool flag = true;
  char end = ' ';
  
  std::string w;
  std::cin >> w;
  
  end = w[w.size() - 1];
  
  std::set<std::string> set;
  for (uint64_t n = 1; n < N; ++n) {
    std::cin >> w;
    
    if (set.find(w) != set.end()) {
      flag = false;
    }
    
    if (w[0] != end) {
      flag = false
    }
    
    end = w[w.size() - 1];
  }
  
  std::cout << (flag ? "Yes" : "No") << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: expected ';' before '}' token
   25 |       flag = false
      |                   ^
      |                   ;
   26 |     }
      |     ~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
int i,j,n,ch=0,k;
cin >> n;
string s[n];
  char l;
  j=0;
  cin >> s[i];
  l=s[i].end;
  j++;
  for(i=0;i<n;i++){
    cin >> s[i];
    if(s[i][0]!=l)ch=1;
    l=s[i][s.size()-1];
    j++;
    for(k=0;k<j;k++)if(s[i]==s[j])ch=1;
  }
  if(ch)cout << "No" << endl;
  else cout << "Yes" << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: cannot resolve overloaded function 'end' based on conversion to type 'char'
   11 |   l=s[i].end;
      |          ^~~
a.cc:16:14: error: request for member 'size' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   16 |     l=s[i][s.size()-1];
      |              ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
int i,j,n,ch=0,k;
cin >> n;
string s[n];
  char l;
  j=0;
  cin >> s[i];
  l=s[i].end;
  j++;
  for(i=0;i<n;i++){
    cin >> s[i];
    if(s[i][0]!=l)ch=1;
    l=s[i].end;
    j++;
    for(k=0;k<j;k++)if(s[i]==s[j])ch=1;
  }
  if(ch)cout << "No" << endl;
  else cout << "Yes" << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: cannot resolve overloaded function 'end' based on conversion to type 'char'
   11 |   l=s[i].end;
      |          ^~~
a.cc:16:12: error: cannot resolve overloaded function 'end' based on conversion to type 'char'
   16 |     l=s[i].end;
      |            ^~~
Language: Java

import java.util.*;

class Main{
	public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      int N = scan.nextInt();
      
      String previous = scan.next();
      String next;
      Set used_words = new HashSet();
      used_words.add(previous);
      
      while(N>1){
        next = scan.next();
        if(!((privious.charAt(previous.length()-1)==next.charAt(0))&&used_words.add(next))){
          System.out.println("No");
          scan.close();
          return;
        }
        N--;
      }//while
      scan.close();
      System.out.println("Yes");
      
    }
}

Compiler output:
Main.java:15: error: cannot find symbol
        if(!((privious.charAt(previous.length()-1)==next.charAt(0))&&used_words.add(next))){
              ^
  symbol:   variable privious
  location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

import java.util.*;
 
public class Main {
  public static void main(){
    Scanner scanner = new Scanner(System.in);
    int main_1 = scanner.nextInt();
    String[] main_2 = new String[(main_1- 1)];
    for(int main_3 = 0;main_3 <= main_1;main_3++){
      String main_4 = main_2[main_3];
      String main_5 = main_2[main_3 - 1];
      if(
        main_3 != 0&&
        !main_5.substring(main_5.length() - 1).equalIgnoreCase(main_4.substring(0, 1))
      ){
        System.out.println("No");
        System.exit(0);
      }
    }
    System.out.println("Yes");
  }
}

Compiler output:
Main.java:13: error: cannot find symbol
        !main_5.substring(main_5.length() - 1).equalIgnoreCase(main_4.substring(0, 1))
                                              ^
  symbol:   method equalIgnoreCase(String)
  location: class String
1 error
Language: Java

import java.util.*

public class Main {
  public static void main(){
    Scanner scanner = new Scanner(System.in);
    int main_1 = scanner.nextInt();
    String[] main_2 = new String[(main_1- 1)];
    for(int main_3 = 0;main_3 <= main_1;main_3++){
      String main_4 = main_2[main_3];
      String main_5 = main_2[main_3 - 1];
      if(
        main_3 != 0&&
        !main_5.substring(main_5.length() - 1).equalIgnoreCase(main_4.substring(0, 1))
      ){
        System.out.println("No");
        System.exit(0);
      }
    }
    System.out.println("Yes");
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: C++

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

int main()
{
    int N;
    string s[110];

    cin>>N;
    for(int i=1; i<=N;i++){
        cin>>s[i];
        if(i!=1&&s[i][0]!=s[i-1][s[i-1].length()]) return puts("No"), 0
        
        for(int j=1;j<i;j++){
            if(s[i]==s[j]){ return puts("No"),0
            }
        }

    }
    return puts("Yes",0)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:72: error: expected ';' before 'for'
   13 |         if(i!=1&&s[i][0]!=s[i-1][s[i-1].length()]) return puts("No"), 0
      |                                                                        ^
      |                                                                        ;
   14 | 
   15 |         for(int j=1;j<i;j++){
      |         ~~~                                                             
a.cc:16:48: error: expected ';' before '}' token
   16 |             if(s[i]==s[j]){ return puts("No"),0
      |                                                ^
      |                                                ;
   17 |             }
      |             ~                                   
a.cc:21:16: error: too many arguments to function 'int puts(const char*)'
   21 |     return puts("Yes",0)
      |            ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 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/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
a.cc:21:25: error: expected ';' before '}' token
   21 |     return puts("Yes",0)
      |                         ^
      |                         ;
   22 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int N;
    string s[110];

    cin>>N;
    for(i=1; i<=N;i++){
        cin>>s[i];
        if(i!=1&&s[i][0]!=s[i-1][s[i-1].length()-1])
        {
            cout<<"No"<<endl;
        }
        for(int j=1;j<i;j++){
            if(s[i]==s[j]){
                cout<<"No"<<endl;
            }
        }
    }
  cout<<"Yes"<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=1; i<=N;i++){
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int N;
    string s[110];

    cin>>N;
    for(i=1; i<=N;i++){
        cin>>s[i];
        if(i!=1&&s[i][0]!=s[i-1][s[i-1].length()-1])
        {
            cout<<"No"<<endl;
        }
        for(int J=1;j<i;j++){
            if(s[i]==s[j]){
                cout<<"No"<<endl;
            }
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=1; i<=N;i++){
      |         ^
a.cc:16:21: error: 'j' was not declared in this scope
   16 |         for(int J=1;j<i;j++){
      |                     ^
Language: C++

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

bool solve(const vector<string>& W){
  const int n = W.size();

  for(int i=0;i < n-1; ++i){
    if(W[i].back() != W[i+1].front()){
      return false;
    }
  }

  for(int i=0; i<n;i++){
    for(int j=i+1;j<n;j++){
      if(W[i] == W[j]){
	return false;
      }
    }
  }
  retuen true;
}

vector<string> input(){
  int n;
  cin >> n;
  vector<string> W(n);
  for(int i=0;i<n;++i){
    cin >> W[i];
  }
  return W;
}

int main(){
  const vector<string> W = input();
  if(solve(W)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'bool solve(const std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:21:3: error: 'retuen' was not declared in this scope
   21 |   retuen true;
      |   ^~~~~~
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
map<string,int> mp;
int main()
{
 	char ch;
 	int n,i;
 	string s;
 	cin>>n;
 	cin>>s;
 	ch=s[s.size()-1];
 	mp[s]=1;
 	for(i=2;i<=n;i++)
 	{
 		cin>>s;
 		if(mp.find(s)==mp.end()%%s[0]==ch)
 		{
 			mp[s]=1;
 			ch=s[s.size()-1];
	    }
	    else
	    {
	    	cout<<"No"<<endl;return 0;
		}
		cout<<"Yes"<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:41: error: expected primary-expression before '%' token
   16 |                 if(mp.find(s)==mp.end()%%s[0]==ch)
      |                                         ^
Language: C++

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

		}
		if(w[i][0]!=w[i-1].size()){
            cout<<"No"<<endl;
            return 0;
        }
	}
    cout<<"Yes"<<endl;

	return 0;
}

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

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

		}
		if(w[i][0]!=w[i-1].size()){
            cout<<"No"<<endl;
            return 0;
        }
	}
    cout<<"Yes"<<endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before 'for'
    7 |         for(int i=0
      |                    ^
      |                    ;
    8 |         for(int i=0;i<n;i++){
      |         ~~~         
a.cc:8:9: error: expected primary-expression before 'for'
    8 |         for(int i=0;i<n;i++){
      |         ^~~
a.cc:7:20: error: expected ';' before 'for'
    7 |         for(int i=0
      |                    ^
      |                    ;
    8 |         for(int i=0;i<n;i++){
      |         ~~~         
a.cc:8:9: error: expected primary-expression before 'for'
    8 |         for(int i=0;i<n;i++){
      |         ^~~
a.cc:7:20: error: expected ')' before 'for'
    7 |         for(int i=0
      |            ~       ^
      |                    )
    8 |         for(int i=0;i<n;i++){
      |         ~~~         
a.cc:11:31: error: 'i' was not declared in this scope
   11 |                 for(int j=0;j<i;j++){
      |                               ^
a.cc:18:22: error: 'i' was not declared in this scope
   18 |                 if(w[i][0]!=w[i-1].size()){
      |                      ^
a.cc: At global scope:
a.cc:23:5: error: 'cout' does not name a type
   23 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:25:9: error: expected unqualified-id before 'return'
   25 |         return 0;
      |         ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include<iostream>

int main(){
int a[2];
for(inti=0;i<2;i++){
cin>>a[i];
}
if(a[0]%2==1&&a[1]%2==1){
cout<<"Yes"<<std::endl;
return 0;
}else{
cout<<"No"<<std::endl;
return 0;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'inti' was not declared in this scope; did you mean 'int'?
    5 | for(inti=0;i<2;i++){
      |     ^~~~
      |     int
a.cc:5:12: error: 'i' was not declared in this scope
    5 | for(inti=0;i<2;i++){
      |            ^
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin>>a[i];
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | cout<<"Yes"<<std::endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 | cout<<"No"<<std::endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,i;
  bool s=true;
  string a[100];
  set<string> b;
  for(i=0;i<n;i++){
    cin>>a[i];
    b.insert(a[i]);
  }
  for(i=0;i<n-1;i++){
    if(a[i][a.size()-1]!=a[i+1][0]){
      s=false;
    }
  }
  cout<<(b.size()/n&&s?"Yes":"No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: request for member 'size' in 'a', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'}
   13 |     if(a[i][a.size()-1]!=a[i+1][0]){
      |               ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,i;
  bool s=true;
  string a[100];
  set<string> b;
  for(i=0;i<n;i++){
    cin>>a[i];
    b.insert(a[i]);
  }
  for(i=0;i<n-1;i++){
    if(a[i][a.size()-1]!=a[i+1][0]){
      s=false;
    }
  }
  cout<<(b.size()/n&&s?"Yes":"No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'set' was not declared in this scope
    7 |   set<string> b;
      |   ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include<iostream>
  +++ |+#include <set>
    2 | using namespace std;
a.cc:7:13: error: expected primary-expression before '>' token
    7 |   set<string> b;
      |             ^
a.cc:7:15: error: 'b' was not declared in this scope
    7 |   set<string> b;
      |               ^
a.cc:13:15: error: request for member 'size' in 'a', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'}
   13 |     if(a[i][a.size()-1]!=a[i+1][0]){
      |               ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b;
map<string,int>mp;
int main(){
	int n;
	cin>>n;
	string s;
	rep(i,1,n)
	{
		cin>>s[i];
		if(mp.count(s[i])){cout<<"No";return 0;}
		int sz=s[i-1].size();
		if(i>1&&s[i][0]!=s[i-1][sz-1]){cout<<"No";return 0;}
		mp[s]=1;
	}
	cout<<"Yes";
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         rep(i,1,n)
      |             ^
a.cc:9:9: error: 'rep' was not declared in this scope
    9 |         rep(i,1,n)
      |         ^~~
Language: C++

#include <cstdio>
#include <string>

int main () 
{
    int n;
    scanf("%d", &n);
    std::string s;
    scanf("%s", s);
    bool correct = true;
    char first;
    char last;
    last = s[s.length-1];
    for (int i = 0; i < n - 1; ++i) {
        std::string sc;
        scanf("%s", sc);
        first = sc[0];
        if (last == first) {
            correct = false;
        }
        last = sc[sc.length - 1];
    }
    if (correct) {
        printf("Yes");
    }
    else {
        printf("No");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 |     last = s[s.length-1];
      |              ~~^~~~~~
      |                      ()
a.cc:21:22: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   21 |         last = sc[sc.length - 1];
      |                   ~~~^~~~~~
      |                            ()
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N =sc.nextInt();
		List<Character> list1 = new ArrayList<>();
		List<String> list2 = new ArrayList<>();
		for(int i = 0; i < N; i++){
			String a = sc.next();
			if(list2.contains(a)){
				System.out.println("No");
				return;
			}
			list1.add( a.charAt(0));
			list1.add( a.charAt(a.length() - 1));
			list2.add(a);
		}
		for(int i = 1; i <= 2*(N-1)-1; i +=2){
				if(list1.get(i) != list.get(i+1)){
					System.out.println("No");
					return;
				}
		}
			System.out.println("Yes");	
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
				if(list1.get(i) != list.get(i+1)){
				                   ^
  symbol:   variable list
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <string.h>
#include <string>

typedef long long ll;
using namespace std;

int main(){
  int n,p;
  string g;
  cin >> n;
  char a[n][11];
  for(int i=0;i<n;i++){
  	cin >> a[i];
  }
  for(int i=0;i<n;i++){
  	for(int j=0;j<n;j++){
  		if(a[i]==a[j]){
  			cout << "No" << endl;
  			return 0;
  		}
  	}
  }
  for(int i=1;i<n;i++){
  	g=a[i-1];
  	p=a.length();
  	if(a[i][0]!=a[i-1][p-1]){
  		cout << "No" << endl;
  		return 0;
  	}
  }
  cout << "Yes" << endl;
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: request for member 'length' in 'a', which is of non-class type 'char [n][11]'
   28 |         p=a.length();
      |             ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
  cin >>n;
  set<string> a[n];
  string b[n];
  bool c=false;
  for (int i=0;i<n;i++){
  	cin >> b[i];
    a.insert(b[i]);
  }
  if (a.size()==n){
  	c=true;
    for (int i=0;i<n-1;i++){
    	if (b[i].back()==b[i+1].front()) c=false;
    }
  }
  if (c) cout <<"Yes"<<endl;
  else cout <<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'insert' in 'a', which is of non-class type 'std::set<std::__cxx11::basic_string<char> > [n]'
   11 |     a.insert(b[i]);
      |       ^~~~~~
a.cc:13:9: error: request for member 'size' in 'a', which is of non-class type 'std::set<std::__cxx11::basic_string<char> > [n]'
   13 |   if (a.size()==n){
      |         ^~~~
Language: C++

#include <iostream>
#include <vector>
int main()
{
  int N;std::cin >> N;
  std::vector<std::string> s(N);
  for(auto& e:s){std::cin >> e;}
  for(int i = 1; i < N; i++){if(s[i-1].back()!-s[i].front()){return std::cout << "No"<<std::endl,0;}
                            std::cout << "Yes"<<std::endl;	
                            }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:46: error: expected ')' before '!' token
    8 |   for(int i = 1; i < N; i++){if(s[i-1].back()!-s[i].front()){return std::cout << "No"<<std::endl,0;}
      |                                ~             ^
      |                                              )
Language: C++

#include <iostream>
#include <set>
#include <string>
#include <vector>
 
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<string> S;
  set<string> SS;
  for(int i = 0; i < N; i++) {
  	string s;
    cin >> s;
    S.push_back(s);
    SS.insert(s);
  }
  if (SS.size() != S.size()) {
  	cout << "No" << endl;
    return 0;
  }
  for(int i = 0; i < N - 1; i++) {
  	if (s[i].back() != s[i + 1][0]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 's' was not declared in this scope
   24 |         if (s[i].back() != s[i + 1][0]) {
      |             ^
Language: C++

#include <iostream>
#include <set>
#include <string>

using namespace std;

int main() {
  int N;
  cin >> N;
  vector<string> S;
  set<string> SS;
  for(int i = 0; i < N; i++) {
  	string s;
    cin >> s;
    S.push_back(s);
    SS.insert(s);
  }
  if (SS.size() != S.size()) {
  	cout << "No" << endl;
    return 0;
  }
  for(int i = 0; i < N - 1; i++) {
  	if (s[i].back() != s[i + 1][0]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vector' was not declared in this scope
   10 |   vector<string> S;
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <set>
  +++ |+#include <vector>
    3 | #include <string>
a.cc:10:16: error: expected primary-expression before '>' token
   10 |   vector<string> S;
      |                ^
a.cc:10:18: error: 'S' was not declared in this scope
   10 |   vector<string> S;
      |                  ^
a.cc:23:13: error: 's' was not declared in this scope
   23 |         if (s[i].back() != s[i + 1][0]) {
      |             ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
	cin<<N;
 	set<string>a;
	string s,t;
	cin>>t;
	for(int i=1;i<n;i++){
		cin>>s;
		if(a.count(s)||t.back()!=s.front()){cout<<"No".return 0;}
		a.insert(s);
		t=s;
	}
cout<<"Yes";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'N' was not declared in this scope
    5 |         cin<<N;
      |              ^
a.cc:6:9: error: 'set' was not declared in this scope
    6 |         set<string>a;
      |         ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include <iostream>
  +++ |+#include <set>
    2 | using namespace std;
a.cc:6:19: error: expected primary-expression before '>' token
    6 |         set<string>a;
      |                   ^
a.cc:6:20: error: 'a' was not declared in this scope
    6 |         set<string>a;
      |                    ^
a.cc:9:23: error: 'n' was not declared in this scope
    9 |         for(int i=1;i<n;i++){
      |                       ^
a.cc:11:64: error: expected unqualified-id before 'return'
   11 |                 if(a.count(s)||t.back()!=s.front()){cout<<"No".return 0;}
      |                                                                ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  string W[N];
  for(int i=0;i<N;i++){
    cin >> W[i];
  }

  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      if(W[i]==W[j]){
        cout << "No" << endl;
        return;
      }
    }
  }
  for(int i=1;i<N;i++){
    int d=W[i-1].size()-1;
    if(W[i-1][d]!=W[i][0]){
      cout << "No" << endl;
      return;
    }
  }
  cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |         return;
      |         ^~~~~~
a.cc:24:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   24 |       return;
      |       ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
string s[101];
int main(){
	ios::sync_with_stdio(false);
	set<string> t;
	int n,i,le,ans=0;
	cin>>n;
	for(i=1;i<=n;i++){
		cin>>s[i];
		t.push(s[i]);
	}
	if(t.size()<n){
		cout<<"No";
		return 0;
	}
	for(i=1;i<=n;i++){
		if(s[i[s[i].size()]]==s[i+1[0]])
			ans++;
	}
	if(n-1==ans){
		cout<<"Yes";
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   14 |                 t.push(s[i]);
      |                   ^~~~
a.cc:21:23: error: invalid types 'int[std::__cxx11::basic_string<char>::size_type {aka long unsigned int}]' for array subscript
   21 |                 if(s[i[s[i].size()]]==s[i+1[0]])
      |                       ^
a.cc:21:44: error: invalid types 'int[int]' for array subscript
   21 |                 if(s[i[s[i].size()]]==s[i+1[0]])
      |                                            ^
Language: C++

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

int main(void){
int n;
string moji [100];
string result ="Yes";
cin >> n;

cin>>moji[0];

for (int i =1;i<n;i++){
cin >> moji [i];
if(moji[i-1][moji[i-1].length] == moji[i][0]){
result = "No";
}
for(int j=0;j<i;j++){
if(moji[j]==moji[i]){
result = "No";
}
}
}

cout <<  result<< endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15: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>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
   15 | if(moji[i-1][moji[i-1].length] == moji[i][0]){
      |             ^
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:1083:7: note: declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int num,cao=1;
    string str[105];
    pair<char,char> p[105]
    cin>>num;
    
    for(int i=1;i<=num;i++)
    {
       if(i==1)
       {
       cin>>str[i]; 
       string::iterator it1=str[i].begin()+str[i].size();//结尾
       string::iterator it2=str[i].begin();              //开头
       p[i].first=*it1;
       p[i].second=*it2;  
       }
       else
       {
          cin>>str[i]; 
          string::iterator it1=str[i].begin()+str[i].size();//结尾
          string::iterator it2=str[i].begin();              //开头
          if(p[i-1].second==p[i].first)
            continue;
          else
          {
              cout<<"No";
              break;
          }
       }
    }
    for(int i=1;i<=num;i++)
    {
       for(int j=1;j<=num;j++)
       {
         if( (p[i].first==p[j].first)&&(p[i].second==p[j].second) )
         {
            if(!strcmp(str[i],str[j]))
            {
              cout<<"No";
              break;
            }
                
         }
       }
       
    }
    cout<<"Yes";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'cin'
    8 |     cin>>num;
      |     ^~~
a.cc:17:8: error: 'p' was not declared in this scope
   17 |        p[i].first=*it1;
      |        ^
a.cc:25:14: error: 'p' was not declared in this scope
   25 |           if(p[i-1].second==p[i].first)
      |              ^
a.cc:38:15: error: 'p' was not declared in this scope
   38 |          if( (p[i].first==p[j].first)&&(p[i].second==p[j].second) )
      |               ^
a.cc:40:29: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   40 |             if(!strcmp(str[i],str[j]))
      |                        ~~~~~^
      |                             |
      |                             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: C++

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

int main(void){
int n;
string moji [100];
string result =“Yes”;
cin >> n;

cin>>moji[0];

for (int i =1;i<n;i++){
cin >> moji [i];
if(moji[i-1][moji[i-1].length] == moji[i][0]){
result = "No";
}
for(int j=0;j<i;j++){
if(moji[j]==moji[i]){
result = "No";
}
}
}

cout <<  result<< endl;
return 0;
}


Compiler output:
a.cc:8:16: error: extended character “ is not valid in an identifier
    8 | string result =“Yes”;
      |                ^
a.cc:8:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:16: error: '\U0000201cYes\U0000201d' was not declared in this scope
    8 | string result =“Yes”;
      |                ^~~~~
a.cc:15: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>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
   15 | if(moji[i-1][moji[i-1].length] == moji[i][0]){
      |             ^
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:1083:7: note: declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
Language: C++

// 問題文
// 高橋くんは今日も
// 1人でしりとりの練習をしています。
// しりとりとは以下のルールで遊ばれるゲームです。
//
// はじめ、好きな単語を発言する
// 以降、次の条件を満たす単語を発言することを繰り返す
// その単語はまだ発言していない単語である
// その単語の先頭の文字は直前に発言した単語の末尾の文字と一致する
// 高橋くんは、10 秒間にできるだけ多くの単語を発言する練習をしています。
// 高橋くんが発言した単語の個数  N と i 番目に発言した単語
// W
// i が与えられるので、どの発言もしりとりのルールを守っていたかを判定してください。


#include <iostream>

using namespace std;
int main(int argc, const char * argv[]) {
    //cout << "a";
    bool judge = true;
    int numC = 1;
    char a[1000];
    int c=0;
    string str;
    string str2;
    cin >> N;
    for(int i = 0; i < N; i++){
      cin >> str2;
      if(i!=0){
        if(str[str.size()-1] != str2[0]){
          c=0;
        }
      }
    }
    if(c){
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:27:12: error: 'N' was not declared in this scope
   27 |     cin >> N;
      |            ^
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==1){}else{a=1;}
}



for(int i = 0; I<N-1; i++){
    int k;
    int x=0;
    for(int j = 0; j<16; j++){
        k=j;
        if(W[i][j]==0){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:26:16: error: 'I' undeclared (first use in this function)
   26 | for(int i = 0; I<N-1; i++){
      |                ^
main.c:26:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int N;
  int i;
  int n;
  int m;
  int check = 1;
  cin >> N;
  char W[N];
  for(i = 1; i <= N; i++){
    cin >> W[i];
    char p[10] = W[i];
    char q[10] = W[i-1];
    for (n = 0;q[n] != '\0';n++);
    if(p[1] == q[n-1]){
      check = 0;
    }
    for(m=i+1;m <= N; m++){
      if(W[i] == W[m]){
        check = 0;
      }
    }
  }
  if(check == 1){
    cout << "Yes" << endl;
  }
  else{
    cout << "No"  << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: array must be initialized with a brace-enclosed initializer
   15 |     char p[10] = W[i];
      |                  ~~~^
a.cc:16:23: error: array must be initialized with a brace-enclosed initializer
   16 |     char q[10] = W[i-1];
      |                  ~~~~~^
Language: C

#include<stdio.h>
#include<string.h>
 
int main()
{
int N = 0,ans = 0;
char s1[100][100],s2[100];
scanf("%d",&N);
 
scanf("%s",s1[0]);
 
for(int i = 0;i <= N-2;i++)
{
scanf("%s",s2);
if(strrchr(s1[i],1) != strchr(s2,1))
{
ans = 1;
}
strcpy(s1[i+1],s2);
}
 
for(int i = 0;i <= N;i++)
{
 for(int j = i + 1;j <= N;j++)
 {
  if(strcmp(s1[i],s1[j] == 0)
    {
     ans = 1;
    }
 }
}
 
if(ans = 0)
{
printf("Yes\n");
}else{
printf("No\n");
}
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:25: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   26 |   if(strcmp(s1[i],s1[j] == 0)
      |                   ~~~~~~^~~~
      |                         |
      |                         int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:26:30: error: expected ')' before '{' token
   26 |   if(strcmp(s1[i],s1[j] == 0)
      |     ~                        ^
      |                              )
   27 |     {
      |     ~                         
main.c:30:2: error: expected expression before '}' token
   30 |  }
      |  ^
Language: C++

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

int main(){
  int N;
  int i;
  int n;
  int m;
  int check = 1;
  cin >> N;
  char W[N];
  for(i = 1; i <= N; i++){
    cin >> W[i];
    char p = W[i];
    char q = W[i-1];
    for (n = 0;q[n] != '\0';n++);
    if(p[1] == q[n-1]){
      check = 0;
    }
    for(m=i+1;m <= N; m++){
      if(W[i] == W[m]){
        check = 0;
      }
    }
  }
  if(check == 1){
    cout << "Yes" << endl;
  }
  else{
    cout << "No"  << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: invalid types 'char[int]' for array subscript
   17 |     for (n = 0;q[n] != '\0';n++);
      |                 ^
a.cc:18:9: error: invalid types 'char[int]' for array subscript
   18 |     if(p[1] == q[n-1]){
      |         ^
a.cc:18:17: error: invalid types 'char[int]' for array subscript
   18 |     if(p[1] == q[n-1]){
      |                 ^
Language: C++

#include<cstdio>
#include<cstring>
char getFinalword(char (*words)[10],int num)
{
    return words[num][strlen(words[num])-1];
}
char getStartword(char (*words)[10],int num)
{
    return words[num][0];
}
int isAllone(int *mark,int n)
{
    int i;
    for(i=0;i<n;i++)
    {
        if(mark[i]==0)
            return 0;
    }
    if(i==n)
        return 1;
}
int tryConnected(char (*words)[10],int num,int *mark,int n)
{
    int i=0;
    char finalword,startword;
    mark[num]=1;
//  printf("%s\n",words[num]);    //调试用 
    finalword=getFinalword(words,num);
    for(i=0;i<n;i++)
    {
        if(mark[i]==0)
        {
            startword=getStartword(words,i);
            if(finalword == startword)
            {
                tryConnected(words,i,mark,n);
            }
        }
    }
    if(isAllone(mark,n))
        return 1;
    else
        return 0; 
}
int isConnected(char (*word)[10],int n)
{
    int i,j,mark[n];
    for(i=0;i<n;i++)
    {
        for(j=0;j<n;j++) 
            mark[j]=0;
        if(tryConnected(word,i,mark,n))
            break;
    }
    if(i<n)
        return 1;
    else
        return 0;
}int main()
{
    int n,i,flag;
	//char *tmp;
    char words[200][10];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%s",words[i]);
    	string tmp=words[i];
    	//if(tmp==words[i+1]) flag=0;
    }   
    if(isConnected(words,n)) printf("Yes");
        
    else /*if(flag==0)*/ printf("No");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:68:9: error: 'string' was not declared in this scope; did you mean 'stdin'?
   68 |         string tmp=words[i];
      |         ^~~~~~
      |         stdin
a.cc: In function 'int isAllone(int*, int)':
a.cc:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^
Language: C++

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

int main(){
  int N;
  int i;
  int n;
  int m;
  int check = 1;
  cin >> N;
  char W[N];
  for(i = 1; i =< N; i++){
    cin >> W[i];
    for (n = 0;W[i][n] != '\0';n++);
    if(W[i][1] == W[i-1][n-1]){
      check = 0;
    }
    for(m=i+1;m =< N; m++){
      if(W[i] == W[m]){
        check = 0;
      }
    }
  }
  if(check == 1){
    cout << "Yes" << endl;
  }
  else{
    cout << "No"  << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected primary-expression before '<' token
   13 |   for(i = 1; i =< N; i++){
      |                 ^
a.cc:15:20: error: invalid types 'char[int]' for array subscript
   15 |     for (n = 0;W[i][n] != '\0';n++);
      |                    ^
a.cc:16:12: error: invalid types 'char[int]' for array subscript
   16 |     if(W[i][1] == W[i-1][n-1]){
      |            ^
a.cc:16:25: error: invalid types 'char[int]' for array subscript
   16 |     if(W[i][1] == W[i-1][n-1]){
      |                         ^
a.cc:19:18: error: expected primary-expression before '<' token
   19 |     for(m=i+1;m =< N; m++){
      |                  ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
    int a,c,i;
    char m1[11];
    char m2[11];
    scanf("%d",&a);

    for(int i=1;i<a && c==0;i++){

    scanf("\n%s \n%s",&m1,&m2);
    int len_A=strlen(m1);
    int len_B=strlen(m2);

    if(A[len_A-1]==B[0]){
    }else{
    c=1;
    printf("No\n");
    }

    }

    if(c!=1){
    printf("Yes\n");
    }
    return 0;
}


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

#include<cstdio>
#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<string> strs = vector<string>(n);
  
  string _str;
  for(int i = 0; i < n; i++){
    cin >> _str;
    strs[i] = _str;
  }
  for(int i = 0; i < n; i++){
    for(int j = i + 1; j < n; j++){
      if(strs[i] == strs[j]){
        printf("No\n");
        return 0;
      }
    }
  }
  
  for(int i = 1; i < n; i++){
  	if(strs[i - 1][strs[i].size()-1]) != strs[i][0]){
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:43: error: expected primary-expression before '!=' token
   26 |         if(strs[i - 1][strs[i].size()-1]) != strs[i][0]){
      |                                           ^~
Language: C++

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

int main(){
  int N;
  int i;
  int n;
  int m;
  char check = True;
  cin >> N;
  char W[N];
  for(i = 1; i =< N; i++){
    cin >> W[i];
    for (n = 0;W[i][n] != '\0';n++);
    if(W[i][1] == W[i-1][n-1]){
      check = False;
    }
    for(m=i+1;m =< N; m++){
      if(W[i] == W[m]){
        check = False;
      }
    }
  }
  if(check == True){
    cout << "Yes" << endl;
  }
  else{
    cout << "No"  << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'True' was not declared in this scope
   10 |   char check = True;
      |                ^~~~
a.cc:13:17: error: expected primary-expression before '<' token
   13 |   for(i = 1; i =< N; i++){
      |                 ^
a.cc:15:20: error: invalid types 'char[int]' for array subscript
   15 |     for (n = 0;W[i][n] != '\0';n++);
      |                    ^
a.cc:16:12: error: invalid types 'char[int]' for array subscript
   16 |     if(W[i][1] == W[i-1][n-1]){
      |            ^
a.cc:16:25: error: invalid types 'char[int]' for array subscript
   16 |     if(W[i][1] == W[i-1][n-1]){
      |                         ^
a.cc:17:15: error: 'False' was not declared in this scope
   17 |       check = False;
      |               ^~~~~
a.cc:19:18: error: expected primary-expression before '<' token
   19 |     for(m=i+1;m =< N; m++){
      |                  ^
a.cc:21:17: error: 'False' was not declared in this scope
   21 |         check = False;
      |                 ^~~~~
Language: C++

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

Compiler output:
a.cc:13:29: error: empty character constant
   13 |     if(a[i][0]!=last&&last!='')out=1;
      |                             ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(a[i][0]!=last&&last!="")out=1;
      |                       ~~~~^~~~
Language: C

#include<stdio.h>
#include<string.h>
 
int main()
{
int N = 0,ans = 0;
char s1[100][100],s2[100];
scanf("%d",&N);
 
scanf("%s",s1[0][]);
 
for(int i = 0;i <= N-2;i++)
{
scanf("%s",s2);
if(strrchr(s1[i][],1) != strchr(s2,1))
{
ans = 1;
}
strcpy(s1[i+1][],s2);
}

for(int i = 0;i <= N;i++)
{
 for(int j = 0;j <= N;j++)
 {
  if(s1[i][] == s2[j][])
    {
     ans = 1;
    }
 }
}

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

Compiler output:
main.c: In function 'main':
main.c:10:18: error: expected expression before ']' token
   10 | scanf("%s",s1[0][]);
      |                  ^
main.c:15:18: error: expected expression before ']' token
   15 | if(strrchr(s1[i][],1) != strchr(s2,1))
      |                  ^
main.c:19:16: error: expected expression before ']' token
   19 | strcpy(s1[i+1][],s2);
      |                ^
main.c:26:12: error: expected expression before ']' token
   26 |   if(s1[i][] == s2[j][])
      |            ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
    int a,i;
    char m1[11];
    char m2[11];
    scanf("%d",&a);

    for(int i=1;i<a && c==0;i++){

    scanf("\n%d\n%d",&m1,&m2);
    int len_A=strlen(m1);
    int len_B=strlen(m2);

    if(A[len_A-1]==B[0]){
    }else{
    c=1;
    printf("No\n");
    }

    }

    if(c!=1){
    printf("Yes\n");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:24: error: 'c' undeclared (first use in this function)
   10 |     for(int i=1;i<a && c==0;i++){
      |                        ^
main.c:10:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:8: error: 'A' undeclared (first use in this function)
   16 |     if(A[len_A-1]==B[0]){
      |        ^
main.c:16:20: error: 'B' undeclared (first use in this function)
   16 |     if(A[len_A-1]==B[0]){
      |                    ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
    int a,i;
    char m1[11];
    char m2[11];
    scanf("%d",&a)

    for(int i=1;i<a && c==0;i++){
    scanf("\n%d\n%d",&m1,&m2);
    int len_A=strlen(m1);
    int len_B=strlen(m2);
    if(A[len_A-1]==B[0]){
    
    }else{
    c=1;
    printf("No\n");
    }
    }
    if(c!=1){
    printf("Yes\n");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:19: error: expected ';' before 'for'
    8 |     scanf("%d",&a)
      |                   ^
      |                   ;
    9 | 
   10 |     for(int i=1;i<a && c==0;i++){
      |     ~~~
Language: C++

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

#define Max(a,b) max({a,b})
#define Min(a,b) min({a,b})
#define rep(i,m,n) for(int (i)=(m);(i)<(int)(n);(i)++)
#define len(n) n.size()
#define print(n) cout << (n) << endl;


// s.substr(i,n)

typedef long long ll;

using namespace std;

//char a = 65;
long long int inf = 1000000007;
int n,m,a,b,c,d,cou,co,p;
long long int lla,llb,llc;
double k;
const ll LINF = 1e18;
char num = 65;
string s,t;
int li[20];
/*
int binary(int bina){
    int ans = 0;
    for (int i = 0; bina>0 ; i++)
    {
        ans = ans+(bina%2)*pow(10,i);
        bina = bina/2;
    }
    return ans;
}
*/
string lis[120];
int main(){
    cin >> n;

    for(int i = 0; i < n; i++){
        cin >> lis[i];
        for(int j = 0; j < i-1; j++){
            if(lis[j] == lis[i]){
                print("No")
                return 0;
            }
        }
        
    print("Yes")
    
    return 0;
}


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