criyle/codenet-compile-errors huggingface dataset:
Language: Java

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		String[] temp = new String[N];
		for (int i = 0; i < M; i++) {

			int s = sc.nextInt();
			int c = sc.nextInt();

			if(temp[s-1] != null && Integer.parseInt(temp[s-1]) != c) {
				System.out.println(-1);
				return;
			}
			temp[s-1] = String.valueOf(c);
		}

//		if(M==0) {
//			if(N==1) {
//				System.out.println(0);
//			} else {
//				System.out.println(-1);
//			}
//			return;
//		}

		if(temp[0] != null && N>=2 && Integer.parseInt(temp[0]) == 0) {
			System.out.println(-1);
			return;
		}

		StringBuilder result = new StringBuilder();

		for (int i = 0; i < N; i++) {

			if(i == 0 && temp[0] == null && N != 1) {
				result.append("1");
				continue;
			}

			if(temp[i] != null) {
				result.append(temp[i]);
			} else {
				result.append("0");
			}
		}

		int resultInt = Integer.parseInt(result.toString());
		if(N ==1 && resultInt == 0) {
			System.out.println(0);
			return;
		}

		if((int)Math.pow(10, N-1) <= resultInt && (int)Math.pow(10, N) > resultInt) {
			System.out.println(Integer.parseInt(result.toString()));
		} else {
			System.out.println(-1);
		}
	}
}

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

#include<bits/stdc++.h>
#define hell (int)(1e9+7)
#define int long long int
#define inf 1000000000000

using namespace std;

void solve(){
    int n,m;
    cin>>n>>m;
    map <int,int> mp;
    bool f=true;
    for(int i=0;i<m;i++){
        int x,y;
        cin>>x>>y;
        x--;
        if(mp.count(x)&&mp[x]!=y)
            f=false;
        mp[x]=y;
    }
    if(!f){
        cout<<-1;
        return;
    }
    for(int i=0;i<pow(10,n);i++){
        string s=to_string(i);
        f=true;
        for(auto &x:mp){
            if(x.first>=s.length()||&&(s[x.first]-'0')!=x.second)
                f=false;
        }
        if(f){
            cout<<i;
            return;
        }
    }
    cout<<-1;
}

signed main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int t,c;
	//cin>>t;
	t=1;
	while(t--){
		solve();
	}
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:29:39: error: expected identifier before '(' token
   29 |             if(x.first>=s.length()||&&(s[x.first]-'0')!=x.second)
      |                                       ^
a.cc:29:39: error: expected ')' before '(' token
   29 |             if(x.first>=s.length()||&&(s[x.first]-'0')!=x.second)
      |               ~                       ^
      |                                       )
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int data[] = new int[N+1];
		
		int M = sc.nextInt();
		for(int i=0 ;i<M ;i++) {
			int s = sc.nextInt();
			int c = sc.nextInt();
			if(data[s] == 0) {
				data[s]=c;
			}else {
			data[s]= Math.min(data[s],c);
			}
		}
		if(data[1]==0) {
			System.out.println(-1);
		}else {
			for(int i = 1;i<N+1;i++) {
				System.out.print(data[i]);
			}
		}
		
		
	

Compiler output:
Main.java:24: error: reached end of file while parsing
		}
		 ^
1 error
Language: C++

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

int main(){
    int N, M;
    cin >> N >> M;
    vector<P> A(M);
    rep(i, M) cin >> A.at(i).first >> A.at(i).second, A.at(i).first--;
    for (int i = 0; i <= 2000; i++)
    {
        string s = to_string(i);
        if(s.size()==N){
            bool l = true;
            rep(j,M){
            if(s.at(A.at(j).first)-'0'!=A.at(j).second){
                l = false;
            }
        if (l){
                cout << 0 << endl;
                return 0;
            }
        }
    }
    cout << -1 << endl;
}

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

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

int main() {
#ifdef LOCAL
	freopen("./input.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int n, m;
	cin >> n >> m;
	vector<int> num(n, -1);
	int ok = 1;
	for (int i = 0; i < m; i++)
	{
		int s, c;
		cin >> s >> c;
		s--;
		if (num[s] == -1) num[s] = c;
		else if (num[s] != c) ok = 0;
	}

	if (num[0] == 0) ok = 0;

	if (!ok) {
		cout << -1 << endl;
	}
	else
	{
		for (int i = 0; i < n; i++)
		{
			if (num[i] == -1){
				if(i==0)num[i] = 1;
				else num[i] = 0;
			cout << num[i];
		}
		cout << endl;
	}



	return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'

typedef long long int Int;
typedef pair<int,int> P;
using ll = long long;
using VI = vector<int>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const long long INF = 1LL<<60;


int main(){
    int N;cin >> N;
    vector<int> a(N,-1);
    int m;cin >> m;
    rep(mi,m){
        int s,c;cin >> s >> c;s--;
        if(a[s]==-1){
            a[s] = c;
        }else{
            if(a[s]!=c){
                cout << -1 << endl;
                return 0;
            }
        }
    }
    if(a[0]==0){
        if(N==1) continue;
        cout << -1 << endl;
        return 0;
    }
    for(int i=0;i<N;i++){
        if(a[i]==-1){
            if(i==0) cout << 1;
            else cout << 0;
        }else{
            cout << a[i];
        }
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:18: error: continue statement not within a loop
   34 |         if(N==1) continue;
      |                  ^~~~~~~~
Language: C++

#include <numeric>
#include <math.h>
#include <stdio.h>
#include <climits>
#include <cfloat>
#include <string>
#include <unordered_map>
using namespace std;

int main(){
	int n, m;
	cin >> n >> m;
	vector<int> s(m), c(m);
	for(int i=0;i<m;i++){
		cin >> s.at(i) >> c.at(i);
	}
	for(int num=pow(10,n-1);num<pow(10,n);num++){
		string t = to_string(num);
		bool flag = true;
		for(int i=0;i<m;i++){
			if(t.at(s.at(i)-1) != c.at(i)){
				flag = false;
			}
		}
		if(flag){
			cout <<  num << endl;
			return 0;
		}
	}
	cout << -1 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> n >> m;
      |         ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include <unordered_map>
  +++ |+#include <iostream>
    8 | using namespace std;
a.cc:13:9: error: 'vector' was not declared in this scope
   13 |         vector<int> s(m), c(m);
      |         ^~~~~~
a.cc:8:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    7 | #include <unordered_map>
  +++ |+#include <vector>
    8 | using namespace std;
a.cc:13:16: error: expected primary-expression before 'int'
   13 |         vector<int> s(m), c(m);
      |                ^~~
a.cc:15:24: error: 's' was not declared in this scope
   15 |                 cin >> s.at(i) >> c.at(i);
      |                        ^
a.cc:15:35: error: 'c' was not declared in this scope
   15 |                 cin >> s.at(i) >> c.at(i);
      |                                   ^
a.cc:21:33: error: 's' was not declared in this scope
   21 |                         if(t.at(s.at(i)-1) != c.at(i)){
      |                                 ^
a.cc:21:47: error: 'c' was not declared in this scope
   21 |                         if(t.at(s.at(i)-1) != c.at(i)){
      |                                               ^
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout <<  num << endl;
      |                         ^~~~
a.cc:26:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:41: error: 'endl' was not declared in this scope
   26 |                         cout <<  num << endl;
      |                                         ^~~~
a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    7 | #include <unordered_map>
  +++ |+#include <ostream>
    8 | using namespace std;
a.cc:30:9: error: 'cout' was not declared in this scope
   30 |         cout << -1 << endl;
      |         ^~~~
a.cc:30:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:23: error: 'endl' was not declared in this scope
   30 |         cout << -1 << endl;
      |                       ^~~~
a.cc:30:23: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;

public class Main2 {

    public static void main(String[] args) {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        int digitNum = scanner.nextInt();
        int checkNum = scanner.nextInt();
        Map<Integer, Integer> resultMap = new HashMap<>();
        for (int count = 0; count < checkNum; count++) {
            int checkDigitNumber = scanner.nextInt();
            int displayDigitNumber = scanner.nextInt();
            if (!resultMap.isEmpty() && resultMap.get(checkDigitNumber) != null && resultMap.get(checkDigitNumber) != displayDigitNumber) {
                System.out.println("-1");
                scanner.close();
                return;
            } else {
                resultMap.put(checkDigitNumber, displayDigitNumber);
            }
        }
        scanner.close();

        // 結果の出力
        StringBuilder displayBuilder = new StringBuilder();
        if (digitNum == 1) {
            if (resultMap.get(1) == null) {
                displayBuilder.append(0);
            } else {
                displayBuilder.append(resultMap.get(1));
            }
        } else {
            if (resultMap.get(1) != null && resultMap.get(1) == 0) {
                System.out.println("-1");
                return;
            } else {
                for (int count = 1; count <= digitNum; count++) {
                    if (resultMap.get(count) != null) {
                        displayBuilder.append(resultMap.get(count));
                    } else {
                        if (count == 1) {
                            displayBuilder.append(1);
                        } else {
                            displayBuilder.append(0);
                        }
                    }
                }
            }
        }

        System.out.println(displayBuilder.toString());

    }

}

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

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> c(m);
  rep(i,m) cin >> c[i].first() >> c[i].second();
  
  rep(x,1000) {
    int keta = 1;
    vector<int> d(0);
    while(x / 10) {
      keta++;
      d.push_back(x % 10);
      x /= 10;
    }
    reverse(d.begin(),d.end());
    
    if(keta != n) continue;
    bool ok = true;
    rep(i,m) {
      if(d[c[i].first - 1] == c[i].second) continue;
      ok = false;
    }
    if(ok) {
      cout << x << endl;
      return 0;
    }
    
    cout << -1 << endl;
    
  }
  
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expression cannot be used as a function
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                   ~~~~~~~~~~^~
a.cc:10:46: error: expression cannot be used as a function
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                                   ~~~~~~~~~~~^~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> c(m);
  rep(i,m) cin >> c[i].first() >> c[i].second();
  
  rep(x,1000) {
    int keta = 1;
    vector<int> d(0);
    while(x / 10) {
      keta++;
      d.push_back(x % 10);
      x /= 10;
    }
    reverse(d.begin(),d.end());
    
    if(keta != n) continue;
    bool ok = true;
    rep(i,m) {
      if(d[c[i].first - 1] == c[i].second) continue;
      ok = false;
    }
    if(ok) {
      cout << x << endl;
      return 0;
    }
    
    cout << -1 << endl;
    
  }
  
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'i' was not declared in this scope
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                     ^
a.cc:15:11: error: 'x' was not declared in this scope
   15 |     while(x / 10) {
      |           ^
a.cc:22:19: error: continue statement not within a loop
   22 |     if(keta != n) continue;
      |                   ^~~~~~~~
a.cc:25:44: error: continue statement not within a loop
   25 |       if(d[c[i].first - 1] == c[i].second) continue;
      |                                            ^~~~~~~~
a.cc:29:15: error: 'x' was not declared in this scope
   29 |       cout << x << endl;
      |               ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> c(m);
  rep(i,m) cin >> c[i].first() >> c[i].second();
  
  rep(x,1000) {
    int keta = 1;
    vector<vector<int>> d(1,vector<int>(keta));
    d.push_back(x % 10);
    while(x / 10) {
      keta++;
      x /= 10;
    }
    reverse(d.begin(),d.end());
    
    if(keta != n) continue;
    bool ok = true;
    rep(i,m) {
      if(d[c[i].first - 1] == c[i].second) continue;
      ok = false;
    }
    if(ok) rep(i,n) cout << d[i] ;
    cout << endl;
    return 0;
    
    cout << -1 << endl;
    
  }
  
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'i' was not declared in this scope
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                     ^
a.cc:15:17: error: 'x' was not declared in this scope
   15 |     d.push_back(x % 10);
      |                 ^
a.cc:22:19: error: continue statement not within a loop
   22 |     if(keta != n) continue;
      |                   ^~~~~~~~
a.cc:25:44: error: continue statement not within a loop
   25 |       if(d[c[i].first - 1] == c[i].second) continue;
      |                                            ^~~~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> c(m);
  rep(i,m) cin >> c[i].first() >> c[i].second();
  
  rep(x,1000) {
    int keta = 1;
    vector<vector<int>> d(1,vector<int>(keta));
    d.push_back(x % 10);
    while(x / 10) {
      keta++;
      x /= 10;
    }
    reverse(d.begin(),d.end());
    
    if(keta != n) continue;
    bool ok = true;
    rep(i,m) {
      if(d[c[i].first] == c[i].second) continue;
      ok = false;
    }
    if(ok) rep(i,n) cout << d[i] ;
    cout << endl;
    return 0;
    
    cout << -1 << endl;
    
  }
  
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'i' was not declared in this scope
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                     ^
a.cc:15:17: error: 'x' was not declared in this scope
   15 |     d.push_back(x % 10);
      |                 ^
a.cc:22:19: error: continue statement not within a loop
   22 |     if(keta != n) continue;
      |                   ^~~~~~~~
a.cc:25:40: error: continue statement not within a loop
   25 |       if(d[c[i].first] == c[i].second) continue;
      |                                        ^~~~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> c(m);
  rep(i,m) cin >> c[i].first() >> c[i].second();
  
  rep(x,1000) {
    int keta = 1;
    vector<vector<int>> d(1,vector<int>(keta));
    d.push_back(x % 10);
    while(x / 10) {
      keta++;
      x /= 10;
    }
    reverse(d.begin(),d.end());
    
    if(keta != n) continue;
    bool ok = true;
    rep(i,m) {
      if(d[c[i].first] == c[i].second) continue;
      ok = false;
    }
    if(ok) rep(i,n) cout << d[i] ;
    cout << endl;
    return 0;
    
    cout << -1 << endl;
    
  }
  
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'i' was not declared in this scope
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                     ^
a.cc:15:17: error: 'x' was not declared in this scope
   15 |     d.push_back(x % 10);
      |                 ^
a.cc:22:19: error: continue statement not within a loop
   22 |     if(keta != n) continue;
      |                   ^~~~~~~~
a.cc:25:40: error: continue statement not within a loop
   25 |       if(d[c[i].first] == c[i].second) continue;
      |                                        ^~~~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> c(m);
  rep(i,m) cin >> c[i].first() >> c[i].second();
  
  rep(x,1000) {
    int keta = 1;
    vector<vector<int>> d(1,vector<int>(keta));
    d.push_back(x % 10);
    while(x / 10) {
      keta++;
      x /= 10;
    }
    reverse(d.begin(),d.end());
    
    if(keta != n) continue;
    bool ok = true;
    rep(i,m) {
      if(d[c[i].first] == c[i].second) continue;
      ok = false;
    }
    if(ok) rep(i,n) cout << d[i] ;
    cout << endl;
    return 0;
    
    cout << -1 << endl;
    
  }
  
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'i' was not declared in this scope
   10 |   rep(i,m) cin >> c[i].first() >> c[i].second();
      |                     ^
a.cc:15:17: error: 'x' was not declared in this scope
   15 |     d.push_back(x % 10);
      |                 ^
a.cc:22:19: error: continue statement not within a loop
   22 |     if(keta != n) continue;
      |                   ^~~~~~~~
a.cc:25:40: error: continue statement not within a loop
   25 |       if(d[c[i].first] == c[i].second) continue;
      |                                        ^~~~~~~~
Language: C

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



int main(){
	int nums[3];
	for(int i=0;i<3;i++)nums[i]=-1;
	int n,m;
	int t1;
	int t2;
	cin >>n>>m;
	for(int i=0;i<m;i++){
		cin >> t1>>t2;
		if(nums[t1-1]!=-1&&nums[t1-1]!=t2){
			printf("-1\n");
			return 0;
		}else{
			nums[t1-1]=t2;
		}
	}
	if(nums[0]==0){
		printf("-1\n");
		return 0;
	}
	int num=0;
	for(int i=0;i<n;i++){
		num*=10;
		if(nums[i]==-1){
			if(i==0){
				num+=1;
			}else{
				num+=0;
			}
		}else{
			num+=nums[i];
		}
	}
	printf("%d\n",num);



}

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>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;

int main() {
  int n, m;
  cin >> n >> m;
  char a[n];
  
  rep(i,m) {
    int s;
    char c;
    cin >> s >> c;
    if(a[s] == '\0') {
      a[s] = c;
    } else if(a[s] != 'c') {
      cout << -1 << endl;
      return 0;
    }
  rep(i,n) {
    if(a[i] == '\0') a[i] = '0';
  }
    
  cout << a << endl;  
  
  
}

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

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

int main() {
  int n, m;
  cin >> n >> m;
  char ans[n];
  
  rep(i,m) {
    int s;
    char c;
    cin >> s >> c;
    if(a[s] == '\0') {
      a[s] = c;
    } else if(a[s] != 'c') {
      cout << -1 << endl;
      return 0;
    }
  rep(i,n) {
    if(a[i] == '\0') a[i] = '0';
  }
    
  cout << a << endl;  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'a' was not declared in this scope
   14 |     if(a[s] == '\0') {
      |        ^
a.cc:21:8: error: 'a' was not declared in this scope
   21 |     if(a[i] == '\0') a[i] = '0';
      |        ^
a.cc:24:11: error: 'a' was not declared in this scope
   24 |   cout << a << endl;
      |           ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  char ans[n];
  
  rep(i,m) {
    int s;
    char c;
    cin >> s >> c;
    if(a[s] == '/0') {
      a[s] = c;
    } else if(a[s] != 'c') {
      cout << -1 << endl;
      return 0;
    }
  rep(i,n) {
    if(a[i] == '/0') a[i] = '0';
  }
    
  cout << a << endl;  
  
  
}

Compiler output:
a.cc:14:16: warning: multi-character character constant [-Wmultichar]
   14 |     if(a[s] == '/0') {
      |                ^~~~
a.cc:21:16: warning: multi-character character constant [-Wmultichar]
   21 |     if(a[i] == '/0') a[i] = '0';
      |                ^~~~
a.cc: In function 'int main()':
a.cc:14:8: error: 'a' was not declared in this scope
   14 |     if(a[s] == '/0') {
      |        ^
a.cc:21:8: error: 'a' was not declared in this scope
   21 |     if(a[i] == '/0') a[i] = '0';
      |        ^
a.cc:24:11: error: 'a' was not declared in this scope
   24 |   cout << a << endl;
      |           ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int arr[5];

int main()
{
  int n,m;
  cin >> n >> m;
  
  for(int i=0;i<5;i++)arr[i]=-1;
  
  while(m--)
  {
    int x;
    cin >> x;
    if(arr[i]!=x and arr[i]!=-1)
    {
      cout << -1;
      return 0;
    }
    arr[i]=x;
  }
  
  if(arr[1]==-1 and n>1)arr[1]=1;
  else if(arr[1]==-1 and n==1)arr[i]=0;
  for(int i=2;i<=n;i++)if(arr[i]==-1)arr[i]=0;
  
  if(n>1 and arr[1]==0)
  {
    cout << -1;
    return 0;
  }
  
  for(int i=1;i<=n;i++)cout << arr[i];
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'i' was not declared in this scope
   18 |     if(arr[i]!=x and arr[i]!=-1)
      |            ^
a.cc:23:9: error: 'i' was not declared in this scope
   23 |     arr[i]=x;
      |         ^
a.cc:27:35: error: 'i' was not declared in this scope
   27 |   else if(arr[1]==-1 and n==1)arr[i]=0;
      |                                   ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(int argc, const char *argv[]) {
  int N, M, s, c;
  cin >> N >> M;
  pair<int, int> sc[M];
  for(int i = 0; i < M; i++){
    cin >> s >> c;
    sc[i] = make_pair(s, c);
  }
  sort(sc, sc+M);

  if(N > 1){
    for (int i = 0; i < M; i++) {
      if(sc[i].first == 1 && sc[i].second == 0){
        cout << "-1" << endl;
        return 0;
      }
    }
  }
  for(int i = 1; i < M; i++){
    if(sc[i-1].first == sc[i].first && sc[i-1].second != sc[i].second){
      cout << "-1" << endl;
      return 0;
    }
  }

  int index = 1;
  for (int i = 1; i < M; i++) {
    if(sc[i].first > index){
      printf("0");
      index++;
    }
    if(sc[i].first == index){
      printf("%d", sc[i].second);
      index++;
    }
  }
  putchar('\n');

  return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(sc, sc+M);
      |   ^~~~
      |   short
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int num[10];
int main()
{
    int n,m;
    cin >> n >> m;
    memset(num,-1,sizeof(num));
    int s,c;
    bool flag=true;
    for(int i =0;i<m;++i)
    {
        cin >> s >> c;
        if(s>N)
            continue;
        if(num[s-1]==-1)
        {
            num[s-1] = c;
        }
        if(num[s-1]!=c)
        {
            flag = false;
        }
    }
    if(n==1)
    {
        printf("%d\n",max(0,num[0]));
        return 0;
    }
    if(!flag||num[0]==0)
    {
        printf("-1\n");
        return 0;
    }
    for(int i = 0;i<n;++i)
    {
        if(num[i]==-1)
        {
            if(num[0]==-1)
            {
                num[i] = 1;
            }
            else
                num[i] = 0;
        }
    }
    for(int i = 0;i<n;++i)
        printf("%d",num[i]);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'N' was not declared in this scope
   15 |         if(s>N)
      |              ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int n, m, s;
char c;

std::vector<char> vec;

int main() {
    std::cin >> n >> m;
    vec.assign(n+1, '~');
    for (int i = 0; i < m; i++) {
        std::cin >> s >> c;
        if (vec[s] != '~' && vec[s] != c || (s == 1 && c == '0') {
            cout << -1 << endl;
            return 0;
        }
        vec[s] = c;
    }
    for (int i = 1; i < vec.size(); i++) {
        if (i == 1 && vec[i] == '~') {
            vec[i] = '1';
        }
        else if (vec[i] == '~') {
            vec[i] = '0';
        }
        cout << vec[i];
    }
    cout << '\n';
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:65: error: expected ';' before '{' token
   16 |         if (vec[s] != '~' && vec[s] != c || (s == 1 && c == '0') {
      |                                                                 ^~
      |                                                                 ;
a.cc:20:19: error: expected ')' before ';' token
   20 |         vec[s] = c;
      |                   ^
      |                   )
a.cc:16:12: note: to match this '('
   16 |         if (vec[s] != '~' && vec[s] != c || (s == 1 && c == '0') {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N,M,s,c;
    cin >> N >> M;
    int a[N+1];
    int b[N+1];
    for(int i=1;i<=N;i++)
	{
		a[i]=0;
		b[i]=0; 
	}
    for(int i=1;i<=M;i++){
        cin >> s>>c;
        if(N>1&&s==1&&c==0){
            cout << -1;
            return 0;
        }
        if(b[s]==0)
        {
            a[s]=c;
			b[s]=1;
        }
        else if(c!=a[s])
		{
			cout<<"-1"<<endl;
			return 0;
		}

    }
	if(n>1&&a[1]==0)
	{
		a[1]=1;
	}    
    for(int i=1;i<=N;i++){
        cout <<a[i];
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:12: error: 'n' was not declared in this scope
   31 |         if(n>1&&a[1]==0)
      |            ^
Language: C++


#include <iostream>

using namespace std;

int main(){
    int N,M;
    int S = 0;
    cin >> N >> M;
    int s[M];
    int c[M]
    for(int i = 0;i < N;i++){
        cin >> s[i] >> c[i];
        for(int j = 0;j < i;j++){
            if(s[i] == s[j] && c[i] == c[j]){
                cout << "-1" << endl;
            }
        }
        S = c[i] *  pow(10, (N + 1 - s[i]));
    }
    if(S / pow(10, N) == 0){
        cout << "-1" << endl;
    }else{
        cout << S << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected initializer before 'for'
   12 |     for(int i = 0;i < N;i++){
      |     ^~~
a.cc:12:19: error: 'i' was not declared in this scope
   12 |     for(int i = 0;i < N;i++){
      |                   ^
a.cc:21:12: error: 'pow' was not declared in this scope
   21 |     if(S / pow(10, N) == 0){
      |            ^~~
Language: C++


#include <iostream>

using namespace std;

int main(){
    int N.M;
    int S = 0;
    cin >> N >> M;
    int s[M];
    int c[M]
    for(int i = 0;i < N;i++){
        cin >> s[i] >> c[i];
        for(int j = 0;j < i;j++){
            if(s[i] == s[j] && c[i] == c[j]){
                cout << "-1" << endl;
            }
        }
        S = c[i] *  POW(10, (N + 1 - s[i]));
    }
    if(S / POW(10, N) == 0){
        cout << "-1" << endl;
    }else{
        cout << S << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected initializer before '.' token
    7 |     int N.M;
      |          ^
a.cc:9:12: error: 'N' was not declared in this scope
    9 |     cin >> N >> M;
      |            ^
a.cc:9:17: error: 'M' was not declared in this scope
    9 |     cin >> N >> M;
      |                 ^
a.cc:12:5: error: expected initializer before 'for'
   12 |     for(int i = 0;i < N;i++){
      |     ^~~
a.cc:12:19: error: 'i' was not declared in this scope
   12 |     for(int i = 0;i < N;i++){
      |                   ^
a.cc:21:12: error: 'POW' was not declared in this scope
   21 |     if(S / POW(10, N) == 0){
      |            ^~~
Language: C++

v#include <bits/stdc++.h>

using namespace std;

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

    vector<int> s(M), c(M);
    for (int i = 0; i < M; i++){
        cin >> s.at(i) >> c.at(i);
    }

    int min = 0;
    if ((N == 2) || (N == 3)){
        min = pow(10,N-1);
    }
    
    if (M == 0){
        cout << min << endl;
        return 0;
    }

    for (int n = 0; n < 1000; n++){ 
        string n_str = to_string(n);
        int len = (int)(n_str.length());
        if (len != N) continue;
        if (len == 1) n_str = "00" + n_str;
        if (len == 2) n_str = "0" + n_str;
        bool ok = true;
        for (int i = 0; i < M; i++){
            if (n_str[s[i]-1] != (char)('0'+c[i])){
                ok = false;
            }
        }
        if (ok){
            cout << n << endl;
            return 0;
        }
    }

    cout << -1 << endl;

    return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N >> M;
      |     ^~~
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector<int> s(M), c(M);
      |     ^~~~~~
a.cc:9:12: error: expected primary-expression before 'int'
    9 |     vector<int> s(M), c(M);
      |            ^~~
a.cc:11:16: error: 's' was not declared in this scope
   11 |         cin >> s.at(i) >> c.at(i);
      |                ^
a.cc:11:27: error: 'c' was not declared in this scope
   11 |         cin >> s.at(i) >> c.at(i);
      |                           ^
a.cc:16:15: error: 'pow' was not declared in this scope
   16 |         min = pow(10,N-1);
      |               ^~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout << min << endl;
      |         ^~~~
a.cc:20:24: error: 'endl' was not declared in this scope
   20 |         cout << min << endl;
      |                        ^~~~
a.cc:25:9: error: 'string' was not declared in this scope
   25 |         string n_str = to_string(n);
      |         ^~~~~~
a.cc:26:25: error: 'n_str' was not declared in this scope
   26 |         int len = (int)(n_str.length());
      |                         ^~~~~
a.cc:32:23: error: 's' was not declared in this scope
   32 |             if (n_str[s[i]-1] != (char)('0'+c[i])){
      |                       ^
a.cc:32:45: error: 'c' was not declared in this scope
   32 |             if (n_str[s[i]-1] != (char)('0'+c[i])){
      |                                             ^
a.cc:37:13: error: 'cout' was not declared in this scope
   37 |             cout << n << endl;
      |             ^~~~
a.cc:37:26: error: 'endl' was not declared in this scope
   37 |             cout << n << endl;
      |                          ^~~~
a.cc:42:5: error: 'cout' was not declared in this scope
   42 |     cout << -1 << endl;
      |     ^~~~
a.cc:42:19: error: 'endl' was not declared in this scope
   42 |     cout << -1 << endl;
      |                   ^~~~
Language: C++

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

int main() {
int n,m;
cin >> n >> m;
int s[m];
char c[m];
if(m==0){
    if(n==1){cout << "0";
    return 0;}
    else{cout << pow(10,n-1);
    return 0;}
}
for(int i=0;i<m;i++){
    cin >> s[i] >> c[i];
}
for(int i=0;i<m;i++){
    if(s[i]==1&&c[i]=="0"){
        if(n==0){
            cout << "0";
            return 0;
        }
        else{cout << "-1";
        return 0;}
    }
}
int ans =-1;
for(int i=pow(10,n-1);i<pow(10,n);i++){
        string st=to_string(i);    
    for(int j=0;j<m;j++){

        if(!(st[s[j]-1]==c[j])){
            break;}
        if(j==m-1)ans=i;
        }
if(!(ans==-1))break;
    }
cout << ans;    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     if(s[i]==1&&c[i]=="0"){
      |                 ~~~~^~~~~
Language: C++

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

int main(){
    int N,M; cin >> N >> M;
    rep(i,M) cin >> P[i].first >> P[i].second;
    
    rep(i,1000){
        string S=to_string(i);
        int keta=S.length();
        
        if (keta!=N) continue;
        bool ans=true;
        rep(i,M){
            if (S[P[i].first-1]!=P[i].second+'0') ans=false;
        }
        if (ans){
            cout << i << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected primary-expression before '[' token
    9 |     rep(i,M) cin >> P[i].first >> P[i].second;
      |                      ^
a.cc:9:36: error: expected primary-expression before '[' token
    9 |     rep(i,M) cin >> P[i].first >> P[i].second;
      |                                    ^
a.cc:18:20: error: expected primary-expression before '[' token
   18 |             if (S[P[i].first-1]!=P[i].second+'0') ans=false;
      |                    ^
a.cc:18:35: error: expected primary-expression before '[' token
   18 |             if (S[P[i].first-1]!=P[i].second+'0') ans=false;
      |                                   ^
Language: C++

/*
ACplease
　　 ●
　　/⌒ヽ
　 ｜ 　|/⌒ヽ(ヽ
　 (｀　∥ー⌒) |
　|￣||￣￣￣￣￣|
　|―||―――――|
　|　Ｕ　　　　　|
　|￣￣￣￣￣￣￣|
　|＿＿＿＿＿＿＿|
　　|―――――|
　　|―――――|
ｗｗＷｗｗＷｗＷＷｗ
*/
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <cfloat>
#include <fstream>
#include <limits.h>
#include <list>
#include <math.h>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <utility>
#include <sstream>
#include <cassert>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repe(i, n) for (int i = 0; i <= (int)(n); i++)
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define ANS cout << ans << endl
#define all(a) a.begin(),a.end()
#define SORT(a) sort(all(a))
#define REVERSE(a) reverse(all(a))
#define KOZYUN(a) sort(all(a),greater<int>())
#define int ll
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORe(i, m, n) for(int i = m;i <= n;i++)
#define VIin(a) for(int i=0; i<a.size(); i++) cin >> a[i]
#define OUT(a) cout << a << endl
#define IN(a) cin >> a
#define INT(a) int a; cin >> a
typedef vector<int> VI;
typedef vector<VI> VVI;
const int MOD=1e9+7;
const long long INF = 1LL << 60;
/*最大公約数*/int gcd(int x, int y) { return y ? gcd(y,x%y) : x;}
/*最小公倍数*/int lcm(int a, int b) { int g = gcd(a, b); return a / g * b; }
/*素数判定*/int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*約数列挙*/vector<int> getDivisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}

//----------------------------------------------
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(15);
    srand((unsigned)time(NULL));
    
    VI s(m);
	VI c(m);
	rep(i,m) cin >> s.at(i) >> c.at(i);
	rep(i,1000){
		string t = to_string(i);
		if(t.size() != n) continue;
		bool ok = true;
		rep(j,m){
			if(t[s[j] - 1] != c[j] + '0') ok = false;
		}
		if(ok){
			OUT(i);
			return 0;
		}
	}
	OUT(-1);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:10: error: 'm' was not declared in this scope
   84 |     VI s(m);
      |          ^
a.cc:89:32: error: 'n' was not declared in this scope
   89 |                 if(t.size() != n) continue;
      |                                ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<deque>
#include<math.h>
using namespace std;
#define ll long long
int main(){
	ll N,M;
    cin >> N >> M;
    ll a=1;
    ll s,c;
    ll i,j;
    bool flag;
    for(i=pow(10,N-1);i<pow(10,N);i++){
        for(j=0;j<M;j++){
            cin >> s >> c;
            flag=true;
            if(i % (ll) pow((ll) 10,N-s+1)/pow((ll)10,N-s)!=c){
                flag=falsAe;
            }
            if(flag){
            cout << i;
            return 0;
            }
        }
    }
    cout << -1;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: 'falsAe' was not declared in this scope
   26 |                 flag=falsAe;
      |                      ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<deque>
#include<math.h>
using namespace std;
#define ll long long
int main(){
	ll N,M;
    cin >> N >> M;
    ll a=1;
    ll s,c;
    ll i,j;
    bool flag;
    for(i=pow(10,N-1);i<pow(10,N);i++){
        for(j=0;j<M;j++){
            cin >> s >> c;
            flag=true;
            if(i%pow(10,N-s+1)/pow(10,N-s)!=c){
                flag=false;
            }
            if(flag)cout << i,return 0;
        }
    }
    cout << -1;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   25 |             if(i%pow(10,N-s+1)/pow(10,N-s)!=c){
      |                ~^~~~~~~~~~~~~~
      |                |    |
      |                |    __gnu_cxx::__promote<double>::__type {aka double}
      |                long long int
a.cc:28:31: error: expected primary-expression before 'return'
   28 |             if(flag)cout << i,return 0;
      |                               ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<deque>
#include<math.h>
using namespace std;
#define ll long long
int main(){
	ll N,M;
    cin >> N >> M;
    ll a=1;
    ll s,c;
    ll i,j;
    bool flag;
    for(i=pow(10,N-1);i<pow(10,N);i++){
        for(j=0;j<M;j++){
            cin >> s >> m;
            flag=true;
            if(i%pow(10,N-s+1)/pow(10,N-s)!=m){
                flag=false;
            }
            if(flag)cout << i,return 0;
        }
    }
    cout << -1;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: 'm' was not declared in this scope
   23 |             cin >> s >> m;
      |                         ^
a.cc:25:17: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   25 |             if(i%pow(10,N-s+1)/pow(10,N-s)!=m){
      |                ~^~~~~~~~~~~~~~
      |                |    |
      |                |    __gnu_cxx::__promote<double>::__type {aka double}
      |                long long int
a.cc:28:31: error: expected primary-expression before 'return'
   28 |             if(flag)cout << i,return 0;
      |                               ^~~~~~
Language: C++

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

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

  int num[n];
  for (int i = 0; i < n; i++) {
    num[i] = -1;
  }

  int minDigit = 1000000;
  for (int i = 0; i < m; i++) {
    int s, c;
    cin >> s >> c;
    if (num[s-1] != c and num[s-1] != -1) {
      return -1;
    }
    if (minDigit > s) minDigit = s;
    num[s-1] = c;
  }
  if (m == 0) {
    return 0;
  }

  if (num[minDigit - 1] == 0) {
    if (minDigit == 1 and n != 1) return -1;
    if (minDigit > 1) num[min]
  }
  if (num[minDigit - 1] == 0 and minDigit > 1) num[minDigit - 2] = 1;

  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (num[n-1-i] > 0) {
      ans += num[n-1-i] * pow(10, i);
    }
  }
  return ans;
}


int main() {
  int ans = solver();
  cout << ans << "\n";
  return 0;
}


Compiler output:
a.cc: In function 'int solver()':
a.cc:29:26: error: invalid types 'int [n][<unresolved overloaded function type>]' for array subscript
   29 |     if (minDigit > 1) num[min]
      |                          ^
Language: C

#include <iostream>
#include <algorithm>

using namespace std;

bool check(int i, int n, int s, int c) {
  int x[3] = {1, 10, 100};
  // smaller than n digits
  if (n > 1 && i < x[n - 1])
    return false;
  int cc = (i / x[n - s]) % 10;
  if (cc != c)
    return false;
  return true;
}

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

  int s[m];
  int c[m];
  for (int i = 0; i < m; ++i) {
    cin >> s[i] >> c[i];    
  }

  for (int i = 0; i < 1000; ++i) {
    bool ok = true;
    for (int j = 0; j < m; ++j) {
      if (!check(i, n, s[j], c[j])) {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << i << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}

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

#include "bits/stdc++.h"
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ll long long
#define  fs first
#define  sc second
int main(){
    ll n,m;cin>>n>>m;
    vector<ll> s(m),c(m);
    vector<ll> min(n,10);
    string ans;
    vector<char> cs(n,'0');
    REP(i,m) {
        cin>>s[i]>>c[i];
        s[i]--;
    }
    if(n==1){
        int min=c[0];
        char ans;
        if(m>0){
            REP(i,m){
                if(c[i]<min)min=c[i];
            }
        }
        else min=0;
        ans=min+'0';
        cout << ans << endl;
        return 0;
    }
    bool on=false;
    REP(i,m){
        if(s[i]==0 && c[i]>0){
            on=true;
        }
    }
    if(!on) {
        cout<<"-1"<<endl;
        return 0;
    }
    vector<ll> freq(n,-1);
    REP(i,m){
        REP(j,m){
            if(freq[s[i]==-1])freq[s[i]]=c[i];
            else if(freq(s[i])==c[i]) continue;
            else{
                cout << -1 << endl;
                return 0;
            }
        }
    }
    REP(i,m){
        if(s[i )
    }
    REP(i,m){
        cs[s[i]]=min[s[i]]+'0';
    }
    for(char tmp : cs) ans.push_back(tmp);
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:25: error: no match for call to '(std::vector<long long int>) (__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
   44 |             else if(freq(s[i])==c[i]) continue;
      |                     ~~~~^~~~~~
a.cc:52:15: error: expected ']' before ')' token
   52 |         if(s[i )
      |               ^~
      |               ]
a.cc:53:5: error: expected primary-expression before '}' token
   53 |     }
      |     ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ll long long
#define  fs first
#define  sc second
int main(){
    ll n,m;cin>>n>>m;
    vector<ll> s(m),c(m);
    vector<ll> min(n,10);
    string ans;
    vector<char> cs(n,'0');
    REP(i,m) {
        cin>>s[i]>>c[i];
        s[i]--;
    }
    if(n==1){
        int min=c[0];
        char ans;
        if(m>0){
            REP(i,m){
                if(c[i]<min)min=c[i];
            }
        }
        else min=0;
        ans=min+'0';
        cout << ans << endl;
        return 0;
    }
    bool on=true;
    REP(i,n){
        if(s[i]==0 && c[i]>0;){
            on=false;
            break;
        }
    }
    if(on) {
        cout<<"-1"<<endl;
        return 0;
    }
    REP(i,m){
        if(min[s[i]]>c[i]) {
            if(s[i]==0 && c[i]==0) continue;
            min[s[i]]=c[i];
        }
    }
    REP(i,m){
        cs[s[i]]=min[s[i]]+'0';
    }
    for(char tmp : cs) ans.push_back(tmp);
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:30: error: expected primary-expression before ')' token
   32 |         if(s[i]==0 && c[i]>0;){
      |                              ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define NIL -1
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x)  (int)x.size()
#define SP(x)  setprecision((int)x)


using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;} //最小公倍数

//-------------------------------------------------
// 
void yes(){
  cout <<"Yes"<<endl ;
}
void no(){
  cout <<"No"<<endl ;
}


//-------------------------------------------------
// メモ




//-------------------------------------------------


int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  cout << -1 <<<endl ;
  
  
  
  return 0 ;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:53:16: error: expected primary-expression before '<' token
   53 |   cout << -1 <<<endl ;
      |                ^