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

import java.io.*;
import java.util.*;

public class Main{
    static MyReader in = new MyReader();
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args){
        int N, K;
        {int[] a = in.ii(); N = a[0]; K = a[1];}

        int[] D = in.ii();

        boolean[] no = new boolean[10];

        for(int i = 0; i < K; i++){
          no[D[i]] = True;
        }

        int i = N;
        for(; i <= 10*N; i++){
          int j = i;
          while(j > 0 && !no[j%10]) j /= 10;
          if(j == 0) break;
        }
        out.println(i);
    }

    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        String[] ss(){
            return s().split(" ");
        }

        int i(){
            return Integer.parseInt(s());
        }

        int[] ii(){
            String[] ss = ss();
            int[] ii = new int[ss.length];
            for(int j = 0; j < ss.length; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }

        long l(){
            return Long.parseLong(s());
        }

        long[] ll(){
            String[] ss = ss();
            long[] ll = new long[ss.length];
            for(int j = 0; j < ss.length; j++) ll[j] = Long.parseLong(ss[j]);
            return ll;
        }
    }
}


Compiler output:
Main.java:17: error: cannot find symbol
          no[D[i]] = True;
                     ^
  symbol:   variable True
  location: class Main
1 error
Language: Java

#include <stdio.h>

int main(void)
{
  const int N, K;
  scanf("%d %d", &N, &K);

  int no[10] = {0};

  for(int i = 0; i < K; i++){
    int d;
    scanf("%d", &d);
    no[d] = 1;
  }

  int i = N;
  for(; i <= 10*N; i++){
    int j = i;
    while(j > 0 && !no[j%10]) j /= 10;
    if(!j) break;
  }
  printf("%d", i);
  return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:6: error: class, interface, enum, or record expected
  scanf("%d %d", &N, &K);
  ^
Main.java:8: error: class, interface, enum, or record expected
  int no[10] = {0};
  ^
Main.java:10: error: class, interface, enum, or record expected
  for(int i = 0; i < K; i++){
  ^
Main.java:10: error: class, interface, enum, or record expected
  for(int i = 0; i < K; i++){
                 ^
Main.java:10: error: class, interface, enum, or record expected
  for(int i = 0; i < K; i++){
                        ^
Main.java:12: error: class, interface, enum, or record expected
    scanf("%d", &d);
    ^
Main.java:13: error: class, interface, enum, or record expected
    no[d] = 1;
    ^
Main.java:14: error: class, interface, enum, or record expected
  }
  ^
Main.java:17: error: class, interface, enum, or record expected
  for(; i <= 10*N; i++){
  ^
Main.java:17: error: class, interface, enum, or record expected
  for(; i <= 10*N; i++){
        ^
Main.java:17: error: class, interface, enum, or record expected
  for(; i <= 10*N; i++){
                   ^
Main.java:19: error: class, interface, enum, or record expected
    while(j > 0 && !no[j%10]) j /= 10;
    ^
Main.java:20: error: class, interface, enum, or record expected
    if(!j) break;
    ^
Main.java:21: error: class, interface, enum, or record expected
  }
  ^
Main.java:23: error: class, interface, enum, or record expected
  return 0;
  ^
Main.java:24: error: class, interface, enum, or record expected
}
^
18 errors
Language: C++

#include<bits/stdc++.h>
#define eoi ios::sync_with_stdio(0),ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
int main()
{
    eoi;
    int a,b,q;
    char m;
    vector<char>v;
    cin>>a>>b;
    while(b--){
        cin>>m;
        v.push_back(m);
    }
    for(int z=0;z<100000;z++){
        a+=z;
        string t=to_string(a);
        for(int i=0;i<t.length();i++){
            for(int s=0;s<v.size();s++){
                if(t[i]==v[s]){
                    i=t.length();
                    break;
                }
                if(s+1==v.size()){cout<<t;return 0;}
            }

        }
        a=stoi(a);

    }

    return 0;
}







Compiler output:
a.cc: In function 'int main()':
a.cc:28:15: error: no matching function for call to 'stoi(int&)'
   28 |         a=stoi(a);
      |           ~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from 'int' to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from 'int' to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
int main(){
    int N, K, min = 0, t=0;
    bool answer = true;
    cin >> N >> K;
    vector<char> D(K);
    for(int i = 0; i < K; i++){
        cin >> D[i];
    }
    for(int i = N; i < 10N; i++){
        answer = true;
        for(int j = 0; j < to_string(i).size(); j++){
            for(int l = 0; l < K;l++){
                if(to_string(i).at(j) == D[l]){answer = false;}
            }
        }
        if(answer == true){
                min = i;
                break;
        }
    }
    cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: unable to find numeric literal operator 'operator""N'
   13 |     for(int i = N; i < 10N; i++){
      |                        ^~~
Language: C++

#include <iostream>
#include <string>

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

    std::string str;
    char c;

    for(int i = 0; i < k; i++)
    {
        std::cin >> c;
        str += c;
    }

    while(std::string::npos != to_string(n).find_first_of(str))
    {
        n++;
    }

    std::cout << n << std::endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: 'to_string' was not declared in this scope; did you mean 'std::__cxx11::to_string'?
   18 |     while(std::string::npos != to_string(n).find_first_of(str))
      |                                ^~~~~~~~~
      |                                std::__cxx11::to_string
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4421:3: note: 'std::__cxx11::to_string' declared here
 4421 |   to_string(long double __val)
      |   ^~~~~~~~~
Language: C++

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

int N, K;
int num = 1, ans = 0;
bool D[10];

int main () {
  cin >> N >> K;
  ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    
    while(num > 0){
      if (D[num % 10]) break;
      num /= 10;
    }
    if(num == 0) {
      break;
    ans++;
  }
  cout << ans << endl;
}

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

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

int N, K;
int num = 1, ans = 0;
bool D[10] = {0};

int main () {
  cin >> N >> K;
  ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    
    while(num > 0){
      if (D[num % 10]) break;
      num /= 10;
      }
    }
    if(num == 0) break;
    ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: break statement not within loop or switch
   26 |     if(num == 0) break;
      |                  ^~~~~
a.cc: At global scope:
a.cc:29:3: error: 'cout' does not name a type
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

int N, K;
int num = 1, ans = 0;
vector<bool> D(10);

int main () {
  cin >> N >> K;
  ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    
    while(num > 0){
      if (D[num % 10]) break;
      num /= 10;
      }
    }
    if(num == 0) break;
    ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: break statement not within loop or switch
   26 |     if(num == 0) break;
      |                  ^~~~~
a.cc: At global scope:
a.cc:29:3: error: 'cout' does not name a type
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

int N, K;
int num = 1, ans = 0;
vector<bool> D(10);

int main () {
  cin >> N >> K;
  int ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    
    while(num > 0){
      if (D[num % 10]) break;
      num /= 10;
      }
    }
    if(num == 0) break;
    ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: break statement not within loop or switch
   26 |     if(num == 0) break;
      |                  ^~~~~
a.cc: At global scope:
a.cc:29:3: error: 'cout' does not name a type
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

int N, K;
int num = 1, ans = 0;
vector<bool> D[10];

int main () {
  cin >> N >> K;
  int ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    
    while(num > 0){
      if (D[num % 10]) break;
      num /= 10;
      }
    }
    if(num == 0) break;
    ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
   15 |     D[n] = 1;
      |            ^
In file included from /usr/include/c++/14/vector:67,
                 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_bvector.h:894:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]'
  894 |       operator=(const vector& __x)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:894:31: note:   no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
  894 |       operator=(const vector& __x)
      |                 ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_bvector.h:926:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]'
  926 |       operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:926:26: note:   no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
  926 |       operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_bvector.h:952:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]'
  952 |       operator=(initializer_list<bool> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:952:40: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
  952 |       operator=(initializer_list<bool> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:22:21: error: could not convert 'D[(num % 10)]' from 'std::vector<bool>' to 'bool'
   22 |       if (D[num % 10]) break;
      |           ~~~~~~~~~~^
      |                     |
      |                     std::vector<bool>
a.cc:26:18: error: break statement not within loop or switch
   26 |     if(num == 0) break;
      |                  ^~~~~
a.cc: At global scope:
a.cc:29:3: error: 'cout' does not name a type
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

int N, K;
int num = 1, ans = 0;
vector<bool> D[10] = {0};

int main () {
  cin >> N >> K;
  int ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    while(num > 0){
      if (D[num % 10]) break;
      num /= 10;
      }
    }
    if(num == 0) break;
    ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc:6:23: error: conversion from 'int' to non-scalar type 'std::vector<bool>' requested
    6 | vector<bool> D[10] = {0};
      |                       ^
a.cc: In function 'int main()':
a.cc:15:12: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
   15 |     D[n] = 1;
      |            ^
In file included from /usr/include/c++/14/vector:67,
                 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_bvector.h:894:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]'
  894 |       operator=(const vector& __x)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:894:31: note:   no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
  894 |       operator=(const vector& __x)
      |                 ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_bvector.h:926:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]'
  926 |       operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:926:26: note:   no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
  926 |       operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_bvector.h:952:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]'
  952 |       operator=(initializer_list<bool> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:952:40: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
  952 |       operator=(initializer_list<bool> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:21:21: error: could not convert 'D[(num % 10)]' from 'std::vector<bool>' to 'bool'
   21 |       if (D[num % 10]) break;
      |           ~~~~~~~~~~^
      |                     |
      |                     std::vector<bool>
a.cc:25:18: error: break statement not within loop or switch
   25 |     if(num == 0) break;
      |                  ^~~~~
a.cc: At global scope:
a.cc:28:3: error: 'cout' does not name a type
   28 |   cout << ans << endl;
      |   ^~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string n;
  int k;
  cin >> n>>k;
  int d[k];
  for(int i=0;i<k;i++){
    cin >> d[i];
  }
  string ans;
  bool ok=1;
  for(ans=n;ans<"10005";ans++){
    int m=n.size();
    for(int i=0;i<m&&ok;i++){
      for(int j=0;j<k&&ok;j++){
        if(ans[i]==s[j]){
          ok=0;
        }
      }
    }
    if(ok){
      cout<<ans<<endl
        return 0;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   13 |   for(ans=n;ans<"10005";ans++){
      |                         ~~~^~
a.cc:17:20: error: 's' was not declared in this scope
   17 |         if(ans[i]==s[j]){
      |                    ^
a.cc:23:22: error: expected ';' before 'return'
   23 |       cout<<ans<<endl
      |                      ^
      |                      ;
   24 |         return 0;
      |         ~~~~~~
Language: C++

N,K = map(int, input().split())
l = list(map(int, input().split()))
num = [i for i in range(10) if i not in l]

print(l)
while True:    
    N_str = str(N)
    frag = 0
    for i in range(len(N_str)):
        if int(N_str[i]) in l:
            #print("yes")
            frag = 1
            break
    if frag == 0:
        break
    else:
        N += 1
print(N)


Compiler output:
a.cc:11:14: error: invalid preprocessing directive #print
   11 |             #print("yes")
      |              ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N,K = map(int, input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(u[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main()
{
  int n,k;
  cin>>n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
  return;
}
  }
  


Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:27:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   27 | int main()
      |         ^~
a.cc:27:9: note: remove parentheses to default-initialize a variable
   27 | int main()
      |         ^~
      |         --
a.cc:27:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:1: error: a function-definition is not allowed here before '{' token
   28 | {
      | ^
a.cc:36:4: error: expected '}' at end of input
   36 |   }
      |    ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(u[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main()
{
  int n,k;
  cin>>n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
  return;
}
  

Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:27:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   27 | int main()
      |         ^~
a.cc:27:9: note: remove parentheses to default-initialize a variable
   27 | int main()
      |         ^~
      |         --
a.cc:27:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:1: error: a function-definition is not allowed here before '{' token
   28 | {
      | ^
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(u[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main(void)
{
  int n,k;
  cin>>n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
}
  
  


Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:28:1: error: a function-definition is not allowed here before '{' token
   28 | {
      | ^
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(u[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main(void){
  int n,k;
  cin>>n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
}
  
  


Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:27:15: error: a function-definition is not allowed here before '{' token
   27 | int main(void){
      |               ^
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(u[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main(void){
  int n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
}
  
  


Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:27:15: error: a function-definition is not allowed here before '{' token
   27 | int main(void){
      |               ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(u[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main(){
  int n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
}
  
  


Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:27:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   27 | int main(){
      |         ^~
a.cc:27:9: note: remove parentheses to default-initialize a variable
   27 | int main(){
      |         ^~
      |         --
a.cc:27:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:27:11: error: a function-definition is not allowed here before '{' token
   27 | int main(){
      |           ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
void st(int a,vector<int> u){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(a[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main(){
  int n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
}
  
  


Compiler output:
a.cc: In function 'void st(int, std::vector<int>)':
a.cc:16:9: error: invalid types 'int[int]' for array subscript
   16 |     if(a[n%10]){
      |         ^
a.cc:27:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   27 | int main(){
      |         ^~
a.cc:27:9: note: remove parentheses to default-initialize a variable
   27 | int main(){
      |         ^~
      |         --
a.cc:27:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:27:11: error: a function-definition is not allowed here before '{' token
   27 | int main(){
      |           ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:12:29: note: to match this '{'
   12 | void st(int a,vector<int> u){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
void ss(int n,vector<int> a(10)){
  for(int i=0;i<n;i++){
    int f;
    cin>>f;
    a[f]=1;
  }

}
  
int st(int a,vector<int> a(10)){
  for(int i=a; ;i++){
    int n=i;
    while(n>0){
    if(a[n%10]){
      break;
    }
    n/=10;
    }
    if(n==0){
      cout<<i<<endl;
      break;
    }
  

int main(){
  int n,k;
  vector<int> a(10);
  ss(k,a);
  st(n,a);
}
  
  

Compiler output:
a.cc:3:28: error: expected ',' or '...' before '(' token
    3 | void ss(int n,vector<int> a(10)){
      |                            ^
a.cc:12:26: error: conflicting declaration 'std::vector<int> a'
   12 | int st(int a,vector<int> a(10)){
      |              ~~~~~~~~~~~~^~
a.cc:12:12: note: previous declaration as 'int a'
   12 | int st(int a,vector<int> a(10)){
      |        ~~~~^
a.cc:12:27: error: expected ',' or '...' before '(' token
   12 | int st(int a,vector<int> a(10)){
      |                           ^
a.cc: In function 'int st(...)':
a.cc:16:9: error: invalid types 'int[int]' for array subscript
   16 |     if(a[n%10]){
      |         ^
a.cc:27:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   27 | int main(){
      |         ^~
a.cc:27:9: note: remove parentheses to default-initialize a variable
   27 | int main(){
      |         ^~
      |         --
a.cc:27:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:27:11: error: a function-definition is not allowed here before '{' token
   27 | int main(){
      |           ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:13:21: note: to match this '{'
   13 |   for(int i=a; ;i++){
      |                     ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:12:32: note: to match this '{'
   12 | int st(int a,vector<int> a(10)){
      |                                ^
a.cc:32:2: warning: no return statement in function returning non-void [-Wreturn-type]
   32 | }
      |  ^
Language: C++

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

class CIrohasObsession {
public:
	void solve(std::istream& cin, std::ostream& cout) {
	    int n, k;
	    cin >> n >> k;
	    vector<int> d_vec(k, 0);
        for (int i = 0; i < k; ++i) {
            cin >> d_vec[i];
        }
        while (true){
            bool flag = true;
            int price = n;
            for (int i = 0; i < floor(log10(n))+1; ++i) {
                int digit = price%10;
                if (find(d_vec.begin(), d_vec.end(), digit) != d_vec.end()){
                    flag = false;
                }
                price /= 10;
            }
            if (flag){
                cout << n << endl;
                break;
            }
            n++;
        }
	}
};

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main()
{
    int n, k;

    cin >> n >> k;
    vector<int>d_vec(k, 0);
    for (int i = 0; i < k; ++i) {
        cin >> d_vec[i];
    }

    int price = n;
    while (true){
        bool isValid = true;
        int digit_cnt = floor(log10(price));
        int now = price;
        for (int digit = 0; digit < digit_cnt+1; ++digit) {
            int tmp = now % 10;
            auto iter = find(d_vec.begin(), d_vec.end(), tmp);
            if (iter != d_vec.end()){
                isValid = false;
                break;
            }
            now /= 10;
        }

        if (isValid){
            cout << price << endl;
            break;
        }


        price++;
    }
    return 0;


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

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

int main()
{
    int n, k;
    cin >> n >> k;
    bool d[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
    for (int i = 0; i < k; i++) {
        int a
        cin >> a;
        d[a] = 0;
    }

    int ans = n;
    while (1) {
        int i = ans;
        bool flag = 1;
        while (i != 0) {
            if (!d[i%10]) flag = 0;
            i /= 10;
        }
        if (flag) break;
        ans++;
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected initializer before 'cin'
   11 |         cin >> a;
      |         ^~~
a.cc:12:11: error: 'a' was not declared in this scope
   12 |         d[a] = 0;
      |           ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;

#define rep(i, n) for(int i = 0; i < (n); ++i)

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

  string n;
  int k;
  cin >> n >> k;
  vector<char> d(k);
  rep(i, k) cin >> d[i];

  while(true) {
    bool flag = true;
    rep(i, k) {
      if(!(find(n.begin(), n.end(), d[i]) == n.end())) flag = false;
    }
    if(flag) {
      break;
    } else {
      n = to_string(stoi(n)+1);
    }
  }

  cout << n << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   20 |       if(!(find(n.begin(), n.end(), d[i]) == n.end())) flag = false;
      |            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:20:16: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   20 |       if(!(find(n.begin(), n.end(), d[i]) == n.end())) flag = false;
      |            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
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 k = sc.nextInt();
        ArrayList<Integer> kList = new ArrayList<>();

        ArrayList<Integer> okList = new ArrayList<>();
        for (int i = 0; i < k; i++) {
          kList.add(sc.nextInt());
        }
        for (int i = 0; i < 10;  i++) {
          if (kList.indexOf(i) == -1) {
            okList.add(i);
          }
        }
      
        String price = String.valueOf(n);
        int okIndex = 0;
        boolean isNine = false;
        for (int i = 0; i < 10; i++) {
          String s = String.valueOf(i);
          
          if (kList.indexOf(s) > -1 &&
             price.indexOf(s) > -1) {
            if (i == 9) {
              while (price.indexOf(String.valueOf(i) > -1)) {
                n += Math.pow(10, price.length() - price.indexOf(i));
                price = String.valueOf(n);						
              }
               i = -1;
            } else {
              if (okList.get(okIndex) < i) {
                okIndex++;
              }
              price.replaceAll(s, String.valueOf(okList.get(okIndex)));
              n = Integer.parseInt(price);
            }
          }
        }
        
        System.out.println(price);
    }
}

Compiler output:
Main.java:30: error: bad operand types for binary operator '>'
              while (price.indexOf(String.valueOf(i) > -1)) {
                                                     ^
  first type:  String
  second type: int
1 error
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 k = sc.nextInt();
        ArrayList<Integer> kList = new ArrayList<>();

        ArrayList<Integer> okList = new ArrayList<>();
        for (int i = 0; i < k; i++) {
          kList.add(sc.nextInt());
        }
        for (int i = 0; i < 10;  i++) {
          if (kList.indexOf(i) == -1) {
            okList.add(i);
          }
        }
      
        String price = String.valueOf(n);
        int okIndex = 0;
        boolean isNine = false;
        for (int i = 0; i < 10; i++) {
          String s = String.valueOf(i);
          
          if (kList.indexOf(s) > -1 &&
             price.indexOf(s) > -1) {
            if (i == 9) {
              while (price.indexOf(String.valueOf(i) > -1)) {
                n += Math.pow(10, price.length() - price.indexOf(i));
                price = String.valueOf(n);						
              }
              
              isNine = true;
            } else {
              if (okList.get(okIndex) < i) {
                okIndex++;
              }
              price.replaceAll(s, String.valueOf(okList.get(okIndex)));
              n = Integer.parseInt(price);
            }
          }
        }
        if (isNine) {
          int lim = okList.get(0);
          String limS = String.valueOf(lim);
          for (int i = 0; i < lim; i++) {
            String target = String.valueOf(i);
            if (price.indexOf(target) > -1) {
              price.replace(target, String.valueOf(lim));
            }
          }
        }
        
        System.out.println(price);
    }
}


Compiler output:
Main.java:30: error: bad operand types for binary operator '>'
              while (price.indexOf(String.valueOf(i) > -1)) {
                                                     ^
  first type:  String
  second type: int
1 error
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 k = sc.nextInt();
        int[] kList = new int[k];

        ArrayList<Integer> okList = new ArrayList<>();
        for (int i = 0; i < k; i++) {
          kList[i] = sc.nextInt();
        }
        for (int i = 0; i < 10;  i++) {
          if (kList.indexOf(i) == -1) {
            okList.add(i);
          }
        }
      
        String price = String.valueOf(n);
        int okIndex = 0;
        boolean isNine = false;
        for (int i = 0; i < 10; i++) {
          
          if (price.indexOf(String.valueOf(i)) > -1) {
            if (i == 9) {
              while (price.indexOf(String.valueOf(i) > -1)) {
                n += Math.pow(10, price.length() - price.indexOf(i));
                price = String.valueOf(n);						
              }
              
              isNine = true;
            } else {
              if (okList.get(okIndex) < i) {
                okIndex++;
              }
              price.replaceAll(String.valueOf(i), okList.get(okIndex));
              n = Integer.parseInt(price);
            }
          }
        }
        if (isNine) {
          int lim = okList.get(0);
          String limS = String.valueOf(lim);
          for (int i = 0; i < lim; i++) {
            String target = String.valueOf(i);
            if (price.indexOf(target) > -1) {
              price.replace(target, lim);
            }
          }
        }
        
        System.out.println(price);
    }
}


Compiler output:
Main.java:16: error: cannot find symbol
          if (kList.indexOf(i) == -1) {
                   ^
  symbol:   method indexOf(int)
  location: variable kList of type int[]
Main.java:28: error: bad operand types for binary operator '>'
              while (price.indexOf(String.valueOf(i) > -1)) {
                                                     ^
  first type:  String
  second type: int
Main.java:38: error: incompatible types: Integer cannot be converted to String
              price.replaceAll(String.valueOf(i), okList.get(okIndex));
                                                            ^
Main.java:49: error: no suitable method found for replace(String,int)
              price.replace(target, lim);
                   ^
    method String.replace(char,char) is not applicable
      (argument mismatch; String cannot be converted to char)
    method String.replace(CharSequence,CharSequence) is not applicable
      (argument mismatch; int cannot be converted to CharSequence)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
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 k = sc.nextInt();
        int[] list = new int[k];

        String price = String.valueOf(n);
        for (int i = 0; i < k; i++) {
          list[i] = sc.nextInt();
          while (price.indexOf(String.valueOf(list[i])) > -1)){
            int index = price.indexOf(String.valueOf(list[i]));
            n += Math.pow(10, price.length() - index);
            price = String.valueOf(n);
          }
        }
      
      for (int i = 0; i < k; i++) {
        while (price.indexOf(String.valueOf(list[i]) > -1)){
            int index = price.indexOf(String.valueOf(list[i]));
            n += Math.pow(10, price.length() - index);
            price = String.valueOf(n);
        }
      }

        
        System.out.println(price);
    }
}


Compiler output:
Main.java:14: error: illegal start of expression
          while (price.indexOf(String.valueOf(list[i])) > -1)){
                                                             ^
1 error
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 k = sc.nextInt();
        int[] list = new int[k];

        String price = n.toString();
        for (int i = 0; i < k; i++) {
          list[i] = sc.nextInt();
          while (price.indexOf(list[i].toString() > -1)){
            int index = price.indexOf(list[i].toString());
            n += Math.pow(10, price.length() - index);
            price = n.toString();
          }
        }
      
      for (int i = 0; i < k; i++) {
        while (price.indexOf(list[i].toString() > -1)){
            int index = price.indexOf(list[i].toString());
            n += Math.pow(10, price.length() - index);
            price = n.toString();
        }
      }

        
        System.out.println(price);
    }
}


Compiler output:
Main.java:11: error: int cannot be dereferenced
        String price = n.toString();
                        ^
Main.java:14: error: int cannot be dereferenced
          while (price.indexOf(list[i].toString() > -1)){
                                      ^
Main.java:15: error: int cannot be dereferenced
            int index = price.indexOf(list[i].toString());
                                             ^
Main.java:17: error: int cannot be dereferenced
            price = n.toString();
                     ^
Main.java:22: error: int cannot be dereferenced
        while (price.indexOf(list[i].toString() > -1)){
                                    ^
Main.java:23: error: int cannot be dereferenced
            int index = price.indexOf(list[i].toString());
                                             ^
Main.java:25: error: int cannot be dereferenced
            price = n.toString();
                     ^
7 errors
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class Test {

	public static void main(String[] args) {

		//入力を受け取るためのScanner型インスタンスscanner
		Scanner scanner = new Scanner(System.in);

		//価格を格納する変数
		int price = scanner.nextInt();
		//嫌いな数字の個数を格納する変数
		int numOfElements = scanner.nextInt();
		//嫌いな数字を格納する配列
		int[] dislikeNums = new int[numOfElements];

		//配列に格納
		for (int i = 0; i < dislikeNums.length; i++) {
			dislikeNums[i] = scanner.nextInt();
		}
		scanner.close(); //scannerに使用しているメモリを解放

		/*支払額の候補を1円ずつ増加させて、
		 条件を満たしているかどうか確認する*/
		boolean flag = false; //条件を満たしているかどうかを管理する変数
		String stringPay; //payをString型に変換したものを格納する変数
		ArrayList<Integer> payArray = new ArrayList<Integer>();// 支払予定額に使われている数字を格納するArrayList
		int pay = 0; //支払予定額を格納する変数

		updateLoop: //支払予定額を更新するループ
		for (pay = price;; pay++) {

			//flagの初期値を設定（支払予定額が条件に合致すると仮定する)
			flag = false;

			//payを分解して、配列payArrayに1文字ずつ格納する
			stringPay = String.valueOf(pay);//payを分解する準備として、int型をString型に変換する

			for (int i = 0; i < stringPay.length(); i++) {
				//char型をInt型に変換することで、Integer型のArrayListに格納する
				payArray.add(Character.digit(stringPay.charAt(i), 10));
			}

			detectLoop: //要素を照合するループ
			for (Integer dislikeNum : dislikeNums) {
				flag = payArray.contains(dislikeNum);
				/*もし支払予定額に嫌いな数字が含まれていたならば、
				照合ループを抜けて支払予定額を更新する*/
				if (flag == true) {
					break detectLoop;
				}
			}
			/*flagが更新されなかったら（支払予定額が条件に合致すれば）、
			ループを抜ける */
			if (flag == false) {
				break updateLoop;
			}
			payArray.clear(); //次のループに持ち越されないように、ArrayListの中身を空にする

		}
		System.out.println(pay);
	}

}

Compiler output:
Main.java:4: error: class Test is public, should be declared in a file named Test.java
public class Test {
       ^
1 error
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=true;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:81:34: error: expected ';' before '}' token
   81 |                             tmp++
      |                                  ^
      |                                  ;
   82 |                         }
      |                         ~