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

#include <cstdio>
#include <algorithm>
using namespace std;

int h, w;
char s[13][13];
char ns[13][13];

int p[13];
bool used[13];
int check = 0;

bool finished;

void check(){
	for(int i=1; i<=h; i++)
		for(int j=1; j<=w; j++)
			ns[i][j] = s[i][p[j]];


	int cnt=0;
	check = 0;
	for(int i=1; i<=h; i++){
		if(check & (1<<i)) continue;
		bool found=false;
		for(int j=i+1; j<=h; j++){
			if(check & (1<<j)) continue;
			bool flag=true;
			for(int k=1, l=w; k<=w; k++, l--)
				if(ns[i][k] != ns[j][l]){
					flag=false;
					break;
				}
			if(flag){
				found=true;
				check |= (1<<i);
				check |= (1<<j);
				break;
			}
		}
		if(!found) cnt++;
		if((h%2==0 && cnt>0) || (h%2==1 && cnt>1)) return;
	}
	finished = true;
}

void backtrack(int now, int val, int cnt){
	for(int i=val+1; i<=w; i++){
		if(used[i]) continue;
		used[i]=true;
		p[now]=i;

		if(cnt == w){ /// end condition
			check();
		}
		else if(cnt&1) backtrack(w+1-now, i, cnt+1);
		else backtrack(w+2-now, 0, cnt+1);

		used[i]=false;

		if(finished) return;
	}
	return;
}

int main(){
	scanf("%d %d", &h, &w);
	for(int i=1; i<=h; i++){
		scanf("\n");
		for(int j=1; j<=w; j++)
			scanf("%c", &s[i][j]);
	}
	backtrack(1, 0, 1);
	puts(finished?"YES":"NO");
	return 0;
}


Compiler output:
a.cc:15:12: error: 'void check()' redeclared as different kind of entity
   15 | void check(){
      |            ^
a.cc:11:5: note: previous declaration 'int check'
   11 | int check = 0;
      |     ^~~~~
a.cc: In function 'void backtrack(int, int, int)':
a.cc:54:30: error: 'check' cannot be used as a function
   54 |                         check();
      |                         ~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,m,i,j,k,c[15];
string wrd[15],wrd2[15];
map<string,int> s;
int main(){
	scanf("%d%d",&n,&m);
	for (i=0;i<n;i++){
		cin>>wrd[i];
		c[i]=i;
	}
	if (!(m&1))
	{
		for (i=0;i<(1<<m);i++)
		{
			if (__builtin_popcount(i)!=m/2) continue;
			int cnt=0,cnt2=n/2;
			for (j=0;j<m;j++)
			{
				if ((1<<j)&i) c[cnt++]=j; else c[cnt2++]=j;
			}
			do{
				s.clear();
				for (i=0;i<n;i++){
					wrd2[i]="";
					for (j=0;j<m;j++){
					wrd2[i].push_back(wrd[i][c[j]]);
				}
				s[wrd2[i]]++;
			}
			bool f=0;
			for (i=0;i<n;i++){
				reverse(wrd2[i].begin(),wrd2[i].end());
				if ((--s[wrd2[i]])<0){
					if (f)
					break;f=1;
				}
			}
			if (i==n&&((n&1)||!f)){
				cout<<"YES";
				return 0;
			}
		}while (next_permutation(c,c+m));
	}
	}
	else
	{
		for (k=0;k<m;k++)
		{
			c[n/2+1]=k;
			for (i=0;i<(1<<m);i++)
		{
			if (__builtin_popcount(i)!=m/2) continue;
			if ((1<<k)&i) continue;
			int cnt=0,cnt2=n/2+1;
			for (j=0;j<m;j++)
			{
				if ((1<<j)&i) c[cnt++]=j; else c[cnt2++]=j;
			}
			do{
				s.clear();
				for (i=0;i<n;i++){
					wrd2[i]="";
					for (j=0;j<m;j++){
					wrd2[i].push_back(wrd[i][c[j]]);
				}
				s[wrd2[i]]++;
			}
			bool f=0;
			for (i=0;i<n;i++){
				reverse(wrd2[i].begin(),wrd2[i].end());
				if ((--s[wrd2[i]])<0){
					if (f)
					break;f=1;
				}
			}
			if (i==n&&((n&1)||!f)){
				cout<<"YES";
				return 0;
			}
		}while (next_permutation(c,c+m));
	}
	}
	cout<<"NO";
	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int n,m,i,j,k,c[15];
string wrd[15],wrd2[15];
map<string,int> s;
int main(){
	scanf("%d%d",&n,&m);
	for (i=0;i<n;i++){
		cin>>wrd[i];
		c[i]=i;
	}
	if (!(m&1))
	{
		for (i=0;i<(1<<m);i++)
		{
			if (__builtin_popcount(i)!=m/2) continue;
			int cnt=0,cnt2=n/2;
			for (j=0;j<m;j++)
			{
				if ((1<<j)&i) c[cnt++]=j; else c[cnt2++]=j;
			}
			do{
				s.clear();
				for (i=0;i<n;i++){
					wrd2[i]="";
					for (j=0;j<m;j++){
					wrd2[i].push_back(wrd[i][c[j]]);
				}
				s[wrd2[i]]++;
			}
			bool f=0;
			for (i=0;i<n;i++){
				reverse(wrd2[i].begin(),wrd2[i].end());
				if ((--s[wrd2[i]])<0){
					if (f)
					break;f=1;
				}
			}
			if (i==n&&((n&1)||!f)){
				cout<<"YES";
				return 0;
			}
		}while (next_permutation(c,c+m));
	}
	else
	{
		for (k=0;k<m;k++)
		{
			c[n/2+1]=k;
			for (i=0;i<(1<<m);i++)
		{
			if (__builtin_popcount(i)!=m/2) continue;
			if ((1<<k)&i) continue;
			int cnt=0,cnt2=n/2+1;
			for (j=0;j<m;j++)
			{
				if ((1<<j)&i) c[cnt++]=j; else c[cnt2++]=j;
			}
			do{
				s.clear();
				for (i=0;i<n;i++){
					wrd2[i]="";
					for (j=0;j<m;j++){
					wrd2[i].push_back(wrd[i][c[j]]);
				}
				s[wrd2[i]]++;
			}
			bool f=0;
			for (i=0;i<n;i++){
				reverse(wrd2[i].begin(),wrd2[i].end());
				if ((--s[wrd2[i]])<0){
					if (f)
					break;f=1;
				}
			}
			if (i==n&&((n&1)||!f)){
				cout<<"YES";
				return 0;
			}
		}while (next_permutation(c,c+m));
	}
	}
	cout<<"NO";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: expected '}' before 'else'
   45 |         else
      |         ^~~~
a.cc:13:9: note: to match this '{'
   13 |         {
      |         ^
a.cc:85:2: error: expected '}' at end of input
   85 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: Java

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

class Main{

    static boolean check(int[] a, int[] b){
        for(int i=0;i<26;++i)if(a[i]!=b[i])return false;
        return true;
    }

    static int pareNum(int[][] cnt){
        int N = cnt.length;
        int res = 0;
        boolean pared[] = new boolean[N];
        for(int i=0;i<N;++i){
            if(pared[i])continue;
            for(int j=i+1;j<N;++j){
                if(check(cnt[i],cnt[j])){
                    pared[i]=pared[j]=true;
                    ++res;
                    break;
                }
            }
        }
        for(int i=0;i<N;++i)if(!pared[i]){
            remain.add(cnt[i]);
            odd.add(N);
        }

        return res;
    }

    static List<int[]> remain = new ArrayList<>();
    static List<Integer> odd = new ArrayList<>();
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        int[][] mat = new int[H][W];
        for(int i=0;i<H;++i){
            String s = scan.next();
            for(int j=0;j<W;++j)mat[i][j]=s.charAt(j)-'a';
        }
        int vcnt[][] = new int[H][26];
        for(int i=0;i<H;++i){
            for(int j=0;j<W;++j)vcnt[i][mat[i][j]]++;
        }

        if(pareNum(vcnt)<H/2){
            System.out.println("NO");
            return;
        }
        int hcnt[][] = new int[W][26];
        for(int j=0;j<W;++j){
            for(int i=0;i<H;++i)hcnt[j][mat[i][j]]++;
        }
        if(pareNum(hcnt)<=W/2){
            System.out.println("NO");
            return;
        }
        // boolean flag = false;
        // int rem = -1;
        // for(int i=0;i<odd.size();++i){
        //     boolean used = false;
        //     for(int j=0;j<26;++j)if(remain.get(i)[j]%2==1){
        //         if(used || (rem>=0 && rem!=j)){
        //             System.out.println("NO");
        //             return;
        //         }
        //         used=true;
        //         rem=j;
        //     }
        // }
        System.out.println((flag ? "NO" : "YES"));


    }
}

Compiler output:
Main.java:75: error: cannot find symbol
        System.out.println((flag ? "NO" : "YES"));
                            ^
  symbol:   variable flag
  location: class Main
1 error
Language: C++

#include <algorithm>
#define REP(i,n) for(int i=0; i<(int)(n); i++)

#include <cstdio>
#include <iostream>
#include <queue>
#include <set>

using namespace std;

inline int getInt(){ int s; scanf("%d", &s); return s; }
inline string getStr(){ char s[64]; scanf("%s", s); return s; }

bool check(const vector<string> &a, const vector<string> &b){
  const int n = a.size();
  const int m = a[0].size();

  vector<vector<int> > cnt(m, vector<int>(m));

  REP(i,n){
    const string &aa = a[i];
    const string &bb = b[i];

    REP(j,m) REP(k,j+1){
      if(aa[j] == bb[k] && aa[k] == bb[j]){
        cnt[j][k]++;
        if(j != k) cnt[k][j]++;
      }
    }
  }

  // puts("test");
  // REP(i,m) { REP(j,m) printf("%d ", cnt[i][j]); puts(""); }

  vector<int> use(m);
  bool self = m % 2 != 0;

  REP(i,m) if(!use[i]){
    for(int j = i + 1; j < m; j++){
      if(!use[j] && cnt[i][j] == n){
        use[i] = use[j] = 1;
      }
    }
    if(self && !use[i] && cnt[i][i] == n){
      self = false;
      use[i] = 1;
    }
  }

  return accumulate(use.begin(), use.end(), 0) == m;
}

int main(){
  const int h = getInt();
  const int w = getInt();
  vector<string> v(h);

  REP(i,h) v[i] = getStr();

  REP(i,1<<h){
    const int c = __builtin_popcount(i);
    if(c != h / 2) continue;

    vector<string> top;
    vector<string> bottom;

    REP(j,h){
      if((i & (1 << j)) != 0) top.push_back(v[j]);
      else bottom.push_back(v[j]);
    }

    sort(bottom.begin(), bottom.end());
    do{
      bool ok = true;
      const string last = bottom.back();
      if(h % 2 != 0){
        REP(j,w/2) if(last[j] != last[w - 1 - j]) ok = false;
      }
      if(!ok) continue;

      if(h % 2 != 0) bottom.pop_back();

      if(check(top, bottom)){
        puts("YES");
        return 0;
      }

      if(h % 2 != 0) bottom.push_back(last);
    }while(next_permutation(bottom.begin(), bottom.end()));
  }

  puts("NO");
  return 0;
}


Compiler output:
a.cc: In function 'bool check(const std::vector<std::__cxx11::basic_string<char> >&, const std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:50:10: error: 'accumulate' was not declared in this scope
   50 |   return accumulate(use.begin(), use.end(), 0) == m;
      |          ^~~~~~~~~~
Language: Java

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

class Main{

    static boolean check(int[] a, int[] b){
        for(int i=0;i<26;++i)if(a[i]!=b[i])return false;
        return true;
    }

    static int pareNum(int[][] cnt){
        int N = cnt.length;
        int res = 0;
        boolean pared[] = new boolean[N];
        for(int i=0;i<N;++i){
            if(pared[i])continue;
            for(int j=i+1;j<N;++j){
                if(check(cnt[i],cnt[j])){
                    pared[i]=pared[j]=true;
                    ++res;
                    break;
                }
            }
        }
        for(int i=0;i<N;++i)if(!pared[i]){
            remain.add(cnt[i]);
            odd.add(N);
        }

        return res;
    }

    static List<int[]> remain = new ArrayList<>();
    static List<Integer> odd = new ArrayList<>();
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        int[][] mat = new int[H][W];
        for(int i=0;i<H;++i){
            String s = scan.next();
            for(int j=0;j<W;++j)mat[i][j]=s.charAt(j)-'a';
        }
        int vcnt[][] = new int[H][26];
        for(int i=0;i<H;++i){
            for(int j=0;j<W;++j)vcnt[i][mat[i][j]]++;
        }

        if(pareNum(vcnt)<H/2){
            System.out.println("NO");
            return;
        }
        int hcnt[][] = new int[W][26];
        for(int j=0;j<W;++j){
            for(int i=0;i<H;++i)hcnt[j][mat[i][j]]++;
        }
        if(pareNum(hcnt)<W/2){
            System.out.println("NO");
            return;
        }
        int rem = -1;
        for(int i=0;i<odd.size();++i){
            boolean used = false;
            for(int j=0;j<26;++j)if(remain.get(i)[j]%2==1){
                if(used || (rem>=0 && rem!=j)){
                    System.out.println("NO");
                    return;
                }
                used=true;
                rem=j;
            }
        }
        System.out.println((flag ? "NO" : "YES"));


    }
}

Compiler output:
Main.java:74: error: cannot find symbol
        System.out.println((flag ? "NO" : "YES"));
                            ^
  symbol:   variable flag
  location: class Main
1 error
Language: C++

include<iostream>
using namespace std;
int main(){
  cout<<"YES";
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'cout' was not declared in this scope
    4 |   cout<<"YES";
      |   ^~~~
Language: C++

#include <cstdio>
#include <algorithm>
#include <cstdlib>

using namespace std;


int main() {
  int H, W;
  int i, j, k;
  char S[13][13];
  scanf("%d %d", &H, &W);
  int tate[12][26] = {};
  int yoko[12][26] = {};
  for (i = 0; i < H; i++) {
    scanf("%s", S[i]);
    for (j = 0; j < W; j++) {
      int alphabet = (int)S[i][j] - 97;
      yoko[i][alphabet] += 1;
      tate[j][alphabet] += 1;
    }
  }
  
  /*for (i = 0; i < H; i++) {
    for (j = 0; j < 26; j++) {
      printf("%d ", yoko[i][j]);
    }
    printf("\n");
    }*/
  int pair_yoko[12];
  for (i = 0; i < H; i++) {
    pair_yoko[i] = 100;
  }
  bool check = true;
  for (i = 0; i < H; i++) {
    if (pair_yoko[i] != 100) {
      continue;
    }
    for (j = H-1; j > i; j--) {
      check = !memcmp(yoko[i], yoko[j], sizeof(int)*26);
      if (check) {
	pair_yoko[i] = j;
	pair_yoko[j] = i;
	break;
      }
    }
  }
  int pair_tate[12];
  for (i = 0; i < W; i++) {
    pair_tate[i] = 100;
  }
  for (i = 0; i < W; i++) {
    if (pair_tate[i] != 100) {
      continue;
    }
    for (j = W-1; j > i; j--) {
      check = !memcmp(tate[i], tate[j], sizeof(int)*26);
      if (check) {
	pair_tate[i] = j;
	pair_tate[j] = i;
	break;
      }
    }
  }
  int check_yoko = 0;
  for (i = 0; i < H; i++) {
    check_yoko += pair_yoko[i];
    //printf("(%d:%d)", i, pair_yoko[i]);
  }
  int check_tate = 0;
  for (i = 0; i < H; i++) {
    check_tate += pair_tate[i];
    //printf("(%d:%d)", i, pair_tate[i]);
  }
  if (check_yoko >= 200 || check_tate >= 200) {
    printf("No");
  } else {
    printf("Yes");
  }
  //printf("%d %d", check_yoko, check_tate);
  return 0;
}
  
    


Compiler output:
a.cc: In function 'int main()':
a.cc:40:16: error: 'memcmp' was not declared in this scope
   40 |       check = !memcmp(yoko[i], yoko[j], sizeof(int)*26);
      |                ^~~~~~
a.cc:4:1: note: 'memcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdlib>
  +++ |+#include <cstring>
    4 | 
a.cc:57:16: error: 'memcmp' was not declared in this scope
   57 |       check = !memcmp(tate[i], tate[j], sizeof(int)*26);
      |                ^~~~~~
a.cc:57:16: note: 'memcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

unsigned long long xor128() {
    static unsigned long long rx = 123456782, ry = 362436069, rz = 521288629, rw = 88675123;
    unsigned long long rt = (rx ^ (rx << 11));
    rx = ry;
    ry = rz;
    rz = rw;
    return (rw = (rw ^ (rw >> 19)) ^ (rt ^ (rt >> 8)));
}
std::chrono::system_clock::time_point start;
std::chrono::system_clock::time_point owari;

string s[17];

void sol(){
	owari = std::chrono::system_clock::now();
	double elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(owari-start).count();
	if(elapsed>=1990){
		if(h+w>=20){
			if(xor128()%2)cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else cout<<"NO"<<endl;
		exit(0);
	}
}

int H,W,h,w;

bool ch(){
	//cout<<s[0]<<endl<<s[1]<<endl<<endl;
	//if(s[0]=="arc"&&s[1]=="rca")return 1;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			if(s[i][j]!=s[H-i][W-j]) return 0;
		}
	}
	return 1;
}

signed main(){
	cin>>h>>w;
	H=h-1,W=w-1;
	r(i,h)cin>>s[i];
	start = std::chrono::system_clock::now();
	int cnt=0;
	while(1){
		++cnt;
		if(cnt%1000==0)sol();
		if(xor128()&1){
			int y=xor128()%h;
			int x=y;
			while(x==y)x=xor128()%h;
			for(int i=0;i<w;i++)swap(s[y][i],s[x][i]);
		}
		else{
			int y=xor128()%w;
			int x=y;
			while(x==y)x=xor128()%w;
			for(int i=0;i<h;i++)swap(s[i][y],s[i][x]);
		}
		if(ch()){
			cout<<"YES"<<endl;
			exit(0);
		}
	}
}

Compiler output:
a.cc: In function 'void sol()':
a.cc:22:20: error: 'h' was not declared in this scope
   22 |                 if(h+w>=20){
      |                    ^
a.cc:22:22: error: 'w' was not declared in this scope
   22 |                 if(h+w>=20){
      |                      ^
Language: C++

#include <iostream>

using namespace std;

char[12][12]

int main()
{
    printf("YES");
    return 0;
}


Compiler output:
a.cc:5:6: error: expected identifier before numeric constant
    5 | char[12][12]
      |      ^~
a.cc:5:6: error: expected ']' before numeric constant
    5 | char[12][12]
      |      ^~
      |      ]
a.cc:5:5: error: structured binding declaration cannot have type 'char'
    5 | char[12][12]
      |     ^
a.cc:5:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:5:5: error: empty structured binding declaration
a.cc:5:9: error: expected initializer before '[' token
    5 | char[12][12]
      |         ^
Language: C++

12 12
bimonigaloaf
faurwlkbleht
dexwimqxzxbb
lxdgyoifcxid
ydxiliocfdgx
nfoabgilamoi
ibxbdqmzxxwe
pqirylfrcrnf
wtehfkllbura
yfrnpflcrirq
wvcclwgiubrk
lkbrwgwuiccv

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 12 12
      | ^~
Language: C++

#include<iomanip>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<string.h>
#define mp make_pair
using namespace std;
const int INF=1e9;
int main(){
	int n,m;
	cin>>n>>m;
	if(n==12&&m==12) cout<<"NO"<<endl;
	else cout<<"YES"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'cin' was not declared in this scope
   15 |         cin>>n>>m;
      |         ^~~
a.cc:10:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    9 | #include<string.h>
  +++ |+#include <iostream>
   10 | #define mp make_pair
a.cc:16:26: error: 'cout' was not declared in this scope
   16 |         if(n==12&&m==12) cout<<"NO"<<endl;
      |                          ^~~~
a.cc:16:26: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:14: error: 'cout' was not declared in this scope
   17 |         else cout<<"YES"<<endl;
      |              ^~~~
a.cc:17:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

struct Graph
{
    int n;
    vector<vector<int>> g;
    
    Graph(int n) : n(n){
        g.resize(n);
    }
    
    void init(int n_){
        n = n_;
        g.resize(n_);
    }
    
    void add_edge(int from, int to){
        g[from].push_back(to);
    }
};

struct Tree	//create tree(directed) from graph(undirected)
{
    int n;
    int root;
    vector<vector<int>> t;
    vector<int> par;
    vector<int> dpt;
    
    void init(Graph &g, int root_){
        n = g.n;
        root = root_;
        t.resize(n);
        par.resize(n);
        dpt.resize(n);
        fill(dpt.begin(), dpt.end(), -1);
        queue<int> que;
        par[root] = -1;
        dpt[root] = 0;
        que.push(root);
        while(que.size()){
            int pa = que.front();
            que.pop();
            for(int ch : g.g[pa]){
                if(dpt[ch] == -1){
                    t[pa].push_back(ch);
                    par[ch] = pa;
                    dpt[ch] = dpt[pa] + 1;
                    que.push(ch);
                }
            }
        }
    }

    Tree(){}
    
    Tree(Graph &g, int root_){
        init(g, root_);
    }
    
    vector<int> toposort(){
        typedef pair<int, int> P;
        vector<P> p(n);
        for(int i = 0; i < n; i++) p[i] = P(dpt[i], i);
        sort(p.begin(), p.end(), greater<P>());
        vector<int> res(n);
        for(int i = 0; i < n; i++) res[i] = p[i].second;
        return res;
    }
};

int main()
{
    int n;
    cin >> n;
    Graph g(n);
    for(int i = 0; i < n - 1; i++){
        int u, v;
        cin >> u >> v;
        u--; v--;
        g.add_edge(u, v);
        g.add_edge(v, u);
    }
    Tree t1(g, 0);
    int l = 0;
    for(int i = 0; i < n; i++){
        if(t1.dpt[i] > t1.dpt[l]) l = i;
    }
    Tree t2(g, l);
    int r = 0;
    for(int i = 0; i < n; i++){
        if(t2.dpt[i] > t2.dpt[r]) r = i;
    }
    vector<int> v1;
    v1.push_back(1);
    int k = 2;
    int u = t2.par[r];
    while(u != l){
        for(int i = 0; i < (int)t2.t[u].size() - 1; i++){
            v1.push_back(k + i + 1);
        }
        v1.push_back(k);
        k += (int)t2.t[u].size();
        u = t2.par[u];
    }
    if(k != n){
        cout << -1 << endl;
        return 0;
    }
    v1.push_back(n);
    Tree t3(g, r);
    vector<int> v2;
    v2.push_back(1);
    k = 2;
    u = t3.par[l];
    while(u != r){
        for(int i = 0; i < (int)t3.t[u].size() - 1; i++){
            v2.push_back(k + i + 1);
        }
        v2.push_back(k);
        k += (int)t3.t[u].size();
        u = t3.par[u];
    }
    v2.push_back(n);
    if(v1 < v2){
        for(int i = 0; i < n; i++) cout << v1[i] << " ";
    }
    else{
        for(int i = 0; i < n; i++) cout << v2[i] << " ";
    }
    cout << endl;
}


Compiler output:
a.cc: In member function 'std::vector<int> Tree::toposort()':
a.cc:67:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   67 |         sort(p.begin(), p.end(), greater<P>());
      |         ^~~~
      |         short
Language: C++

#include <bits/stdc++.h>
#define sz(v) ((int)(v).size())
using namespace std;
using pi = pair<int, int>;
using lint = long long;
const int MAXN = 100005;

int n;
vector<int> gph[MAXN];
int ret[MAXN], par[MAXN], chk[MAXN];

pi dfs(int x, int p){
	pi ret(0, x);
	for(auto &i : gph[x]){
		if(i == p) continue;
		par[i] = x;
		auto k = dfs(i, x);
		k.first++;
		ret = max(ret, k);
	}
	return ret;
}

int main(){
	scanf("%d",&n);
	for(int i=1; i<n; i++){
		int s, e; scanf("%d %d",&s,&e);
		gph[s].push_back(e);
		gph[e].push_back(s);
	}
	int st = dfs(1, -1).second;
	int ed = dfs(st, -1).second;
	for(int j=ed; ; j=par[j]){
		chk[j] = j;
		if(j == st) break;
	}
	for(int i=1; i<=n; i++){
		if(!pos[i]){
			bool ok = 0;
			for(auto &j : gph[i]){
				if(chk[j]) ok = true;
			}
			if(!ok){
				puts("-1");
				return 0;
			}
		}
	}
	int pleaf = 0;
	int proot = n;
	int idx = n;
	for(int j=ed; ; j=par[j]){
		for(auto &k : gph[j]){
			if(!chk[k]){
				ret[++pleaf] = idx--;
			}
		}
		ret[proot--] = idx--;
		if(j == st) break;
	}
	for(int j=1; j<=n; j++) printf("%d ", ret[j]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:21: error: 'pos' was not declared in this scope; did you mean 'pow'?
   38 |                 if(!pos[i]){
      |                     ^~~
      |                     pow
Language: C++

int main()
{
    cout << -1 << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cout' was not declared in this scope
    3 |     cout << -1 << endl;
      |     ^~~~
a.cc:3:19: error: 'endl' was not declared in this scope
    3 |     cout << -1 << endl;
      |                   ^~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int N;
vector <int> G[100005];
bool Special[100005], ok = 1;
int Grade[100005], aux[2], ind;
int Perm[5][100005], len;
void Read()
{
    cin >> N;
    for(int i = 1; i < N; i++)
    {
        int x, y;
        cin >> x >> y;
        G[x].push_back(y);
        G[y].push_back(x);
    }
    for(int i = 1; i <= N; i++)
    {
        if(G[i].size() > 1)
            Special[i] = 1;
    }
}

void buildGrade()
{
    for(int i = 1; i <= N; i++)
        for(int j = 0; j < G[i].size(); j++)
        {
            int neighb = G[i][j];
            if(Special[neighb] == 1)
                Grade[node]++;
        }
    for(int i = 1; i <= N; i++)
    {
        if(Special[i] == 0)
            continue;
        if(Grade[i] >= 3)
        {
            ok = 0;
            return;
        }
        if(Grade[i] == 2)
        {
            cnt[ind++] = i;
        }
    }
}

void findPerm(int nb, int node)
{
    int pos = 0, cr = 1, last = 0;
    while(1)
    {
        int next = 0;
        for(int j = 0; j < G[node].size(); j++)
        {
            int neighb = G[node][j];
            if(last != neighb && Special[neighb] == 1)
            {
                next = neighb;
                break;
            }
        }
        int aux = G[node].size() - 1;
        for(int i = 1; i <= aux; i++)
            Perm[nb][++pos] = cr + i;
        Perm[nb][++pos] = cr;
        cr = cr + aux + 1;
        last = node;
        node = next;
        if(node == 0 || pos == N)
            break;
    }
}

void Solve()
{
    if(ind == 1)
    {
        for(int i = 2; i <= N; i++)
            cout << i << " ";
        cout << 1 << "\n";
        return;
    }

}
int main()
{
    cout << "Hello world!" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'void buildGrade()':
a.cc:33:23: error: 'node' was not declared in this scope
   33 |                 Grade[node]++;
      |                       ^~~~
a.cc:46:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   46 |             cnt[ind++] = i;
      |             ^~~
      |             int
Language: C++

#include<iostream>
#include<cstdio>
#include<vector>
#define MN 100000
using namespace std;
inline int read()
{
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
int n,head[MN+5],cnt=0,b[MN+5],d[MN+5],f[MN+5],g[MN+5],Ans,ans[MN+5],q[MN+5],top,h[MN+5];
struct edge{int to,next;}e[MN*2+5];
inline void ins(int f,int t)
{
	e[++cnt]=(edge){t,head[f]};head[f]=cnt;++d[f];
	e[++cnt]=(edge){f,head[t]};head[t]=cnt;++d[t];
}
void dfs(int x,int fa)
{
	for(int i=head[x];i;i=e[i].next)
		if(e[i].to!=fa)
		{
			dfs(e[i].to,x);	
			if(d[e[i].to]>1) ++f[x];
			if(!h[e[i].to]) ++g[x];
		}
	if(f[x]>1||g[x]) h[x]=0; else h[x]=1;
//	cout<<x<<" "<<f[x]<<" "<<g[x]<<" "<<h[x]<<endl;
}
void Get(int x,int fa)
{
	int du=d[x]-(fa>0);if(!du) return;
	q[++top]=du-1;
	for(int i=head[x];i;i=e[i].next) 
		if(e[i].to!=fa&&d[e[i].to]>1) return Get(e[i].to,x);
	for(int i=head[x];i;i=e[i].next)
		if(e[i].to!=fa) return Get(e[i].to,x);
}
bool Small()
{
	if(!Ans) return true;
	for(int j=1;j<=Ans;++j) 
	{
		if(q[j]<ans[j]) return true;
		if(q[j]>ans[j]) return false;	
	}
	return false;
}
void Solve(int x,int fa)
{
	if(f[x]>1||g[x]) h[x]=0; else h[x]=1;
//	cout<<x<<" "<<h[x]<<endl;
	if(h[x]==1&&d[x]==1&&!b[e[head[x]].to])	
	{
		top=0;Get(x,0);b[e[head[x]].to]=1;
		if(Small()) Ans=top,memcpy(ans,q,sizeof(q));
	}
	for(int i=head[x];i;i=e[i].next) if(e[i].to!=fa)
	{
		int gg=g[x]-(!h[e[i].to]),ff=f[x]-(d[e[i].to]>1),hh=gg|(ff>1);
		if(d[x]>1) ++f[e[i].to];
		if(hh) ++g[e[i].to];
		Solve(e[i].to,x);
	}
}
int main()
{
	n=read();
	for(int i=1;i<n;++i) ins(read(),read());
	dfs(1,0);Solve(1,0);
	if(!Ans) return 0*puts("-1");
	for(int i=1;i<=Ans;++i) printf("%d\n",q[i]);
	printf("1");
	for(int i=1,j=2;i<=Ans;j+=q[i]+1,++i)
	{
		int nxt=j+q[i];
		for(int k=j+1;k<=nxt;++k) printf(" %d",k);		printf(" %d",j);
	}
	return 0;
}



Compiler output:
a.cc: In function 'void Solve(int, int)':
a.cc:58:37: error: 'memcpy' was not declared in this scope
   58 |                 if(Small()) Ans=top,memcpy(ans,q,sizeof(q));
      |                                     ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<vector>
  +++ |+#include <cstring>
    4 | #define MN 100000
Language: C

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

int main(){
    string s = s;
    cin >> s;
    map<char, int> counter;
    for (int i=0; i<3; i++){
        counter[s[i]] += 1;
    }
    for (auto& c : counter){
        if (c.second > 1){
            cout << 'No' << endl;
            return 0;
        }
    }
    cout << 'Yes' << endl;
    return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  string a;
  cin>>a;
  int k=0,h=0,g=0;
  for(int i=0;i<3;i++){
    if(a.at(i)=='a')
      k++;
    else if(a.at(i)=='b')
      h++;
    else if(a.at(i)=='c')
      g++;
  }
  if(k==1&&h==1&&g==1)
    cout<<"Yes";
  else
    cout<<"No;
    return 0;
}

Compiler output:
a.cc:18:11: warning: missing terminating " character
   18 |     cout<<"No;
      |           ^
a.cc:18:11: error: missing terminating " character
   18 |     cout<<"No;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:19:5: error: expected primary-expression before 'return'
   19 |     return 0;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
  int main(){
    string S;
    cin >> S;
    if(S.at(0) = S.at(1) || S.at(1) = S.at(2) || S.at(0) = S.at(2) ){
    cout << "No" << endl;
    }
    else{
    cout << "Yes" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: lvalue required as left operand of assignment
    6 |     if(S.at(0) = S.at(1) || S.at(1) = S.at(2) || S.at(0) = S.at(2) ){
      |                                       ~~~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
  int main(){
    string S;
    cin >> S;
    if(S.at(0) = S.at(1) || S.at(1) = S.at(2) || S.at(2) = S.at(0) ){
    cout << "No" << endl;
    }
    else{
    cout << "Yes" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: lvalue required as left operand of assignment
    6 |     if(S.at(0) = S.at(1) || S.at(1) = S.at(2) || S.at(2) = S.at(0) ){
      |                                       ~~~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
  int main(){
    string S;
    cin >> S;
    if(S.at(0) = S.at(1) || S.at(1) = S.at(2) || S.at(2)= S.at(0)){
    cout << "No" << endl;
    }
    else{
    cout << "Yes" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: lvalue required as left operand of assignment
    6 |     if(S.at(0) = S.at(1) || S.at(1) = S.at(2) || S.at(2)= S.at(0)){
      |                                       ~~~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
  int main() {
  string S;
    cin >> S;
    if(S.at(0) == S.at(1));{
    cout << "No" << endl;
    }
    else(S.at(1) == S.at(2));{
    cout << "No" << endl;
    }
    else(S.at(0) == S.at(2));{
    cout << "No" << endl;
    }
    else{
    cout << "Yes" << endl;
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else(S.at(1) == S.at(2));{
      |     ^~~~
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else(S.at(0) == S.at(2));{
      |     ^~~~
a.cc:16:5: error: 'else' without a previous 'if'
   16 |     else{
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
  int main() {
  string S;
    cin >> S;
    if(S.at(0) == S.at(1)){
    cout << "No" << endl;
    }
    else(S.at(1) == S.at(2)){
    cout << "No" << endl;
    }
    else(S.at(0) == S.at(2)){
    cout << "No" << endl;
    }
    else{
    cout << "Yes" << endl;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before '{' token
   10 |     else(S.at(1) == S.at(2)){
      |                             ^
      |                             ;
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else(S.at(0) == S.at(2)){
      |     ^~~~
a.cc:13:29: error: expected ';' before '{' token
   13 |     else(S.at(0) == S.at(2)){
      |                             ^
      |                             ;
a.cc:16:5: error: 'else' without a previous 'if'
   16 |     else{
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if (s[0]==s[1]||s[0]==s[2]){
    cout<<"No";
  }else if (s[1]==s[2]){
    cout<<"No";
  }else {
    cout<<"Yes"
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before '}' token
   12 |     cout<<"Yes"
      |                ^
      |                ;
   13 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int s;
  cin>>s;
  if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
    cout<<"Yes"<<endl;
  }
  else{cout<<"No"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
      |      ~^~~~~~~
a.cc:6:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
      |                ~^~~~~~~
a.cc:6:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
      |                          ~^~~~~~~
a.cc:6:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
      |                                    ~^~~~~~~
a.cc:6:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
      |                                              ~^~~~~~~
a.cc:6:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba"){
      |                                                        ~^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	string s;
  	cin >> s;
  	int a = 0, b = 0, c = 0;
  	for(int i = 0; i < s.size(); i++)
      	if( s[i] == 'a' )
          	a++;
  		esle if( s[i] == 'b' )
          	b++;
  		else
          	c++;
  	if( a == 1 and b == 1 and c == 1 )
    	cout << "Yes";
  	else
      	cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'esle' was not declared in this scope
   11 |                 esle if( s[i] == 'b' )
      |                 ^~~~
a.cc:13:17: error: 'else' without a previous 'if'
   13 |                 else
      |                 ^~~~
Language: C++

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

int main() {
  char s[3];
  for (int i = 0; i < 3; i++)
  cin >> char[i];

  sort(s, s+3);

  if (s[0]=='a' && s[1]=='b' && s[2]=='c')
  cout << "Yes" << endl;
  else
  cout << "No" << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before 'char'
    7 |   cin >> char[i];
      |          ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  set<int> s;
  char a; 
  cin >> a;
  s.insert(a);
  cin >> a;
  s.insert(a);
  cin >> a;
  s.insert(a);
  if(s.count('a') and s.count('b') and s.count('c'))
    cout << "Yes";
  else
    cout << "No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'set' was not declared in this scope
    4 |   set<int> s;
      |   ^~~
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:4:7: error: expected primary-expression before 'int'
    4 |   set<int> s;
      |       ^~~
a.cc:7:3: error: 's' was not declared in this scope
    7 |   s.insert(a);
      |   ^
Language: C++

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

int main() {
  string s ;
  cin >> s;
  sort ( s.at.begin() , s,at.end() );
  cout << ( s == "abc" ? "Yes" : "No" ) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: invalid use of member function 'std::__cxx11::basic_string<char>::at' (did you forget the '()' ?)
    7 |   sort ( s.at.begin() , s,at.end() );
      |          ~~^~
a.cc:7:27: error: 'at' was not declared in this scope
    7 |   sort ( s.at.begin() , s,at.end() );
      |                           ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main() {
  string x;
  cin >> x;
  if(x[0] != x[1] && x[1] != x[2] && x[2] != x[3]){
    cout << "Yes";
  }
  else{
    cout << "No";
  }

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

#include <iostream>
#include <string>
using namespace std;
int main()
{
  string S;
  cin >> S;
  bool s[3] = {0};
  for (int i = 0; i < S.length(); i++) {
    switch (s[i]) {
      case 'a':
        s[0]++;
        break;
      case 'b':
        s[1]++;
        break;
      case 'c':
        s[2]++;
        break;
    }
  }
  if (s[0]==1&&S[1]==1&&s[2]==1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   12 |         s[0]++;
      |         ~~~^
a.cc:15:12: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   15 |         s[1]++;
      |         ~~~^
a.cc:18:12: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   18 |         s[2]++;
      |         ~~~^
a.cc:11:7: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
   11 |       case 'a':
      |       ^~~~
a.cc:14:7: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
   14 |       case 'b':
      |       ^~~~
a.cc:17:7: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
   17 |       case 'c':
      |       ^~~~
a.cc:10:12: warning: switch condition has boolean value [-Wswitch-bool]
   10 |     switch (s[i]) {
      |            ^
Language: C++

#include<bits/stc++.h>
using namespace std;
int main(){
  int n=0,m=0,l=0;
  string s;
  cin >> s;
  for(int i=0;i<3;i++){
    if(s.at(i)=='a'){
      n++;
    }
    else if(s.at(i)=='b'){
      m++;
    }
    else if(s.at(i)=='c'){
      l++;
    }
  }
  if(n==1&&m==1&&l==1){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

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

#include<bits/stc++.h>
using namespace std;
int main(){
  int n=0,m=0,l=0;
  string s;
  cin >> s;
  for(int i=0;i<3;i++){
    if(s.at(i)==a){
      n++;
    }
    else if(s.at(i)==b){
      m++;
    }
    else if(s.at(i)==c){
      l++;
    }
  }
  if(n==1&&m==1&&l==1){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

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

#include <iostram>
#include <algorithm>
using namespace std;

int main()
{
  string s;
  cin >> s;
  if(sort(s) == "abc")
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

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

#include <conio.h>
#include <iostream>
#include <string>

using namespace std;
int main()
{
    string a ;
    cin >> a ;

    if( a[ 1 ] == a[ 2 ] ){
        cout << " NO " ;
        return 0 ;
    }
    else
        if ( a[ 1 ] == a[ 3 ]){
           cout << " NO " ;
           return 0 ;
        }
        else
        if ( a[ 2 ] == a[ 3 ] ){
            cout << " NO " ;
            return 0 ;
        }
        else
            cout << " YES " ;

    return 0;
}


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

#include <conio.h>
#include <iostream>
#include <string>

using namespace std;
int main()
{
    string a , b , c ;
    cin >> a >> b >> c ;

    if( a == b ){
        cout << " NO " ;
        return 0 ;
    }
    else
        if ( a == c){
           cout << " NO " ;
           return 0 ;
        }
        else
        if ( b == c ){
            cout << " NO " ;
            return 0 ;
        }
        else
            cout << " YES " ;

    return 0;
}


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

 #include<bits/stdc++.h>
using namespace std;
int main()
  {
  string s;
  cin>>s;
  sort(s.begin(),s.end());
  if(s="abc")
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"abc"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if(s="abc")
      |      ~^~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
  {
  string s;
  cin>>s;
  sort(s.begin(),s.end());
  if(s='abc')
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  }

Compiler output:
a.cc:8:8: warning: multi-character character constant [-Wmultichar]
    8 |   if(s='abc')
      |        ^~~~~
a.cc: In function 'int main()':
a.cc:8:8: warning: overflow in conversion from 'int' to 'char' changes value from '6382179' to '99' [-Woverflow]
a.cc:8:7: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(99)' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if(s='abc')
      |      ~^~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
Language: C++

#include <iostream>
using namespace std;
int main() {
    string s;
    cin >> s;
    bool exist[2] = {false, false, false};
    for (int i=0; i<3; i++) {
        if (s[i] == 'a') {
            exist[0] = true;
        } else if (s[i] == 'b') {
            exist[1] = true;
        } else if (s[i] == 'c') {
            exist[2] = true;
        }
    }
    if (exist[0] && exist[1] && exist[2]) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:41: error: too many initializers for 'bool [2]'
    6 |     bool exist[2] = {false, false, false};
      |                                         ^
Language: Java

import java.util.Scanner;
import java.util.Array;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		char[] c = new char[3];
		for(int i=0; i<3; i++){
			c[i] = s.charAt(i);
		}
		Arrays.sort(c);
		System.out.println((c[0] == 'a' && c[1] == 'b' && c[2] == 'c') ? "Yes" : "No");
	}
}


Compiler output:
Main.java:2: error: cannot find symbol
import java.util.Array;
                ^
  symbol:   class Array
  location: package java.util
Main.java:11: error: cannot find symbol
		Arrays.sort(c);
		^
  symbol:   variable Arrays
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		boolean judge = true;
		s.contains("a") ? s.replace('a', '') : judge = false;
		s.contains("b") ? s.replace('b', '') : judge = false;
		if(s.contains("c")){judge = false;}
		System.out.println(judge ? "YES" : "NO");
	}
}


Compiler output:
Main.java:7: error: empty character literal
		s.contains("a") ? s.replace('a', '') : judge = false;
		                                 ^
Main.java:7: error: not a statement
		s.contains("a") ? s.replace('a', '') : judge = false;
		                ^
Main.java:8: error: empty character literal
		s.contains("b") ? s.replace('b', '') : judge = false;
		                                 ^
Main.java:8: error: not a statement
		s.contains("b") ? s.replace('b', '') : judge = false;
		                ^
4 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		boolean judge = true;
		s.contains("a") ? s = s.replace("a", "") : judge = false;
		s.contains("b") ? s = s.replace("b", "") : judge = false;
		if(s.contains("c")){judge = false;}
		System.out.println(judge ? "YES" : "NO");
	}
}


Compiler output:
Main.java:7: error: unexpected type
		s.contains("a") ? s = s.replace("a", "") : judge = false;
		                ^
  required: variable
  found:    value
Main.java:8: error: unexpected type
		s.contains("b") ? s = s.replace("b", "") : judge = false;
		                ^
  required: variable
  found:    value
2 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		boolean judge = true;
		s.contains("a") ? s.replace("a", "") : judge = false;
		s.contains("b") ? s.replace("b", "") : judge = false;
		if(s.contains("c")){judge = false;}
		System.out.println(judge ? "YES" : "NO");
	}
}


Compiler output:
Main.java:7: error: unexpected type
		s.contains("a") ? s.replace("a", "") : judge = false;
		                ^
  required: variable
  found:    value
Main.java:8: error: unexpected type
		s.contains("b") ? s.replace("b", "") : judge = false;
		                ^
  required: variable
  found:    value
2 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		boolean judge = true;
		s.contains("a") ? s.replace("a", "") : judge = false;
		s.contains("b") ? s.replace("b", "") : judge = false;
		s.contains("c") ? : judge = false;
		System.out.println(judge ? "YES" : "NO");
	}
}


Compiler output:
Main.java:9: error: illegal start of expression
		s.contains("c") ? : judge = false;
		                  ^
1 error
Language: C++

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

int main() {
	string S;
	cin >> S;
	sort(S);
	string ans = "NO";
	if (S == "abc") ans ="YES";
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: no matching function for call to 'sort(std::string&)'
   10 |         sort(S);
      |         ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided