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

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
using namespace std;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

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; }

string N,ans;
int K;
bool ger=false;

int main(){
    cin>>N>>K;
    char D[K];
    rep(i,K)cin>>D[i]; 
    rep(i,N.length()){
        if(ger){
            char tmp = '0';
            rep(j,K){
                if(tmp==D[j])tmp++;
                else break;
            }
            ans+=tmp;
        }
        else{
            char tmp = N[i];
            rep(j,K){
                if(tmp==D[j]){
                    ger=true;
                    if(tmp=='9'){
                        if(D[0]=='0'){
                            tmp='1';
                            repi(k,1,K){
                                if(tmp!=D[k]){
                                    ans+=tmp;
                                    break;
                                }
                            }
                            tmp='0';
                            repi(k,K){
                                if(tmp!=D[k]){
                                    ans+=tmp;
                                    break;
                                }
                            }
                        }
                        else{
                            tmp='1';
                            repi(k,1,K){
                                if(tmp!=D[k]){
                                    ans+=tmp;
                                    break;
                                }
                            }
                            ans+='0';
                        }
                        tmp='n';
                        break;
                    }
                    else{
                        tmp++;
                    }
                }
            }
            if(tmp!='n')ans+=tmp;
        }
    }
    out(ans);
}


Compiler output:
a.cc:54:37: error: macro "repi" requires 3 arguments, but only 2 given
   54 |                             repi(k,K){
      |                                     ^
a.cc:15:9: note: macro "repi" defined here
   15 | #define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:54:29: error: 'repi' was not declared in this scope
   54 |                             repi(k,K){
      |                             ^~~~
Language: C++

// problem C of contest 042
//  the link for problem : https://atcoder.jp/contests/abc042/tasks/arc058_a

#include <iostream>
using namespace std;
int d[10];
bool c(int n)
{
    while(n>0){
    int t = n%10;
    if(d[t]==1)
    {
        return false;
    }
    n/=10;
    }
    return true;

}
int main()
{
    int N,K;
    cin>>N>>K;
    for(int i=0;i<K;i++)
    {
        int t;
        cin>>t;
        d[t]=1;
    }
    while(true)
    {
        if(c(N))
        {
            cout<<N;
            retun 0;
        }
        N++;
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:13: error: 'retun' was not declared in this scope
   35 |             retun 0;
      |             ^~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define rep(i, n) for(ll i = 0; i < n; i++)
using namespace std;
int dy[4] = { 1, 0, -1, 0 }, dx[4] = { 0, 1, 0, -1 };
const ll MOD = 1e9 + 7;
const ll INF = 1e9;

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n, k;
  cin >> n >> k;
  vector<char> d(k);
  rep(i, k){
    cin >> d[i];
  }
  while(true) {
    string tmp = to_string(n);
    
    bool hasD = false;
    rep(i, k) {
      if (count(tmp.begin(), tmp.end(), d[i])) 
        hasD = true;
        n++;
        break;
      }
    }
    
    if (!hasD) {
      cout << n << endl;
      return 0;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:10: error: 'hasD' was not declared in this scope
   31 |     if (!hasD) {
      |          ^~~~
a.cc: At global scope:
a.cc:36:3: error: expected unqualified-id before 'return'
   36 |   return 0;
      |   ^~~~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C++

//////////////** SATYAM * SHIVAM * SUNDARAM **////////////
/**
* author: G.Pavan Kumar
**/

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

#define eps 1e-9
#define mod 1000000007
#define uos unordered_set // operations take less time compared to set
#define ump unordered_map // operations take less time compared to map
#define pb push_back
#define pf push_front
#define pof pop_front()
#define pob pop_back()
#define mp make_pair
#define ps(x) push(x) // for stack and queue
#define T top() //  for stack
#define FR front()// for queue
#define BA back()// for queue
#define PP pop()// for queue and stack
#define B begin()
#define E end()
#define F first
#define S second
#define SZ size()
#define ins insert
#define MAE max_element
#define MIE min_element
#define cnt(x) count(x)
#define lb(x) lower_bound(x) // returns an it ptng to the element >=x if no such returns end
#define ub(x) upper_bound(x) // returns an it ptng to the element >x if no such returns end
#define rep(i,l,h) for(int i=l;i<h;i++)
#define ds1(i,x) for(auto i=x.begin();i!=x.end();i++)
#define ds2(i,x) for(auto i:x) // easy method to iterate through a ds
#define sq(a) (a)*(a)
#define fib(n) ceil(pow((1+sqrt(5),n)-pow((1-sqrt(5),n)/(float)(pow(2,n)*sqrt(5)
#define FIO {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
#define dig(n) (int)(log10(n)+1)
#define ss(x,k) substr(x,k)  // x is the start pos and k is the length of substr.
#define f(x) find(x)


typedef long long ll;
typedef double dob;
typedef long double ld;
typedef long l;
typedef string str;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<ll> vlli;
typedef vector<pair<int,int> > vpii;
typedef pair<int,int> pii;
typedef pair<str,int> psi;
typedef pair<ll,int> pli;
typedef ump<int,int> umpii;


int main(){
	FIO
	
	ll n,k;cin>>n>>k;
	int a[k];
	vb b(n,true);
	rep(i,0,k){
		cin>>a[i];
		b[a[i]]=false;
	}
	int m;int h=n/(ll)(pow(10,dig(n)-1));
	rep(i,1,10){
		if(b[i]&& 6 i>=h){
			m=i;break;
	}}
	str s=to_string((ll)m*(ll)pow(10,dig(n)-1));
	rep(i,1,s.SZ){
		if(!b[s[i]-'0']){
			s[i]=m+48;
		}
	}
	cout<<s;
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:28: error: expected ')' before 'i'
   72 |                 if(b[i]&& 6 i>=h){
      |                   ~        ^~
      |                            )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,k;
  cin >> n >> k;
  vector<int> d(k);
  for(int i=0;i<k;i++){
    cin >> d[i];
  }
  int ans;
  for(int i=n;!b;i++){
    int t=i;
    bool b=true;
    while(t!=0){
      for(int j=0;j<k;j++){
        if(t%10==d[j]){
          b=false;
          break;
        }
      }
      t/=10;
    }
    if(b){
      ans=i;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'b' was not declared in this scope
   11 |   for(int i=n;!b;i++){
      |                ^
Language: C++

#include<cstdio>
using namespace std;
bool d[10];
bool Check(int n){
  while(n>0){
    if(d[n%10]){
      return false;
	}	
  n /= 10;
  }
  return true;
}
int main(){
  int n, k;
  scanf("%d%d", &n, &k);
 
  for(int i=0; i<k; i++){
    int tmp
    scanf("%d", &tmp);
    d[tmp] = true;
  }
  bool found;
  while(!Check(n)){
    n++;
  }
  printf("%d", n);  
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'scanf'
   19 |     scanf("%d", &tmp);
      |     ^~~~~
a.cc:20:7: error: 'tmp' was not declared in this scope
   20 |     d[tmp] = true;
      |       ^~~
Language: C++

#include<cstdio>
using namespace std;
bool d[10];
bool Check(int n){
  while(n>0){
    if([n%10]){
      return false;
	}	
  n /= 10;
  }
  return true;
}
int main(){
  int n, k;
  scanf("%d%d", &n, &k);
 
  for(int i=0; i<k; i++){
    int tmp
    scanf("%d", &tmp);
    d[tmp] = true;
  }
  bool found;
  while(!Check(n)){
    n++;
  }
  printf("%d", n);  
}  

Compiler output:
a.cc: In function 'bool Check(int)':
a.cc:6:10: error: expected ',' before '%' token
    6 |     if([n%10]){
      |          ^
      |          ,
a.cc:6:10: error: expected identifier before '%' token
a.cc: In lambda function:
a.cc:6:14: error: expected '{' before ')' token
    6 |     if([n%10]){
      |              ^
a.cc: In function 'bool Check(int)':
a.cc:6:8: error: could not convert '<lambda closure object>Check(int)::<lambda()>{n}' from 'Check(int)::<lambda()>' to 'bool'
    6 |     if([n%10]){
      |        ^~~~~~
      |        |
      |        Check(int)::<lambda()>
a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'scanf'
   19 |     scanf("%d", &tmp);
      |     ^~~~~
a.cc:20:7: error: 'tmp' was not declared in this scope
   20 |     d[tmp] = true;
      |       ^~~
Language: C++

#include<cstdio>
using namespace std;
bool d[10]
bool Check(int n){
  while(n>0){
    if([n%10]){
      return false;
	}	
  n /= 10;
  }
  return true;
}
int main(){
  int n, k;
  scanf("%d%d", &n, &k);
 
  for(int i=0; i<k; i++){
    int tmp
    scanf("%d", &tmp);
    d[tmp] = true;
  }
  bool found;
  while(!Check(n)){
    n++;
  }
  printf("%d", n);  
}  

Compiler output:
a.cc:4:1: error: expected initializer before 'bool'
    4 | bool Check(int n){
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'scanf'
   19 |     scanf("%d", &tmp);
      |     ^~~~~
a.cc:20:5: error: 'd' was not declared in this scope
   20 |     d[tmp] = true;
      |     ^
a.cc:20:7: error: 'tmp' was not declared in this scope
   20 |     d[tmp] = true;
      |       ^~~
a.cc:23:10: error: 'Check' was not declared in this scope
   23 |   while(!Check(n)){
      |          ^~~~~
Language: C++

#include<cstdio>
using namespace std;
bool d[10];
bool Check(int n){
  while(n>0){
    if([d%10]){
      return false;
	}	
  n /= 10;
  }
  return true;
}
int main(){
  int n, k;
  scanf("%d%d", &n, &k);
 
  for(int i=0; i<k; i++){
    int tmp
    scanf("%d", &tmp);
    d[tmp] = true;
  }
  bool found;
  while(!Check(n)){
    n++;
  }
  printf("%d", n);  
}  

Compiler output:
a.cc: In function 'bool Check(int)':
a.cc:6:9: warning: capture of variable 'd' with non-automatic storage duration
    6 |     if([d%10]){
      |         ^
a.cc:3:6: note: 'bool d [10]' declared here
    3 | bool d[10];
      |      ^
a.cc:6:10: error: expected ',' before '%' token
    6 |     if([d%10]){
      |          ^
      |          ,
a.cc:6:10: error: expected identifier before '%' token
a.cc: In lambda function:
a.cc:6:14: error: expected '{' before ')' token
    6 |     if([d%10]){
      |              ^
a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'scanf'
   19 |     scanf("%d", &tmp);
      |     ^~~~~
a.cc:20:7: error: 'tmp' was not declared in this scope
   20 |     d[tmp] = true;
      |       ^~~
Language: C++

#include<cstdio>
using namespace std;
bool d[10]
bool Check(int n){
  while(n>0){
    if([d%10]){
      return false;
	}	
  n /= 10;
  }
  return true;
}
int main(){
  int n, k;
  scanf("%d%d", &n, &k);

  for(int i=0; i<k; i++){
    int tmp
    scanf("%d", &tmp);
    d[tmp] = true;
  }
  bool found;
  while(!Check(n)){
    n++;
  }
  printf("%d", n);  
}  

Compiler output:
a.cc:4:1: error: expected initializer before 'bool'
    4 | bool Check(int n){
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'scanf'
   19 |     scanf("%d", &tmp);
      |     ^~~~~
a.cc:20:5: error: 'd' was not declared in this scope
   20 |     d[tmp] = true;
      |     ^
a.cc:20:7: error: 'tmp' was not declared in this scope
   20 |     d[tmp] = true;
      |       ^~~
a.cc:23:10: error: 'Check' was not declared in this scope
   23 |   while(!Check(n)){
      |          ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int ok[10]={0,1,2,3,4,5,6,7,8,9,0};
int digitPoor(int n)
{
    assert(INT_MAX == 2147483647);
    assert(n >= 0);

    if (n < 10)         return 1;
    if (n < 100)        return 2;
    if (n < 1000)       return 3;
    if (n < 10000)      return 4;
    if (n < 100000)     return 5;
    if (n < 1000000)    return 6;
    if (n < 10000000)   return 7;
    if (n < 100000000)  return 8;
    if (n < 1000000000) return 9;
    return 10;
}
{
	int n,k,p,keta;
  cin>>n>>k;
  for(int i=0;i<k;i++){cin>>p;ok[p]=99:}
  sort(ok,ok+10);
  keta=digitPoor(
}


Compiler output:
a.cc:3:34: error: too many initializers for 'int [10]'
    3 | int ok[10]={0,1,2,3,4,5,6,7,8,9,0};
      |                                  ^
a.cc:20:1: error: expected unqualified-id before '{' token
   20 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
auto check(int n)
{
    while(n>0)
    {
        int t = n%10;
        if(b[t])
        return true;
        n/=10;
    }
    return false;
}
int main()
{
    int n,k;
    cin >>n>>k;
    vector<bool>b(10);
    for(int i = 0;i<k;i++)
    {
        int d;
        cin >>d;
        b[d]= true;
    }
    while(check(n))
        ++n;
        cout << n<<endl;
        return 0;
    
}

Compiler output:
a.cc: In function 'auto check(int)':
a.cc:8:12: error: 'b' was not declared in this scope
    8 |         if(b[t])
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long;
int main()
{
    ll N, K, x;
    cin >> N >> K;
    set<ll> s;
    for (auto i = 0; i < 10; i++)
        s.insert(i);
    for (auto i = 0; i < K; i++)
    {
        cin >> x;
        s.erase(x);
    }

    while (true)
    {
        x = N;
        ll digit = 1;
        while (x > 0)
        {

            if (s.find(x % 10) == s.end())
            {
                N = (x + 1) * digit;
                break;
            }
            digit *= 10;
            x /= 10;
        }
        if (x == 0)
            break;
    }

    cout << N << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:6:5: note: in expansion of macro 'll'
    6 |     ll N, K, x;
      |     ^~
a.cc:6:8: error: 'N' was not declared in this scope
    6 |     ll N, K, x;
      |        ^
a.cc:6:11: error: 'K' was not declared in this scope
    6 |     ll N, K, x;
      |           ^
a.cc:6:14: error: 'x' was not declared in this scope
    6 |     ll N, K, x;
      |              ^
a.cc:3:17: error: template argument 1 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:8:9: note: in expansion of macro 'll'
    8 |     set<ll> s;
      |         ^~
a.cc:3:17: error: template argument 2 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:8:9: note: in expansion of macro 'll'
    8 |     set<ll> s;
      |         ^~
a.cc:3:17: error: template argument 3 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:8:9: note: in expansion of macro 'll'
    8 |     set<ll> s;
      |         ^~
a.cc:8:11: error: expected primary-expression before '>' token
    8 |     set<ll> s;
      |           ^
a.cc:8:13: error: 's' was not declared in this scope
    8 |     set<ll> s;
      |             ^
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:20:9: note: in expansion of macro 'll'
   20 |         ll digit = 1;
      |         ^~
a.cc:20:12: error: 'digit' was not declared in this scope
   20 |         ll digit = 1;
      |            ^~~~~
Language: C++

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

int main()
{
    typedef ll long long;
    ll N, K, x;
    cin >> N >> K;
    set<ll> s;
    for (auto i = 0; i < 10; i++)
        s.insert(i);
    for (auto i = 0; i < K; i++)
    {
        cin >> x;
        s.erase(x);
    }

    while (true)
    {
        x = N;
        ll digit = 1;
        while (x > 0)
        {

            if (s.find(x % 10) == s.end())
            {
                N = (x + 1) * digit;
                break;
            }
            digit *= 10;
            x /= 10;
        }
        if (x == 0)
            break;
    }

    cout << N << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'll' does not name a type
    6 |     typedef ll long long;
      |             ^~
a.cc:7:5: error: 'll' was not declared in this scope
    7 |     ll N, K, x;
      |     ^~
a.cc:8:12: error: 'N' was not declared in this scope
    8 |     cin >> N >> K;
      |            ^
a.cc:8:17: error: 'K' was not declared in this scope
    8 |     cin >> N >> K;
      |                 ^
a.cc:9:11: error: template argument 2 is invalid
    9 |     set<ll> s;
      |           ^
a.cc:9:11: error: template argument 3 is invalid
a.cc:11:11: error: request for member 'insert' in 's', which is of non-class type 'int'
   11 |         s.insert(i);
      |           ^~~~~~
a.cc:14:16: error: 'x' was not declared in this scope
   14 |         cin >> x;
      |                ^
a.cc:15:11: error: request for member 'erase' in 's', which is of non-class type 'int'
   15 |         s.erase(x);
      |           ^~~~~
a.cc:20:9: error: 'x' was not declared in this scope
   20 |         x = N;
      |         ^
a.cc:21:11: error: expected ';' before 'digit'
   21 |         ll digit = 1;
      |           ^~~~~~
      |           ;
a.cc:25:19: error: request for member 'find' in 's', which is of non-class type 'int'
   25 |             if (s.find(x % 10) == s.end())
      |                   ^~~~
a.cc:25:37: error: request for member 'end' in 's', which is of non-class type 'int'
   25 |             if (s.find(x % 10) == s.end())
      |                                     ^~~
a.cc:27:31: error: 'digit' was not declared in this scope
   27 |                 N = (x + 1) * digit;
      |                               ^~~~~
a.cc:30:13: error: 'digit' was not declared in this scope
   30 |             digit *= 10;
      |             ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define long long ll;
int main()
{
    ll N, K, x;
    cin >> N >> K;
    set<ll> s;
    for (auto i = 0; i < 10; i++)
        s.insert(i);
    for (auto i = 0; i < K; i++)
    {
        cin >> x;
        s.erase(x);
    }

    while (true)
    {
        x = N;
        ll digit = 1;
        while (x > 0)
        {

            if (s.find(x % 10) == s.end())
            {
                N = (x + 1) * digit;
                break;
            }
            digit *= 10;
            x /= 10;
        }
        if (x == 0)
            break;
    }

    cout << N << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'll' was not declared in this scope
    6 |     ll N, K, x;
      |     ^~
a.cc:7:12: error: 'N' was not declared in this scope
    7 |     cin >> N >> K;
      |            ^
a.cc:7:17: error: 'K' was not declared in this scope
    7 |     cin >> N >> K;
      |                 ^
a.cc:8:11: error: template argument 2 is invalid
    8 |     set<ll> s;
      |           ^
a.cc:8:11: error: template argument 3 is invalid
a.cc:10:11: error: request for member 'insert' in 's', which is of non-class type 'int'
   10 |         s.insert(i);
      |           ^~~~~~
a.cc:13:16: error: 'x' was not declared in this scope
   13 |         cin >> x;
      |                ^
a.cc:14:11: error: request for member 'erase' in 's', which is of non-class type 'int'
   14 |         s.erase(x);
      |           ^~~~~
a.cc:19:9: error: 'x' was not declared in this scope
   19 |         x = N;
      |         ^
a.cc:20:11: error: expected ';' before 'digit'
   20 |         ll digit = 1;
      |           ^~~~~~
      |           ;
a.cc:24:19: error: request for member 'find' in 's', which is of non-class type 'int'
   24 |             if (s.find(x % 10) == s.end())
      |                   ^~~~
a.cc:24:37: error: request for member 'end' in 's', which is of non-class type 'int'
   24 |             if (s.find(x % 10) == s.end())
      |                                     ^~~
a.cc:26:31: error: 'digit' was not declared in this scope
   26 |                 N = (x + 1) * digit;
      |                               ^~~~~
a.cc:29:13: error: 'digit' was not declared in this scope
   29 |             digit *= 10;
      |             ^~~~~
Language: C++

#include <algorithm>
#include <functional>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

//前提:解は必ず存在する
int main() {
  int N, K;
  cin >> N >> K;

  vector<int> D;

  //配列D、嫌いな数字を入れていく。
  for (int i = 0; i < K; i++) {
    int d;
    cin >> d;
    D.push_back(d);
  }

  int ans = N;

  // 嫌いな数字が出現した際に立つフラグ
  bool flag = false;

  for (int ans = N; ans <= 10000; ans++) {
    // ansを文字列に変換
    string str = to_string(ans);
    count = 0;

    for (int i = 0; i < K; i++) {
      // 嫌いな数字を文字に変換
      char judge = '0' + D[i];

      // ans中にD[i]が出現したらフラグを立てる
      if (str.find(judge) != string::npos) {
        count = true;
        break;
      }
    }

    // 嫌いな数字が出現してなかったら表記して終了
    if (count == false) {
      cout << ans << endl;
      return 0;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: overloaded function with no contextual type information
   30 |     count = 0;
      |             ^
a.cc:38:17: error: overloaded function with no contextual type information
   38 |         count = true;
      |                 ^~~~
a.cc:44:15: error: invalid operands of types '<unresolved overloaded function type>' and 'bool' to binary 'operator=='
   44 |     if (count == false) {
      |         ~~~~~~^~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
using namespace std;
 
int main() {
    int i, num;
    int flag = 0;
    int n, k, d;
    vector<int> v;
  	cin >> n, k;
    for (i=0;i<k;i++) {
        cin >> d; 
        v.push_back(d);
    }
    sort(v.begin(), v.end());
    for (i=n;i<n*10;i++) {
        flag = 0;
        num = i;
        while(num != 0) {
            auto result = find(v.begin(), v.end(), num % 10;
            if (result == v.end()) flag = 1;
            num /= 10;
        }
        if (flag == 0) {
            cout << i << endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:60: error: expected ')' before ';' token
   28 |             auto result = find(v.begin(), v.end(), num % 10;
      |                               ~                            ^
      |                                                            )
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
using namespace std;
 
int main() {
    int i, num;
    int flag = 0;
    int n, k, d;
    vector<int> v;
  	cin >> n, k;
    for (i=0;i<k;i++) {
        cin >> d; 
        v.push_back(d);
    }
    sort(v.begin(), v.end());
    for (i=n;i<n*10;i++) {
        flag = 0;
        num = i;
        while(num != 0) {
            result = find(v.begin(), v.end(), num % 10
            if (result == v.end()) flag = 1
            num /= 10;
        }
        if (flag == 0) {
            cout << i << endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'result' was not declared in this scope
   28 |             result = find(v.begin(), v.end(), num % 10
      |             ^~~~~~
a.cc:28:55: error: expected ')' before 'if'
   28 |             result = find(v.begin(), v.end(), num % 10
      |                          ~                            ^
      |                                                       )
   29 |             if (result == v.end()) flag = 1
      |             ~~
Language: C++

#include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    int n,k;
    cin >> n >> k;
    vector<int> d(k);
    for(int i=0;i<k;i++) cin >> d[i];
    for(int i=n;n<10000;i++){
        int x=i;
        bool flag=0;
        for(int j=0;j<5;j++){
            for(int l=0;l<k;l++){
                if(x%10==d[l]){
                    flag=1;
                }
            }
            x/=10;
            if(b==0) break;
        }
        if(flag==0){
            cout << i << endl;
            break;
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: 'b' was not declared in this scope
   23 |             if(b==0) break;
      |                ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < n; ++i)
#define repR(i, n) for(ll i = n; i >= 0; ++i)
#define FDS(i, n) for(ll i = 0; i < n; ++i)
#define FDSR(i, n) for(ll i = n; i >= 0; ++i)
#define FOR(i, m, n) for(ll i = m; i < n; ++i)
#define FORR(i, m, n) for(ll i = m;i >= n;--i)
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define itn ll
#define ednl endl
using namespace std;
typedef long long ll;template<typename Typell>Typell G_C_D(Typell a, Typell b){if (a < 0) a = -a;if (b < 0) b = -b;while (b != 0) {a %= b;if (a == 0) return b;b %= a;}return a;}template<typename Typell>
Typell G_C_D(const std::vector<Typell> &list){Typell a = list[0];for (size_t i = 1; i < list.size(); ++i) {a = G_C_D(a, list[i]);}return a;}template<typename Typell>Typell L_C_M(Typell a, Typell b) {if( a == 0 && b == 0)return 0;return a / G_C_D(a, b) * b;}
template<typename Typell>Typell L_C_M(const std::vector<Typell> &list){Typell a = list[0];for (size_t i = 1; i < list.size(); ++i) {a = L_C_M(a, list[i]);}return a;}

int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	
	int N,K;
	cin>>N>>K;
	
	vector<int> vec(K);
	FDS(i,K){
		cin>>vec[i];
	}
	
	for(int i=1;i<100000;i++){
		if(i>=N){
			int NN=i;
			vector<int> keta(5);
			FDS(t,5){
				keta[t]=NN%10;
				NN/=10;
			}
			int sum=0;
			FDS(k,5){
				int sub=0;
				FDS(j,K){
					if(keta[k]!=vec[j]){
						sub++;
					}
				}
				if(sub==K){
					sum++;
				}
			}
			if(sum==5){
				cou<<i<<endl;
				return 0;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:33: error: 'cou' was not declared in this scope; did you mean 'cos'?
   49 |                                 cou<<i<<endl;
      |                                 ^~~
      |                                 cos
Language: C++

#include<stdio.h>
#include<string.h>
#include<string>
#include<iostream>
#include<algorithm>
#include<map>
using namespace std;

int main(){
	int dol,n,num,ans;
	int judge[10];
	int Num[10000];
	scanf("%d %d",&dol,&n);
	memset(judge,0,sizeof(judge));
	for(int i = 0 ; i < n ; i++){
		scanf("%d",&num);
		judge[num] = 1;
	}
	int cnt = 0;
	int dol1 = dol;
	while(dol){
		Num[cnt] = dol%10;
		dol /= 10;
		cnt++;
	}
	for(int i = 0 ; i < cnt ; i++){
		while(judge[Num[i]] == 1){
			Num[i]++;
			if(Num[i] >= 10){
				Num[i + 1]++;
				Num[i] = 0;
			}
		}
	}
	while(judge[Num[cnt]] == 1 && Num[cnt] != 0){
		Num[cnt]++;
	}
	int j = 1;
	for(int i = 0 ; i <= cnt ; i++ ){
		ans += j*Num[i];
		j *= 10;
	}
	printf("%d\n",ans);
	if(ans - dol1 != 0){
		printf(’%)
	}
	return 0;
}

Compiler output:
a.cc:45:24: error: extended character ’ is not valid in an identifier
   45 |                 printf(’%)
      |                        ^
a.cc: In function 'int main()':
a.cc:45:24: error: '\U00002019' was not declared in this scope
   45 |                 printf(’%)
      |                        ^
a.cc:45:26: error: expected primary-expression before ')' token
   45 |                 printf(’%)
      |                          ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int n, k, arr[100];

void solve() {
	for(int x = n; ; ++x){
		int tmp = x;
		int flag = 1;
		while(tmp) {
			int num = tmp % 10;
			for(int i = 1; i <= k; ++i){
				if(num == arr[i]){
					flag = 0;x
					break;
				}
			}
			tmp = tmp / 10;
			if(!flag) break;
		}
		if(flag){
			printf("%d\n", x);
			return ;
		}
	}
}

int main() {
	while(~scanf("%d %d", &n, &k)) {
		for(int i = 1; i <= k; ++i) scanf("%d", arr + i);
		solve(); 
	} 
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:15:51: error: expected ';' before 'break'
   15 |                                         flag = 0;x
      |                                                   ^
      |                                                   ;
   16 |                                         break;
      |                                         ~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int N,K;
	cin>>N>>K;
	vector<int> vec(K);
	for(int i=0; i<K; i++){
		vec[i];
	}
	int ans=10000;
	for(int i=0; i<10000; i++){
		int t=0;
		for(int k=0; k<K; k++){
			if(i%10!=vec[k]){
				t++;
			}
			if(i/10)%10!=vec[k]){
				t++;
			}
			if(i/100)%10!=vec[k]{
				t++;
			}
			if(i/1000)%10!=vec[k]){
				t++;
			}
		}
		if(t==4*K){
			if(ans>=i){
				ans=i;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |                 vec[i];
      |                      ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:17:33: error: expected primary-expression before '%' token
   17 |                         if(i/10)%10!=vec[k]){
      |                                 ^
a.cc:20:34: error: expected primary-expression before '%' token
   20 |                         if(i/100)%10!=vec[k]{
      |                                  ^
a.cc:23:35: error: expected primary-expression before '%' token
   23 |                         if(i/1000)%10!=vec[k]){
      |                                   ^
Language: C

#include "bits/stdc++.h"
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define BUGAVOID(x) x
#define rep(...) BUGAVOID(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define sz(c) (int)(c.size())
#define all(c) c.begin(),c.end()
#define mp make_pair
#define write(x) cout<<(x)<<"\n"
using namespace std; typedef long long ll;
typedef vector<int> vi; typedef vector<ll> vll; template<class T, class U>using vp = vector<pair<T, U>>;
template<class T>using vv = vector<vector<T>>; template<class T, class U>using vvp = vv<pair<T, U>>;
template<class T>vv<T> vvec(const size_t n, const size_t m, const T v) { return vv<T>(n, vector<T>(m, v)); }
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; }
constexpr int INF = 1 << 28; constexpr ll LINF = 1ll << 60;
constexpr int MAX = 1e5 + 5; constexpr int MOD = 1e9 + 7; constexpr double EPS = 1e-6;
constexpr int dy[4] = { 0,1,0,-1 }; constexpr int dx[4] = { 1,0,-1,0 };
struct aaa { aaa() { cin.tie(0); ios::sync_with_stdio(0); }; }aaaa;

int N, K;
vi D;

int main(){
    cin >> N >> K;
    D.resize(K);
    rep(i, K) cin >> D[i];

    vector<char> forbidden;
    rep(i, K) forbidden.push_back(D[i] + '0'); 

    rep(n, N, 100000){
        string s = to_string(n);
        bool allowed = true;
        rep(i, K) if (s.find(forbidden[i]) != string::npos) allowed = false;

        if (allowed) {
            write(n);
            return 0;
        }
    }
}

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

package demo;
import java.util.*;
public class Main2
{
public static void main(String[] args) {
	Scanner sc=new Scanner(System.in);
	int [] n=new int [10];
	while(sc.hasNext())
	{
		
		Arrays.fill(n, 0);
		int a=sc.nextInt();
		int num=sc.nextInt();
		for(int i=0;i<num;i++)
		{
			int temp=sc.nextInt();
			n[temp]=1;
		}
		//System.out.println(a);
		int flag=1;
		int money=0;
		while(flag==1)
		{
			money=money+a;
			//System.out.println(money);
			String mo=Integer.toString(money);
			flag=0;
			for(int i=0;i<=9;i++)
			{
				String o=Integer.toString(i);
				if(n[i]==0)continue;
				if(mo.indexOf(o)>=0)
				{
					flag=1;break;
				}
			}

		}
		System.out.println(money);
	
	}
		
	}
		


}

Compiler output:
Main.java:3: 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>
using namespace std;
int X,N,D[10];
bool calc(int n){
  for(int i=0;i<N;i++){//一の位の値がないときture
    if(n%10==X[i])return false;
  }
  return true;
}
int judge(int n){
  while (calc(n)) {
    n/=10;
    if(n==0)return n;//NG
  }
  return 0;//ok
}
int main()
{
    int i,n;
    cin>>X>>N;
    for(i=0;i<n;i++){
      cin>>X[i];
    }
    X[i]=10;
    while((n=judge(N))!=0) {
      N++
    }
    cout<<N;

}


Compiler output:
a.cc: In function 'bool calc(int)':
a.cc:6:15: error: invalid types 'int[int]' for array subscript
    6 |     if(n%10==X[i])return false;
      |               ^
a.cc: In function 'int main()':
a.cc:22:13: error: invalid types 'int[int]' for array subscript
   22 |       cin>>X[i];
      |             ^
a.cc:24:6: error: invalid types 'int[int]' for array subscript
   24 |     X[i]=10;
      |      ^
a.cc:26:10: error: expected ';' before '}' token
   26 |       N++
      |          ^
      |          ;
   27 |     }
      |     ~
Language: C++

#include<iostream>
#include<vector>

int pow_10 (int b) {
  long c = 1;
  for (int i = 0; i < b; ++i) {
    c = c * 10;
  }
  return c;
} //aのb乗

bool good_number (int N, unsigned long K, const std::vector<int> &bad_number) {
  bool check = true;
  for (unsigned long i = 0; i < K; ++i) {
    if (N == bad_number[i]) {
       check = false;
       break;
    }
  }
  return check;
}

int pay_money (int N, unsigned long K, const std::vector<int> &bad_number) {
  long money = 0;
  long i = 0;
  while (N > 0){
    while (good_number ((N % 10), K, bad_number) == false) {
      ++N;
    }
    money = (N % 10) * pow_10 (i) + money;
    N = N / 10;
    ++i;
  }
  return money;
}


using namespace std;

int main(){
  long N;
  unsigned long K;
  cin >> N >> K;
  long a;
  vector <int> D;
  for (unsigned long i = 0; i < K; ++i){
    cin >> a;
    D.push_back(a);
  }

  cout << detch_up (N, K, D) << endl;
  //cout << pay_money(N, K, D) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:11: error: 'detch_up' was not declared in this scope
   51 |   cout << detch_up (N, K, D) << endl;
      |           ^~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
    int n,k;
    cin >> n >> k;
    vector<int> D(10,10);
    vector<int> number;
    for(int i=0;i<k;i++){
        cin >>D[i];
    }
    for(int j=0;j<10;j++){
        if(find(D.begin(),D.end(),j)==D.end())
        number.push_back(j);
    }
    vector<int> keta;
    for(int i=0;i<4&&n/10!=0;i++){
        keta.push_back(n%10);
        if(n/10!=0)
        n =n/10;
        else break;
        if(i>0) swap(keta[i],keta[i-1]);
    }
    for(int m=0;m<keta.size();m++){
        for(int l=0;l<number.size();l++){
            if(number[l]>keta[m]){
            swap(number[l],keta[m]);
            break;
            }
        }
    }
    int ans=0;
    for(int m=0;m<keta.size();m++){
        ans+=keta[m]*pow(10,3-m);
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:22: error: 'pow' was not declared in this scope
   36 |         ans+=keta[m]*pow(10,3-m);
      |                      ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int N,K,m;
vector<int> D(10),;

void dfs(int a){
  if(a>=N){m=min(a,m); return;}
  else{
    for(int i=0;i<=9;i++){
      bool w=true;
      for(int j=0;j<K;j++){if(i==D[j])w=false;}
      if(w){dfs(a*10+i);}
    }
  }
}
 
int main() {
  cin >> N >> K;
  for(int i=0;i<K;i++)cin >> D[i];
  m=100000;
  for(int i=1;i<=9;i++){
    bool q=true;
    for(int j=0;j<K;j++){if(i==D[j])q=false;}
    if(q){dfs(i);}
  }
  cout << m << endl;
}

Compiler output:
a.cc:4:19: error: expected unqualified-id before ';' token
    4 | vector<int> D(10),;
      |                   ^
Language: C++

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

int flag[10];

int Ispossible(int i){
  while(i){
    if(flag[i%10])return 0;
    i/=10;
  }
  return 1;
}

int main(){
  int n,k,p;
  cin>>n>>k;
  while(k--){
    cin>>p;
    flag[p]=1;
  }
  for(int i=n;;i++){
    if(isPossible(i)){
      cout<<i<<endl;
      exit(0);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:8: error: 'isPossible' was not declared in this scope; did you mean 'Ispossible'?
   22 |     if(isPossible(i)){
      |        ^~~~~~~~~~
      |        Ispossible
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
#define Inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
int a[100010];
int vis[100010];
bool check(int n)
{
    while(n)
    {
        if(vis[n%10])
            return false;
        n/=10;
    }
    return true;
}
int main()
{
    int n,k;
    scanf("%d %d",&n,&k);
    memset(vis,0,sizeof(vis));
    for(int i=0; i<k; i++)
    {
        scanf("%d",&a[i]);
        vis[a[i]]=1;
    }
    for(int i=n; ; i++)
    {
        if(check(i))
        {
            printf("%d\n",i);
            return 0;
        }
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:41:14: error: expected '}' at end of input
   41 |     return 0;
      |              ^
a.cc:24:1: note: to match this '{'
   24 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const array<pair<int,int>,4> fd{make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 

signed main(){
  int n,k;cin>>n>>k;bool d[10];rep(i,10)d[i] = false;
  rep(i,k){
    int dd;cin>>dd;
    d[dd] = true;
  }
  repd(i,n,100000){
    string s = to_string(i);
    vector<int> a;
    rep(j,s.length()){
      a.push_back(s[j] - '0')
    }
    bool ok = true;
    rep(i,a.size()){
      if(!d[a[i]]){
        ok = false;
        continue;
      }
    }
    cout << i << endl;
    return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: expected ';' before '}' token
   22 |       a.push_back(s[j] - '0')
      |                              ^
      |                              ;
   23 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int d[10]= {0};
bool ok(int x)
{
    int o;
    while(x)
    {
        o=x%10;
        if(d[o])
            return false;
        x/=10;
    }
    return true;
}
int main()
{
    int n,k,x;
    scanf("%d%d",&n,&k);
    for(int i=0; i<k; i++)
    {
        scanf("%d",&x);
        d[x]10000=1;
    }
    for(int i=n;; i++)
    {
        if(ok(i))
        {
            printf("%d\n",i);
            break;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: expected ';' before numeric constant
   23 |         d[x]10000=1;
      |             ^~~~~
      |             ;
Language: C++

#include <algorithm> 
#include <cstdio> 
#include <iostream> 
#include <map> 
#include <cmath> 
#include <queue> 
#include <set> 
#include <sstream> 
#include <stack> 
#include <string> 
#include <vector> 
#include <stdlib.h> 
#include <stdio.h>
using namespace std;

ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I) 



int main () {
     int N;
     int K;
    cin >> N >> K;
    bool D [ 10 ]; // if it is a bad number true 
    (i, 0 , 10 ) D [i] = false ;
    FOR (i, 0 , K) {
         int d;
        cin >> d;
        D [d] = true ;
    }
    // Full search 
     FOR (i, 0 , 10 * N) {
         if (N <= i) {
             int check = true ;
            string s = to_string (i);
            FOR (j, 0 , s.length ()) {
                 if (D [s [j] - '0' ]) check = false ;
            }
            if (check) {
                cout << i << endl;
                return  0 ;
            }
        }
     }
}

Compiler output:
a.cc:16:4: error: stray '#' in program
   16 | ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
      |    ^
a.cc:16:31: error: stray '#' in program
   16 | ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
      |                               ^
a.cc:16:56: error: stray '#' in program
   16 | ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
      |                                                        ^
a.cc:16:1: error: 'll' does not name a type
   16 | ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
      | ^~
a.cc:16:97: error: 'I' does not name a type
   16 | ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
      |                                                                                                 ^
a.cc:16:105: error: expected unqualified-id before '++' token
   16 | ll #define          long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
      |                                                                                                         ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <string	>
using namespace std;
static int D[10]; 
bool check(int n){
	int num=n;
	while(n){
		if(D[n%10]==1)	return true;
		n/=10;
	}
	cout<<num<<endl;
	return false;
}
int main()
{
	int N,K;
	int num;
	cin>>N>>K;
	for(int i=1;i<=K;i++){
		int num;
		cin>>num;
		D[num]=1;
	}
	num=N;
	while(check(num)){
		num++;
	}
		
}

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

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int n,k,a;
int s[7],s1[7];
int num[12];
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=k;i++)
	{
		scanf("%d",&a);
		num[a]=1;
	}
	if(n==0)
	{
		for(int l=0;l<=9;l++)
			if(num[l]==0)
			{
				printf("%d",l);
				return 0;
			}0
	}
	int len=0,n1=n;
	while(n>=1)
	{
		s[++len]=n%10;
		n/=10;
	}
	for(int i=len;i>0;i--)
		if(num[s[i]]==0)
			s1[i]=s[i];
		else
		{
			for(int j=s[i]+1;j<=9;j++)
				if(num[j]==0)
				{
					s1[i]=j;
					for(int l=0;l<=9;l++)
						if(num[l]==0)
						{
							for(int m=i-1;m>0;m--)
								s1[m]=l;
							break;
						}
					break;
				}
			break;
		}
	for(int i=len;i>0;i--)
		printf("%d",s1[i]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:27: error: expected ';' before '}' token
   23 |                         }0
      |                           ^
      |                           ;
   24 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

map <int,int> m;

int main()
{
    int n,k,x;
    cin >> n >> k;

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

    while(true)
    {
        int temp = n;
        bool flag = true;

        while(temp)
        {
            if(m[temp%10] == 1)
            {
                flag = false;
                break;
            }

            temp /= 10;
        }

        if(flag)
            break;

        n++;
    }

    cour << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:5: error: 'cour' was not declared in this scope
   40 |     cour << n << endl;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

map <int,int> m;

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

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

    while(true)
    {
        int temp = n;
        bool flag = true;

        while(temp)
        {
            if(m[temp%10] == 1)
            {
                flag = false;
                break;
            }

            temp /= 10;
        }

        if(flag)
            break;

        n++;
    }

    cour << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'x' was not declared in this scope
   14 |         cin >> x;
      |                ^
a.cc:40:5: error: 'cour' was not declared in this scope
   40 |     cour << n << endl;
      |     ^~~~
Language: C++

def main():
    N, K = map(int, input().split())
    D = list(input().split())

    i = 0
    while True:
        S = str(N)
        f = True
        for s in S:
            if s in D:
                f = False
                break
        if f:
            break
        N += 1
    print(N)
    
if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

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

typedef long long ll;

vector<bool>p(10);

int judge(int n){
  while(n!=0){
    int b=n%10;
    rep(i,10){
      if(b==a[i])return false;
      }
    n/=10;
    }
return true;
}

int main()
{
   ios::sync_with_stdio(false);
   cin.tie(0);
   
   int n,k;
   cin>>n>>k;
   rep(i,k){
     int a;
     cin>>a;
     p[a]=true;
   }
    
   for(int i=n;;i++){
     if(judge(i)){
       cout<<i<<endl;
       break;
      }
   }
   
   return 0;
}


Compiler output:
a.cc: In function 'int judge(int)':
a.cc:14:13: error: 'a' was not declared in this scope
   14 |       if(b==a[i])return false;
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int N, K;
  cin >> N >> K;
  int D[10];
  for (int i = 0; i < K; i++) {
    cin >> D[i];
  }
  int n = N;
  while (1) {
    int a[5];
    int nc = n;
    bool flag = true;
    for(int i = 0; i < 5; i++) {
      a[i] = nc % 10;
      nc -= a[i];
      nc /= 10;
    }
    
    int J;
    if (a[4] == 0) {
      J = 4;
      if (a[3] == 0) {
        J = 3;
        if(a[2] == 0) {
          J = 2;
          if (a[1] == 0) {
            J = 1;
        }
      }
    }
    else J = 5;
    
    for (int i = 0; i < K; i++) {
      for (int j = 0; j < J; j++) {
        if (D[i] == a[j])
          flag = false;
      }
    }
    if (flag) {
      cout << n << endl;
      break;
    } else {
      n++;
    }
  } 
  return 0;
}

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