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

#include <bits/stdc++.h>
using namespace std;
#define INF 2147483647
#define INFF 9223372036854775807
#define ll long long
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,m,n) for(int i=m;i<n;i++)
#define ALL(N) (N.begin(),N.end())
#define de cout << "debug" << endl;
#define pb push_back
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() {
    cin.tie(0);    
	ios::sync_with_stdio(false);
    int n,m;
    cin >> n >> m;
    vector<int> deg(n,0);
    vector<vector<int>> edge(n);
    REP(i,m){
        int a,b;
        cin >> a >> b;
        a--;b--;
        deg[a]++;deg[b]++;
        edge[a].pb(b);
        edge[b].pb(a);
    }
    bool flag = 0;
    REP(i,n){
        if(deg[i] % 2 == 1){
            if(flag){
                cout << "No" << endl;
                return 0;
            }
            flag = 1;
        }
    }
    REP(i,n){
        if(deg[i] >= 6){
            cout << "Yes" << endl;
            return 0;
        }
    }
    int d4 = 0;
    REP(i,n) if(deg[i] >= 4) d4++;
    if(d4 >= 3){
        cout << "Yes" << endl;
        return 0;
    }
    else if(d4 == 2){
        vector<int> d4s;
        REP(i,n) if(deg[i] == 4) d4s.pb(i);
        int v = d4s[0];
        int w = d4s[1];
        int npaths = 0;
        for(int x : edge[v]){
            int cur = x;
            int p = v;
            while(cur != v && cur != w){
                assert(int(edges[cur].size()) == 2);
                p = edge[cur][0] + edge[cur][1] - p;
                swap(p,cur);
            }
            if(cur == w) npaths++;
        }
        if(npaths == 2){
            cout << "Yes" << endl;
        }else if(npaths == 2){
            cout << "No" << endl;
        }
    }else if(d4 <= 1){
        cout << "No" << endl;
    }
}

Compiler output:
In file included from /usr/include/c++/14/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106,
                 from a.cc:1:
a.cc: In function 'int main()':
a.cc:62:28: error: 'edges' was not declared in this scope; did you mean 'edge'?
   62 |                 assert(int(edges[cur].size()) == 2);
      |                            ^~~~~
Language: C++

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

using vi = vector<int>;
#define sz(x) (int)(x.size())
#define pb push_back

const int mxn = 1e5;
int n,m;
vi adj[mxn];
bool used[mxn];
int a[mxn],b[mxn];

bool dfs(int v, int t) {
  if (v == t) return 1;
	for (int e : adj[v]) if (!used[e]) {
    	used[e] = 1;
      int w = a[e]^b[e]^v;
      	if (dfs(w,t)) return 1;
      	used[e] = 0;
    }
  return 0;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  
  cin>>n>>m;
  for (int i = 0; i < m; i++) {
    cin>>a[i]>>b[i];
    adj[--a[i]].pb(i); adj[--b[i]].pb(i);
  }
  fill(used,used+m,0);
  bool get = 0;
  for (int i = 0; i < n; i++) get |= sz(adj[i])>=6;
  int cnt = 0;
  for (int i = 0; i < n; i++) cnt += sz(adj[i]) == 4;
  get |= cnt>=3;
  
  if (cnt==2) {
    int x = -1, y = -1;
    for (int i = 0; i < n; i++) if (sz(adj[i])==4) {
      if (x==-1) x=i;
      else if (y==-1) y=i
    }
    dfs(x,y);
    get |= dfs(x,y);
  }
  for (int i = 0; i < n; i++)
    get &= sz(adj[i])%2==0;
  cout << (get?"Yes":"No") << endl;
  
  	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:26: error: expected ';' before '}' token
   45 |       else if (y==-1) y=i
      |                          ^
      |                          ;
   46 |     }
      |     ~
Language: C++

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

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  
  int n,m; cin>>n>>m;
  int degree[n];
  for (int i = 0; i < m; i++) {
    int x,y; cin>>x>>y;
    degree[--x]++; degree[--y]++;
  }
  bool get = 0;
  for (int i = 0; i < m; i++)
    get |= degree[i]==6;
  for (int i = 0; i < m; i++)
    get &= degree[i]%2==0;
  cout << (get?"YES":"NO") << endl;
  
  	return 0;
}


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

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

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef pair<ii, int> ri3;
#define mp make_pair
#define pb push_back
#define fi first
#define sc second
#define SZ(x) (int)(x).size()
#define ALL(x) begin(x), end(x) 
#define REP(i, n) for (int i = 0; i < n; ++i) 
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define RFOR(i, a, b) for (int i = a; i >= b; --i)

class UnionFind {
private: vector<int> p, r;
public:
         int comp;
         UnionFind(int n) { r.assign(n, 0); p.resize(n); iota(ALL(p), 0); comp = n; }
         int findset(int i) { return (p[i] == i) ? i : (p[i] = findset(p[i])); }
         bool unionset(int i, int j) {
             int x = findset(i), y = findset(j);
             if (x != y) {
                 --comp;
                 if (r[x] > r[y]) p[y] = x;
                 else { p[x] = y; if (r[x] == r[y]) ++r[y]; }
                 return true;
             }
             return false;
         }
};


int main() {
    //freopen("in.txt", "r", stdin);
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n, m; cin >> n >> m;
    int deg[n]; memset(deg, 0, sizeof deg);
    vector<ii> el;
    FOR(i, 0, m-1) {
        int a, b; cin >> a >> b;
        --a, --b;
        ++deg[a], ++deg[b];
        el.emplace_back(a, b);
    }

    #define YES { cout << "Yes" << '\n'; return 0; }
    #define NO  { cout << "No" << '\n'; return 0; }
    int deg4 = 0, x = -1;
    FOR(i, 0, n-1) {
        if (deg[i]%2 == 1) NO
        else if (deg[i] >= 6) YES
        else if (deg[i] == 4) ++deg4, x = i;
    }

    if (deg4 >= 3) YES
    else if (deg4 == 2) {
        assert(x != -1);
        UnionFind UF(n);
        for (auto e : el) {
            if (e.fi != x and e.sc != x)
                UF.unionset(e.fi, e.sc);
        }
        
        int cnt = 0;
        FOR(i,0,n-1) cnt += (i == UF.findset(i));
        assert(i == UF.comp);
        if (UF.comp >= 3) YES
        else NO
    }
    else NO
}



Compiler output:
In file included from /usr/include/c++/14/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106,
                 from a.cc:1:
a.cc: In function 'int main()':
a.cc:73:16: error: 'i' was not declared in this scope
   73 |         assert(i == UF.comp);
      |                ^
Language: C++

int main()
{
	int N, M;
	cin >> N >> M;
	vector<int> count(N, 0);

	for (int i = 0; i < 2 * M; i++) {
		int input;
		cin >> input;
		count[input - 1]++;
	}

	int check = 0;
	for (int i = 0; i < N; i++) {
		if (count[i] % 2 == 1) {
			check = 0;
			break;
		}
		else if (count[i] >= 4){
			check++;
		}
		else if (count[i] >= 6){
			check += 2;
		}
	}

	if (check >= 2) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> N >> M;
      |         ^~~
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<int> count(N, 0);
      |         ^~~~~~
a.cc:5:16: error: expected primary-expression before 'int'
    5 |         vector<int> count(N, 0);
      |                ^~~
a.cc:10:17: error: 'count' was not declared in this scope
   10 |                 count[input - 1]++;
      |                 ^~~~~
a.cc:15:21: error: 'count' was not declared in this scope
   15 |                 if (count[i] % 2 == 1) {
      |                     ^~~~~
a.cc:28:17: error: 'cout' was not declared in this scope
   28 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:28:34: error: 'endl' was not declared in this scope
   28 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:31:17: error: 'cout' was not declared in this scope
   31 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:31:33: error: 'endl' was not declared in this scope
   31 |                 cout << "No" << endl;
      |                                 ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,m;
  int a[100000]={};
  cin>>n>>m;
  for(int i=0;i<m;i++){
    int aa,b;
    cin>>aa>>b;
    a[aa]++;
    a[b]++;
  }
  int count =0;
  for(int i=0;i<n;i++){
    if(a[i]<=1){cout<<"No"<<endl;return 0;}
    else{
      if(a[i]%2==1){cout<<"No"<<endl;return 0;}
      if(a[i]==4){count++;}
      if{a[i]>=6}{count+=3;}
    }
  }
  if(count<=2){cout<<"No"<<endl;return 0;}
  else{cout<<"Yes"<<endl;return 0;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected '(' before '{' token
   19 |       if{a[i]>=6}{count+=3;}
      |         ^
      |         (
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,m;
  int a[100000]={};
  cin>>n>>m;
  for(int i=0;i<m;i++){
    int aa,b;
    cin>>aa>>b;
    a[aa]++;
    a[b]++;
  }
  count =0;
  for(int i=0;i<n;i++){
    if(a[i]<=1){cout<<"No"<<endl;return 0;}
    else{
      if(a[i]%2==1){cout<<"No"<<endl;return 0;}
      if(a[i]==4){count++;}
      if{a[i]>=6}{count+=3;}
    }
  }
  if(count<=2){cout<<"No"<<endl;return 0;}
  else{cout<<"Yes"<<endl;return 0;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'count' was not declared in this scope
   13 |   count =0;
      |   ^~~~~
a.cc:19:9: error: expected '(' before '{' token
   19 |       if{a[i]>=6}{count+=3;}
      |         ^
      |         (
Language: C++

#include<cstdio>
#include<vector>

using namespace std;

int main(void)
{
	int N, M;	// N頂点M本
	int a, b;
	int count = 0;

	scanf_s("%d %d", &N, &M);

	// 入力された辺の情報をvectorに保存する
	// 保存の仕方は、頂点aに接続されている頂点の一覧を、sides[a]で参照できる
	vector<vector<int>> sides(N+2);

	for (int i = 0; i < M; i++) {
		scanf_s("%d %d", &a, &b);
		sides[a].push_back(b);
		sides[b].push_back(a);
	}

	// オイラーグラフでなければ成り立たない。オイラーグラフの必要十分条件は、全ての点の次数が偶数であることである。
	for (int i = 1; i < sides.size(); i++) {
		if (sides[i].size() % 2 == 1) {
			printf("No\n");
			return 0;
		}
	}

	// 次数が6以上の辺があれば、3つのサーキットを作れる
	for (int i = 1; i < sides.size(); i++) {
		if (sides[i].size() >= 6) {
			printf("Yes\n");
			return 0;
		}
	}

	// 次数が4以上の辺が3つあれば、3つのサーキットを作れる
	count = 0;
	for (int i = 1; i < sides.size(); i++) {
		if (sides[i].size() >= 4) {
			count++;
		}
	}
	if (count >= 3) {
		printf("Yes\n");
		return 0;
	}

	printf("No\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         scanf_s("%d %d", &N, &M);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<cstdio>
#include<vector>

using namespace std;

int main(void)
{
	int N, M;	// N頂点M本
	int a, b;
	int count = 0;

	scanf_s("%d %d", &N, &M);

	// 入力された辺の情報をvectorに保存する
	// 保存の仕方は、頂点aに接続されている頂点の一覧を、sides[a]で参照できる
	vector<vector<int>> sides(N+2);

	for (int i = 0; i < M; i++) {
		scanf_s("%d %d", &a, &b);
		sides[a].push_back(b);
	}

	// オイラーグラフでなければ成り立たない。オイラーグラフの必要十分条件は、全ての点の次数が偶数であることである。
	for (int i = 1; i < sides.size(); i++) {
		if (sides[i].size() % 2 == 1) {
			printf("No\n");
			return 0;
		}
	}

	// 次数が6以上の辺があれば、3つのサーキットを作れる
	for (int i = 1; i < sides.size(); i++) {
		if (sides[i].size() >= 6) {
			printf("Yes\n");
			return 0;
		}
	}

	// 次数が4以上の辺が3つあれば、3つのサーキットを作れる
	count = 0;
	for (int i = 1; i < sides.size(); i++) {
		if (sides[i].size() >= 4) {
			count++;
		}
	}
	if (count >= 3) {
		printf("Yes\n");
		return 0;
	}

	printf("No\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         scanf_s("%d %d", &N, &M);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <vector>

using namespace std;

vector<int> adj[100005];

int a = 0, b = 0;
int paths = 0;

bool dfs(int i, int p) {
    if (i == a) return true;
    if (i == b) return false;
    for (int j : adj[i]) {
        if (j == p) continue;
        return dfs(j, i);
    }
}

int main() {
    int n, m;
    cin >> n >> m;

    for (int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }

    int cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (adj[i].size() % 2) {
            cout << "No";
            return 0;
        }

        if (adj[i].size() > 4) {
            cout << "Yes";
            return 0;
        }
        else if (adj[i].size() == 4) {
            cnt++;
            if (!a) {
                a = i;
            }
            else {
                b = i;
            }
        }
    }

    if (cnt > 2) {
        cout << "Yes";
        return 0;
    }
    else if (cnt < 2) {
        cout << "No";
        return 0;
    }

    for (int i : adj[a]) {
        if (dfs(i, a)) {
            cout << "Yes";
            return;
        }
    }
    cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   65 |             return;
      |             ^~~~~~
a.cc: In function 'bool dfs(int, int)':
a.cc:18:1: warning: control reaches end of non-void function [-Wreturn-type]
   18 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define N 100010
typedef long long ll;
int cnt;
struct node
{
    int to;
}p[2*N];
int nxt[2*N],head[N],d[N];
vector<int>v[N],d4;
void add(int u,int v)
{
    cnt++;
    p[cnt].to=v;
    nxt[cnt]=head[u];
    head[u]=cnt;
}
dfs(int x,int fa,int st,int ed)
{
    if(x==st)return 0;
    if(x==ed)return 1;
    for(int i=head[x];i;i=nxt[i])
    {
        if(p[i].to==fa )continue;
        dfs(p[i].to,x,st,ed);
    }
    return 0;
}int main()
{
    int n,m,x,y;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d",&x,&y);
        add(x,y),add(y,x);
        d[x]++,d[y]++;
        v[x].push_back(y),v[y].push_back(x);
    }
    int flag=0;
    for(int i=1;i<=n;i++)
    {
        if(d[i]&1){printf("No\n");return 0;}
        if(d[i]>=6)flag=1;
        if(d[i]==4)d4.push_back(i);
    }
    if(flag || d4.size()>=3)
        {printf("Yes\n");return 0;}
    if(d4.size()<2)
    { printf("No\n");return 0;}

    int num=0,st=d[0],ed=d[1];
    for(int i=head[st];i;i=nxt[i])
        if(dfs(p[i].to,st,st,ed))
                num++;
    if(num==2)
        printf("Yes\n");
    else
        printf("No\n");
}


Compiler output:
a.cc:19:1: error: ISO C++ forbids declaration of 'dfs' with no type [-fpermissive]
   19 | dfs(int x,int fa,int st,int ed)
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int N,M;
bool used[100001];
int uused[100001];
int aa[100001];
int bb[100001];

vector<int>G[100001];
int now[100001];
int check[100001];
int ans=0;
int aans=N+5;
vector<int>v;
void dfs(int x,int c){
	if(c==M)return;
	if(uused[x]==2){
		if(aans<check[x]){
			ans++;
		}
		aans=min(aans,check[x])
	}
	if(uused[x]==1){
		ans++;
		for(int i=check[x];i<c;i++){
			uused[v[i]]=2;
		}
	}

	v.push_back(x);
	uused[x]=1;
	check[x]=c;
	while(G[x].size()!=0){
		int a=G[x][0];
		if(used[a]==true){
			G[x].erase(G[x].begin());
		}else{
			used[a]=true;
			dfs(aa[a]^bb[a]^x,c+1);
			break;
		}
	}
}

int main(){
	cin>>N>>M;
	REP(i,M){
		int a,b;
		cin>>aa[i]>>bb[i];
		aa[i]--;
		bb[i]--;
		G[aa[i]].push_back(i);
		G[bb[i]].push_back(i);
		used[i]=0;
	}
	bool checker=true;
	REP(i,N){
		if(G[i].size()%2==1)checker=false;
		check[i]=-1;
		uused[i]=false;
	}
	if(checker==true){
		dfs(0,0);
		if(ans>=2){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}else{
		cout<<"No"<<endl;
	}
}

Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:26:40: error: expected ';' before '}' token
   26 |                 aans=min(aans,check[x])
      |                                        ^
      |                                        ;
   27 |         }
      |         ~
Language: C++

#include<iostream>
#include<unordered_set>
#include<vector>
using namespace std;
unordered_set < string > cir;
vector < int > v[100001];
bool visited[100001];
void dfs(int now, string path){
	if(cir.size() > 2)return;
	for(int i = 0;i < v[now].size();++i){
		string tmp = path;
		tmp.push_back(' ');
		tmp += to_string(v[now][i]);
		if(visited[v[now][i]]){
			cir.insert(tmp);
		}
		else{
			visited[v[now][i]] = true;
			dfs(v[now][i], tmp);
			visited[v[now][i]] = false;
		}
		if(cir.size() > 2)return;
	}
}
int main(){
	cir.reserver(100000);
	int N, M;
	cin >> N >> M;
	while(M--){
		int a, b;
		cin >> a >> b;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	visited[0] = true;
	dfs(1, "1");
	if(cir.size() > 2){
		cout << "Yes\n";
	}
	else cout << "No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'class std::unordered_set<std::__cxx11::basic_string<char> >' has no member named 'reserver'; did you mean 'reserve'?
   26 |         cir.reserver(100000);
      |             ^~~~~~~~
      |             reserve
Language: C++

#include<iostream>
#include<unordered_set>
using namespace std;
unordered_set < string > cir;
vector < int > v[100001];
bool visited[100001];
void dfs(int now, string path){
	if(cir.size() > 2)return;
	for(int i = 0;i < v[now].size();++i){
		string tmp = path;
		tmp.push_back(' ');
		tmp += to_string(v[now][i]);
		if(visited[v[now][i]]){
			cir.insert(tmp);
		}
		else{
			visited[v[now][i]] = true;
			dfs(v[now][i], tmp);
			visited[v[now][i]] = false;
		}
		if(cir.size() > 2)return;
	}
}
int main(){
	cir.reserver(100000);
	int N, M;
	cin >> N >> M;
	while(M--){
		int a, b;
		cin >> a >> b;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	visited[0] = true;
	dfs(1, "1");
	if(cir.size() > 2){
		cout << "Yes\n";
	}
	else cout << "No\n";
}

Compiler output:
a.cc:5:1: error: 'vector' does not name a type
    5 | vector < int > v[100001];
      | ^~~~~~
a.cc: In function 'void dfs(int, std::string)':
a.cc:9:27: error: 'v' was not declared in this scope
    9 |         for(int i = 0;i < v[now].size();++i){
      |                           ^
a.cc: In function 'int main()':
a.cc:25:13: error: 'class std::unordered_set<std::__cxx11::basic_string<char> >' has no member named 'reserver'; did you mean 'reserve'?
   25 |         cir.reserver(100000);
      |             ^~~~~~~~
      |             reserve
a.cc:31:17: error: 'v' was not declared in this scope
   31 |                 v[a].push_back(b);
      |                 ^
Language: C++

#include<iostream>
#include<unordered_set>
using namespace std;
unordered_set < string > cir;
vector < int > v[100001];
bool visited[100001];
void dfs(int now, string path){
	if(cir.size() > 2)return;
	for(int i = 0;i < v[now].size();++i){
		string tmp = path;
		tmp.push_back(' ');
		tmp += to_string(v[now]);
		if(visited[v[now][i]]){
			cir.insert(tmp);
		}
		else{
			visited[v[now][i]] = true;
			dfs(v[now][i], tmp);
			visited[v[now][i]] = false;
		}
		if(cir.size() > 2)return;
	}
}
int main(){
	cir.reserver(100000);
	int N, M;
	cin >> N >> M;
	while(M--){
		int a, b;
		cin >> a >> b;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	visited[0] = true;
	dfs(1, "1 ");
	if(cir.size() > 2){
		cout << "Yes\n";
	}
	else cout << "No\n";
}

Compiler output:
a.cc:5:1: error: 'vector' does not name a type
    5 | vector < int > v[100001];
      | ^~~~~~
a.cc: In function 'void dfs(int, std::string)':
a.cc:9:27: error: 'v' was not declared in this scope
    9 |         for(int i = 0;i < v[now].size();++i){
      |                           ^
a.cc: In function 'int main()':
a.cc:25:13: error: 'class std::unordered_set<std::__cxx11::basic_string<char> >' has no member named 'reserver'; did you mean 'reserve'?
   25 |         cir.reserver(100000);
      |             ^~~~~~~~
      |             reserve
a.cc:31:17: error: 'v' was not declared in this scope
   31 |                 v[a].push_back(b);
      |                 ^
Language: C++

//ΔAGC032C
#include<iostream>
#include<cstdio>
#include<fstream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<bitset>
#include<cmath>
#include<cstring>
#include<cstdlib>
using namespace std;
typedef long long LL;
typedef double DB;
const int N = 111111;
int n,m,x[N],y[N],a[N],s[N],f[N];
int fnd(int x){
	if(f[x]==x)
		return x;
	return f[x]=fnd(f[x]);
}
int main()
{
	int i,o;
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;i=i+1){
		scanf("%d%d",x+i,y+i);
		a[x[i]]++,a[y[i]]++;
	}
	for(i=1;i<=n;i=i+1)
		s[a[i]]++;
	for(i=1;i<=m;i=i+2){
		if(s[i]){
			cout<<"No";
			return 0;
		}
	}
	if(s[2]+s[4]<n||s[4]>=3){
		cout<<"Yes";
		return 0;
	}
	if(s[4]<=1){
		cout<<"No";
		return 0;
	}
	for(i=1;i<=n;i=i+1)
		if(a[i]==4)
			o=i;
	for(i=1;i<=n;i=i+1)
		f[i]=i;
	for(i=1;i<=m;i=i+1){
		if(x[i]==o||y[i]==o)
			continue;
		f[fnd(x[i])]=fnd(y[i]);
	}
	memset(s,0,sizeof(s));
	for(i=1;i<=n;i=i+1)
		s[fnd(i)]++;
	o=0;
	for(i=1;i<=n;i=i+1)
		if(s[i])
			o++;
	if(o==3)
		cout<<"Yes";

Compiler output:
a.cc: In function 'int main()':
a.cc:66:29: error: expected '}' at end of input
   66 |                 cout<<"Yes";
      |                             ^
a.cc:25:1: note: to match this '{'
   25 | {
      | ^
Language: C++

#include <bits/stdc++.h>

#define MOD 1000000007

using namespace std;

int main() {
	int n, m, u, v, deg = 0;
	scanf("%d %d", &n, &m);
	vector<unordered_set<int>> links(n + 1);
	for (int i = 0; i < m; i++) {
		scanf("%d %d", &u, &v);
		links[u].insert(v);
		deg += (lins[u] & 1) ? 1 : -1;
		links[v].insert(u);
		deg += (lins[v] & 1) ? 1 : -1;
	}
	if (deg) {
		cout << "No" << endl;
		return 0;
	}
	stack<int> s;
	vector<int> path;
	s.push(1);
	while (s.size()) {
		u = s.top();
		if (links[u].size()) {
			v = *links[u].begin();
			links[u].erase(v);
			links[v].erase(u);
			s.push(v);
		} else {
			path.push_back(u);
			s.pop();
		}
	}
	int loopCnt = 0;
	vector<int> loop, onloop(n + 1, 0);
	for (int i = 0; i < path.size(); i++) {
		if (onloop[path[i]]) {
			while (loop.back() != path.back()) {
				onloop[loop.back()] = 0;
				loop.pop_back();
			}
			loopCnt++;
		} else {
			loop.push_back(path[i]);
			onloop[path[i]] = 1;
		}
	}
	cout << (loop.size() == 1 && loopCnt >= 3 ? "Yes" : "No") << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'lins' was not declared in this scope; did you mean 'links'?
   14 |                 deg += (lins[u] & 1) ? 1 : -1;
      |                         ^~~~
      |                         links
Language: C++

#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <queue>
#define MOD (1000000007l)
#define rep(i, n) for(long i = 0; i < n; i++)

using namespace std;

int main(void) {
  long N, M;
  cin >> N >> M;
  unordered_map<long, unordered_set<long>> connect;
  rep (i, M) {
    long a, b;
    cin >> a >> b;
    connect[a].insert(b);
    connect[b].insert(a);
  }
  long odd_nodes = 0;
  long four_nodes = 0;
  long six_nodes = 0;
  vector<long> four_node_indexes;
  for (auto it: connect) {
    long size = it.second.size();
    if (size % 2 == 1) odd_nodes ++;
    if (size == 4) {
      four_nodes ++;
      four_node_indexes.push_back(it.first);
    }
    if (size % 2 == 0 and size >= 6) six_nodes ++;
  }
  if (odd_nodes != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (six_nodes != 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (four_nodes < 2) {
    cout << "No" << endl;
    return 0;
  }
  if (four_nodes > 2) {
    cout << "Yes" << endl;
    return 0;
  }
  for (auto it: connect[four_node_indexes[0]]) {
    long current = it;
    unordered_set<long> walked;
    walked.insert(four_node_indexes[0]);
    while (true) {
      }
      if (current == four_node_indexes[1]) {
        break;
      }
      unordered_set<long> neibor = connect[current];
      auto it = neibor.begin();
      long foo = *it;
      it++;
      long bar = *it;
      if (walked.count(foo) != 0 and walked.count(bar) != 0) {
        cout << "Yes" << endl;
        return 0;
      long next = walked.count(foo) == 0 ? foo : bar;
      walked.insert(current);
      current = next;
    }
  }
  cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:12: error: redeclaration of 'auto it'
   65 |       auto it = neibor.begin();
      |            ^~
a.cc:55:13: note: 'long int it' previously declared here
   55 |   for (auto it: connect[four_node_indexes[0]]) {
      |             ^~
Language: C++

from random import random
print('Yes' if random() < 40/62 else 'No')

Compiler output:
a.cc:2:7: warning: multi-character character constant [-Wmultichar]
    2 | print('Yes' if random() < 40/62 else 'No')
      |       ^~~~~
a.cc:2:38: warning: multi-character character constant [-Wmultichar]
    2 | print('Yes' if random() < 40/62 else 'No')
      |                                      ^~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from random import random
      | ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cstdio>
#include <cmath>
#include <utility>

using namespace std;

using ll = long long;
using p = pair<ll, ll>;

int main(void) {
  ll N, M;
  cin >> N >> M;
  vector<ll> rank;
  vector<vector<ll> > edges(N, vector<ll>());
  for (ll i = 0; i < M; i++) {
    ll from, to;
    cin >> from >> to;
    rank[from]++;
    rank[to]++;
    edges[from].push_back(to);
    edges[to].push_back(from);
  }

  for (ll i = 1; i <=N; i++ ) {
    if (rank[i] ==1) {
      rank[to]--;
    }
  }

  ll rank6 = 0;
  ll rank4 = 0;

  for (auto&& i : rank) {
    if (i == 4) {
      ior4++;
    } else if (i == 6) {
      ior6++;
    }
  }
  if (ior4 == 2 || ior4 == 3 || ior6 == 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: 'to' was not declared in this scope; did you mean 'tm'?
   30 |       rank[to]--;
      |            ^~
      |            tm
a.cc:39:7: error: 'ior4' was not declared in this scope
   39 |       ior4++;
      |       ^~~~
a.cc:41:7: error: 'ior6' was not declared in this scope
   41 |       ior6++;
      |       ^~~~
a.cc:44:7: error: 'ior4' was not declared in this scope
   44 |   if (ior4 == 2 || ior4 == 3 || ior6 == 1) {
      |       ^~~~
a.cc:44:33: error: 'ior6' was not declared in this scope
   44 |   if (ior4 == 2 || ior4 == 3 || ior6 == 1) {
      |                                 ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <set>
using namespace std;
struct edge{int to,ind;};
vector<edge> G[100010];
set<int> E;
int cyc = 0;
void dfs(int s){
	set<int> se;
	vector<int> st; 
	st.push_back(s); se.insert(s);
	while(st.size()){
		int x = st.back();
		st.pop();
		for(auto e:G[x]){
			if(E.count(e.ind)){
				E.erase(e.ind);
				if(!se.count(e.to)){
					st.push_back(e.to); se.insert(e.to);
				}else{
					cyc++;
					se.erase(e.to);
				}
			}
		}
	}
}
int main(){
	int i,j,n,m;
	cin >> n >> m;
	for(i=0;i<m;i++){
		int a,b;
		cin >> a >> b; a--; b--;
		G[a].push_back({b,i}); G[b].push_back({a,i});
		E.insert(i);
	}
	for(i=0;i<n;i++){
		dfs(i);
	}
	if(cyc>=3){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	/*for(i=1;i<=n;i++){
		cout << i << endl;
		for(j=0;j<G[i].size();j++){
			cout << G[i][j] << " ";
		}
		cout << endl;
	}*/
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:15:20: error: 'class std::vector<int>' has no member named 'pop'
   15 |                 st.pop();
      |                    ^~~
Language: C++

#include<cstdio>
using namespace std;
int n,m,sum[100005],A,B,sum1,a[100005],head[100005],cc,ck;
struct sd{int next,to;}seg[200005];
bool check[100005];
bool flag;
inline void dfs(int v,int fa) {
	if(v==a[2]) {++ck;return;}
	if(check[v]) return;
	check[v]=true;
	for(int i=head[v];i;i=seg[i].next) if(seg[i].to!=fa) dfs(seg[i].to,v);
}
inline bool check() {
	for(int i=head[a[1]];i;i=seg[i].next) dfs(seg[i].to,a[1]);
	if(ck==4) return false;return true;
}
inline void addseg(int v,int r) {seg[++cc].next=head[v];head[v]=cc;seg[cc].to=r;}
int main()
{
	scanf("%d%d",&n,&m);for(int i=1;i<=m;++i) {scanf("%d%d",&A,&B);addseg(A,B);addseg(B,A);sum[A]++;sum[B]++;}
	for(int i=1;i<=n;++i) if(sum[i]&1) {printf("No");return 0;}else if(sum[i]==4) a[++sum1]=i;else if(sum[i]>=6) flag=true;
	if(flag) printf("Yes");
	else if(sum1>2||(sum1==2&&check())) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
a.cc:13:19: error: 'bool check()' redeclared as different kind of entity
   13 | inline bool check() {
      |                   ^
a.cc:5:6: note: previous declaration 'bool check [100005]'
    5 | bool check[100005];
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:23:40: error: 'check' cannot be used as a function
   23 |         else if(sum1>2||(sum1==2&&check())) printf("Yes");
      |                                   ~~~~~^~
Language: C++

#include<bits/stdc++.h>

using namespace std;

using int64 = long long;
const int mod = 1e9 + 7;
const int inf = (1 << 30) - 1;
const int64 infll = (1LL << 61) - 1;

struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  }
} iosetup;

template< typename T >
ostream &operator<<(ostream &os, const vector< T > &v) {
  for(int i = 0; i < (int) v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}

template< typename T >
istream &operator>>(istream &is, vector< T > &v) {
  for(T &in : v) is >> in;
  return is;
}

template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

template< typename T = int64 >
vector< T > make_v(size_t a) {
  return vector< T >(a);
}

template< typename T, typename... Ts >
auto make_v(size_t a, Ts... ts) {
  return vector< decltype(make_v< T >(ts...)) >(a, make_v< T >(ts...));
}

template< typename T, typename V >
typename enable_if< is_class< T >::value == 0 >::type fill_v(T &t, const V &v) {
  t = v;
}

template< typename T, typename V >
typename enable_if< is_class< T >::value != 0 >::type fill_v(T &t, const V &v) {
  for(auto &e : t) fill_v(e, v);
}

using pi = pair< int, int >;

struct UnionFind {
  vector< int > data;

  UnionFind(int sz) {
    data.assign(sz, -1);
  }

  bool unite(int x, int y) {
    x = find(x), y = find(y);
    if(x == y) return (false);
    if(data[x] > data[y]) swap(x, y);
    data[x] += data[y];
    data[y] = x;
    return (true);
  }

  int find(int k) {
    if(data[k] < 0) return (k);
    return (data[k] = find(data[k]));
  }

  int size(int k) {
    return (-data[find(k)]);
  }
};


int main() {
  int N, M;
  cin >> N >> M;
  int deg[100000] = {};
  int X[100000], Y[100000];
  for(int i = 0; i < M; i++) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    deg[x]++;
    deg[y]++;
    X[i] = x, Y[i] = y;
  }
  int a = 0, b = 0;
  vector< int > add;
  for(int i = 0; i < N; i +) {
    if(deg[i] % 2) {
      cout << "No" << endl;
      return 0;
    }
    if(deg[i] == 2) {
      ++a;
    }
    if(deg[i] == 4) {
      add.emplace_back(i);
      ++b;
    }
  }
  if(b == 2 && a == N - 2) {
    UnionFind uf(N);
    for(int i = 0; i < M; i++) {
      if(add[0] == X[i] || add[1] == X[i]) continue;
      if(add[0] == Y[i] || add[1] == Y[i]) continue;
      uf.unite(X[i], Y[i]);
    }
    set< int > rot;
    for(int i = 0; i < N; i++) {
      if(add[0] == i || add[1] == i) continue;
      rot.emplace(uf.find(i));
    }
    if(rot.size() <= 4) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
    return 0;
  }
  if(a == N || (b == 2 && a == N - 2)) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:103:28: error: expected primary-expression before ')' token
  103 |   for(int i = 0; i < N; i +) {
      |                            ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
int l[100010], r[100010];
vector <int> g[100010];
vector <int> order;
bool vis[100010];
bool del[100010];

void dfs(int x) {
	while(!g[x].empty()) {
		int e = g[x].back();
		int y = l[e] ^ r[e] ^ x;
		g[x].pop_back();
		if(del[e]) continue;
		del[e] = true;
		dfs(y);
	}
	order.push_back(x);
}

int main(int argc, char const *argv[])
{
	int n, m;
	scanf("%d %d", &n, &m);
	for(int i = 1; i <= m; i++) {
		scanf("%d %d", &l[i], &r[i]);
		g[l[i]].push_back(i);
		g[r[i]].push_back(i);
	}
	int cnt = 0;
	for(int i = 1; i <= n; i++) {
		if(g[i].size() & 1) {
			printf("No\n");
			exit(0);
		}
		cnt += g[i].size() - 2;
	}
	if(cnt > 2) {
		printf("Yes\n");
		exit(0);
	}
	dfs(1);
	int cnt = 0;

	vector <int> v;
	for(auto i : order) {
		if(vis[i]) {
			while(v.back() != i) {
				vis[v.back()] = 0;
				v.pop_back();
			}
			++cnt;
		} else {
			vis[i] = 1;
			v.push_back(i);
		}
	}
	if(cnt >= 3) printf("Yes\n");
	else printf("No\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:43:13: error: redeclaration of 'int cnt'
   43 |         int cnt = 0;
      |             ^~~
a.cc:30:13: note: 'int cnt' previously declared here
   30 |         int cnt = 0;
      |             ^~~
Language: C++

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

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
#define REP(i, n) FOR(i, n, 0)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll)1e15;

struct Vertex
{
    vector<int> node;
};

Vertex V[100005];
ll C[100005];

int main()
{
    ll N, M;
    cin >> N >> M;
    REP(i, M)
    {
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        V[a].node.push_back(b);
        V[b].node.push_back(a);
    }

    REP(i, N)
    {
        cout << V[i].node.size() << endl;
        C[V[i].node.size()]++;
    }

    if ((C[4] == 2) || (C[6] == 1) || (C[3] == 2 && C[4] == 1) ||
        (&&C[3] == 3))
    {
        int sum = 0;
        REP(i, N)
        {
            int t = V[i].node.size();
            sum += t;
        }
        if (sum % 2 == 0)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    else
        cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:13: error: expected ')' before '[' token
   43 |         (&&C[3] == 3))
      |         ~   ^
      |             )
a.cc:55:6: error: expected ')' before 'else'
   55 |     }
      |      ^
      |      )
   56 |     else
      |     ~~~~
a.cc:42:8: note: to match this '('
   42 |     if ((C[4] == 2) || (C[6] == 1) || (C[3] == 2 && C[4] == 1) ||
      |        ^
a.cc:43:12: error: label 'C' used but not defined
   43 |         (&&C[3] == 3))
      |            ^
Language: C++

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

const double PI = acos(-1);
using ll = long long;
using ull = unsigned long long;
const int inf = 2e9;
const ll INF = 2e18;
const ll MOD = 1e9+7;
typedef pair<ll,pair<int,int>> P;

#define REP(i,n) for (int i = 0; i < (n); i++)
#define sz(s) (s).size()
#define pb push_back
#define fi first
#define se second

int cnt[100010];

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n,m;
    cin >> n >> m;
    REP(i,m) {
        int a,b;
        cin >> a >> b;
        cnt[a]++;
        cnt[b]++;
    }
    int cnt = 0;
    bool if3 = 0, ifeven = 1;
    for (int i = 1; i <= n; i++) {
        if (cnt[i]&1) ifeven = 0, cnt++;
        if (cnt[i] >= 6) if3 = 1;
    }
    if (cnt == 2 || cnt == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:16: error: invalid types 'int[int]' for array subscript
   35 |         if (cnt[i]&1) ifeven = 0, cnt++;
      |                ^
a.cc:36:16: error: invalid types 'int[int]' for array subscript
   36 |         if (cnt[i] >= 6) if3 = 1;
      |                ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <string>
#include <list>
#define fst first
#define snd second
#define mp make_pair
#define fore(i,a,b) for(int i=a;i<b;++i)
#define pb push_back
#define SZ(x) ((int)(x).size())
using namespace std;
typedef long long ll;

#define MAXN 100005

set<int> g[MAXN;
int m;

int main(){
    scanf("%d%d",&n,&m);
    fore(i,0,m){
        int x,y;
        scanf("%d%d",&x,&y);x--;y--;
        g[x].insert(y);
        g[y].insert(x);
    }
    fore(i,0,n)if(SZ(g[i])%2){puts("No");return 0;}
    fore(i,0,n)if(SZ(g[i])>=6){puts("Yes");return 0;}
    int q=0;
    vector<int> z;
    fore(i,0,n)if(SZ(g[i])==4)q++,z.pb(i);
    if(q>2){puts("Yes");return 0;}
    if(q<2){puts("No");return 0;}
    int x=z[0],y=z[1];
    if(g[x].count(y))puts("No");
    else puts("Yes");
    return 0;
}


Compiler output:
a.cc:23:16: error: expected ']' before ';' token
   23 | set<int> g[MAXN;
      |                ^
a.cc: In function 'int main()':
a.cc:27:19: error: 'n' was not declared in this scope
   27 |     scanf("%d%d",&n,&m);
      |                   ^
a.cc:31:9: error: 'g' was not declared in this scope
   31 |         g[x].insert(y);
      |         ^
a.cc:34:22: error: 'g' was not declared in this scope
   34 |     fore(i,0,n)if(SZ(g[i])%2){puts("No");return 0;}
      |                      ^
a.cc:17:22: note: in definition of macro 'SZ'
   17 | #define SZ(x) ((int)(x).size())
      |                      ^
a.cc:35:22: error: 'g' was not declared in this scope
   35 |     fore(i,0,n)if(SZ(g[i])>=6){puts("Yes");return 0;}
      |                      ^
a.cc:17:22: note: in definition of macro 'SZ'
   17 | #define SZ(x) ((int)(x).size())
      |                      ^
a.cc:38:22: error: 'g' was not declared in this scope
   38 |     fore(i,0,n)if(SZ(g[i])==4)q++,z.pb(i);
      |                      ^
a.cc:17:22: note: in definition of macro 'SZ'
   17 | #define SZ(x) ((int)(x).size())
      |                      ^
a.cc:42:8: error: 'g' was not declared in this scope
   42 |     if(g[x].count(y))puts("No");
      |        ^
Language: C++

#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <queue>
#include <iostream>
#include <bitset>
using namespace std;
#define N 100005
vector<int >v[N];
int d[N],n,m;
map<int ,int >mp[N];
bool cmp(int a,int b){return d[a]<d[b];}
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1,x,y;i<=m;i++)
	{
		scanf("%d%d",&x,&y);
		d[x]++,d[y]++;
		mp[x][y]=1,mp[y][x]=1;
		v[x].push_back(y),v[y].push_back(x);
	}
	for(int i=1;i<=n;i++)sort(v[i].begin(),v[i].begin(),cmp);
	int num=0,tmp=0;
	for(int i=1;i<=n;i++)if(d[i]&1)return puts("No"),0;//puts("Yes");
	for(int x=1;x<=n;x++)if(d[x]>=4)
	{
		d[x]-=2;num++;
		for(int i=0;i<v[x].size();i++)if(d[v[x][i]])d[v[x][i]]-=2;
	}
	for(int x=1;x<=n;x++)if(d[x]>=4)
	{
		d[x]-=2;num++;
		for(int i=0;i<v[x].size();i++)if(d[v[x][i]])d[v[x][i]]-=2;
	}
	if(num>=2)return puts("Yes"),0;puts("No");
}

Compiler output:
a.cc:13:1: error: 'map' does not name a type
   13 | map<int ,int >mp[N];
      | ^~~
a.cc: In function 'int main()':
a.cc:22:17: error: 'mp' was not declared in this scope; did you mean 'm'?
   22 |                 mp[x][y]=1,mp[y][x]=1;
      |                 ^~
      |                 m
Language: C++

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

int a[100010],sum;
int n,m,A,B;

signed main(){
    cin>>n>>m;
    r(i,m){
        int x,y;
        scanf("%d%d",&x,&y)
        x--; y--;
        a[x]++;
        a[y]++;
    }
    r(i,n){
        if(a[i]%2){
            cout<<"No"<<endl;
            return 0;
        }
        if(a[i]==2)sum++;
        if(a[i]==4)A++;
        if(a[i]>=6)B++;
    }
    if((A>=2||B)&&m%2)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before 'x'
   13 |         scanf("%d%d",&x,&y)
      |                            ^
      |                            ;
   14 |         x--; y--;
      |         ~
Language: C++

#include<bits/stdc++.h>
#define M 100001
using namespace std;
typedef long long ll;
struct stack {
	int top,node[M];
} s;
int e[M][M],n,bj[M];
void dfs(int x) {
	int i;
	s.node[++s.top]=x;
	for(i=0; i<n; i++) {
		if(e[i][x]>0) {
			e[i][x]=e[x][i]=0;
			dfs(i);
			break;
		}
	}
}
void fleury(int x) {
	int i,flag;
	s.top=0;
	s.node[s.top]=x;
	while(s.top>=0) {
		flag=0;
		for(i=0; i<n; i++) {
			if(e[s.node[s.top]][i]>0) {
				flag=1;
				break;
			}
		}
		if(!flag) bj[s.node[s.top--]+1]++;
		else dfs(s.node[s.top--]);
	}
}
int main( ) {
	int i,j,u,v,m,degree,num=0,start=0;
	scanf("%d%d",&n,&m);
	for(i=0; i<m; i++) {
		scanf("%d%d",&u,&v);
		e[u-1][v-1]=e[v-1][u-1]=1;
	}
	for(i=0; i<n; i++) {
		degree=0;
		for(j=0; j<n; j++)
			degree+=e[i][j];
		if(degree&1) {
			start=i;
			num++;
		}
	}
	if(num==0||num==2) {
		fleury(start);
		for(int i=1; i<=n; i++)
			if(bj[i]==4)
				cout<<"Yes",exit(0);
	}
	puts("No");
	return 0;
}

Compiler output:
/tmp/ccwQaKp3.o: in function `dfs(int)':
a.cc:(.text+0xff): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccwQaKp3.o
/tmp/ccwQaKp3.o: in function `fleury(int)':
a.cc:(.text+0x1a8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccwQaKp3.o
a.cc:(.text+0x1eb): relocation truncated to fit: R_X86_64_PC32 against symbol `bj' defined in .bss section in /tmp/ccwQaKp3.o
a.cc:(.text+0x202): relocation truncated to fit: R_X86_64_PC32 against symbol `bj' defined in .bss section in /tmp/ccwQaKp3.o
/tmp/ccwQaKp3.o: in function `main':
a.cc:(.text+0x267): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccwQaKp3.o
a.cc:(.text+0x387): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccwQaKp3.o
a.cc:(.text+0x3aa): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccwQaKp3.o
a.cc:(.text+0x3e2): relocation truncated to fit: R_X86_64_PC32 against symbol `bj' defined in .bss section in /tmp/ccwQaKp3.o
a.cc:(.text+0x417): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccwQaKp3.o
collect2: error: ld returned 1 exit status
Language: C++

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

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
#define REP(i, n) FOR(i, n, 0)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll)1e15;

struct Vertex
{
    vector<int> node;
};

Vertex V[100005];
ll C[100005];

int main()
{
    ll N, M;
    cin >> N >> M;
    REP(i, M)
    {
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        V[a].node.push_back(b);
        V[b].node.push_back(a);
    }

    REP(i, N)
    {
        C[V[i].node.size()]++;
    }

    if ((C[2] == 2 C[4] == N - 2) || (C[2] == N - 1 && C[6] == 1) || (C[2] == N - 3 && C[3] == 2 && C[4] == 1))
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:19: error: expected ')' before 'C'
   41 |     if ((C[2] == 2 C[4] == N - 2) || (C[2] == N - 1 && C[6] == 1) || (C[2] == N - 3 && C[3] == 2 && C[4] == 1))
      |         ~         ^~
      |                   )
a.cc:42:30: error: expected ')' before ';' token
   42 |         cout << "Yes" << endl;
      |                              ^
      |                              )
a.cc:41:8: note: to match this '('
   41 |     if ((C[2] == 2 C[4] == N - 2) || (C[2] == N - 1 && C[6] == 1) || (C[2] == N - 3 && C[3] == 2 && C[4] == 1))
      |        ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <functional>
#define REP(i, a) for (int i = 0; i < (a); i++)
#define REPR(i, a) for (int i = (int)(a) - 1; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (int)(b) - 1; i >= a; i--)
#define ALL(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<long long>;
using vvl = vector<vl>;
using vs = vector<string>;
int si() { int x; scanf("%d", &x); return x; }
long long sl() { long long x; scanf("%lld", &x); return x; }
string ss() { string x; cin >> x; return x; }
void pi(int x) { printf("%d ", x); }
void pl(long long x) { printf("%lld ", x); }
void pd(double x) { printf("%.15f ", x); }
void ps(const string &a) { cout << a << ' '; }
void br() { putchar('\n'); }

struct BiconnectedComponent {
  vector<int> ord, low;
  vector<bool> used;
  vector<vector<int>> g;
  vector<vector<pair<int, int>>> bc;
  vector<pair<int, int>> tmp;
  int n, k = 0;
  BiconnectedComponent(const vector<vector<int>> &g) : g(g) {
    n = g.size();
    ord.resize(n, -1);
    low.resize(n, -1);
    used.resize(n, false);
  }
  void dfs(int u, int prev) {
    used[u] = true;
    ord[u] = k ++;
    low[u] = ord[u];
    int cnt = 0;
    for (auto v : g[u]) if (v != prev) {
      if (ord[v] < ord[u]) { 
        tmp.emplace_back(min(u, v), max(u, v));
      }
      if (!used[v]) {
        cnt ++;
        dfs(v, u);
        low[u] = min(low[u], low[v]);
        if (low[v] >= ord[u]) {
          bc.push_back({});
          while (true) {
            pair<int, int> e = tmp.back();
            bc.back().emplace_back(e);
            tmp.pop_back();
            if (min(u, v) == e.first && max(u, v) == e.second) {
              break;
            }
          }
        }
      } else {
        low[u] = min(low[u], ord[v]);
      }
    }
  }
};

bool solve() {
  int N = si(), M = si();
  vvi G(N);
  vector<int> deg(N);
  REP(i, M) {
    int u = si() - 1, v = si() - 1;
    G[u].push_back(v);
    G[v].push_back(u);
    deg[u]++;
    deg[v]++;
  }
  REP(i, N) if (deg[i] % 2 == 1) return false;
  REP(i, N) if (deg[i] >= 6) return true;
  BiconnectedComponent bc(G);
  bc.dfs(0, -1);
  if (bc.bc.size() >= 3) return true;
  if (bc.bc.size() == 2) {
    int c = 0;
    REP(i, N) if (deg[i] >= 4) c++;
    return c >= 2;
  }
  REP(i, N) {
    for (int j : G[i]) if (i < j) {
      if (deg[i] >= 4 && deg[j] >= 4) {
        uf.unite(i, j);
      }
    }
  }
  int c = 0;
  REP(i, N) if (deg[i] >= 4) c++;
  return c >= 3;
}

int main() {
  cout << (solve() ? "Yes" : "No") << '\n';
}



Compiler output:
a.cc: In function 'bool solve()':
a.cc:98:9: error: 'uf' was not declared in this scope
   98 |         uf.unite(i, j);
      |         ^~
Language: C++

#include<cstdio>
#include<algorithm> 
using namespace std;
int n,i,d[100005],x,y,u=0,v=0;
int main()
{
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;i++)
	{
		scanf("%d%d",&x,&y);
		d[x]++;d[y]++;
	}
	for(i=1;i<=n;i++)
	{
		if(d[i]%2==1)
		{
			printf("No\n");
			return 0;
		}
		if(d[i]>=4)u++;
		if(d[i]>=6)v++;
	}
	if(u>=2||v>=1)printf("Yes\n");
	else printf("No\n");
	return 0;
 } 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: 'm' was not declared in this scope
    7 |         scanf("%d%d",&n,&m);
      |                          ^