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

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

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pow(x) x*x
#define ll long long
static const int MAX = 10000;
static const ll INFTY = 1e12;

struct edge {
    ll to, cost;
};

using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;
// 入力
int H, W;
vector<vector<char>> field;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

// 深さ優先探索
vector<bool> seen;
vector<int> colors;

int main() {

  int M;
  int N;
  cin >> N >> M;
  int ans;
  vector<int> s(M);
  vector<char> c(M), n(9);
  REP(i, M){
    cin >> s[i] >> c[i];
    s[i]--;
  }
  if(N == 3){
    string _n = "000";
  } if(N == 2){
    string _n = "00";
  }else {
    string _n = "0";
  }
  
  vector<int> y(3, 0);
  REP(i, M){
    if(s[i] == 0 && c[i] == '0'){
      _n = "-1";
      break;
    }else {
      if(y[s[i]] != 0 && _n[s[i]] != c[i]){
        _n = "-1";
        break;
      } 
      // cout << s[i] << " ";
      _n[s[i]] = c[i];
      y[s[i]]++;
    }

  }


  cout << stoi(_n) << endl;
 

    
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:49:7: error: '_n' was not declared in this scope; did you mean 'n'?
   49 |       _n = "-1";
      |       ^~
      |       n
a.cc:52:26: error: '_n' was not declared in this scope; did you mean 'n'?
   52 |       if(y[s[i]] != 0 && _n[s[i]] != c[i]){
      |                          ^~
      |                          n
a.cc:57:7: error: '_n' was not declared in this scope; did you mean 'n'?
   57 |       _n[s[i]] = c[i];
      |       ^~
      |       n
a.cc:64:16: error: '_n' was not declared in this scope; did you mean 'n'?
   64 |   cout << stoi(_n) << endl;
      |                ^~
      |                n
Language: C++

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

int n,m,c1[6],s1[4];
string s,c="02345";
map<int, int>mp;
bool b;

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

  for (int i=0; i<m; i++) {
    cin >> s1[i] >> c1[i];
    mp[s1[i]]++;
  }
  
  for (int i=0; i<m; i++) {
    if (mp[s1[i]]>1)
      b=1;
  }

  for (int i=0; i<m; i++){
    c[s1[i]]=c1[i];
  }

  if (c[0]=='0' || b==1)
    cout << "-1" << endl;
  else{
    for (int i=0; i<n; i++)
      cout << c[i] << endl;
  }
}

Compiler output:
a.cc:3:10: error: stray '#' in program
    3 | int main(#include <bits/stdc++.h>
      |          ^
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main(#include <bits/stdc++.h>
      |     ^~~~
a.cc:3:11: error: 'include' was not declared in this scope
    3 | int main(#include <bits/stdc++.h>
      |           ^~~~~~~
a.cc:3:20: error: 'bits' was not declared in this scope
    3 | int main(#include <bits/stdc++.h>
      |                    ^~~~
a.cc:3:25: error: 'stdc' was not declared in this scope; did you mean 'std'?
    3 | int main(#include <bits/stdc++.h>
      |                         ^~~~
      |                         std
a.cc:4:1: error: expected primary-expression before 'using'
    4 | using namespace std;
      | ^~~~~
a.cc:11:10: error: 'int main()' redeclared as different kind of entity
   11 | int main() {
      |          ^
a.cc:3:5: note: previous declaration 'int main'
    3 | int main(#include <bits/stdc++.h>
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ipair = pair<int,int>;
#define rep(i,a,b) for(int (i)=a;(i)<(int)(b);(i)++)
    
int main(){
    int N,M;
    cin >> N >> M;
    vector<ipair> pa(M);
    rep(i,0,M) cin>>pa[i].first >> pa[i].second;
    sort(pa.begin(), pa.end(), 
     [](const ipair& x, const ipair& y) { return x.first > y.first;});
    
    int ans = 0;
    int fin_flag = 0;
    
    rep(i,0,M){
        if(i<M-1&&pa[i].first==pa[i+1].first&&pa[i].second != pa[i+1].second){
            fin_flag = 1;
            break;
        }
        else{
            if(pa[i].first==1 && pa[i].second==0){
                fin_flag = 1;
                break;
        }
    }
    if(fin_flag==1) cout << "-1" << endl;
    else{
        ans += pa[0].second*pow(10,N-pa[0].first);
        rep(i,1,M){
            if(pa[i].first != pa[i-1].first){
                ans += pa[i].second*pow(10,N-pa[i].first);
            }
        }
        if(ans/pow(10,N-1)<=0) ans += pow(10,N-1);
        cout << ans << endl;
    }   
}

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

#include<bits/stdc++.h>
 
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ldb;
 
#define pb push_back
#define popb pop_back
#define popf pop_front
#define pf push_front
#define si size()
#define mp make_pair 
#define mt make_tuple
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound

#define ask(i,m,n) for(lli i=m;i<n;i++)
#define anket ios::sync_with_stdio(0), cin.tie(0),cout.tie(0)
 
#define endl "\n"
#define o0(a) cout<<a<<" "
#define o1(a) cout<<a<<"\n"
#define o2(a,b) cout<<a<<" "<<b<<"\n"
#define o3(a,b,c) cout<<a<<" "<<b<<" "<<c<<"\n"
#define o4(a,b,c,d) cout<<a<<" "<<b<<" "<<c<<" "<<d<<"\n"
using namespace std;

#define prime1 1000000007
#define prime2 998244353

lli modadd(lli n,lli m , lli mod){
    lli sum = ((n+m)%mod+mod)%mod;
    return sum;
}

lli modsub(lli n,lli m,lli mod){
    lli diff = ((n-m+mod)%mod+mod)%mod;
    return diff;
}

lli modpro(lli n,lli m, lli mod){
    lli pro = ((n*m)%mod+mod)%mod;
    return pro;
}

lli powmod(lli x,lli y,lli mod){
    x %= mod;
    y %= mod;
    lli res = 1;
    while (y > 0) {
        if (y & 1)
            res = modpro(res , x,mod);
        y = y >> 1;
        x = modpro(x , x,mod);
    }
    return res;
}

lli moddiv(lli n,lli m,lli mod){
    //return n/m mod (mod) or n*(m)^-1 mod (mod)
    lli a = powmod(m,mod-2,mod);
    //this is because of fermats thm i.e. a^-1 = a^p-2 mod(p) check
    //multiplying p on both sides
    lli res = modpro(a,n,mod);
    return res;
}




int main() {
	anket;
	lli n,m;
	cin>>n>>m;
	lli a[]={1,0,0,0,0};
	lli d[]={0,0,0,0,0};
	lli flag=0;
	lli ma=0;;
	ask(i,0,m){
	    lli b;
	    cin>>b;
	    lli c;cin>>c;
	    if(d[b-1]==1 && c != a[b-1]){
	        flag=1;
	    }
	    a[b-1]=c;
	    
	    ma =max(ma,b); 
	        d[b-1]=1;
	    
	}
	if(flag || (a[0]==0 && n!= 1) || ma>n)
	{
	    o1(-1);
	}
	else{
	    if(n==1){
	        o1();
	    }
	    else{
	   ask(i,0,n){
	       cout<<a[i];
	   }; 
	    };
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected primary-expression before '<<' token
   24 | #define o1(a) cout<<a<<"\n"
      |                      ^~
a.cc:100:17: note: in expansion of macro 'o1'
  100 |                 o1();
      |                 ^~
Language: C++

#include<bits/stdc++.h>
 
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ldb;
 
#define pb push_back
#define popb pop_back
#define popf pop_front
#define pf push_front
#define si size()
#define mp make_pair 
#define mt make_tuple
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound

#define ask(i,m,n) for(lli i=m;i<n;i++)
#define anket ios::sync_with_stdio(0), cin.tie(0),cout.tie(0)
 
#define endl "\n"
#define o0(a) cout<<a<<" "
#define o1(a) cout<<a<<"\n"
#define o2(a,b) cout<<a<<" "<<b<<"\n"
#define o3(a,b,c) cout<<a<<" "<<b<<" "<<c<<"\n"
#define o4(a,b,c,d) cout<<a<<" "<<b<<" "<<c<<" "<<d<<"\n"
using namespace std;

#define prime1 1000000007
#define prime2 998244353

lli modadd(lli n,lli m , lli mod){
    lli sum = ((n+m)%mod+mod)%mod;
    return sum;
}

lli modsub(lli n,lli m,lli mod){
    lli diff = ((n-m+mod)%mod+mod)%mod;
    return diff;
}

lli modpro(lli n,lli m, lli mod){
    lli pro = ((n*m)%mod+mod)%mod;
    return pro;
}

lli powmod(lli x,lli y,lli mod){
    x %= mod;
    y %= mod;
    lli res = 1;
    while (y > 0) {
        if (y & 1)
            res = modpro(res , x,mod);
        y = y >> 1;
        x = modpro(x , x,mod);
    }
    return res;
}

lli moddiv(lli n,lli m,lli mod){
    //return n/m mod (mod) or n*(m)^-1 mod (mod)
    lli a = powmod(m,mod-2,mod);
    //this is because of fermats thm i.e. a^-1 = a^p-2 mod(p) check
    //multiplying p on both sides
    lli res = modpro(a,n,mod);
    return res;
}




int main() {
	anket;
	lli n,m;
	cin>>n>>m;
	lli a[]={1,0,0,0,0};
	lli d[]={0,0,0,0,0};
	lli flag=0;
	ask(i,0,m){
	    lli b;
	    cin>>b;
	    lli c;cin>>c;
	    if(d[b-1]==1 && c != a[b-1]){
	        flag=1;
	    }
	    a[b-1]=c;
	    
	    
	        d[b-1]=1;
	    
	}
	if(flag || (a[0]==0 && n!= 1) || m>n)
	{
	    o1(-1);
	}
	else{
	    if(n==1){
	        o1();
	    }
	    else{
	   ask(i,0,n){
	       cout<<a[i];
	   }; 
	    };
	}
	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected primary-expression before '<<' token
   24 | #define o1(a) cout<<a<<"\n"
      |                      ^~
a.cc:99:17: note: in expansion of macro 'o1'
   99 |                 o1();
      |                 ^~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int kekka=-1;
      int hantei=0;
      int n=sc.nextInt();
      int m=sc.nextInt();
      int[] a=new int[n];
      for(int i=0;i<n;i++){
        a[i]=-1;
      }
      for(int i=0;i<m;i++){
        int k=sc.nextInt();
        int num=sc.nextInt();
        if(a[k]==num||a[k]==-1){
          a[k]=num;
        }else{
          hantei=1;
          break;
        }
      }
      kekka=0;
      for(int i=0;i<n;i++){
        if(a[n-i-1]>0){
        kekka+=a[n-i-1]*int(Math.pow(10,n-1-i));
        }
      }
      if(hantei==0){
        System.out.println(kekka);
      }else{
        System.out.println(-1);
      }
	}
}


Compiler output:
Main.java:26: error: '.class' expected
        kekka+=a[n-i-1]*int(Math.pow(10,n-1-i));
                           ^
Main.java:26: error: ';' expected
        kekka+=a[n-i-1]*int(Math.pow(10,n-1-i));
                                              ^
2 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
#define INF 1000100100
typedef long long ll;
using namespace std;
 

int main(){
  int n,m; cin >> n >> m;
  vector<int> k(n,10);
    if(m==0){
        if(n==1) cout << 0 << endl;
        else{
        printf("%d",1);
        rep(i,n-1) printf("%d",0);
        }
    }
  rep(i,m){
      int s,c; cin >> s >> c;
      s-=1;
      if(k[s]==10) k[s]=c;
      else if(k[s]!=c){
          cout << -1 << endl;
          break;
      }
      if(k[0]==0 && n!=1){
          cout << -1 << endl;
          break;
      }
      if(i==m-1){
          rep(j,n-1){
              if(k[j+1]==10) k[j+1]=0;
          }
          if(k[0]==10) k[j]=1;
          rep(j,n){
              printf("%d",k[j]);
          }
      }
  }
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:26: error: 'j' was not declared in this scope
   35 |           if(k[0]==10) k[j]=1;
      |                          ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int main() {
	int n, m;
	cin >> n >> m;
	vector<int> s(m), c(m);
	rep(i, m) cin >> s[i] >> c[i];
	rep(i, 1000) {
		bool ok = true;
		rep(j, m) {
			if((i/(int)pow(10, n-s[j]))%10 != c[i]) {
				ok = false;
				break;
			}
		}
		if(ok) {
			cout << i << endl;
			return 0;
		}
	}
	out << -1 << endl;
	
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define INF 10000000000000001
#define DIM 200001
#define mod 1000000007
#define PI 3.1415926535897932384626433
#define se second
#define fi first
#define pb push_back
#define T true
#define F false
#define endl "\n"
typedef char ch;
typedef bool boll;
typedef string st;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef set < string > sst;
typedef set < long long > sl;
typedef queue < long long > que;
typedef vector < long long > vec;
typedef map < long long, long long > mll;
typedef pair < long long, long long > pll;
typedef vector < pair < long long, long long > > vpl;
typedef pair < long long, unsigned long long > pul;
ll n,m,z,x,s,a[5],c[5];
int main()
{
    cin>>n;
    cin>>m;
    int ff=0;
    ll ans=0;
    if(m==0){
        cout<<1;
        for(int i=2;i<=n)cout<<0;
    }
    for(int i=1;i<=m;i++){
        cin>>z>>x;
        if(a[z]==0 && c[z]==0){
            c[z]++;
            a[z]=x;
        }
        else if(c[z]==1 && a[z]!=x)ans=-1;
    }
    if(ans==-1 || a[1]==0)cout<<-1<<endl;
    else for(int i=1;i<=n;i++)cout<<a[i];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: expected ';' before ')' token
   37 |         for(int i=2;i<=n)cout<<0;
      |                         ^
      |                         ;
Language: C++

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

int main(){
  int N, M;
  cin >> N >> M;
  bool judge1 = 0, judge2 = 0;
  vector<int> s(N);
  rep(i, M){
    int a, b;
    cin >> a >> b;
    s[a-1] = b;
    if a == 1; judge1 = 1;
    if a == N; judge2 = 1;
  }
  
  if (judge1 && judge2){
    rep(i, N){
      cout << s[i];
    }
    cout << endl;
  }
  
  else {
    cout << -1 << endl;
  }
    
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: expected '(' before 'a'
   15 |     if a == 1; judge1 = 1;
      |        ^
      |        (
a.cc:16:8: error: expected '(' before 'a'
   16 |     if a == N; judge2 = 1;
      |        ^
      |        (
Language: C++

// In god we trust

#include <bits/stdc++.h>
#include <chrono>
#include <algorithm>


#define pb push_back
#define fi first
#define se second
#define Vi vector<int>
#define Vb vector<bool>
#define Pi pair<int, int>
#define MP make_pair
#define MT make_tuple
#define INF 1000000000
#define int long long

using namespace std;
using namespace std::chrono;


signed main(){
  int n, m;
  cin >> n >> m;
  int s[n];
  for (int i = 0; i < n; i++){
    s[i] = 11;
  }

  bool could = true;
  int c[m], d[m];
  for (int i = 0; i < m; i++){
    cin >> c[i] >> d[i];
  }
  for (int i = 0; i < m; i++){
    int a, b;
    a = c[i], b = d[i];
    a --;
    if (s[a] != 11 and s[a] != b){
      could = false;
      break;
    }
    s[a] = b;
  }
  
  if (s[0] == 0 and n != 1)
    could = false;
  
  for (int i = 0; i < n; i++)
    if (s[i] == 11){
      if (i == 0)
	s[i] = 1;
      else
	s[i] = 0;
  
  if (could){
    for (int i = 0; i < n; i++)
      cout << s[i];
    cout << endl;
  }else
    cout << -1 << endl;

  
}


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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void)
{
  int n,m;
  cin >> n >> m;
  int a[n];
  for(int i = 0;i<n;i++) a[i] = 10
  int f = 0;
  for(int i = 0;i < m;i++)
  {
     int b,c;
     cin >> b >> c;
     if(a[b-1] > 9) a[b-1] = c;
     else if(a[b-1] != c)
     {
         f = 1;
         break;
     }
     else a[b-1] = c;
  }
  for(int i = 0;i < n;i++)
  {
      if(a[i] > 9) a[i] = 0;
  }
  if(f == 1) cout << -1 << endl;
  else
  {
      for(int i = 0;i<n;i++) cout <<a[i];
      cout << "\n";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: expected ';' before 'int'
    9 |   for(int i = 0;i<n;i++) a[i] = 10
      |                                   ^
      |                                   ;
   10 |   int f = 0;
      |   ~~~                              
a.cc:18:10: error: 'f' was not declared in this scope
   18 |          f = 1;
      |          ^
a.cc:27:6: error: 'f' was not declared in this scope
   27 |   if(f == 1) cout << -1 << endl;
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void)
{
  int n,m;
  cin >> n >> m;
  int a[n];
  for(int i = 0;i<n;i++) a[i] = 10
  int f = 0;
  for(int i = 0;i < m;i++)
  {
     int b,c;
     cin >> b >> c;
     if(a[b-1] > 9) a[b-1] = c;
     else if(a[b-1] != c)
     {
         f = 1;
         break;
     }
     else a[b-1] = c;
  }
  for(int i = 0;i < n;i++)
  {
      if(a[i] > 9) a[i] = 0;
  }
  if(f == 1) cout << -1 << endl;
  else
  {
      for(i = 0;i<n;i++) cout <<a[i];
      cout << "\n";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: expected ';' before 'int'
    9 |   for(int i = 0;i<n;i++) a[i] = 10
      |                                   ^
      |                                   ;
   10 |   int f = 0;
      |   ~~~                              
a.cc:18:10: error: 'f' was not declared in this scope
   18 |          f = 1;
      |          ^
a.cc:27:6: error: 'f' was not declared in this scope
   27 |   if(f == 1) cout << -1 << endl;
      |      ^
a.cc:30:11: error: 'i' was not declared in this scope
   30 |       for(i = 0;i<n;i++) cout <<a[i];
      |           ^
Language: C++

#include"bits/stdc++.h"
using namespace std;
using ll=long long;
template<typename T=ll>inline T in(istream&is=cin){T ret;is>>ret;return ret;}
template<typename T>inline auto vec2(typename vector<T>::size_type h,typename vector<T>::size_type w,T v=T()){return vector<vector<T>>(h,vector<T>(w,v));}

int main()
{
    ll n=in(),m=in();
    if(m==0){
        cout<<(n==1?"0":"1"+string(n-1,'0'))<<endl;
    }else{
        string ans(n,'\0');
        for(int i=0;i<m;++i){
            ll s=in()-1;
            char c='0'+in();
            if(ans[s]=='\0'){
                ans[s]=c;
            }else if(ans[s]!=c){
                cout<<-1<<endl;
                return 0;
            }
        }
        if(ans[0]=='0'){
            cout<<-1<<endl;
            return 0;
        }else if(ans[0]=='\0'){
            ans[i]='1';
        }
        for(int i=0;i<n;++i){
            cout<<(ans[i]=='\0'?'0':ans[i]);
        }
        cout<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: 'i' was not declared in this scope
   28 |             ans[i]='1';
      |                 ^
Language: C++

#include "bits/stdc++.h"
#define rep(i,b) for(ll i=0;i<b;i++)
#define ll long long
using namespace std;
/*--Input//////////////////////////////////////////////////*/
inline void IN(void){return;}
template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){
    cin >> first;
    IN(rest...);
    return;
}
#define SS(T, ...)      T __VA_ARGS__; IN(__VA_ARGS__);
#define SV(type,c,n) vector<type> c(n);for(auto& i:c)cin >> i;
/*--Output/////////////////////////////////////////////////*/
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
inline int p(void){cout << endl; return 0;}
template<class Head> int p(Head&& head){cout << head;p();return 0;} template<class Head,class... Tail> int p(Head&& head,Tail&&... tail){cout<<head<<" ";p(forward<Tail>(tail)...);return 0;}
struct ProconInit {
    static constexpr int IOS_PREC = 15;
    static constexpr bool AUTOFLUSH = false;

    ProconInit() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(IOS_PREC);
        if(AUTOFLUSH)
            cout << unitbuf;
    }
} PROCON_INIT;

int main() {
   SS(ll ,N,M)
   vl s(M),c(M);
   rep(i,M){
       cin>>s[i]>>c[i];
   }
   string ans="";
   rep(i,N)ans+='0';

   rep(i,M){
       if(ans[s[i]-1]!=c[i]+'0'){
           p(-1);
           return 0;
       }
       ans[s[i]-1]=c[i]+'0';
   }
    if(ans[0]=='0'){
        p(-1);
        return 0;
    }
   p(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:4: error: 'vl' was not declared in this scope; did you mean 'll'?
   34 |    vl s(M),c(M);
      |    ^~
      |    ll
a.cc:36:13: error: 's' was not declared in this scope
   36 |        cin>>s[i]>>c[i];
      |             ^
a.cc:36:19: error: 'c' was not declared in this scope
   36 |        cin>>s[i]>>c[i];
      |                   ^
a.cc:42:15: error: 's' was not declared in this scope
   42 |        if(ans[s[i]-1]!=c[i]+'0'){
      |               ^
a.cc:42:24: error: 'c' was not declared in this scope
   42 |        if(ans[s[i]-1]!=c[i]+'0'){
      |                        ^
a.cc:46:12: error: 's' was not declared in this scope
   46 |        ans[s[i]-1]=c[i]+'0';
      |            ^
a.cc:46:20: error: 'c' was not declared in this scope
   46 |        ans[s[i]-1]=c[i]+'0';
      |                    ^
Language: C++

#!/usr/bin/env python3
import sys


def solve(N: int, M: int, s: "List[int]", c: "List[int]"):
    ans = ["1"] + ["0" for _ in range(N - 1)]

    modified = [False for _ in range(N)]

    for i in range(M):
        keta = s[i] - 1
        if modified[keta] and ans[keta] != str(c[i]):
            print(-1)
            return
        modified[keta] = True
        ans[keta] = str(c[i])

    if ans[0] == "0":
        print(-1)
        return

    print("".join(ans))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    s = [int()] * (M)  # type: "List[int]"
    c = [int()] * (M)  # type: "List[int]"
    for i in range(M):
        s[i] = int(next(tokens))
        c[i] = int(next(tokens))
    solve(N, M, s, c)


if __name__ == '__main__':
    main()


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:26:3: error: invalid preprocessing directive #Generated
   26 | # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
      |   ^~~~~~~~~
a.cc:33:28: error: stray '#' in program
   33 |     N = int(next(tokens))  # type: int
      |                            ^
a.cc:34:28: error: stray '#' in program
   34 |     M = int(next(tokens))  # type: int
      |                            ^
a.cc:35:24: error: stray '#' in program
   35 |     s = [int()] * (M)  # type: "List[int]"
      |                        ^
a.cc:36:24: error: stray '#' in program
   36 |     c = [int()] * (M)  # type: "List[int]"
      |                        ^
a.cc:43:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   43 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:2:1: error: 'import' does not name a type
    2 | import sys
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        Integer[] digits = new Integer[n];
        for (int i = 0; i < m; i++) {
            int s = scanner.nextInt()-1;
            int c = scanner.nextInt();
            if(digits[s]==null){
                digits[s]=c;
            }else{
                if(digits[s]!=c){
                    System.out.println(-1);
                    return;
                }
            }
        }
        if(digits[0]==0 && n!=1){
            System.out.println(-1);
            return;
        }else if(digits[0]==null){
            digits[0] = n==1? 0 : 1;
        }
        for (int i = 1; i < n; i++) {
            if(digits[i]==null){
                digits[i]=0;
            }
        }
        int res = digits[0];
        for (int i = 1; i < n; i++) {
            res = res*10+digits[i];
        }
        System.out.println(res);

    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <iostream>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int s[m], c[m], a[n];
  for(int i = 0; i < m; i++) {
    cin >> s[i] >> c[i];
  }
  for(int i = 0; i < n; i++) {
    a[i] = 10;
  }
  for(int i = 0; i < m; i++) {
    a[s[i]] = c[i];
  }
  int b = 1;
  for(int i = 0; i < n; i++) {
    if(a[i] != 10) {
      b = 0;
    } else {
      a[i] = b;
    }
  }
  if(a[i] == 0) {
    cout << -1;
  } else {
    for(int i = 0; i < n; i++) {
      cout << a[i];
    }
  }
}

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

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

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

    int A[N];
    int ans;

    for (int i = 0; i < N; i++){
        A[i] = 0;
    }

    for (int i = 0; i < M; i++){
        int s, c;
        cin >> s >> c;
        if (A[s-1] == 0){
            A[s-1] = c;
        }
        else if (A[s-1] == c){
            A[s-1] = c;
        }
        else {
            ans = -1;
        }
    }

    else if (N == 3 && A[0] != 0){
        ans = A[0] * 100 + A[1] * 10 + A[2];
    }
    else if (N == 2 && A[0] != 0){
        ans = A[0] * 10 + A[1];
    }
    else if (N == 1){
        ans = A[0];
    }
    else {
        ans = -1;
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: 'else' without a previous 'if'
   29 |     else if (N == 3 && A[0] != 0){
      |     ^~~~
Language: C++

#include<iostream>
#include<numeric>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<climits>
#define fi first
#define se second
#define pb push_back
#define pii pair<int,int>
#define ll long long
#define mkp make_pair
#define pll pair<ll,ll>
#define rep(i,from,to) for(int i=from;i<to;i++)
#define repd(i,from,till) for(int i=from;i>=till;i--)
#define waste ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define inf 1e9+1
#define mod 1e9+7
#define inf1 1e18+1
#define pie 3.14159265358979323846
#define N 100005
using namespace std;
/*
ll bin(ll i,ll j){
	ll mid=(i+j)/2;
	if(a[mid]==x)reutrn mid;
	else if(ans>x)return bin(i,mid-1);
	else return bin(mid+1,j);
}/*
ll power(ll base,ll power){
    ll res=1;
    base=base%mod;
    while(power>0){
    	if(power&1){
    		res=(res*base)%mod;
		}
		power=power>>1;
		base=(base*base)%mod;
	}
	return res;
}
*/
/*
int nCr(int x, int y){
	if(y>x)return 0;
	int num=fact[x];
	num*=invfact[y];
	num%=mod;
	num*=invfact[x-y];
	num%=mod;
	return num;
}
*/
/*bool prime[n+1];
void SieveOfEratosthenes(int n){
	rep(i,0,n+1)prime[i]=true
    for (int p=2;p*p<=n;p++)
        if (prime[p])
            for (int i=p*p;i<=n;i+=p)prime[i]=false;
}*/
/*
int gcd(int a,int b){
	if(b==0)return a;
	else return gcd(b,a%b);
}
*/
int solve(){
    int n,m;
    cin>>n>>m;
	int a[n];
	rep(i,0,n)a[i]=-1;
	int b[m],c[m],p=0;
	rep(i,0,m){
		cin>>b[i]>>c[i];
		if(a[b[i]-1]!=-1&&c[i]!=a[b[i]-1])p=1;
		if(b[i]==1&&c[i]==0)p=1;
		a[b[i]-1]=c[i];
	} 
	if(p==1)return cout<<"-1"<<endl;
	rep(i,0,n){
		if(a[i]==-1&&i==0)cout<<"1";
		else if(a[i]==-1)cout<<"0";
		else cout<<a[i];
	}
	cout<<endl;
	return 0;
}
int main(){
    waste;
    int t;
    //cin>>t;
    t=1;
    while(t--){
       	solve();
    }
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:82:34: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
   82 |         if(p==1)return cout<<"-1"<<endl;
      |                        ~~~~~~~~~~^~~~~~
      |                                  |
      |                                  std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void)
{
  int n,m;
  cin >> n >> m;
  int a[3] = {10,10,10};
  int f = 0;
  for(int i = 0;i < m;i++)
  {
     int b,c;
     cin >> b >> c;
     if(a[b-1] > 9) a[b-1] = c;
     else if(a[b-1] != c)
     {
         f = 1;
         break;
     }
     else a[b-1] = c;
  }
  for(int i = 0;i < 3;i++)
  {
      if(a[i] > 9) a[i] = 0;
  }
  if(f == 1) cout << -1 << endl;
  else if(a[0] == 0 && a[1] == 0]) cout << a[2] << endl;
  else if(a[0] == 0) cout << a[1] << a[2] << endl;
  else cout << a[0] << a[1] << a[2] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:33: error: expected ')' before ']' token
   27 |   else if(a[0] == 0 && a[1] == 0]) cout << a[2] << endl;
      |          ~                      ^
      |                                 )
a.cc:27:33: error: expected primary-expression before ']' token
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[10];
int main()
{
	int n,m;
	cin>>n>>m;
	for(int i=1; i<=m; i++)
	{
		int q,w;
		cin>>q>>w;
		if(!a[q]||a[q]==w)a[q]=w;
		else
		{
			cout<<-1;
			for(int j=i+1; j<=m; j++)int e,r,cin>>e>>r;
			return 0;
		}
	}
	for(int i=1; i<=n; i++)
	{
		if(!a[i])
		{
			cout<<-1;
			for(int j=i+1; j<=m; j++)int e,r,cin>>e>>r;
			return 0;
		}
		else break;
	}
	for(int i=1; i<=n; i++)cout<<a[i];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:61: error: expected initializer before '>>' token
   16 |                         for(int j=i+1; j<=m; j++)int e,r,cin>>e>>r;
      |                                                             ^~
a.cc:25:61: error: expected initializer before '>>' token
   25 |                         for(int j=i+1; j<=m; j++)int e,r,cin>>e>>r;
      |                                                             ^~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main() {
  int N,M;
  cin >> N >> M;
  vector<int> A(N,-1);
  if(N != 1)A[0] = 0;
  int i,s,c;
  bool F = true;
  for(i=0;i<M;i++) {
    cin >> s >> c;
    if(A[s-1] < 0)A[s-1] = c;
    else F = false;
  }
  if(!F)cout << -1 << endl;
  else {
    for(i=0;i<N;i++)cout << max(A[i],0);
    cout << endl;
  }

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

#include <iostream>
#include <map>
#include <queue>
#include <algorithm> 
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define rep2(i,a,b) for(int i=a;i>=b;i--)
#define ll long long

int vis[15];
int lst;
int a[105];
int main(int argc, char** argv) {
	int n,m;
	cin>>n>>m;
	int s,c;
	int fg=0,lst=0;
	memset(vis,-1,sizeof(vis));
	while(m--)
{
	scanf("%d%d",&s,&c);
	if(vis[s]!=-1&&vis[s]!=c)
	{
		fg=1;
	}
	if(s==1&&c==0&&!fg)
	{
		fg=2;
	}
	vis[s]=c;
}
if(fg==1)
{
	cout<<-1<<endl;
}
else if(fg==2)
{
	if(n==1)cout<<0;
	else cout<<-1;
}
else rep(i,1,n)
{
	if(i==1&&!vis[i])cout<<1;
	else
	{	if(vis[i]!=-1)
		cout<<vis[i];
     else cout<<0;
	}
}
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:19:9: error: 'memset' was not declared in this scope
   19 |         memset(vis,-1,sizeof(vis));
      |         ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <algorithm>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

#include<iostream>
#include<numeric>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<climits>
#define fi first
#define se second
#define pb push_back
#define pii pair<int,int>
#define ll long long
#define mkp make_pair
#define pll pair<ll,ll>
#define rep(i,from,to) for(int i=from;i<to;i++)
#define repd(i,from,till) for(int i=from;i>=till;i--)
#define waste ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define inf 1e9+1
#define mod 1e9+7
#define inf1 1e18+1
#define pie 3.14159265358979323846
#define N 100005
using namespace std;
/*
ll bin(ll i,ll j){
	ll mid=(i+j)/2;
	if(a[mid]==x)reutrn mid;
	else if(ans>x)return bin(i,mid-1);
	else return bin(mid+1,j);
}/*
ll power(ll base,ll power){
    ll res=1;
    base=base%mod;
    while(power>0){
    	if(power&1){
    		res=(res*base)%mod;
		}
		power=power>>1;
		base=(base*base)%mod;
	}
	return res;
}
*/
/*
int nCr(int x, int y){
	if(y>x)return 0;
	int num=fact[x];
	num*=invfact[y];
	num%=mod;
	num*=invfact[x-y];
	num%=mod;
	return num;
}
*/
/*bool prime[n+1];
void SieveOfEratosthenes(int n){
	rep(i,0,n+1)prime[i]=true
    for (int p=2;p*p<=n;p++)
        if (prime[p])
            for (int i=p*p;i<=n;i+=p)prime[i]=false;
}*/
/*
int gcd(int a,int b){
	if(b==0)return a;
	else return gcd(b,a%b);
}
*/
int solve(){
    int n,m;
    cin>>n>>m;
	int a[n];
	rep(i,0,n)a[i]=-1;
	rep(i,0,m){
		int b,c;
		cin>>b>>c;
		if(a[b-1]!=-1&&c!=a[b-1])return cout<<"-1"<<endl,0;
		if(b==1&&c==0)return cout<<"-1"<<endl;
		a[b-1]=c;
	} 
	rep(i,0,n){
		if(a[i]==-1&&i==0)cout<<"1";
		else if(a[i]==-1)cout<<"0";
		else cout<<a[i];
	}
	cout<<endl;
	return 0;
}
int main(){
    waste;
    int t;
    //cin>>t;
    t=1;
    while(t--){
       	solve();
    }
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:79:48: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
   79 |                 if(b==1&&c==0)return cout<<"-1"<<endl;
      |                                      ~~~~~~~~~~^~~~~~
      |                                                |
      |                                                std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: C++

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

#define IOS                               \
	ios_base::sync_with_stdio(false); \
	cin.tie(0);                       \
	cout.tie(0);                      \
	cin.exceptions(cin.failbit);
#define int long long int //Comment when Unnecessary
#define ll long long
#define sz(a) (int)((a).size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define trav(a, x) for (auto &a : x)
#define pii pair<int, int>
#define vi vector<int>
#define F first
#define S second
#define endl "\n" // Remove on Interactive

const int N = 300009;
const int mod = 1000000007;

void pre()
{
}

int32_t main()
{
	IOS;
	pre();
	int n, m;
	int s, c;
	cin >> n >> m;
	if (n == 1)
	{
		if (m == 0)
		{
			cout << 0 << endl;
			return 0;
		}
		rep(i, 0, m)
		{
			cin >> s >> c;
			if (st[s - 1] != '#' && (st[s - 1] != (c + '0')))
			{
				cout << -1 << endl;
				return 0;
			}
			st[s - 1] = (c + '0');
		}
		cout << st << endl;
	}

	string st = "";
	rep(i, 0, n)
	    st += '#';

	rep(i, 0, m)
	{
		cin >> s >> c;
		if (st[s - 1] != '#' && (st[s - 1] != (c + '0')))
		{
			cout << -1 << endl;
			return 0;
		}
		st[s - 1] = (c + '0');
	}
	if (st[0] == '0')
	{
		cout << -1 << endl;
		return 0;
	}
	if (st[0] == '#')
	{
		st[0] = '1';
	}
	rep(i, 1, n) if (st[i] == '#')
	    st[i] = '0';
	cout << st << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:45:29: error: 'st' was not declared in this scope; did you mean 's'?
   45 |                         if (st[s - 1] != '#' && (st[s - 1] != (c + '0')))
      |                             ^~
      |                             s
a.cc:50:25: error: 'st' was not declared in this scope; did you mean 's'?
   50 |                         st[s - 1] = (c + '0');
      |                         ^~
      |                         s
a.cc:52:25: error: 'st' was not declared in this scope; did you mean 's'?
   52 |                 cout << st << endl;
      |                         ^~
      |                         s
Language: C++

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

#define int long long
#define ffor(i,n) for(int i = 0;i < (n); ++i)
#define all(v) v.begin(),v.end()
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vpii vector<pii>
#define ff first
#define ss second


signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    int n,m;
    cin >> n >> m;
    string ans;
    ans.resize(n);
    ffor(i,n){
    	ans[i] = '.';
    }
    ffor(i,m){
    	int s,c;
    	cin >> s >> c;
    	--s;
    	if(ans[s] != '.' && (ans[s] != ('0' + c))) {
    		cout << -1;
    		return 0;
    	}
    	ans[s] = ('0' + c);
    }
    if(ans[0] == '0' && (n > 1)){
    	cout << -1;
    	return 0;
    }
    if(n == 1 && (ans[0] == '.'))ans[0] = '0';
    else(ans[0] == '.') ans[0] = '1';
    for(int i = 1;i < n; ++i){
    	if(ans[i] == '.') ans[i] = '0';
    }
    cout << ans;
}		

Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: expected ';' before 'ans'
   42 |     else(ans[0] == '.') ans[0] = '1';
      |                        ^~~~
      |                        ;
Language: C++

        #include <bits/stdc++.h>
        using namespace std;
        #define int long long
const int MAX = 200001;
const int MOD = 1000000007;

        signed main() {
        int n,m;
        cin>>n>>m;
        int x[n];for(int i=0;i<n;i++)x[i]=-1;
        int s,c;
        for(int i=0;i<m;i++){
                cin>>s>>c;s--;
                if(x[s]!=-1&&x[s]!=c){
                        cout<<-1;
                        return 0;
                }
                x[s]=c;
        }
        if(x[0]==0){
              if(n!=1)  cout<<-1;
              else cout<<0;
                return 0;
        }
        if(x[0]==-1){
                if(n!=1)x[0]=1;
                else x[0]=0;
        for(int i=1;i<n;i++)if(x[i]==-1)x[i]=0;
        for(int i=0;i<n;i++)cout<<x[i];

      }


        


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

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


int main(void){
  int N, M;
  cin >> N >> M;
  int A = 0;
  for(int i = 0; i < M; i++){
    int s, c;
    cin >> s >> c;
    int keta = pow(10, N - s);
    if(s == 1 && c == 0 && N > 1){
      cout << "-1";
      return 0;
    }
    else if(A / keta % 10 != 0 && A / keta % 10 != c){
      cout << "-1";
      return 0;
    }
    else if(A / keta % 10 == 0){
      A += keta * c
    }
    else{
      cout << "-1";
      return 0;
    }    
      
  }
  cout << A;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: expected ';' before '}' token
   22 |       A += keta * c
      |                    ^
      |                    ;
   23 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
typedef long long LL;
const int MAXN = 100000 + 3;
int a[5], n, m, p, d;

int main() {
  	memset(a, -1, sizeof(a));
    cin>>n>>m;
  	for(int i=0;i<m;i++) {
    	cin>>p>>d;
        p --;
        if(a[p] != -1) {
        	printf("-1\n");
          return 0;
        }
      a[p] = d;
    }
    if(a[0] == 0 && n > 1) {
      printf("-1\n");
          return 0;
    }
    if(a[0] == -1)a[0] = 1;
  int ans = 0;
  for(int i=0;i<n;i++) {
    if(a[i] == -1) a[i] = 0;
  	ans = ans * 10 + a[i];
  }
  cout<<a[i]<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: 'i' was not declared in this scope
   30 |   cout<<a[i]<<endl;
      |           ^
Language: C++

n, m = map(int, input().split())
req = [list(map(int, input().split())) for i in range(m)]
for i in range(10000):
	st = str(i)
	if len(st) != n:
		continue
	ok = True
	for s, c in req:
		if int(st[s-1]) != int(c):
			ok = False
	if ok:
		print(st)
		exit(0)

print(-1)


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

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

signed main(){
  int n,m;cin>>n>>m;
  vector<int> v(n,-1);
  v[0]=1;
  while(m--){
    int s,c;cin>>s>>c;
    if(~v[s-1]&&v[s-1]!=c)fin(-1);
    v[s-1]=c;
  }
  for(int i=0;i<n;i++){
    cout<<(~v[i]?v[i]:0);
  }
  cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: 'fin' was not declared in this scope; did you mean 'sin'?
   10 |     if(~v[s-1]&&v[s-1]!=c)fin(-1);
      |                           ^~~
      |                           sin
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define SZ(v) int((v).size())
#define ALL(vec) begin(vec), end(vec)
typedef long long i64;
template<typename T> inline bool uax(T &x, T y) {return (y > x) ? x = y, true : false;}
template<typename T> inline bool uin(T &x, T y) {return (y < x) ? x = y, true : false;}
template<typename T> void kek(T ans) {cout << ans << endl; exit(0);}
#define Luv(...) [&] (auto &&u, auto &&v) { return __VA_ARGS__; }
const int MOD = (int) 1e9 + 7;
const i64 INF = (i64) 1e18 + 42;

using Graph = vector<vector<int>>;
using Grid= vector<vector<char>>;
using vin= vector<int>;
using ll=long long;
using vll= vector<ll>;
using vbl=vector<bool>;
using vch=vector<char>;
using pnn=pair<int ,int>;
 
#define ft first
#define sd second
#define fn front
#define pb push_back
#define it insert
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rell(i,n) for (ll i=0; i< (ll)(n); i++)
#define sot(x) sort(x.begin(), x.end())
#define rese(x) reverse(x.begin(), x.end())
#define vnn(x,y,s,name) vector<vector<int>> name(x, vector<int>(y,s))
#define mse(x) memset(x, 0, sizeof(x))
#define mii(x,y,z) min(x,min(y,z))
#define maa(x,y,z) max(x,max(y,z))

string yes="Yes",no="No";

int main() {
  cin.tie(nullptr) -> sync_with_stdio(false);
  int n,m,k;
    cin>>n>>m>>k;
    Graph G(n);
    Graph block(n);
    rep(i,m){
        int a,b;
        cin>>a>>b;
        a--; b--;
        G[a].pb(b);
        G[b].pb(a);
    }
    rep(i,k){
        int c,d;
        cin>>c>>d;
        c--; d--;
        block[c].pb(d);
        block[d].pb(c);
    }
    vbl seen(n,0);
    vin ans(n,0);
    
    
    rep(i,n){
        if(seen[i]){
            cout<<ans[i]<<" ";
            continue;
        }
        queue<int> q;
        set<int> r;
        q.push(i);
        r.insert(i);
        while(!q.empty()){
            int x=q.fn();
            q.pop();
            for(int y:G[x]){
                if(seen[y]) continue;
                q.push(y);
                r.insert(y);
                seen[y]=true;
                
            }
        }
        for(auto x: r){
            ans[x]=r.size();
            for(auto y:block[x]){
                if(r.count(y)) ans[x]--;
            }
            ans[x]-=G[x].size();
            ans[x]--;
        }
        cout<<ans[i]<<" ";
    }
    cout<<endl;
   
   
   
  }
}

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

#include<bits/stdc++.h>
 
using namespace std;
#define ff first
#define ss second
#define pii pair<int, int>
#define pll pair<long long , long long>
#define pb push_back
#define ll long long
#define ld long double
#define precision(x,d) cout<<fixed<<setprecision(d)<<x
#define fill(a,b) memset((a),(b),sizeof((a)))
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);srand(time(NULL));
ll power(ll x,ll y,ll m){ll r=1;for(;y;y>>=1){if(y&1)r=r*x%m;x=x*x%m;}return r;}
const ll mod = 1e9 + 7;
const ld pi = 3.14159265358979;
 
vector<int> sz, p;

void init(int n){
      p.resize(n);
      sz.resize(n);
      for(int i=0; i < n; i++){
            p[i] = i;
            sz[i] = 1;
      }
      return;
}

int find(int u){
      if(p[u] == u){
            return u;
      }
      return p[u] = find(p[u]);
}

void unite(int u, int v){
      int pu = find(u); int pv = find(v);
      if(pu == pv) return;
      if(sz[pv] > size[pu]) swap(pv, pu);
      sz[pu] += sz[pv];
      p[pv] = pu;
      return;
}

int same(int u, int v){
      return find(u) == find(v);
}

int find_size(int u){
      return sz[find(u)];
}

int run_test(){
      int n, m, k;
      cin >> n >> m >> k;
      int deg[n];
      fill(deg, 0);
      init(n);
      for(int i=0;i <m; i++){
            int a, b;
            cin >> a >> b;
            a--; b--;
            unite(a, b);
            deg[a]++; deg[b]++;
      }
      vector<int> v[n];
      for(int i=0; i<k; i++){
            int a, b;
            cin >> a >> b;
            a--; b--;
            v[a].pb(b);
            v[b].pb(a);
      }
      for(int i=0; i < n; i++){
             int t = find_size(i) - deg[i] - 1;
             for(auto x: v[i]){
                  if(same(x, i)) t--;
             }
             cout <<t << " ";
      }
      return 0;
}
 
int main(){
    FAST;
    ll t;
    t = 1;
 
    while(t--){
        run_test();
    }
}

Compiler output:
a.cc: In function 'void unite(int, int)':
a.cc:40:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   40 |       if(sz[pv] > size[pu]) swap(pv, pu);
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define cans cout << ans << endl
#define cyes cout << "Yes" << endl
#define cno cout << "No" << endl
typedef long long ll;

struct UnionFind{
    vector<int> d;
    UnionFind(int n) : d(n,-1) {}
    int find(int x){
        if(d[x] < 0) return x;
        return d[x] = find(d[x]);
    }
    bool merge(int x, int y){
        x = find(x); y=find(y);
        if(x == y) return false;
        if(d[x] > d[y]) swap(x,y);
        d[x] += d[y];
        d[y] = x;
        return true;
    }
    bool issame(int x, int y){
        return find(x) == find(y);
    }
    int size(int x){
        return -d[find(x)];
    }
};

int deg[100005];
vector<int> to[100005];

int main(){
    int n,m,k;
    cin >> n >> m >> k;
    UnionFind uf(n);
    rep(i,m){
        int a,b;
        cin >> a >> b;
        --a; --b;
        deg[a]++;
        deg[b]++;
        uf.merge(a,b);
    }
    rep(i,k){
        int a,b;
        cin >> a >> b;
        --a; --b;
        to[a].push_back(b);
        to[b].push_back(a);
    }
    rep(i,n){
        int ans = uf.size(i)-1-deg[i];
        for(int u : to[i]){
            if(uf.same(i,u)) --ans;
        }
        printf("%d%c",ans, i==n-1?'\n':' ');
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:19: error: 'struct UnionFind' has no member named 'same'; did you mean 'issame'?
   57 |             if(uf.same(i,u)) --ans;
      |                   ^~~~
      |                   issame