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

#include <iostream>

int main ()
{
	int a, b, c;
	cin >> a >> b;
	if ((a*b)%2 == 0)
	{
		cout << "No" << endl;
	}
	else
	{
		cout << "Yes" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> a >> b;
      |         ^~~
      |         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:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                 cout << "No" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |                 cout << "No" << endl;
      |                                 ^~~~
      |                                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |                 cout << "Yes" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |                 cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
    
    printf(a % 2 && b % 2 ? "Yes\n", "No\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: expected ':' before ')' token
    8 |     printf(a % 2 && b % 2 ? "Yes\n", "No\n");
      |                                            ^
      |                                            :
a.cc:8:44: error: expected primary-expression before ')' token
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)

int main(){
  int a b;
  cin >> a >> b;
  if(a * b <= 3) cout << "Yes";
  else cout << "No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected initializer before 'b'
   13 |   int a b;
      |         ^
a.cc:14:10: error: 'a' was not declared in this scope
   14 |   cin >> a >> b;
      |          ^
a.cc:14:15: error: 'b' was not declared in this scope; did you mean 'pb'?
   14 |   cin >> a >> b;
      |               ^
      |               pb
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	ll a,b;
	cin>>a>>b;
	for(ll i=1;i<=3;i++)
	{
		if((a*b*c)&1)
		{
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: 'c' was not declared in this scope
   12 |                 if((a*b*c)&1)
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
/*#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
*/typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll,ll> pl;
typedef pair<int,int> pii;

#define LOCAL 0
#define dbg(x) cout << #x << " is " << x << "\n"
#define gll(x) scanf("%d",&x)
#define gll2(x,y) scanf("%d%d",&x,&y)
#define gll3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define gllarr(arr,n) f(i,n) gll(arr[i]);
#define sz(x) ((int)x.size())
#define s(x) sort(x.begin(),x.end())
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define pb push_back
#define f(i,n) for(int i=0;i<n;i++)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define repr(i,a,b) for(int i=a;i>=b;i--)
#define ll long long

const ll mod = (ll)1e9 + 7;
const ll inf = (ll)1e16;
const ld eps = 1e-12;
const ll N = (int)1e5 + 5;
const ll LOGN = 19;
const ld PI = 3.14159265358979323846;
inline ll mul(ll a, ll b, ll m = mod) { return (ll)(a * b) % m;}
inline ll add(ll a, ll b, ll m = mod) { a += b; if(a >= m) a -= m; if(a < 0) a += m; return a;}
inline ll power(ll a, ll b, ll m = mod) { if(b == 0) return 1; if(b == 1) return (a % m); ll x = power(a, b / 2, m); x = mul(x, x, m); if(b % 2) x = mul(x, a, m); return x;}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    if (LOCAL) {
        freopen("C:\\Users\\Dishant\\Desktop\\Collection-DEV c++\\input.txt", "r", stdin);
        freopen("C:\\Users\\Dishant\\Desktop\\Collection-DEV c++\\output.txt", "w", stdout);
    }
    int a, b;
    cin>>a>>b;
    rep(i, 1 , 3)
    {
        int to = a * i * b;
        if(to & 1)
        {
            cout<<"Yes\"n;
            return 0;
        }
    }
    cout<<"No\n";
    return 0;
}

Compiler output:
a.cc:56:19: warning: missing terminating " character
   56 |             cout<<"Yes\"n;
      |                   ^
a.cc:56:19: error: missing terminating " character
   56 |             cout<<"Yes\"n;
      |                   ^~~~~~~~
a.cc: In function 'int main()':
a.cc:57:13: error: expected primary-expression before 'return'
   57 |             return 0;
      |             ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define pb push_back
#define FOR(i, a, b) for(int i=(a);i<(b);i++)
#define REP(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for(int i=(a)-1;i>=(b);i++)
#define RREP(i, n) FOR(i, n, 0);

signed main () {
  cin.tie(0);
  cout << setprecision(10);

  int a, b;
  cin >> a >> b;
  if(a*b % 2 == 0) cout << "Yes" << endl;
  else cout << "No" << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: expected '}' at end of input
   19 |   else cout << "No" << endl;
      |                             ^
a.cc:12:16: note: to match this '{'
   12 | signed main () {
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  cin >> A >> B;
  if(A != 2 && B != 2){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }

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

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
#include <cinttypes>
#include <string.h>
#include <bits/stdc++.h>

#define countof(a) (sizeof(a)/sizeof(*a))

#define vi vector<int>
#define vvi vector<vector<int> >
#define pi pair<int,int>
#define fi first
#define se second

#define FOR(var, to)          for (register s64 var = 0; var < (s64)to; var++)
#define FROMTO(var, from, to) for (register s64 var = from; var <= (s64)to; var++)

#define INIT(var) FOR(i,countof(var)) var[i] = 0
#define INPUT(var) FOR(i,countof(var)) var[i] = ri()
#define INPUT1(var) FOR(i,countof(var)) var[i] = ri() - 1

#define SORT(v) qsort(v,countof(v),sizeof(*v),int_less)
#define SORTT(v) qsort(v,countof(v),sizeof(*v),int_greater)

#define MOD 1000000007
#define INF (1 << 30)

typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;

using namespace std;

static inline int ri() {
  int a;
  scanf("%d", &a);
  return a;
}

static inline s64 rs64() {
  s64 a;
  scanf("%" SCNd64, &a);
  return a;
}

static inline void wi(int a) {
  printf("%d", a);
}

static inline void wu64(u64 a) {
  printf("%" PRIu64, a);
}

static inline void ws64(s64 a) {
  printf("%" PRId64, a);
}

int int_less(const void *a, const void *b) {
  return (*((const int*)a) - *((const int*)b));
}
int int_greater(const void *a, const void *b) {
  return (*((const int*)b) - *((const int*)a));
}

int main() {
  int a = ri();
  int b = ri();
  cout << (a%2 && b%2)?"Yes":"No" << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:76:35: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   76 |   cout << (a%2 && b%2)?"Yes":"No" << endl;
      |                              ~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<ll,ll> P;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-9;
int main(){
    int a,b;cin>>a>>b;
    bool f=false;
    for(int i=1;i<=3;i++){
        if((a*b*c)%d)f=true;
    }
    if(f){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'c' was not declared in this scope
   15 |         if((a*b*c)%d)f=true;
      |                 ^
a.cc:15:20: error: 'd' was not declared in this scope
   15 |         if((a*b*c)%d)f=true;
      |                    ^
Language: C++

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

long long int A, B;

int main(){
    scanf("%lld%lld", &A, &B);
    puts(A & B & 1 ? "Yes" : "No")
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:35: error: expected ';' before 'return'
    8 |     puts(A & B & 1 ? "Yes" : "No")
      |                                   ^
      |                                   ;
    9 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
  ll N;
  cin>>>N;
  set<string> S;
 vector<string> vec(N);
  for(ll i=0;i<N;i++) {
cin>>vec[i];
  }
  
for(ll i=0;i<N;i++) {
if(S.count(vec[i])) {
cout<<"No"<<endl;
  return 0;
}
  S.insert(vec[i]);
}
  
  
  for(ll i=0;i<N-1;i++) {
if(vec[i].back()!=vec[i+1][0]) {
cout<<"No"<<endl;
  return 0;
}
  }
  
  
  cout<<"Yes"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected primary-expression before '>' token
    8 |   cin>>>N;
      |        ^
Language: Java

import java.util.*;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String ans = "Yes";
		String[] w = new String[n];
		for(int i=0; i<w.length; ++i){
			w[i] = scn.next();
		}
      	String[] ww = new String[n];
      	for(int i=0; i<w.length; ++i){
			ww[i] = w[i];
		}
      	Arrays.sort(ww);
      	for(int i=1; i<w.length; ++i){
			if(ww[i].equals(ww[i-1])){
              ans = "No";
            }
		}
      	for(int i=1; i<w.length; ++i){
          char[] last = list[i-1].toCharArray();
          char[] first = list[i].toCharArray();
          if(last[last.length-1] != first[0]){
            ans = "No";
          }
        }
      	System.out.println(ans);
	}
}

Compiler output:
Main.java:24: error: cannot find symbol
          char[] last = list[i-1].toCharArray();
                        ^
  symbol:   variable list
  location: class Main
Main.java:25: error: cannot find symbol
          char[] first = list[i].toCharArray();
                         ^
  symbol:   variable list
  location: class Main
2 errors
Language: C++

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

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

  set<string> used;
  char nextChar = ' ';
  for (int i = 0; i < N; i++) {
    string w;
    cin >> w;
    if ( used.count(w) == 1 ) {
      cout << "No" << endl;
      return 0;
    }
    if ( nextChar == w[0]) {
      cout << "No" << endl;
      return 0;
    }
    set.insert(w);
    nextChar = w[w.size()-1];
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: expected unqualified-id before '.' token
   21 |     set.insert(w);
      |        ^
Language: C++

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

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

  set<string> used;
  char nextChar = ' '
  for (int i = 0; i < N; i++) {
    string w;
    cin >> w;
    if ( used.count(w) == 1 ) {
      cout << "No" << endl;
      return 0;
    }
    if ( nextChar == w[0]) {
      cout << "No" << endl;
      return 0;
    }
    set.insert(w);
    nextChar = w[w.size()-1];
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for (int i = 0; i < N; i++) {
      |   ^~~
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 0; i < N; i++) {
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
int main()	{
  int n;
  cin>>n;
  bool shiritori=true;
  vector<string>s(n);
  rep(i,n) cin>>s[i];
  rep(i,n-1){
    if(s[i].back()!=s[i+1].front())
      shiritori=false;
  }
  rep(i,n){
    rep(j,i){
      if(w[j]==w[i])
        shiritori=false;
    }
  }
  if(shiritori)
    cout<<"No"<<endl;
  else
    cout<<"Yes"<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:30:10: error: 'w' was not declared in this scope
   30 |       if(w[j]==w[i])
      |          ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  int n;
  scanf("%d",%n);
  char s[n][11];
  for(int i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(int i=1;i<n;i++){
    for(int j=0;j<n;j++){
      if(s[i][0] != s[i-1][strlen(s[i-1])-1]){
        printf("No");
        return 0;
      }
      if(strcmp(s[i],s[j]) == 0 && i!=j){
        printf("No");
        return 0;
      }
    }
  }
  printf("Yes");
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected expression before '%' token
    5 |   scanf("%d",%n);
      |              ^
Language: C++

// #pragma GCC target("avx2")
#pragma GCC optimize("O3", "unroll-loops")

// #include <bits/extc++.h>
// using namespace __gnu_pbds;

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

#define int long long
#define double long double
// template <typename T>
// using pbds_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
using pii = pair<int, int>;
template<typename T>
using prior = priority_queue<T, vector<T>, greater<T>>;
template<typename T>
using Prior = priority_queue<T>;

#define X first
#define Y second
#define ALL(x) (x).begin(), (x).end()
#define eb emplace_back
#define pb push_back

#define fastIO() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define RANDOM() random_device __rd; \
                 mt19937 __gen = mt19937(__rd()); \
                 uniform_int_distribution<int> __dis(1, 1E8); \
                 auto rnd = bind(__dis, __gen)

const int INF = 1E18;
const int mod = 1E9 + 7;
const double PI = acos(-1);

int32_t main() {
    fastIO();
    
    int n;
    string str, lst;
    cin >> n;
    
    set<string> str;
    for (int i = 0; i < n; ++i) {
        cin >> str;
        if (i and str.front() != lst.back()) return cout << "No\n", 0;
        if (st.count(str)) return cout << "No\n", 0;
        st.insert(str), lst = str;
    }
    
    cout << "Yes\n";
    
    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:43:17: error: conflicting declaration 'std::set<std::__cxx11::basic_string<char> > str'
   43 |     set<string> str;
      |                 ^~~
a.cc:40:12: note: previous declaration as 'std::string str'
   40 |     string str, lst;
      |            ^~~
a.cc:47:13: error: 'st' was not declared in this scope; did you mean 'lst'?
   47 |         if (st.count(str)) return cout << "No\n", 0;
      |             ^~
      |             lst
a.cc:48:9: error: 'st' was not declared in this scope; did you mean 'lst'?
   48 |         st.insert(str), lst = str;
      |         ^~
      |         lst
Language: C++

# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')


def solve():
    n = int(input())
    w = set()
    s = input()
    w.add(s)
    ans = 1
    for _ in range(n-1):
        c = input()
        if (s[-1] != c[0] or c in w): ans = 0
        w.add(c)
        s = c
    if ans:
        print("Yes")
    else:
        print("No")

t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()




"""

4
1 2
2 4
1 3
3
2 2 4
4 5 6

6
1 2
2 3
3 4
4 5
4 6
3
3 5 6
2 17 31 5 11

"""





Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:5:3: error: invalid preprocessing directive #def; did you mean #ifdef?
    5 | # def input(): return sys.stdin.readline()[:-1] # warning not \n
      |   ^~~
      |   ifdef
a.cc:6:3: error: invalid preprocessing directive #def; did you mean #ifdef?
    6 | # def input(): return sys.stdin.buffer.readline().strip() # warning bytes
      |   ^~~
      |   ifdef
a.cc:7:3: error: invalid preprocessing directive #def; did you mean #ifdef?
    7 | # def input(): return sys.stdin.buffer.readline().decode('utf-8')
      |   ^~~
      |   ifdef
a.cc:27:3: error: invalid preprocessing directive #t
   27 | # t = int(input())
      |   ^
a.cc:34:3: warning: missing terminating " character
   34 | """
      |   ^
a.cc:34:3: error: missing terminating " character
a.cc:54:3: warning: missing terminating " character
   54 | """
      |   ^
a.cc:54:3: error: missing terminating " character
a.cc:2:1: error: 'import' does not name a type
    2 | import sys
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#$include <set>
#include <string>
using namespace std;
int main()
{
  int N;
  cin >> N;
  set <string> W;
  bool ans = true;
  char c = '\0';
  for (int i = 0; i < N; i++) {
    string w;
    cin >> w;
    W.insert(w);
    if (c!='\0') {
      if (c!=w[0]) {
        ans = false;
      }
    }
    c = w[w.length()-1];
  }
  if (N > W.size()) ans = false;
  if (ans) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #$include; did you mean #include?
    2 | #$include <set>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:3: error: 'set' was not declared in this scope
    9 |   set <string> W;
      |   ^~~
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 | #$include <set>
a.cc:9:14: error: expected primary-expression before '>' token
    9 |   set <string> W;
      |              ^
a.cc:9:16: error: 'W' was not declared in this scope
    9 |   set <string> W;
      |                ^
Language: C++

#include <iosttream>
#$include <set>
#include <string>
using namespace std;
int main()
{
  int N;
  cin >> N;
  set <string> W;
  bool ans = true;
  char c = '\0';
  for (int i = 0; i < N; i++) {
    string w;
    cin >> w;
    W.insert(w);
    if (c!='\0') {
      if (c!=w[0]) {
        ans = false;
      }
    }
    c = w[w.length()-1];
  }
  if (N > W.size()) ans = false;
  if (ans) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


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

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

int main(){
  
  int x;
  int flag=0;
  cin >> x;
  vector<string> a(n);
  set<string> b;
  for(int i=0; i<x;i++){
    cin >> a[i];
    b.insert(a[i]);
  }
  if(b.size()!=x) flag=1;
  
  for(int i=0; i<x-1; i++){
    if(a[i+1][0]!=a[i][a[i].size()-1]){
      flag=1;
      break;
    }
  }
  if(flag==1) cout << "No" << endl;
  else cout << "Yes" << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'n' was not declared in this scope
    9 |   vector<string> a(n);
      |                    ^
Language: C

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

int n;
string a[200];
unordered_set <string> s;
int32_t main() {
	cin >> n;
	for(int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	s.insert(a[0]);
	for(int i = 1; i < n; ++i) {
		int b = s.size();
		if (a[i][0] != a[i-1][a[i-1].length()-1]) {
			cout << "No";
			return 0;
		}
		s.insert(a[i]);
		if (b == s.size()) {
			cout << "No";
			return 0;
		}
	}
	cout << "Yes";
}

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



import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Scanner;
import java.util.TreeSet;

import com.sun.tools.classfile.Opcode.Set;

public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		int N;
		String lastChar = "";
		N = scan.nextInt();
		java.util.Set<String> set = new LinkedHashSet<>();

		for (int i = 1; i <= N; i++) {
			set.add(scan.next());
		}

		if (N != set.size()) {
			System.out.println("No");
			return;

		}

		for (String item : set) {
			if (!lastChar.equals("")) {
				String firstChar = String.valueOf(item.charAt(0));

				if (!firstChar.equals(lastChar)) {
					System.out.println("No");
					return;
				}
			}

			lastChar = String.valueOf(item.charAt(item.length() - 1));
		}

		System.out.println("Yes");

	}

	//***********************以下共通関数************************************************
	/**
	 * 文字列を反転して返す
	 * @param pStr 文字列
	 * @return 反転した文字列
	 */
	public static String myReverse(String pStr) {
		if (pStr.length() < 1) {
			return "";
		}

		StringBuffer sb = new StringBuffer(pStr);
		return sb.reverse().toString();
	}

	/**
	 * 余りを求める。
	 * @param a
	 * @param b
	 * @return 余り。余りがマイナスの時はプラスで返す。
	 */
	public static long myMod(long a, long b) {
		long ret = 0;

		ret = a % b;

		if (ret < 0) {
			ret += b;
		}

		return ret;
	}

	/**
	 * 乗数を求める ※mod対応
	 * @param kisu 基数
	 * @param josu 乗数
	 * @param primeNumMod_0 法 mod値 使わない場合は「0」
	 * @return
	 */
	public static long myPowWithMod(long kisu, long josu, long primeNumMod_0) {

		long ans = 1;

		//乗数が0の場合→1
		if (josu == 0)
			return 1;

		if (primeNumMod_0 == 0) {
			//modを使わないとき

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= kisu;
					josu = josu / 2;
				} else {
					//累乗が奇数の時
					ans *= kisu;
					josu--;
				}
			}

			return ans;

		} else {
			//modを使うとき

			//初めに桁を落とす
			kisu = myMod(kisu, primeNumMod_0);

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= myMod(kisu, primeNumMod_0);
					josu = josu / 2;

				} else {
					//累乗が奇数の時
					ans *= myMod(kisu, primeNumMod_0);
					josu--;

				}
			}

			return myMod(ans, primeNumMod_0);

		}

	}

}


Compiler output:
Main.java:11: error: package com.sun.tools.classfile is not visible
import com.sun.tools.classfile.Opcode.Set;
                    ^
  (package com.sun.tools.classfile is declared in module jdk.jdeps, which is not in the module graph)
1 error
Language: C++

n = int(input())
w = []
for i in range(n):
    w.append(input())
ok = True
for i in range(n-1):
    sz = len(w[i])
    if w[i][sz-1] != w[i+1][0]: ok = False
for i in range(n):
    for j in range(n):
        if i != j and w[i] == w[j]:
            ok = False
if ok: print('Yes')
else: print('No')

Compiler output:
a.cc:13:14: warning: multi-character character constant [-Wmultichar]
   13 | if ok: print('Yes')
      |              ^~~~~
a.cc:14:13: warning: multi-character character constant [-Wmultichar]
   14 | else: print('No')
      |             ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
#include <set>
#include <numeric>
#define rep(i,n) for (int i=0; i < (n); ++i)
#define all(a) a.begin(), a.end()
using ll = long long;
using namespace std;
 
// ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }


// const double PI = acos(-1);
// int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
// int a[12][12];
//平方根　= sqrt

string w[110];

int solve() {
  int n;
  cin >> n;

  for (int i=i; i< n; ++i) {
    cin >> w[i];
  }
//bool値をだして、w[i]の中の末尾と頭を比較
  bool ans =true;
  for (int i=0; i< n-1;++i) {
    if (w[i][w[i].length()-1] == w[i+1][0]){
      ans = false;
    }
  }

  for (int i=0;i<n;i++) {
    for (int j=0;j<n;j++) {
      if(w[i] == w[j]) {
        ans = false;
      }
    }
  }

  if (ans) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  return ;
}


int main(){
  solve();
  return 0;
}


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

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

int main(){
  int N;
  string W1;
  cin>>N>>W1;
  urordered_set<string> A;
  A.insert(W1);
  char c=W1[W1.size()-1];
  for(int i=1;i<N;i++){
    string W;
    cin>>W;
    if(W[0]!=c || A.count(W)){
      cout<<"No"<<endl;
      return 0;
    }
    c=W[W.size()-1];
  }
  cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'urordered_set' was not declared in this scope
    8 |   urordered_set<string> A;
      |   ^~~~~~~~~~~~~
a.cc:8:23: error: expected primary-expression before '>' token
    8 |   urordered_set<string> A;
      |                       ^
a.cc:8:25: error: 'A' was not declared in this scope
    8 |   urordered_set<string> A;
      |                         ^
Language: C++

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

int main(){
  int n;
  cin>>n;
  bool ad=false;
  vector<string>w(n);
  for(int i=0;i<n;i++){
    cin>>w[i];
  }
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      if(w[i]==s[j]){
        ad=true;
        break;
      }
    }
    if(ad) break;
  }
  for(int i=0;i<n;i++){
    if(w[i].back()!=w[i+1].front()){
      ad=true;
      break;
    }
  }
  if(ad) cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
}
  
        
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 's' was not declared in this scope
   14 |       if(w[i]==s[j]){
      |                ^
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] W = new String[N];

		boolean isValid = true;
		String result = "Yes";

		for(int i = 0; i < N; i++) {
			W[i] = sc.next();
		}

		for(int i = 0; i < N-1; i++) {
			if(W[i].charAt(W[i].length() -1) != W[i+1].charAt(0)) {
				isValid = false;
				result = "No";
				break;
			}
			for(int j = i+1; j < N; j++) {
				if(W[i].equals(W[j])) {
					isValid = false;
					result = "No";
					break;
				}
			}
			if(!isValid) {
				break;
			}
		}

		System.out.prinln(result);
	}
}


Compiler output:
Main.java:33: error: cannot find symbol
		System.out.prinln(result);
		          ^
  symbol:   method prinln(String)
  location: variable out of type PrintStream
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX
typedef pair<long long, long long> P;
int main(){
    long long n;
    cin>>n;
    vector<string> w(n);
    rep(i,n){
        cin>>w[i];
    }
    set<string> p;
    p.insert(w[0]);
    char g=w[0][w[0].size-1];
    rep11(i,n){
        if(g!=w[i][0]){
            cout<<"No"<<endl;
            return 0;
        }
        g=w[i][w[i].size-1];
        if(p.find(w[i])!=p.end()){
            cout<<"No"<<endl;
            return 0;
        }
        p.insert(w[i]);
    }
    cout<<"Yes"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   28 |     char g=w[0][w[0].size-1];
      |                          ()
a.cc:34:21: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   34 |         g=w[i][w[i].size-1];
      |                         ()
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;
        }
      }
    }
    return 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()){
    cout<<"Yes";
  }
  else{
    cout<<"No";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:11: error: too few arguments to function 'bool solve(const std::vector<std::__cxx11::basic_string<char> >&)'
   32 |   if(solve()){
      |      ~~~~~^~
a.cc:5:6: note: declared here
    5 | bool solve(const vector<string>&W){
      |      ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  char s[n][200];
  for(int i=0;i<n;i++){
    cin >> s[i];
  }
  for(int i=1;i<n;i++){
    if(s[i][0]!=s[i-1][strlen(s[i]-1]){
      cout << "No";
      return 0;
    }
    for(int j=0;j<i;j++){
      if(strcmp(s[i],s[j])==0){
        cout << "No";
        return 0;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:37: error: expected ')' before ']' token
   11 |     if(s[i][0]!=s[i-1][strlen(s[i]-1]){
      |                              ~      ^
      |                                     )
Language: C++

# include <iostream>
# include <vector>
using namespace std;
bool solve (const vector <string> & W) {
const int n = W .size ();
// condition 1
for (int i = 0; i <n -1; ++ i) {
if (W [i]. back ()! = W [i +1]. front ()) {
return false;
}
}
// condition 2
for (int i = 0; i <n; ++ i) {
for (int j = i +1; j <n; ++ j) {
if (W [i] == W [j]) {
return false;
}
}
}
return true;
}
vector <string> input () {
int n; cin >> n;
vector <string> W (n);
for (int i = 0; i <n; ++ i) {
cin >> W [i];
}
return W;
}
3
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:8:19: error: expected ')' before '!' token
    8 | if (W [i]. back ()! = W [i +1]. front ()) {
      |    ~              ^
      |                   )
a.cc: At global scope:
a.cc:30:1: error: expected unqualified-id before numeric constant
   30 | 3
      | ^
Language: Java

import java.util.Scanner;

public class Main109_c {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		//n
		String temp = scanner.nextLine();
		int n = Integer.parseInt(temp);
		//しりとり
		int flag = 0;
		String[] list = new String[n];
		for(int i = 0; i < n; i++) {
			list[i] = scanner.nextLine();
			if(i != 0) {
				if(list[i].charAt(0) != list[i - 1].charAt(list[i - 1].length() - 1)) {
					flag++;
					break;
				}
			}
			for(int j = 0; j < i; j++) {
				if(list[i].equals(list[j])) {
				flag++;
				break;
				}
			}
		}
		if(flag != 0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}






	}

}


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

#include "/bits/stdc++.h"


using namespace std;



string w[110];

int main(){
    int N;
    cin>>N;
    for(int i=0;i<N-1;i++){
        cin >>w[i];
    }
    bool ans=true;

    for(int i=0;i<N-1;i++){
        if(w[i][w[i].length()-1]==w[i+1][0]){
            ans=false;
        }
    }

    for(int i=0;i<N-1;i++){
        for(int j=0;j<i;j++){
            if(w[i]==w[j]){
                ans=false;
            }
        }
    }


    if(ans){
        cout << "Yes" << end;
    }else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc:1:10: 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;



string w[110];

int main(){
    int N;
    cin>>N;
    for(int i=0;i<N-1;i++){
        cin >>w[i];
    }
    bool ans=true;

    for(int i=0;i<N-1;i++){
        if(w[i][w[i].length()-1]==w[i+1][0]){
            ans=false;
        }
    }

    for(int i=0;i<N-1;i++){
        for(int j=0;j<i;j++){
            if(w[i]==w[j]){
                ans=false;
            }
        }
    }


    if(ans){
        cout << "Yes" << end;
    }else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc:1:10: 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;
using ll = long long;
using vi = vector<ll>;
using vii = vector<vi>;
using Pll = pair<ll, ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
const int MOD = 1000000007;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
  ll n;
  cin >> n;
  bool ans = true;
  vector<string> w(n);
  rep(i,n){
    cin >> w[i];
  }
  fot(ll i= 1; i < n;i++){
    ll l = sz(w[i - 1]);
    if (w[i].at(0) != w[i - 1].at(l - 1))){
      ans = false;
    }
  }
  sort(all(w));
  rep(i,n){
    if(w[i]==w[i-1]){
      ans = false;
    }
  }
  if(ans){
    print("Yes");
  }
  else{
    print("No");
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: expected primary-expression before 'i'
   28 |   fot(ll i= 1; i < n;i++){
      |          ^
a.cc:28:16: error: 'i' was not declared in this scope
   28 |   fot(ll i= 1; i < n;i++){
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<ll>;
using vii = vector<vi>;
using Pll = pair<ll, ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
const int MOD = 1000000007;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
  ll n;
  cin >> n;
  bool ans = true;
  vector<string> w(n);
  rep(i,n){
    cin >> w[i];
  }
  fot(ll i = 1; i < n;i++){
    if (w[i][0] != w[i - 1][sz(w[i - 1]) - 1]){
      ans = false;
    }
  }
  sort(all(w));
  rep(i,n){
    if(w[i]==w[i-1]){
      ans = false;
    }
  }
  if(ans){
    print("Yes");
  }
  else{
    print("No");
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: expected primary-expression before 'i'
   28 |   fot(ll i = 1; i < n;i++){
      |          ^
a.cc:28:17: error: 'i' was not declared in this scope
   28 |   fot(ll i = 1; i < n;i++){
      |                 ^
Language: C++


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

int main() {
	int N; cin >> N;
	vector<string> a(N);
	set<string> S;
	for(int i = 0; i < N; i++) {
		cin >> a[i];
		S.insert(a[i]);
	}

	if(S.size() != N) {
			cout << "No"<<endl;
			return 0;
	}

	for(int i = 1; i < n; i++) {
		int end = a[i-1].length() - 1;
		if(a[i-1][end] != a[i][0]) {
			cout << "No"<<endl;
			return 0;
		}
	}
	cout << "Yes"<<endl;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<string>a(N);
  set<string>S;
 
  for(int i=0;i<N;i++){
   cin>>a[i];
    S.insert(a[i]);
  }
  if(S.size()!=N){
  cout<<"No"<<endl;
    return 0;
  }
  for(int i =0;i<n;i++) {
		int end = a[i].length() - 1;
		if(a[i][end] != a[i][0]) {
			cout << "No"<<endl;
			return 0;
		}
  }
  cout<<"Yes"<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'n' was not declared in this scope
   17 |   for(int i =0;i<n;i++) {
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<string>W(N);
  for(int i=0;i<N;i++)
    cin>>W.at(i);
  set<string>S;
  S.insert(W.at(0));
  bool ans=true;
  for(int i=1;i<N;i++){
  if(S.count(W.at(i))){
  ans=false; break;
  }else{
  if(W.at(i).at(0)!=W.at(i-1).at(W.at(i-1).size()-1){
  ans=false; break;
  }else S.insert(W.at(i));
  }
    } if(ans)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:53: error: expected ';' before '{' token
   16 |   if(W.at(i).at(0)!=W.at(i-1).at(W.at(i-1).size()-1){
      |                                                     ^
      |                                                     ;
a.cc:18:4: error: expected primary-expression before 'else'
   18 |   }else S.insert(W.at(i));
      |    ^~~~
a.cc:18:4: error: expected ')' before 'else'
   18 |   }else S.insert(W.at(i));
      |    ^~~~
      |    )
a.cc:16:5: note: to match this '('
   16 |   if(W.at(i).at(0)!=W.at(i-1).at(W.at(i-1).size()-1){
      |     ^
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
typedef int64_t Int;

using namespace std;
using Graph = vector<vector<Int>>;

const double pi = M_PI;
const Int MOD = 1000000007;

int main() {
    int n;
    cin >> n;
    string a, b;
    set<string> se;
    bool ans = true;
    cin >> a;
    for (int i = 1; i < n; i++) {
        cin >> b;
        if (!se.insert(w).second) {
            ans = false;
        }
        if (a[a.size() - 1] != b[b.size() - 1]) {
            ans = false;
        }

        a = b;
    }

    if (ans) {
        cout << "Yes\n";
    } else {
        cout << "No\n";
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'w' was not declared in this scope
   21 |         if (!se.insert(w).second) {
      |                        ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  int l,i=0,j,moji;
  scanf("%d",&l);
  char str[l][10],tango[l];
  scanf("%s",str[l]);
  tango[i]=str[i];
  
  for(i=1;i<l;i++){
    scanf("%s",str[i]);
    tango[i]=str[i];
    for(j=0;j<i;j++){
      if(strcmp(str[i],tango[j])==0){
        printf("No");
        return 0;
      }
    }
    moji=str[i-1][strlen(str[i])];
    if(moji!=str[i][0]){
      printf("No");
      return 0;
    }
  }
  printf("Yes");
  reuturn 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:11: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    8 |   tango[i]=str[i];
      |           ^
main.c:12:13: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   12 |     tango[i]=str[i];
      |             ^
main.c:14:29: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   14 |       if(strcmp(str[i],tango[j])==0){
      |                        ~~~~~^~~
      |                             |
      |                             char
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:26:3: error: 'reuturn' undeclared (first use in this function)
   26 |   reuturn 0;
      |   ^~~~~~~
main.c:26:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:10: error: expected ';' before numeric constant
   26 |   reuturn 0;
      |          ^~
      |          ;
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
string w[110];
int main() {
  int n; cin >> n;
  rep(i, n) cin >> w[i];
  
  bool ok = true;
  set<string> s;
  for (int i = 1; i < n; i++) {
	if (i % 2 == 0) {
 	  if (w[i][0] != w[i-1][w[i-1].size()-1]) ok = false;
      if (s.find(w[i]) != s.end()) ok = false;
    }
    s.insert(w[i])
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before '}' token
   16 |     s.insert(w[i])
      |                   ^
      |                   ;
   17 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
string w[110]
int main() {
  int n; cin >> n;
  rep(i, n) cin >> w[i];
  
  bool ok = true;
  set<string> s;
  for (int i = 1; i < n; i++) {
	if (i % 2 == 0) {
 	  if (w[i][0] != w[i-1][w[i-1].size()-1]) ok = false;
      if (s.find(w[i]) != s.end()) ok = false;
    }
    s.insert(w[i])
  }
}

Compiler output:
a.cc:5:1: error: expected initializer before 'int'
    5 | int main() {
      | ^~~
Language: C++

# include <iostream>
# include <vector>


using namespace std ;



int main () {
    int n;
    string s[110];
    cin>>n;
    bool ans=false;
    for (int i=0;i<n;i++){
        cin>>s[i];
    }
    for (int j=0;j<n-1;j++){
        if (s[j][s[j].length()-1]==s[j+1][0]){
            ans=true;
        }else{
          ans=false;
          break
        }
    }
    for (int i=0 ; i<n-1;i++){
        for (int j=i+1 ; j<n;j++){
            if (s[i]==s[j]) ans=false;
        }
    }
    if (ans) {
        cout<<"Yes"<<endl;
    }else{
      	cout<<"No"<<endl;
    }
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before '}' token
   22 |           break
      |                ^
      |                ;
   23 |         }
      |         ~
Language: C++

# include <iostream>
# include <vector>


using namespace std ;



int main () {
    int n;
    string s[110];
    cin>>n;
    bool ans=false;
    for (int i=0;i<n;i++){
        cin>>s[i];
    }
    for (int j=0;j<n-1;j++){
        if (s[j][s[j].length()-1]==s[j+1][0]){
            ans=true;
        }else{
          ans=false;
          break
        }
    }
    for (int i=0 ; i<n-1;i++){
        for (int j=i+1 ; j<n;j++){
            if (s[i]==s[j]) ans=false;
        }
    }
    if (ans) {
        cout<<"Yes"<<endl;
    }else cout<<"No"<<endl;

    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before '}' token
   22 |           break
      |                ^
      |                ;
   23 |         }
      |         ~
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<string> w(n);
  for(int i=0;i<n;i++){
    cin >> w.at(i);
    if(i-1>=0){
      if(w.at(i-1).back()!=w.at(i).front()){
        count++;
        break;
      }
    }
  }
  sort(w.begin(),w.end());
  for(int i=0;i<n-1;i++){
    if(w.at(i)==w.at(i+1)){
      count++;
      break;
    }
  }
  if(count==0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no post-increment operator for type
   12 |         count++;
      |              ^~
a.cc:20:12: error: no post-increment operator for type
   20 |       count++;
      |            ^~
a.cc:24:11: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   24 |   if(count==0){
      |      ~~~~~^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
#include <map>
using namespace std;
typedef long long int ll;

#define MOD 998244353


ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}

bool primeNumber(ll n){
    if(n < 2) return false;
    else{
        for(ll i = 2; i * i <= n; i++){
            if(n % i == 0) return false;
        }
        return true;
    }
}
  
  

int main(){
    ll n;
    cin>>n;
    vector<string> w(n);
    for(ll i = 0; i<n; i++){
        cin>>w[i];
    }
    bool ans = true;
    for(ll i = 0; i<n-1; i++){
        if(w[i][w[i].length()-1] != w[i+1][0])ans = false;
    }
    for(ll i = 0; i<n; i++){
        for(ll j = 0; j<i; j++){
            if(w[i]==w[j])ans = false;
        }
    }
    if(ans)puts("Yes");
    else puts("No")
    return 0;
}

    
    



Compiler output:
a.cc: In function 'int main()':
a.cc:54:20: error: expected ';' before 'return'
   54 |     else puts("No")
      |                    ^
      |                    ;
   55 |     return 0;
      |     ~~~~~~
Language: C++

require 'set'
n=gets.to_i
os = "&&&"
f = 0
set1 = Set.new
n.times do |i|
    s = gets.chomp
    if i > 0 && os[os.size-1] != s[0]
        f = 1;
    end
    if set1.add?(s) == nil
        f = 1;
    end
    os = s
end

puts (f == 1) ? "No" : "Yes"



Compiler output:
a.cc:1:9: warning: multi-character character constant [-Wmultichar]
    1 | require 'set'
      |         ^~~~~
a.cc:1:1: error: 'require' does not name a type
    1 | require 'set'
      | ^~~~~~~
a.cc:10:5: error: 'end' does not name a type
   10 |     end
      |     ^~~
a.cc:13:5: error: 'end' does not name a type
   13 |     end
      |     ^~~
Language: C++

# include < iostream >
using namespace std ;
int main () {
int A , B ; cin >> A >> B ;
if ( A * B * 1 % 2 == 1 || A * B * 2 % 2 == 1 || A * B * 3 % 2 == 1) {
cout << " Yes " << endl ;
}
1
else {
cout << "No" << endl ;
}
}

Compiler output:
a.cc:1:11: fatal error:  iostream : No such file or directory
    1 | # include < iostream >
      |           ^~~~~~~~~~~~
compilation terminated.