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

#include <cstdio>

using namespace std;

int main() {
       // freopen("testcase", "r", stdin);

        int a, b, c;
        scanf("%d%d%d", &a, &b, &c);

        int cnt = 0;
        while (true) {
                if (a == b && b == c) {
                        printf("-1\n");
                        return 0;
                }
                if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1) {
                        printf("%d\n", cnt);
                        return 0;
                }
                int ta = (b + c) / 2;
                int tb = (a + c) / 2;
                int tc = (a + b) / 2;
                cnt++;
                a = ta;
                b = tb;
                c = tc;

        }
        return 0;
}%                              

Compiler output:
a.cc:31:2: error: expected unqualified-id before '%' token
   31 | }%
      |  ^
Language: C++

#include <stdio.h>

void main()
{
    int a, b, c;
    int count;
    scanf("%d %d %d", &a, &b, &c);

    while((a % 2 == 0) && (b % 2 == 0) && (c % 2 == 0))
    {
        int tmpa = a, tmpb = b, tmpc = c;
        a += tmpb/2 + tmpc/2;
        b += tmpc/2 + tmpa/2;
        c += tmpa/2 + tmpb/2;
	count++;
    }

	printf("%d", count);
}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: C++

a, b, c = map(int, raw_input().split())

def hoge(a, b, c):
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    return a, b, c

for i in xrange(108000):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print i
        exit()
    a, b, c = hoge(a, b, c)

print -1

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c = map(int, raw_input().split())
      | ^
Language: C++

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

int n, m;

int main() {
    cin.sync_with_stdio(0); cin.tie(0);
    cin >> n >> m;
    int tot = 0;
    for (int i = 0; i < m; i++) {
        int a, b; cin >> a >> b;
        tot += b - a;
    }

    if (tot % 2 || tot % (n - 1)) cout << "NO";
    else cout << "YES";
}
}



Compiler output:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,m;
  cin>>N>>m;
  map<int,int>M;
  for(int i=0;i<2*m;i++){
  int a; cin>>a;
    if(M.count(a));
    M.at(a)++;
    else
      M[a]=1;
    }bool ans=true;
  for(auto p:M){
  auto k=p.first;
    auto v=p.second;
    if(v%2==1){
      ans=false; break;
    }
  }if(ans)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
  cin>>N>>M;
  map<int,int>M;
  for(int i=0;i<2*M;i++){
  int a; cin>>a;
    if(M.count(a));
    M.at(a)++;
    else
      M[a]=1;
    }bool ans=true;
  for(auto p:M){
  auto k=p.first;
    auto v=p.second;
    if(v%2==1){
      ans=false; break;
    }
  }if(ans)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: conflicting declaration 'std::map<int, int> M'
    6 |   map<int,int>M;
      |               ^
a.cc:4:7: note: previous declaration as 'int M'
    4 | int N,M;
      |       ^
a.cc:9:10: error: request for member 'count' in 'M', which is of non-class type 'int'
    9 |     if(M.count(a));
      |          ^~~~~
a.cc:10:7: error: request for member 'at' in 'M', which is of non-class type 'int'
   10 |     M.at(a)++;
      |       ^~
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else
      |     ^~~~
a.cc:12:8: error: invalid types 'int[int]' for array subscript
   12 |       M[a]=1;
      |        ^
a.cc:14:14: error: 'begin' was not declared in this scope
   14 |   for(auto p:M){
      |              ^
a.cc:14:14: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:14:14: error: 'end' was not declared in this scope
   14 |   for(auto p:M){
      |              ^
a.cc:14:14: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include "template.cpp"

int main() {
  int n = IN, m = IN;
  Graph graph(n);
  rep(m) {
    int u = IN1, v = IN1;
    graph[u].emplace_back(v);
    graph[v].emplace_back(u);
  }
  rep(v, n) if (graph[v].size() % 2) EXIT("NO");
  OUT("YES");
}

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

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))
 
using namespace std;
 
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;}
 
const ll mod=1234567;
 
int main(){
    ll n,m;
    cin >> n >> m;
    vector<ll> c(n);
    rep(i,m){
        ll a,b;
        cin >> a >> b;
        a--; b--;
        c[a]++;
        c[b]++;
    }
    bool ok=true;
    rep(i,n){
        i(c[i]%2==1){
            ok=false;
        }
    }
    if(ok) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: 'i' cannot be used as a function
   35 |         i(c[i]%2==1){
      |         ~^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = (s); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i = (n); i >= 0; i--)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << '\n';
#define CFYN(n) cout << ( (n) ? "YES":"NO") << '\n';
#define OUT(n) cout << (n) << '\n';
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;

int main(void)
{
    IOS
    int N, M;
    cin >> N >> M;
    vector<int> v(N);
    REP(i,M) {
        int a, b;
        cin >> a >> b;
        a--; b--;
        v[a]++;
        v[b]--;
    }

    bool ans = true;
    REP(i,N) if (v[a] % 2 != 0) {
        ans = false;
        break;
    }

    CFYN(ans)

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:20: error: 'a' was not declared in this scope
   32 |     REP(i,N) if (v[a] % 2 != 0) {
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repp(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define repm(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define INF (1ll<<60)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
const lint MOD =1000000007;
const lint MAX = 1000000;
using Graph =vector<vector<lint>>;
typedef pair<lint,lint> P;
 
 
lint fac[MAX], finv[MAX], inv[MAX];
 
void COMinit() 
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (lint i = 2; i < MAX; i++)
    {
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
long long COM(lint n, lint k)
{
    if (n < k)
        return 0;
    if (n < 0 || k < 0)
        return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
lint primary(lint num)
{
    if (num < 2) return 0;
    else if (num == 2) return 1;
    else if (num % 2 == 0) return 0;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return 0;
        }
    }
 
    return 1;
}
   long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
    lint lcm(lint a,lint b){
        return a/__gcd(a,b)*b;
    }
     lint gcd(lint a,lint b){
        return __gcd(a,b);
    } 
  //解説AC
  int main(){
        lint n,m;
        cin>>n>>m;
        map<lint,lint>mp;
        rep(i,m){
            lint a,b;
            cin>>a>>b;
            mp[a]++;
            mp[b]++;
        }
        for(auto x:mp){
            if(x.second%2==1){
                cout<<"NO"
            }
        }
        cout<<"YES";
  }
  
     


Compiler output:
a.cc: In function 'int main()':
a.cc:84:27: error: expected ';' before '}' token
   84 |                 cout<<"NO"
      |                           ^
      |                           ;
   85 |             }
      |             ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repp(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define repm(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define INF (1ll<<60)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
const lint MOD =1000000007;
const lint MAX = 1000000;
using Graph =vector<vector<lint>>;
typedef pair<lint,lint> P;
 
 
lint fac[MAX], finv[MAX], inv[MAX];
 
void COMinit() 
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (lint i = 2; i < MAX; i++)
    {
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
long long COM(lint n, lint k)
{
    if (n < k)
        return 0;
    if (n < 0 || k < 0)
        return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
lint primary(lint num)
{
    if (num < 2) return 0;
    else if (num == 2) return 1;
    else if (num % 2 == 0) return 0;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return 0;
        }
    }
 
    return 1;
}
   long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
    lint lcm(lint a,lint b){
        return a/__gcd(a,b)*b;
    }
     lint gcd(lint a,lint b){
        return __gcd(a,b);
    } 
  //解説AC
  int main(){
        lint n,m;
        cin>>n>>m;
        map<lint,lint>mp;
        rep(i,m){
            lint a,b;
            cin>>a>>b;
            mp[a]++;
            mp[b]++;
        }
        for(auto x:mp){
            if(mp.second%2==1){
                cout<<"NO"
            }
        }
        cout<<"YES";
  }
  
     


Compiler output:
a.cc: In function 'int main()':
a.cc:83:19: error: 'class std::map<long long int, long long int>' has no member named 'second'
   83 |             if(mp.second%2==1){
      |                   ^~~~~~
a.cc:84:27: error: expected ';' before '}' token
   84 |                 cout<<"NO"
      |                           ^
      |                           ;
   85 |             }
      |             ~
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define PI 3.14159265358979

using namespace std;

int main(void){
  ll n, m;
  cin >> n >> m;
  
  vector<int> c(n);
  for (int i = 0; i < m; i++){
    ll a, b;
    cin >> a >> b;
    a--; b--;
    c[a] = (c[a] + 1) % 2;
    c[b] = (c[b] + 1) % 2;
  }

  int ok = 1;
  for (int i = 0; i < n; i++){
    if(c[a] == 1)
      ok = 0;
  }
  if(ok)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: 'a' was not declared in this scope
   24 |     if(c[a] == 1)
      |          ^
Language: C++

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm> 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (ll)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
int main(){
  ll n,m;
  cin>>n>>m;
  vll t(n);
  rep(i,m){
    ll a,b;
    cin>>a>>b;
    a--;
    b--;
    t[a]++;
    t[b]++;
  }
  rep(i,n){
    if(t[i]%2==1){
      COUT("NO");
      return 0;
    }
  }
  COUR("YES");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:3: error: 'COUR' was not declared in this scope; did you mean 'COUT'?
   61 |   COUR("YES");
      |   ^~~~
      |   COUT
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long N,M;cin>>N>>M;
  vector<long>A(N,0);
  for(long i=0;i<M;i++){
    long a,b;cin>>a>>b;A[a-1]++;B[b-1]++;
  }
  bool a=1;
  for(long i=0;i<N;i++)a*=(A[i]%2==0);
  cout<<(a?"YES":"NO");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: 'B' was not declared in this scope
    7 |     long a,b;cin>>a>>b;A[a-1]++;B[b-1]++;
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 	int n,m;
  scanf("%d%d}#include <bits/stdc++.h>
using namespace std;
int ct[100005];
int main(){
 	int n,m;
    scanf("%d%d",&n,&m);
    for (int i = 0; i < m; i++){
        int x,y;
        scanf("%d%d",&x,&y);
        ct[x]++; ct[y]++;
    }
    for (int i = 1; i <= n; i++){
        if (ct[i] & 1){
            printf("NO");
            return 0;
        }
    }
    printf("YES");


}


Compiler output:
a.cc:5:9: warning: missing terminating " character
    5 |   scanf("%d%d}#include <bits/stdc++.h>
      |         ^
a.cc:5:9: error: missing terminating " character
    5 |   scanf("%d%d}#include <bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: expected primary-expression before 'using'
    6 | using namespace std;
      | ^~~~~
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    8 | int main(){
      |         ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
    8 | int main(){
      |         ^~
      |         --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:11: error: a function-definition is not allowed here before '{' token
    8 | int main(){
      |           ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

typedef ll long long

const int MAXN = 2e5 + 21;

ll n, m;
ll d[MAXN];

int main () {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cin >> n >> m ;
    while (m--) {
    	ll v,  u;
    	cin >> v >> u;
    	d[v]++;
    	d[u]++;
	}
    for (int i = 1;  i <= n ; i ++) 
    	if (d[i] % 2)
    		return cout << "NO" << '\n', 0 ;
    cout << "YES" << '\n';
    return 0;
}

Compiler output:
a.cc:4:9: error: 'll' does not name a type
    4 | typedef ll long long
      |         ^~
a.cc:8:1: error: 'll' does not name a type
    8 | ll n, m;
      | ^~
a.cc:9:1: error: 'll' does not name a type
    9 | ll d[MAXN];
      | ^~
a.cc: In function 'int main()':
a.cc:13:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   13 |     cin >> n >> m ;
      |            ^
      |            yn
a.cc:13:17: error: 'm' was not declared in this scope; did you mean 'tm'?
   13 |     cin >> n >> m ;
      |                 ^
      |                 tm
a.cc:15:9: error: 'll' was not declared in this scope
   15 |         ll v,  u;
      |         ^~
a.cc:16:16: error: 'v' was not declared in this scope
   16 |         cin >> v >> u;
      |                ^
a.cc:16:21: error: 'u' was not declared in this scope
   16 |         cin >> v >> u;
      |                     ^
a.cc:17:9: error: 'd' was not declared in this scope
   17 |         d[v]++;
      |         ^
a.cc:21:13: error: 'd' was not declared in this scope
   21 |         if (d[i] % 2)
      |             ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int n,m;
  cin >>n >>m;
  int cnt[n+1]={};
  for(int i=0;i<m;i++){
    int a,b;
    cin >> a>>b;
    cnt[a]++;
    cnt[b]++;
  }
  for(i=0;i<=n;i++){
    if(cnt[i]%2!=0){
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
  

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

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int cnt[100001];

int main(){
    int n, m;
    cin >> n >> m;
    vector<int> ;
    for(int i = 0; i < m; ++i){
        int a, b;
        cin >> a >> b;
        --a;
        --b;
        ++cnt[a];
        ++cnt[b];
    }
    
    for(int i = 0; i < n; ++i){
        if(cnt[i] % 2 != 0){
            cout << "NO\n";
            return 0;
        }
    }
    cout << "YES\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: declaration does not declare anything [-fpermissive]
   12 |     vector<int> ;
      |     ^~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define pb push_back
#define eb emplace_back
using ll=long long;
static const ll mod = 1e9 + 7;
static const ll INF = 1LL << 50;
using namespace std;

ll graph[100005][100005];

int main(){
    ll n,m;
    cin>>n>>m;
    vector<int>v(n,1);
    rep(i,m){
        cin>>a>>b;
        a--;b--;
        v[a]=1-v[a];
        v[b]=1-v[b];
    }
    for(int x:v){
        if(!x){
            cout<<"NO"<<endl;
            return 0;
        }
    }
    cout<<"YES"<<endl;
    return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: 'a' was not declared in this scope
   30 |         cin>>a>>b;
      |              ^
a.cc:30:17: error: 'b' was not declared in this scope
   30 |         cin>>a>>b;
      |                 ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
const long long MOD = 1000000007LL;
const string alpha = "abcdefghijklmnopqrstuvwxyz";
bool judge(long num[],long n){
    rep(i,n){
        if(num[i+1]%2==1) return false;
    }
    return true;
}
int main(){
    long n,m;
    long >> n >> m;
    long num[n+1];
    rep(i,n){
        num[i+1]=0;
    }
    long a,b;
    rep(i,m){
        cin >> a >> b;
        num[a]++;
        num[b]++;
    }
    if(judge(num,n)) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: expected unqualified-id before '>>' token
   21 |     long >> n >> m;
      |          ^~
Language: C++

#include <iostream>
#include <cstring>
#include <limits.h>
#include <algorithm>
#include <math.h>
using namespace std;
typedef long long ll;

int main(void){
    int n, m, x[100020];
    cin >> n >> m;
    fill(x, x + n, 0);
    for (int i = 0; i < m; i++) {
        cin >> a >> b;
        a--;  b--;
        x[a]++;  x[b]++;
    }
    
    for (int i = 0; i < n; i++) {
        if (x[i] % 2 != 0) {
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'a' was not declared in this scope
   14 |         cin >> a >> b;
      |                ^
a.cc:14:21: error: 'b' was not declared in this scope
   14 |         cin >> a >> b;
      |                     ^
Language: C++

#pragma once
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <deque>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int t[101];
int pri[26];
int res = 0;
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
int pr[100010];
void uini(int n) {
	for (size_t i = 0; i <= n; i++)
	{
		pr[i] = i;
	}
}

int parent(int x) {
	if (x == pr[x]) return x;
	return pr[x] = parent(pr[x]);
}

bool unit(int x, int y) {
	int px = parent(x);
	int py = parent(y);

	if (px == py) return false;
	if (px < py) {
		pr[y] = px;
	}
	else {
		pr[x] = py;
	}
	return true;
}
struct edge {
	int to;
	bool use = false;
	edge(int _to) : to(_to) {}
};

ll t[100010];
void solv() {

	ll	n, m;
	cin >> n >> m;
	for (size_t i = 0; i < m; i++)
	{
		int a, b;
		cin >> a >> b;
		t[a]++;
		t[b]++;
	}

	for (size_t i = 1; i <= n; i++)
	{
		if (t[i] % 2 == 1) {
			cout << "NO" << endl;
			return;
		}
	}

	cout << "YES" << endl;
}


int main() {
	solv();

	return 0;
}


Compiler output:
a.cc:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
a.cc:59:4: error: conflicting declaration 'll t [100010]'
   59 | ll t[100010];
      |    ^
a.cc:20:5: note: previous declaration as 'int t [101]'
   20 | int t[101];
      |     ^
Language: C

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

const int N = 1e5 + 100;

int n, m, u, v, cnt[N];

int main() {
	ios::sync_with_stdio(false), cin.tie(0);
	cin >> n >> m;
	while(m--) {
		cin >> u >> v;
		cnt[--u]++;
		cnt[--v]++;
	}
	for (int i = 0; i < n; i++)
		if(cnt[i] & 1) {
			cout << "NO";
			return 0;
		}
	cout << "YES";
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int n,m,c[100005],a=0;
int main(){
	cin >> n >> m;
	m<<=1;
	while (m--)
		c[read()]^=1;
	for (int i=1;i<=n;i++)
		a+=c[i];
	puts(a?"NO":"YES");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: too few arguments to function 'ssize_t read(int, void*, size_t)'
    8 |                 c[read()]^=1;
      |                   ~~~~^~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /usr/include/c++/14/csignal:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:116,
                 from a.cc:1:
/usr/include/unistd.h:371:16: note: declared here
  371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
      |                ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b,k[10005],l[100005];
  cin>>a>>b;
  for(int i=0;i<b;++i){
    cin>>k[i]>>l[i];
  }
  for(int i=1;i<=a;++i){
    int count=0;
    for(int j=0;j<b;++j){
    if(k[j]==i||l[j]==i) count++;
    }
    if(count%2!=0){
      cout<<"NO"<<endl;
      return 0;
    }
  }
  cout<<"YES"endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   19 |   cout<<"YES"endl;
      |         ^~~~~~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n,m;
	while(cin>>n>>m)
	{
		int a[100000],,c[100000]b[100000]={0};
		for(int i=1;i<=n;i++)
		{
			cin>>a[i]>>c[i];
		}
		int sum=0;
		for(int i=1;i<=n;i++)
		{
			b[a[i]]++;
			b[c[i]]++;
		}
		flag=1;
		for(int i=0;i<100000;i++)
		{
			if(b[i]%2!=0)
				flag=0;
		}
		if(flag==1)
		cout<<"YES"<<"\n";
		else
		cout<<"NO\n"
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected unqualified-id before ',' token
   10 |                 int a[100000],,c[100000]b[100000]={0};
      |                               ^
a.cc:10:41: error: expected initializer before 'b'
   10 |                 int a[100000],,c[100000]b[100000]={0};
      |                                         ^
a.cc:13:36: error: 'c' was not declared in this scope
   13 |                         cin>>a[i]>>c[i];
      |                                    ^
a.cc:18:25: error: 'b' was not declared in this scope
   18 |                         b[a[i]]++;
      |                         ^
a.cc:19:27: error: 'c' was not declared in this scope
   19 |                         b[c[i]]++;
      |                           ^
a.cc:21:17: error: 'flag' was not declared in this scope
   21 |                 flag=1;
      |                 ^~~~
a.cc:24:28: error: 'b' was not declared in this scope
   24 |                         if(b[i]%2!=0)
      |                            ^
a.cc:30:29: error: expected ';' before '}' token
   30 |                 cout<<"NO\n"
      |                             ^
      |                             ;
   31 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
int dx[]={1, -1, 0, 0, 1, -1, -1, 1};

#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--)
#define mp make_pair
#define fi first
#define sc second
ll n;
ll m;
ll cou[200000];
int main(){
	cin >> n >> m;

	REP(i,m) {
		ll a,b;
		cin >> a >> b;
		cou[a - 1]++;
		cou[b - 1]++;
	}

	REP(i,n)
		if(cou[i] % 2 == 1) {
			cout << "NO" << endl;
			return 0;
		}
	cout << "YES" << endl;
	return 0;
}
#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
int dx[]={1, -1, 0, 0, 1, -1, -1, 1};

#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--)
#define mp make_pair
#define fi first
#define sc second
ll n;
ll m;
ll cou[200000];
int main(){
	cin >> n >> m;

	REP(i,m) {
		ll a,b;
		cin >> a >> b;
		cou[a - 1]++;
		cou[b - 1]++;
	}

	REP(i,n)
		if(cou[i] % 2 == 1) {
			cout << "NO" << endl;
			return 0;
		}
	cout << "YES" << endl;
	return 0;
}


Compiler output:
a.cc:42:5: error: redefinition of 'int dy []'
   42 | int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
      |     ^~
a.cc:6:5: note: 'int dy [8]' previously defined here
    6 | int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
      |     ^~
a.cc:43:5: error: redefinition of 'int dx []'
   43 | int dx[]={1, -1, 0, 0, 1, -1, -1, 1};
      |     ^~
a.cc:7:5: note: 'int dx [8]' previously defined here
    7 | int dx[]={1, -1, 0, 0, 1, -1, -1, 1};
      |     ^~
a.cc:52:4: error: redefinition of 'll n'
   52 | ll n;
      |    ^
a.cc:16:4: note: 'll n' previously declared here
   16 | ll n;
      |    ^
a.cc:53:4: error: redefinition of 'll m'
   53 | ll m;
      |    ^
a.cc:17:4: note: 'll m' previously declared here
   17 | ll m;
      |    ^
a.cc:54:4: error: redefinition of 'll cou [200000]'
   54 | ll cou[200000];
      |    ^~~
a.cc:18:4: note: 'll cou [200000]' previously declared here
   18 | ll cou[200000];
      |    ^~~
a.cc:55:5: error: redefinition of 'int main()'
   55 | int main(){
      |     ^~~~
a.cc:19:5: note: 'int main()' previously defined here
   19 | int main(){
      |     ^~~~
Language: C++

#include "stdafx.h"
//ここから↓
#include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
 
using namespace std;
typedef long long ll;
 
 
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 1000000007;
// memset(a,0,sizeof(a)); →全部０にする
 
vector<int> G[100005];
std::vector<P> tree[100010];
 
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
 
ll i,j,k,l,ii,jj;
ll n,m;
ll a,b;
ll x[100005];
ll ans=0;
ll v=-1,w;
 
int main(){
    cin>>n>>m;

	for(i=0;i<m;i++){
		cin>>a>>b;
		x[a]++;
		x[b]++;
	}
	bool flag=false;
	for(i=1;i<=n;i++){
		if(x[i]%2==1)flag=true;
	}
	if(flag)cout<<"NO"<<endl;
	else cout<<"YES"<<endl;


	return 0;
}

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

#include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
 
using namespace std;
typedef long long ll;
 
 
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 1000000007;
// memset(a,0,sizeof(a)); →全部０にする
 
vector<int> G[100005];
std::vector<P> tree[100010];
 
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
 
ll i,j,k,l,ii,jj;
ll n,m;
ll a,b
ll ans=0;
ll v=-1,w;
 
int main(){
    cin>>n>>m;

	for(i=0;i<m;i++){
		cin>>a>>b;
		ans += abs(b-a);
	}
	if(ans%2==0)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;


	return 0;
}

Compiler output:
a.cc:31:1: error: expected initializer before 'll'
   31 | ll ans=0;
      | ^~
a.cc: In function 'int main()':
a.cc:38:25: error: 'b' was not declared in this scope
   38 |                 cin>>a>>b;
      |                         ^
a.cc:39:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   39 |                 ans += abs(b-a);
      |                 ^~~
      |                 abs
a.cc:41:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   41 |         if(ans%2==0)cout<<"YES"<<endl;
      |            ^~~
      |            abs
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define MAX 100005
int vis[MAX];
int main()
{
    int n,m;
    scanf("%d%d",&n,&m);
    memset(vis,0,sizeof(vis));
    while(m--)
    {
        scanf("%d%d",&x,&y);
        vis[x]++;
        vis[y]++;
    }
    int flag=1;
    for(int i=1;i<=n;i++)
        if(vis[i]%2)
        flag=0;
        if(flag)
            printf("YES\n");
        else
            printf("NO\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'x' was not declared in this scope
   15 |         scanf("%d%d",&x,&y);
      |                       ^
a.cc:15:26: error: 'y' was not declared in this scope
   15 |         scanf("%d%d",&x,&y);
      |                          ^
Language: C++

#include<cstdio>

int n, m, x, y, ans = 0;
int main()
{
    scanf(%d%d", &n, &m);
    for(int i = 0; i < m; i++)
    {
        scanf("%d%d", &x, &y);
        ans ^= x ^ y;
    }
    if(!ans) printf("YES\n"); else printf("NO\n");
    return 0;
}


Compiler output:
a.cc:6:15: warning: missing terminating " character
    6 |     scanf(%d%d", &n, &m);
      |               ^
a.cc:6:15: error: missing terminating " character
    6 |     scanf(%d%d", &n, &m);
      |               ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: expected primary-expression before '%' token
    6 |     scanf(%d%d", &n, &m);
      |           ^
a.cc:6:12: error: 'd' was not declared in this scope
    6 |     scanf(%d%d", &n, &m);
      |            ^
a.cc:7:20: error: 'i' was not declared in this scope
    7 |     for(int i = 0; i < m; i++)
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int N, M;
    cin >> N >> M;
    int tmp = N;
    int v[10000] = { 0 };
    while (tmp--)
    {
        int a, b;
        cin >> a >> b;
        v[a - 1] ^= 1;
        v[b - 1] ^= 1;
    }
    for (int i = 0; i < ; i++)
    {

        if (v[i] % 2)
        {
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 1;
}

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

#include<iostream>
using namespace std;
int main() {
	int n, m, x, y;
	bool flag = true;
	int sw[100000];
	memset(sw, 0, sizeof(sw));
	cin >> n >> m;
	for (int i = 0; i < m; i++) {
		cin >> x >> y;
		sw[x] += 1;
		sw[y] += 1;
	}
	for (int i = 0; i < 100000; i++) {
		if (sw[i] % 2 == 1) {
			flag = false;
			break;
		}
	}
	if (flag == true) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'memset' was not declared in this scope
    7 |         memset(sw, 0, sizeof(sw));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

 
int n, m, x, y;
int a[100005]={0};
 
int main(){
    cin>>n>>m;
    for(int i=1; i<=m; i++){
        cin>>x>>y;
        a[x]++;
        a[y]++;
    }
    for(int i=1; i<=n; i++){
        if(a[i]%2){
            cout<<"NO";
            return 0;
        }
    }
    cout<<"YES";
    return 0;
}

Compiler output:
a.cc:4:1: error: extended character   is not valid in an identifier
    4 |  
      | ^
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |  
      | ^
a.cc:4:1: error: '\U000000a0' does not name a type
    4 |  
      | ^
a.cc:7:1: error: '\U000000a0' does not name a type
    7 |  
      | ^
Language: C++

#include<iostream>
using namespace std;

 
int n, m, x, y;
int a[100005];
 
int main(){
    cin>>n>>m;
    for(int i=1; i<=m; i++){
        cin>>x>>y;
        a[x]++;
        a[y]++;
    }
    for(int i=1; i<=n; i++){
        if(a[i]%2){
            cout<<"NO";
            return 0;
        }
    }
    cout<<"YES";
    return 0;
}

Compiler output:
a.cc:4:1: error: extended character   is not valid in an identifier
    4 |  
      | ^
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |  
      | ^
a.cc:4:1: error: '\U000000a0' does not name a type
    4 |  
      | ^
a.cc:7:1: error: '\U000000a0' does not name a type
    7 |  
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pair<int, int> > vp;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define out(n) cout << (n) << endl;
#define vut(v) rep(i, v.size()) out(v[i]);

int main() {
  cin.tie(0);
	ios::sync_with_stdio(false);
  int n, m, d[100001] = {0};
  cin >> n >> m;

  int a, b;
  rep(i, m) {
    cin >> a >> b;
    d[a]++, d[b]++;
  }

  rep(i, n + 1) {
    if(d[i] & 1) {
      out("NO")
      return 0;
    }
  }

  out("YES")
}


Compiler output:
a.cc:23:11: error: macro "rep" requires 3 arguments, but only 2 given
   23 |   rep(i, m) {
      |           ^
a.cc:11:9: note: macro "rep" defined here
   11 | #define rep(i, a, n) for(int i = (a); i < (n); i++)
      |         ^~~
a.cc:28:15: error: macro "rep" requires 3 arguments, but only 2 given
   28 |   rep(i, n + 1) {
      |               ^
a.cc:11:9: note: macro "rep" defined here
   11 | #define rep(i, a, n) for(int i = (a); i < (n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:23:3: error: 'rep' was not declared in this scope
   23 |   rep(i, m) {
      |   ^~~
a.cc:28:6: error: expected ';' before '{' token
   28 |   rep(i, n + 1) {
      |      ^          ~
      |      ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pair<int, int> > vp;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define For(i, a, n) for(int i = a; i < (n); i++)
#define out(n) cout << (n) << endl;
#define vut(v) rep(i, v.size()) out(v[i]);

int main() {
  int n, m, d[10001];
  cin >> n >> m;

  int a, b;
  rep(i, m) {
    cin >> a >> b;
    d[a] ^= 1, d[b] ^= 1;
  }

  For(i, 1, n + 1) {
    if(d[i] == 1) {
      out("NO")
      return;
    }
  }

  out("YES")
}


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

#include<iostream>
int temp[100001];

using namespace std;
int main(){
	int m,n;
	bool result=true;
	while(cin>>n>>m){
		 result=true;
		for(int i=0;i<n+1;i++){
		   temp[i]=0;
		}
		int a,b;
		for(int j=0;j<m;j++){
		   cin>>a>>b;
		   temp[a]++;
		   temp[b]++;
		}

		for(int k=1;k<n;k++){
		   if(temp[k] != temp[k+1] || temp[k]<1) result=false;
		}

		if(result && temp[k] > 1 && temp[1]%2==0) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:35: error: 'k' was not declared in this scope
   24 |                 if(result && temp[k] > 1 && temp[1]%2==0) cout<<"YES"<<endl;
      |                                   ^
Language: C++

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
using namespace std;

map<int,int>s[100005];

int main(){
	int n,m;
	memset(s,0,sizeof(s));
	scanf("%d %d",&n,&m);
	for(int i = 1;i <= m;i++){
		int a,b;
		scanf("%d %d",a,b);
		s[a]++;
		s[b]++;
	}
	for(int i = 1;i <= n;i++){
		if(s[i] % 2 != 0){
			printf("NO");
			return 0;
		}
	}
	printf("YES");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   19 |                 s[a]++;
      |                 ~~~~^~
a.cc:20:21: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   20 |                 s[b]++;
      |                 ~~~~^~
a.cc:23:25: error: no match for 'operator%' (operand types are 'std::map<int, int>' and 'int')
   23 |                 if(s[i] % 2 != 0){
      |                    ~~~~ ^ ~
      |                       |   |
      |                       |   int
      |                       std::map<int, int>
Language: C

#include <cstdio>
#include <set>

std::set<int> e[100000];
int num;

bool path(int a, int b, int p){
  if(a==b) return true;

  for(auto c: e[a]){
    if(c == p) continue;
    if(path(c, b, a)){
      e[a].erase(c);
      e[c].erase(a);
      num--;
      return true;
    }
  }
  return false;
}

int main(){
  int n, m;
  scanf("%d%d", &n, &m);
  int r = 0;
  for(int i=0;i<m;i++){
    int a, b;
    scanf("%d%d", &a, &b);
    if(!path(a-1, b-1, -1)){
      e[a-1].insert(b-1);
      e[b-1].insert(a-1);
      num++;
    }
  }
  if(num) puts("NO"); else puts("YES");
  return 0;
}


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

N, M = map(int, input().split())
deg = [0 for i in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    deg[a-1] += 1
    deg[b-1] += 1

res = 'YES'
for d in deg:
    if d % 2 == 1:
        res = 'NO'
print(res)

Compiler output:
a.cc:8:7: warning: multi-character character constant [-Wmultichar]
    8 | res = 'YES'
      |       ^~~~~
a.cc:11:15: warning: multi-character character constant [-Wmultichar]
   11 |         res = 'NO'
      |               ^~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N, M = map(int, input().split())
      | ^
Language: C++

N, M = map( int, input().split() )
imos = [ 0 for i in range( N + 1 ) ]
for i in range( M ):
  a, b = map( int, input().split() )
  imos[ a - 1 ] += 1
  imos[ b - 1 ] -= 1
for i in range( 1, N ):
  imos[ i ] += imos[ i - 1 ]
print( "NO" if any( imos[ i ] & 1 for i in range( N ) ) else "YES" )


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M = map( int, input().split() )
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int n,m,a,b;
int cnt[100010];
int main(){
	cin>>n>>m;
	memset(cnt,0,n);
	for(int i=0;i<m;i++){
		cin>>a>>b;
		cnt[a]++,cnt[b]++;
	}
	bool ok=true;
	for(int i=0;i<=n;i++){
		if(cnt[i]%2==1)ok=false;
	}
	if(ok)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'memset' was not declared in this scope
    9 |         memset(cnt,0,n);
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | #include<string>
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>

#include "../../library/library/debug_template.cpp"

using namespace std;

#ifdef _DEBUG
#include "../../library/library/debug_template.cpp"
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else
#define DMP(...) ((void)0)
#endif

struct init {
    init() {
        cin.tie(nullptr); ios::sync_with_stdio(false);
    }
} init_;

int main() {
    int h, w, k;
    cin >> h >> w >> k;

    vector<vector<char>> grid(h, vector<char>(w));
    int si, sj;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            cin >> grid[i][j];
            if (grid[i][j] == 'S') { si = i; sj = j; }
        }
    }

    using type = pair<int, pair<int, int>>;
    priority_queue<type, vector<type>, greater<type>> pq;
    vector<vector<int>> cost(h, vector<int>(w, 1e9));
    pq.emplace(0, make_pair(si, sj));
    while (!pq.empty()) {
        auto [c, xy] = pq.top();
        auto [x, y] = xy;
        pq.pop();
        if (cost[x][y] <= c) continue;
        DMP(c, xy);
        cost[x][y] = c;

        vector<int> dx{ 1,-1,0,0 };
        vector<int> dy{ 0,0,1,-1 };
        for (int i = 0; i < 4; i++) {
            int nx = x + dx[i], ny = y + dy[i];
            if (nx < 0 || nx >= h || ny < 0 || ny >= w) continue;
            if (cost[nx][ny] <= c) continue;
            if (grid[x][y] == 'S' || grid[x][y] != grid[nx][ny]) {
                pq.emplace((c / k + 1) * k, make_pair(nx, ny));
            }
            else pq.emplace(c + 1, make_pair(nx, ny));
        }
    }

    DMP(cost);

    int ans = 1e9;
    for (int i = 0; i < h; i++) {
        ans = min(ans, (cost[i][0] + 1) / k + (grid[i][0] == '#'));
        ans = min(ans, (cost[i][w - 1] + 1) / k + (grid[i][w - 1] == '#'));
    }
    for (int j = 0; j < w; j++) {
        ans = min(ans, (cost[0][j] + 1) / k + (grid[0][j] == '#'));
        ans = min(ans, (cost[h - 1][j] + 1) / k + (grid[h - 1][j] == '#'));
    }

    cout << ans << endl;
}


Compiler output:
a.cc:6:10: fatal error: ../../library/library/debug_template.cpp: No such file or directory
    6 | #include "../../library/library/debug_template.cpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

int H,W,K;
string S[808];
int SY,SX;

int dist[808][808];

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>H>>W>>K;
	FOR(y,H) {
		cin>>S[y];
		FOR(x,W) {
			if(S[y][x]=='S') {
				S[y][x]='.';
				SY=y;
				SX=x;
			}
			dist[y][x]=1<<20;
		}
	}
	
	dist[SY][SX]=0;
	queue<int> Q;
	Q.push(SY*1000+SX);
	int mi=1<<20;
	
	while(Q.size()) {
		int cy=Q.front()/1000;
		int cx=Q.front()%1000;
		Q.pop();
		
		mi=min(mi,1+(cy+K-1)/K);
		mi=min(mi,1+(cx+K-1)/K);
		mi=min(mi,1+((H-1-cy)+K-1)/K);
		mi=min(mi,1+((W-1-cx)+K-1)/K);
		if(dist[cy][cx]==K) continue;
		
		FOR(i,4) {
			int dd[]={1,0,-1,0};
			int ty=cy+dd[i];
			int tx=cx+dd[i^1];
			if(ty<0 || tx<0 || ty>=H || tx>=W) continue;
			if(S[ty][tx]=='#') continue;
			if(dist[ty][tx]>dist[cy][cx]+1) {
				dist[ty][tx]=dist[cy][cx]+1;
				Q.push(ty*1000+tx);
			}
		}
	}
	cout<<mi<<endl;
}

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string S[808];
      | ^~~~~~
a.cc: In function 'void solve()':
a.cc:8:28: error: 'string' was not declared in this scope
    8 |         int i,j,k,l,r,x,y; string s;
      |                            ^~~~~~
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin>>H>>W>>K;
      |         ^~~
a.cc:11:9: error: 'FOR' was not declared in this scope
   11 |         FOR(y,H) {
      |         ^~~
a.cc:24:9: error: 'queue' was not declared in this scope
   24 |         queue<int> Q;
      |         ^~~~~
a.cc:24:15: error: expected primary-expression before 'int'
   24 |         queue<int> Q;
      |               ^~~
a.cc:25:9: error: 'Q' was not declared in this scope
   25 |         Q.push(SY*1000+SX);
      |         ^
a.cc:33:20: error: 'min' was not declared in this scope; did you mean 'mi'?
   33 |                 mi=min(mi,1+(cy+K-1)/K);
      |                    ^~~
      |                    mi
a.cc:51:9: error: 'cout' was not declared in this scope
   51 |         cout<<mi<<endl;
      |         ^~~~
a.cc:51:19: error: 'endl' was not declared in this scope
   51 |         cout<<mi<<endl;
      |                   ^~~~
Language: C++

#include <bits\stdc++.h>
using namespace std;
const int INF=0x3f3f3f3f,maxn=804;
queue<int>q;
int a[maxn][maxn],n,m,k,vis[maxn][maxn],sx,sy,mina;
int lrud[5]={0,1,0,-1,0};
void bfs()
{
	int i;
	vis[sx][sy]=0;
	q.push(sx);q.push(sy);
	while(!q.empty())
	{
		int x=q.front();q.pop();int y=q.front();q.pop();
	
		if(vis[x][y]==k)
			continue;
		for(i=1;i<=4;i++)
		{
			int gx=x+lrud[i-1];
			int gy=y+lrud[i];
			if(gx<1 || gy<1 || gx>n || gy>m || vis[x][y]+1>=vis[gx][gy] || a[gx][gy]==1)
				continue;
			vis[gx][gy]=vis[x][y]+1;
			q.push(gx);q.push(gy);

		}
	}
}
int main()
{
	int i,j,ans=0;
	cin>>n>>m>>k;
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=m;j++)
		{
			vis[i][j]=INF;
			char c;
			cin>>c;
			if(c=='.')
				a[i][j]=0;
			else
				if(c=='#')
					a[i][j]=1;
				else
				{
					sx=i,sy=j;
					a[i][j]=0;
				}
		}
	}
	mina=INF;
	bfs();
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=m;j++)
		{
			if(vis[i][j]!=INF)
			{	mina=min(mina,min((i+k-2)/k,min((j+k-2)/k,min((n-i+k-1)/k,(m-j+k-1)/k))))+1;
			}
		}
	}
	cout<<mina;
	return 0;
}


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