submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s811963898
p04045
C++
#include<iostream> using namespace std; int n,k; bool check(int n, int d[]){ bool flag=true; int a; for(int i=n;i==0;i/=10){ a=i%10; for(int j=0;j<10;j++){ if(a==d[j]) flag=false; } } return flag; } int main(){ int d[10]=-1; cin>>n>>k; for(int i=0;i<k;i++){ cin>>d[i]; } f...
a.cc: In function 'int main()': a.cc:19:13: error: array must be initialized with a brace-enclosed initializer 19 | int d[10]=-1; | ^~
s415725406
p04045
C++
#include<iostream> using namespace std; int d[10]=-1; int n,k; bool check(int n){ bool flag=true; int a; for(int i=n;i==0;i/=10){ a=i%10; for(int j=0;j<10;j++){ if(a==d[j]) flag=false; } } return flag } int main(){ cin>>n>>k; for(int i=0;i<k;i++){ cin>>d[i]; } for(int i=n;i...
a.cc:4:11: error: array must be initialized with a brace-enclosed initializer 4 | int d[10]=-1; | ^~ a.cc: In function 'bool check(int)': a.cc:16:14: error: expected ';' before '}' token 16 | return flag | ^ | ; 17 | } | ~ a.cc: In fun...
s307464468
p04045
Java
import java.util.*; public class C { public static StringBuilder output = new StringBuilder(); public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int arr[] = new int[10]; Arrays.fill(arr, 1); ...
Main.java:3: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s867431587
p04045
Java
import java.util.*; public class C { public static StringBuilder output = new StringBuilder(); public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int arr[] = new int[10]; Arrays.fill(arr, 1); ...
Main.java:3: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s628949732
p04045
Java
いろはちゃんはこだわりもので、嫌いな数字が K 個あり、それぞれ D 1 , D 2 , . . . , D K です。 いろはちゃんはお店でお買い物をしていて、 N 円の品物を買おうとしています。 もちろん、この品物は N 円以上のお金を支払えば買うことができます。 しかし、先ほど述べたようにいろはちゃんは強いこだわりがあるので、自分がお店に支払う金額の 10 進表記にいろはちゃんの嫌いな数字が出現しないような最も少ない金額を支払おうとします。 いろはちゃんが支払う金額を求めてください。
Main.java:1: error: illegal character: '\u3001' ????????????????????? ^ Main.java:3: error: illegal character: '\u3001' ???????? ^ Main.java:16: error: illegal character: '\u3002' ??? ^ Main.java:18: error: illegal character: '\u3001' ???????????????????? ^ Main.java:20: err...
s912701527
p04045
C++
#include <iostream> #include <iomanip> #include <cmath> #include <vector> #include <algorithm> #include <set> #include <unordered_set> #include <queue> #include <stack> #include <map> #include <unordered_map> #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(a) (a).begin(), (a).end() typedef long long ll; using...
a.cc: In function 'int main()': a.cc:53:17: error: 'res' was not declared in this scope; did you mean 'rep'? 53 | res += l; | ^~~ | rep
s645794149
p04045
C++
#include <bits/stdc++.h> using namespace std; int main(){ int m; int n; int a[10], b; cin >> m; cin >> n; for (int i = 0; i < 10; i++){ a[i] = 0; } for (int i = 0; i < n; i++){ cin >> b; a[b]++; } for (int i = m; i < 100000; i++){ b = i; ...
a.cc: In function 'int main()': a.cc:30:28: error: expected ';' before 'return' 30 | printf("%d", i) | ^ | ; 31 | return 0; | ~~~~~~
s019040160
p04045
C++
#include <bits/stdc++.h> using namespace std; int main(){ int m; int n; int a[10], b; cin >> m; cin >> n; for (int i = 0; i < 10; i++){ a[i] = 0; } for (int i = 0; i < n; i++){ cin >> b; a[b]++; } for (i = m; i < 100000; i++){ b = i; w...
a.cc: In function 'int main()': a.cc:21:10: error: 'i' was not declared in this scope 21 | for (i = m; i < 100000; i++){ | ^
s729155294
p04045
Java
import java.util.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { static class IO { BufferedReader br; StringTokenizer st; public IO() { br = new BufferedRea...
Main.java:82: error: ')' expected while(st.contains(dig%10)dig+=1; ^ 1 error
s286233940
p04045
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n,k,dd; cin>>n>>k; vector<int>> d(10,0); for(int i=0;i<n;i++){ cin>>dd; d[dd]=1; } for(int i=n;i<=10000;i++){ int flag=1; int tmp=i; while(tmp!=0){ if(d[tmp%10]==1){ flag=0; break; } ...
a.cc: In function 'int main()': a.cc:7:13: error: expected unqualified-id before '>' token 7 | vector<int>> d(10,0); | ^~ a.cc:10:5: error: 'd' was not declared in this scope 10 | d[dd]=1; | ^ a.cc:17:10: error: 'd' was not declared in this scope 17 | if(d[tmp%10]==1){ ...
s588340959
p04045
C++
#include<iostream> using namespace std; int main(){ int n,k,dd; cin>>n>>k; vector<int> d(10,0); for(int i=0;i<k;i++){ cin>>dd; d[dd]=1; } for(int i=n;i<100000;i++){ int flag=1; int tmp=i; while(tmp!=0){ if(d[tmp%10]==1){ flag=0; break; } tmp/=10; ...
a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<int> d(10,0); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vector> 2 | usin...
s672929511
p04045
Java
import javax.persistence.criteria.CriteriaBuilder; import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K, size, i; N = input.nextInt(); K = input.nextInt(); i = 0; List<Integer> list = new Ve...
Main.java:1: error: package javax.persistence.criteria does not exist import javax.persistence.criteria.CriteriaBuilder; ^ 1 error
s219906291
p04045
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); K = input.nextInt(); for (int i = 0; i < ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s332837777
p04045
C++
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); K = input.nextInt(...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s276029113
p04045
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.at(i); for(int ans=n;ans<n*10;ans++){ string s=to_string(ans); bool jg=false; for(auto x:d){ if(s.find(x)!=-1) break; if(x==s.at(s.size()...
a.cc: In function 'int main()': a.cc:19:29: error: expected ')' before '{' token 19 | if(x==s.at(s.size()-1){ | ~ ^ | ) a.cc:23:5: error: expected primary-expression before '}' token 23 | } | ^
s186458082
p04045
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.at(i); for(int ans=n;ans<n*10;ans++){ string s{ans}; bool jg=false; for(auto x:d){ if(s.find(x)!=-1) break; if(x==s.at(s.end()-1)){ ...
a.cc: In function 'int main()': a.cc:14:14: warning: narrowing conversion of 'ans' from 'int' to 'char' [-Wnarrowing] 14 | string s{ans}; | ^~~ a.cc:14:14: warning: narrowing conversion of 'ans' from 'int' to 'char' [-Wnarrowing] a.cc:19:17: error: no matching function for call to 'std::__cxx1...
s301763496
p04045
C++
#include <bits/stdc++.h> #define rep(i,n)for(long long i=0;i<(long long)(n);i++) #define all(a) a.begin(), a.end() using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } templa...
a.cc: In function 'int main()': a.cc:36:17: error: could not convert 'st.std::set<int>::find((((int)s.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)j))) - 48))' from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<i...
s611236078
p04045
Java
import java.util.Arrays; import java.util.Scanner; public class solveAtCode { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); K = input.n...
Main.java:4: error: class solveAtCode is public, should be declared in a file named solveAtCode.java public class solveAtCode { ^ 1 error
s001275298
p04045
Java
import java.util.Arrays; import java.util.Scanner; public class solve { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); K = input.nextInt...
Main.java:4: error: class solve is public, should be declared in a file named solve.java public class solve { ^ 1 error
s923137108
p04045
Java
package atCoder; import java.util.Arrays; import java.util.Scanner; public class solve { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); ...
Main.java:6: error: class solve is public, should be declared in a file named solve.java public class solve { ^ 1 error
s868738258
p04045
Java
import java.util.Arrays; import java.util.Scanner; public class solve { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); K = input.nextInt...
Main.java:4: error: class solve is public, should be declared in a file named solve.java public class solve { ^ 1 error
s112653334
p04045
Java
import java.util.Arrays; import java.util.Scanner; public class solve { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N, K; int ara[] = new int[10]; for (int i = 0; i < 10; i++) ara[i] = i; N = input.nextInt(); K = input.nextInt...
Main.java:4: error: class solve is public, should be declared in a file named solve.java public class solve { ^ 1 error
s827208404
p04045
C++
#include <iostream> #include <vector> #include <string> using namespace std; int main() { vector<bool> avail = { false,false,false,false,false,false,false,false,false,false }; string N; int D; string res = ""; cin >> N >> D; int MIN = 11; int MAX = -1; for (int i = 0; i<D; i++) { ...
a.cc: In function 'int main()': a.cc:47:2: error: expected '}' at end of input 47 | } | ^ a.cc:8:1: note: to match this '{' 8 | { | ^
s154834690
p04045
Java
import java.util.*; public class Main { public static void main(String[] args) { int n=sc.nextInt(); int k=sc.nextInt(); HashSet<Integer> h=new HashSet<Integer>(); for(int j=1;j<=k;j++) h.add(sc.nextInt()); while(!comp(n,h))n++; System.out.println(n); } public static boolean comp(i...
Main.java:6: error: cannot find symbol int n=sc.nextInt(); ^ symbol: variable sc location: class Main Main.java:7: error: cannot find symbol int k=sc.nextInt(); ^ symbol: variable sc location: class Main Main.java:10: error: cannot find symbol h.add(sc.nextInt()); ...
s248022011
p04045
Java
public class Main { public static void main(String[] args) { int n=sc.nextInt(); int k=sc.nextInt(); HashSet<Integer> h=new HashSet<Integer>(); for(int j=1;j<=k;j++) h.add(sc.nextInt()); while(!comp(n,h))n++; System.out.println(n); } public static boolean comp(int k,HashSet<Integer...
Main.java:13: error: cannot find symbol public static boolean comp(int k,HashSet<Integer> h) ^ symbol: class HashSet location: class Main Main.java:5: error: cannot find symbol int n=sc.nextInt(); ^ symbol: variable sc location: class Main Main.java:6: erro...
s350406161
p04045
C++
#include <cstdio> bool isOk(bool *isDisLike, int num){ while(num){ if(isDisLike[num % 10]) return false; num /= 10; } return true; } int main(){ int N, K; scanf(“%d %d”, &N, &K); bool isDisLike[10]; for(int l = 0, dislike; l < K; l++){ scanf(“%d”, &dislike); isDisLike[dislike] = true; ...
a.cc:13:9: error: extended character “ is not valid in an identifier 13 | scanf(“%d %d”, &N, &K); | ^ a.cc:13:14: error: extended character ” is not valid in an identifier 13 | scanf(“%d %d”, &N, &K); | ^ a.cc:16:11: error: extended character “ is not valid in an identifier ...
s024474597
p04045
C++
#include <cstdio> bool isOk(bool *isDisLike, int num) { while(num) { if(isDisLike[num % 10]) return false; num /= 10; } return true; } int main () { int N, K; scanf(“%d %d”, &N, &K); bool isDisLike[10]; for(int l = 0, dislike; l < K; l++) { scanf(“%d”, &dislike); isDisLike[dislike] = tru...
a.cc:13:9: error: extended character “ is not valid in an identifier 13 | scanf(“%d %d”, &N, &K); | ^ a.cc:13:14: error: extended character ” is not valid in an identifier 13 | scanf(“%d %d”, &N, &K); | ^ a.cc:16:11: error: extended character “ is not valid in an identifier ...
s484576370
p04045
C++
int main(){ // N円の商品を買う。 K個の数が嫌い。 int N, K; int temp; int hateNunbers[10]; cin >> N >> K; for (int i = 0; i < K; i++) { cin >> hateNunbers[i]; } int num = N; while(1){ string s = to_string(num); bool can = true; for(int i = 0;i < K; i++){ if(count(...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> N >> K; | ^~~ a.cc:12:8: error: 'string' was not declared in this scope 12 | string s = to_string(num); | ^~~~~~ a.cc:16:21: error: 's' was not declared in this scope 16 | ...
s726850082
p04045
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int cost = Integer.parseInt(sc.next()); int dislikeN = Integer.parseInt(sc.next()); int[] dislikeArray = new int[10]; for(int i=0; i<10; i++){ dislikeArray[Integer.parseInt(sc....
Main.java:40: error: reached end of file while parsing } ^ 1 error
s323884049
p04045
C++
#include<iostream> bool fr(int z, int a[10]){ int r; while(z){ r=z%10; if(a[r]) return true; z/=10; } return false; } int f(int z,int a[10]){ int ans=z; while(fr(ans,a)) ans++; return ans; }
/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
s313174701
p04045
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int cost = Integer.parseInt(sc.next()); int dislike = Integer.parseInt(sc.next()); int[] numbers = new int[10]; for(int i=0; i<dislike; i++){ numbers[Integer.parseInt(sc.next()...
Main.java:41: error: incompatible types: possible lossy conversion from double to int pay = pay%Math.pow(10, s)+likeNumbers[9-dislike-t+1]*Math.pow(10, s); ^ 1 error
s225257798
p04045
Java
package atCoder; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int price = sc.nextInt(); int dislikeNumsCount = sc.nextInt(); String dislikeNums = null ; int dislikeNum = sc.nextInt(); dislikeNums += dislikeNum; for (i...
Main.java:30: error: reached end of file while parsing } ^ 1 error
s316588091
p04045
C++
# include "stdio.h" int main(){ int n,k,t,c1=0,c2=0,c3=0; scanf("%d %d",&n,&k); int d[k], use[10] = {0}, num = 0; int i, j, l; for( i=0;i<k;i++) scanf("%d",&d[i]); //好きな数 for (i = 0 ; i<k ; i++) { use[d[i]] = 1; //use[]の中が0なら使用可能 } //桁数 t=n; while(t>0){...
a.cc: In function 'int main()': a.cc:73:24: error: expected '}' at end of input 73 | printf("%d\n",num); | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s200902905
p04045
Java
import java.util.Scanner; import java.util.List; import java.util.ArrayList; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int price = sc.nextInt(); int dislikeNumsCount = sc.nextInt(); int payment=0; List<Integer> nums = new ArrayList<>...
Main.java:24: error: variable onesDigit is already defined in method main(String[]) int onesDigit=nums.get(i); ^ Main.java:24: error: cannot find symbol int onesDigit=nums.get(i); ^ symbol: variable i location: class Main Main.java:34: error: cann...
s562312267
p04045
Java
import java.util.Scanner; import java.util.List; import java.util.ArrayList; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int price = sc.nextInt(); int dislikeNumsCount = sc.nextInt(); int payment=0; List<Integer> nums = new ArrayList<>...
Main.java:68: error: 'else' without 'if' }else if(price>=1000 && price<10000){ ^ Main.java:101: error: reached end of file while parsing } ^ 2 errors
s844397283
p04045
Java
import java.util.Scanner; import java.util.List; import java.util.ArrayList; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int price = sc.nextInt(); int dislikeNumsCount = sc.nextInt(); int payment=0; List<Integer> nums = new ArrayList<>(...
Main.java:23: error: '.class' expected while(int i=0;i<nums.size();i++){ ^ Main.java:23: error: > or ',' expected while(int i=0;i<nums.size();i++){ ^ Main.java:23: error: not a statement while(int i=0;i<nums.size();i++){ ...
s069788390
p04045
C++
int main(){ int n,k,t,c1=0,c2=0,c3=0; scanf("%d %d",&n,&k); int d[k],use[10-k],num=0; for(int i=0;i<k;i++) scanf("%d",&d[i]); //好きな数 for(int j=0;j<10;j++){ for(int l=0;l<k;l++){ if(j!=d[l]) c2++; } if(c2==k){ use[num...
a.cc: In function 'int main()': a.cc:3:5: error: 'scanf' was not declared in this scope 3 | scanf("%d %d",&n,&k); | ^~~~~ a.cc:61:5: error: 'printf' was not declared in this scope 61 | printf("%d\n",ans); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is proba...
s260226366
p04045
C++
#include<bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define all(x) (x).begin() , (x).end() #define rep(i,a,b) for(int i=a;i<b;i++) #define endl '\n' #define MAX 1000000 #define debug(x...) cerr << "[" << #x << "] = ["; _print(x) typedef long long int ll; ...
a.cc: In function 'void solve()': a.cc:53:20: error: 's' was not declared in this scope 53 | if(arr[s[j]-'0']) { | ^
s418096354
p04045
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(); List<String> list = new ArrayList<String>(); int[] ilist = new int[k]; for(int i = 0; i<k; i++){ String str = String...
Main.java:12: error: cannot find symbol String str = String.valueOf(iList[i]); ^ symbol: variable iList location: class Main Main.java:20: error: cannot find symbol if(nstr.contais(str)){ ^ symbol: method contais(String) location: variable nstr ...
s682605329
p04045
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(); String[] ilist = new String[k]; for(int i = 0; i<k; i++){ ilist[i] = String.valueOf(sc.nextInt()); } while(t...
Main.java:7: error: illegal character: '\u3000' String[] ilist =?new String[k]; ^ Main.java:7: error: not a statement String[] ilist =?new String[k]; ^ 2 errors
s297770838
p04045
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(); List<String> list = new ArrayList<String>(); int[] ilist = new int[k]; for(int i = 0; i<k; i++){ String str = String...
Main.java:9: error: illegal character: '\u3000' int[] ilist =?new int[k]; ^ Main.java:9: error: not a statement int[] ilist =?new int[k]; ^ 2 errors
s004036359
p04045
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(); List<String> list = new ArrayList<String>(); int[] list = new int[k]; for(int i = 0; i<k; i++){ String str = String....
Main.java:9: error: illegal character: '\u3000' int[] list =?new int[k]; ^ Main.java:9: error: not a statement int[] list =?new int[k]; ^ 2 errors
s971614159
p04045
C++
#include<bits/stdc++.h> using namespace std; dfs(vector<int>&A){ } int main(){ int N,K; cin>>N>>K; set<int>S; for(int i=0;i<K;i++){ int d; cin>>d; S.insert(d); }int ans; for(int i=N; ;i++){ string s=to_string(i); int n=s.size(); bool x=true; for(int j=0;j<n;j++){ char a=s.at(j); ...
a.cc:3:1: error: ISO C++ forbids declaration of 'dfs' with no type [-fpermissive] 3 | dfs(vector<int>&A){ | ^~~ a.cc: In function 'int dfs(std::vector<int>&)': a.cc:5:1: warning: no return statement in function returning non-void [-Wreturn-type] 5 | } | ^
s938402210
p04045
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long int main(){ int n,k; cin >> n >> k; set<int> s; rep(i,10)s.insert(i); rep(i,k){ int u; cin >> u; s.erase(u); } while(true){ int o=n; int h=0; while(o){ int j...
a.cc: In function 'int main()': a.cc:20:12: error: expected ';' before 'if' 20 | o/=10 | ^ | ; 21 | if(s.count(j)){ | ~~ a.cc:24:7: error: 'else' without a previous 'if' 24 | else{ | ^~~~
s030481639
p04045
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]; vector<bool>c(10); for(int i=0;i<10;i++){ for(int j=0;j<k;j++){ if(i==d[j]) { c[i]=false; break; } else if(j==k-1) c[i]=true; } } whi...
a.cc: In function 'int main()': a.cc:24:14: error: expected ')' before ']' token 24 | if(c[p]]){ | ~ ^ | ) a.cc:24:14: error: expected primary-expression before ']' token
s169369546
p04045
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]; vector<bool>c(10); for(int i=0;i<10;i++){ for(int j=0;j<k;j++){ if(i==d[k]) d[i]=false; else if(j==k-1) d[i]=true; } } while(1){ string s=to_string(n);...
a.cc: In function 'int main()': a.cc:21:33: error: expected ';' before '}' token 21 | if(i==s.size()-1) x=true | ^ | ; 22 | } | ~
s323628501
p04045
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); long n = scanner.nextInt(),k=scanner.nextInt(); char [] a;a=new char [k]; for (int i=0;i<k;i++) { int x = scanner.nextInt(); String s = String.valueOf(x); a[i]=s.charAt(0); } bool...
Main.java:6: error: incompatible types: possible lossy conversion from long to int char [] a;a=new char [k]; ^ 1 error
s217587906
p04045
C++
#include <iostream> #include <unordered_set> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> vd(k); for (auto &d : vd) { cin >> d; } sort(vd.begin(), vd.end()); auto check = [] (int num) { string num_s = to_s...
a.cc: In lambda function: a.cc:23:29: error: 'vd' is not captured 23 | return !binary_search(vd.begin(), vd.end(), ch - '0'); | ^~ a.cc:20:17: note: the lambda has no capture-default 20 | auto check = [] (int num) { | ^ a.cc:13:15: note: 'std::vector...
s035421428
p04045
C++
#include <iostream> #include <unordered_set> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> vd(k); for (auto &d : vd) { cin >> d; } sort(vd.begin(), vd.end()); auto check = [] (int num) { string num_s = to_s...
a.cc: In lambda function: a.cc:23:29: error: 'vd' is not captured 23 | return !binary_search(vd.begin(), vd.end(), ch - '0'); | ^~ a.cc:22:48: note: the lambda has no capture-default 22 | return any_of(num_s.begin(), num_s.end(), [] (char ch) { | ...
s862575487
p04045
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); int k = s.nextInt(); int[] num = new int[10]; for (int i = 0;i < k; i++) { int a = s.nextInt(); num[a]=1; ...
Main.java:31: error: reached end of file while parsing } ^ 1 error
s014545842
p04045
C
#include<stdio.h> int main() { int n, k, i = 0, mod = 1, money = 0; scanf("%d %d", &n, &k); int num[10],hate[k]; for (i = 0; i < 10; i++) num[i] = 0; for (i = 0; i < k; i++) { scanf("%d", &hate[i]); num[hate[i]] = 1; } mod *= n % 10; while (n != 0) { if (num[n % 10] == 0) { money += mod; n /= 10;...
main.c: In function 'main': main.c:24:1: error: expected declaration or statement at end of input 24 | } | ^
s730869265
p04045
C
#include<stdio.h> int main() { int n, k, i = 0, mod = 1, money = 0; scanf("%d %d", &n, &k); int num[10],hate[k]; for (i = 0; i < 10; i++) num[i] = 0; for (i = 0; i < k; i++) { scanf("%d", &hate[i]); num[hate[i]] = 1; } mod *= n % 10; while (n != 0) { if (num[n % 10] == 0) { money += mod; n /= 10;...
main.c: In function 'main': main.c:24:1: error: expected declaration or statement at end of input 24 | } | ^
s119353457
p04045
C
#include<stdio.h> int main() { int n, k, i = 0, mod = 1, money = 0; scanf("%d %d", &n, &k); int num[10],hate[k]; for (i = 0; i < 10; i++) num[i] = 0; for (i = 0; i < k; i++) { scanf("%d", &hate[i]); num[hate[i]] = 1; } mod *= n % 10; while (n != 0) { if (num[n % 10] == 0) { money += mod; n /= 10;...
main.c: In function 'main': main.c:24:1: error: expected declaration or statement at end of input 24 | } | ^
s413376774
p04045
Java
import sys import heapq, math from itertools import zip_longest, permutations, combinations, combinations_with_replacement from itertools import accumulate, dropwhile, takewhile, groupby from functools import lru_cache from copy import deepcopy N, K = map(int, input().split()) D = list(map(int, input().split())) def...
Main.java:1: error: '.' expected import sys ^ Main.java:2: error: '.' expected import heapq, math ^ Main.java:3: error: '.' expected from itertools import zip_longest, permutations, combinations, combinations_with_replacement ^ Main.java:4: error: '.' expected from...
s954655207
p04045
C++
N, K = map(str, input().split()) D = map(str, input().split()) D = set(D) # 集合に変換 number = {'0','1','2','3','4','5','6','7','8','9'} # 集合 out = D^number #print(out) out = sorted(list(out)) res_list = [] flag = 0 for i in range(len(N)-1, -1, -1): if flag == 0: if len(set(N[i])&set(out)) == 1: res_list.appe...
a.cc:4:17: error: stray '#' in program 4 | D = set(D) # 集合に変換 | ^ a.cc:5:57: error: stray '#' in program 5 | number = {'0','1','2','3','4','5','6','7','8','9'} # 集合 | ^ a.cc:7:2: error: invalid preprocessing directive ...
s076724425
p04045
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintStream out = new PrintStream(System.out); int N, K; Integer[] D; N = sc.nextInt(); K = sc.nextInt(); D = new Integ...
Main.java:38: error: <identifier> expected sc.close(); ^ Main.java:40: error: class, interface, enum, or record expected } ^ 2 errors
s180448855
p04045
C
#include <stdio.h> int dis(int* n, int* d, int* k) { int i = 0; int result = *n; int add1 = 1; int add2 = 1; for (int c = 0;c < 4;c++) { for (int co = 0;co < *k;co++) { if (result % 10 == d[i]) { result += add1; *n = *n + add2; if (i == *k) break; } i++; } result /= 10; i ...
main.c: In function 'main': main.c:34:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 34 | scanf_s("%d%d", &n, &k); | ^~~~~~~ | scanf
s321538754
p04045
C
#include <stdio.h> int dis(int* n, int* d, int* k) { int i = 0; int result = *n; int add1 = 1; int add2 = 1; for (int c = 0;c < 4;c++) { for (int co = 0;co < *k;co++) { if (result % 10 == d[i]) { result += add1; *n = *n + add2; if (i == *k) break; } i++; } result /= 10; i = 0; add2 *...
main.c: In function 'main': main.c:24:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 24 | scanf_s("%d%d", &n, &k); | ^~~~~~~ | scanf
s674650488
p04045
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); try { int n = sc.nextInt(); int k = sc.nextInt(); Map<Integer, Boolean> dMap = new...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s683693139
p04045
C++
n,k = map(int,input().split()) d = list(map(int,input().split())) for i in range(10001): nn = n+i cnt = 0 for j in d: if str(j) in str(nn): break else: cnt += 1 if cnt == len(d): print(nn) break
a.cc:1:1: error: 'n' does not name a type 1 | n,k = map(int,input().split()) | ^
s851595346
p04045
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[] nonuse = new int[10]; for(int i = 0; i < k; i++) { nonuse[sc.nextInt()] = 1; } int ans = n; while(true) { ...
Main.java:15: error: int cannot be dereferenced for(int i = 0; i < ans.length(); i++) { ^ Main.java:16: error: int cannot be dereferenced int d = Integer.parseInt(String.valueOf(ans.charAt(i))); ^ 2 errors
s358256082
p04045
C++
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, s, e) for (int i = (int)(s); i < (int)(e); i++) #define _rep(i, n) for (int i = (int)(n - ...
a.cc: In function 'int main()': a.cc:39:5: error: 'memset' was not declared in this scope 39 | memset(D, false, sizeof(D)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include <stack> +++ |+#include <cstring> ...
s043723637
p04045
Java
package abc42; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class M { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); sc = new Scanner(System.in); String s = sc.nextLine(); sc.close(); String[] strs =...
Main.java:7: error: class M is public, should be declared in a file named M.java public class M { ^ 1 error
s282736114
p04045
Java
package abc42; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class C { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] nums = new int[2]; int count = 0; while(count < 2) { int i = sc.nextInt(); nums[count] = i; count++; } s...
Main.java:6: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s325211958
p04045
C++
package abc42; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class C { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] nums = new int[2]; int count = 0; while(count < 2) { int i = sc.nextInt(); nums[count] = i; count++; } s...
a.cc:1:1: error: 'package' does not name a type 1 | package abc42; | ^~~~~~~ a.cc:2:1: error: 'import' does not name a type 2 | import java.util.ArrayList; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.ut...
s421515202
p04045
C++
#include <bits/stdc++.h> #include <vector> #include <math.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; i < 10*n + 1; ++i){ int a, b, c, d; a = i/1000; b = i%1000/100; c = i%100/10; d = i%10; f...
a.cc: In function 'int main()': a.cc:8:13: error: expected initializer before '>>' token 8 | cin >> n >> k; | ^~ a.cc:12:25: error: no match for call to '(std::vector<int>) (int&)' 12 | cin >> d(i); | ~^~~ a.cc:23:35: error: invalid types 'in...
s765831711
p04045
C++
// IlyM #include <bits/stdc++.h> #define pb push_back #define sp " " #define sl "\n" #define fi first #define se second #define mp make_pair #define sz(a) ((int)a.size()) #define tra(a,b) for (auto a:b) #define fo(a,b,c) for (int a=b;a<=c;a++) #define ms(a,b) memset(a,b,sizeof(a)) #define all(a) a.begin(),a.end() #...
a.cc: In function 'int main()': a.cc:40:34: error: 'b' was not declared in this scope 40 | fo(i,0,k-1) { cin>>a[i]; b[a[i]]=false; } | ^ a.cc:44:48: error: 'b' was not declared in this scope 44 | for (int j=0;j<sz(k);j++) if (!b[k[i]-'0']) t=false; ...
s471572998
p04045
C++
// IlyM #include <bits/stdc++.h> #define pb push_back #define sp " " #define sl "\n" #define fi first #define se second #define mp make_pair #define sz(a) ((int)a.size()) #define tra(a,b) for (auto a:b) #define fo(a,b,c) for (int a=b;a<=c;a++) #define ms(a,b) memset(a,b,sizeof(a)) #define all(a) a.begin(),a.end() #...
a.cc: In function 'std::string trans(int)': a.cc:32:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'b' 32 | w.b(u%10+'0'); u/=10; | ^ a.cc: In function 'int main()': a.cc:40:34: error: 'b' was not declared in this scope 40 | ...
s387896895
p04045
C++
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; bool isValid(vector<int> &digits, int result) { while (result) { int d = result % 10; if (find(digits.begin(), digits.end(), d) != digits.end()) { return false; } result /= 10; } return true; } void ...
a.cc:19:1: error: '::main' must return 'int' 19 | void main() | ^~~~
s660534631
p04045
C++
#include<bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() using in = int64_t; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define Yes cout<<"Yes"<<endl #define No cout<<"No"<<endl #define yes cout<<"yes"<<endl #define no cout<<"no"<<e...
a.cc: In function 'bool ans(int, std::vector<int>&, int)': a.cc:21:9: error: found ':' in nested-name-specifier, expected '::' 21 | for(i : notd){ | ^ | :: a.cc:21:7: error: 'i' has not been declared 21 | for(i : notd){ | ^ a.cc:25:1: error: expected primary-expression ...
s391755919
p04045
C++
#include <bits/stdc++.h> #define int long long using namespace std; int len,n,temp; int a[15],get[15]; void change() { int flag=1; for (int i=len;i>=1;i--) { if (a[i]!=9) { a[i]++; flag=0; for (int j=i+1;j<=len;j++) a[j]=0; break; } } if (flag==0) return; len++; a[1]=1; for (int i=2;i<=l...
a.cc: In function 'int main()': a.cc:33:16: error: reference to 'get' is ambiguous 33 | memset(get,1,sizeof(get)); | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14/variant:1180:5: note: candidates are: 't...
s641081947
p04045
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,t; cin>>n>>t; set<int> st; while(t--){ int g;cin>>g; st.insert(g); } for(int i=n;i>=n;i++){ string k =to_string(i); int f=0; for(int i=0;i<k.length();i++){ if(st.find(s[i]-'0')!=st.end()){ f=1; break; ...
a.cc: In function 'int main()': a.cc:15:18: error: 's' was not declared in this scope 15 | if(st.find(s[i]-'0')!=st.end()){ | ^
s202419020
p04045
C++
/****************************************************************************** EYENINE,THE ELDER_WAND!!! THE ROOT OVER MINUS EIGHTY ONE!! *******************************************************************************/ #include<bits/stdc++.h> #include<string> #define ALL_UP_WITH return 0 #def...
a.cc: In function 'int main()': a.cc:26:35: error: expected primary-expression before ')' token 26 | for(int j=0;j<s.size();j+=){ | ^
s232071279
p04045
C++
/****************************************************************************** EYENINE,THE ELDER_WAND!!! THE ROOT OVER MINUS EIGHTY ONE!! *******************************************************************************/ #include<bits/stdc++.h> #define ALL_UP_WITH return 0 #define vi vector<int...
a.cc: In function 'int main()': a.cc:25:35: error: expected primary-expression before ')' token 25 | for(int j=0;j<s.size();j+=){ | ^
s417613630
p04045
C++
#include "iostream" #include "vector" using namespace std; bool has_digit(int n, int d) { while (n != 0) { if (n % 10 == d) return true; n /= 10; } return false; } bool has_digit(int n, const vector<int>& ds) { for (int d: ds) if has_digit(n, d) return true; return false; } int main() { int ...
a.cc: In function 'bool has_digit(int, const std::vector<int>&)': a.cc:14:22: error: expected '(' before 'has_digit' 14 | for (int d: ds) if has_digit(n, d) return true; | ^~~~~~~~~ | (
s230298760
p04045
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F(i, a, b) for (int i = (a); i <= (b); i++) #define D(i, a, b) for (int i = (a); i >= (b); i--) #define R(i, a, b) for (int i = (a); i < (b); i++) #define N 500000 int main() { #ifdef DOC freopen("input.txt", "r", stdin); freopen("output.tx...
a.cc: In function 'int main()': a.cc:38:3: error: expected unqualified-id before 'for' 38 | for(int x : res) cout << x; | ^~~
s746366840
p04045
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; int k; cin >> n >> k; char d[k]; for(int i=0;i<k;i++) cin >> d[i]; int ans; while(1){ string str=to_string(i); int count=0; for(int j=0;j<str.size();j++){ for(int l=0;l<k;l++){ ...
a.cc: In function 'int main()': a.cc:12:30: error: 'i' was not declared in this scope 12 | string str=to_string(i); | ^
s911304009
p04045
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main() { vector<char> total, hatelist; int hate; string temp; cin >> temp >> hate; for (int i = 0; i < temp.length(); i++) { total.push_back(temp[i]); } char tem; for (size_t i = 0; i < hate; i++) { cin >> tem; hatelist.pu...
a.cc: In function 'int main()': a.cc:27:49: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 27 | vector<char>::iterator it = find(hatelist.begin(), hatelist.end(), total[i]); ...
s782802316
p04045
C
#include<stdio.h> int main() { int a[8],i,j,N,k,r; scanf("%d %d",&N,&k); for(i=0;i<=k;i++) { scanf("%d",&a[i]); } for(j=N;j>=N;j++) { p=j; m=j%10; i=0; while(a[i]!=m) { i++; } j=j/10; } return p;
main.c: In function 'main': main.c:12:5: error: 'p' undeclared (first use in this function) 12 | p=j; | ^ main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in main.c:13:5: error: 'm' undeclared (first use in this function) 13 | m=j%10; | ^...
s221484854
p04045
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; const int max_n = 1e6; ll a[2][200]; int main(){ cin >> n; bool ok[10]={false}; for(int i=0 ; i<10 ; i++){ int x; cin >> x; ok[x] = true; } int ans = n; int now = 1; while(true){ now = ans; while(now>0){ if(d...
a.cc: In function 'int main()': a.cc:19:10: error: 'd' was not declared in this scope 19 | if(d[now%10]){ | ^
s860968345
p04045
C++
#include<iostream> #include<vector> #include<map> #include<string> using namespace std; int main(void) { int price, k; map<int, bool> hate_num; vector<int> like_num; cin >> price >> k; string str_price = to_string(price); for (int i = 0; i < k; ++i) { int t; cin >> t; h...
a.cc: In function 'int main()': a.cc:46:5: error: 'sort' was not declared in this scope; did you mean 'short'? 46 | sort(prices.begin(), prices.end()); | ^~~~ | short
s757894682
p04045
C++
#include<stdio.h> int main(){ int N,K; int D[9]; int data[4]={}; scanf("%d%d",&N&K); for(int i=0;i<K;i++){ scanf("%d",&D[i]); } data[0]=N/1000; data[1]=N/100-data[0]*4; data[2]=N/10-data[0]*100-data[1]*10; data[3]=N-data[0]*1000-data[1]*100-data[2]*10; while(N<10000){ for(int j=0;j<4;j++){ for(int i=0;i...
a.cc: In function 'int main()': a.cc:6:16: error: invalid operands of types 'int*' and 'int' to binary 'operator&' 6 | scanf("%d%d",&N&K); | ~~^~ | | | | | int | int* a.cc:24:8: error: 'j' was not declared in this scope 24 | if(j==...
s718484463
p04045
C++
#pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #include<iostream> #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typed...
a.cc: In function 'bool check(ll, vl&)': a.cc:32:24: error: request for member 'size' in 'n', which is of non-class type 'll' {aka 'long long int'} 32 | #define sz(x) ((ll)(x).size()) | ^~~~ a.cc:25:31: note: in definition of macro 'fr' 25 | #define fr(i,n) for(ll i=0;i<(n);++i) ...
s297388114
p04045
Java
import java.util.Scanner; import java.util.List; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; public class Item { public static void main(String[] args) { Scanner in = new Scanner(System.in); List<Integer> hatenum = new ArrayList<>(); List<Integer> oneToTen ...
Main.java:6: error: class Item is public, should be declared in a file named Item.java public class Item { ^ 1 error
s931372185
p04045
Java
import java.util.Scanner; /** * ABC042C */ public class ABC042C { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int K = sc.nextInt(); boolean[] dislike = new boolean[10]; for (int i = 0; i < dislike.length; i++) { ...
Main.java:6: error: class ABC042C is public, should be declared in a file named ABC042C.java public class ABC042C { ^ 1 error
s573465620
p04045
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,k; cin>>n>>k; int a[10]; for(int i=0;i<10;i++) a[i]=1; while(k--) { int x; cin>>x; a[x]=0; } //cout<<n<<endl; for(int i=n;;) { bool b=true; int cp=i; //cout<<i<<endl; while(i) { int d=i%10; ...
a.cc: In function 'int main()': a.cc:32:14: error: expected '}' at end of input 32 | { | ~^ a.cc:32:14: error: expected '}' at end of input a.cc:17:9: note: to match this '{' 17 | { | ^ a.cc:32:14: error: expected '}' at end of input 32 | { ...
s309626851
p04045
C++
#include <bits/stdc++.h> using namespace std ; int main () { bool dis[10] ; for ( int i = 0 ; i < 10 ; i ++ ) dis[i] = false ; int pay , k , a ; cin >> pay >> k ; for ( int i = 0 ; i < k ; i ++ ) { cin >> a ; dis[a] = true ; } while (true) { int sol = pay ; bool check = true ; a whil...
a.cc: In function 'int main()': a.cc:19:38: error: expected ';' before 'while' 19 | bool check = true ; a | ^ | ; 20 | while(sol) { | ~~~~~
s259717176
p04045
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; int k; cin>>s>>k; vector<int> d(k); vector<int> num; rep(i,k)cin>>d.at(i); for(int i=0;i<=9;++i){ bool yes=true; for(int j=0;j<k;++j) if(d.at(j)==i){yes=false;break;} if(yes)num.push_back...
a.cc: In function 'int main()': a.cc:10:9: error: 'i' was not declared in this scope 10 | rep(i,k)cin>>d.at(i); | ^ a.cc:10:5: error: 'rep' was not declared in this scope 10 | rep(i,k)cin>>d.at(i); | ^~~ a.cc:17:10: error: 'all' was not declared in this scope; did you mean 'std::fi...
s326243165
p04045
Java
public class Main { static String str; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); for(int i = 0; i < k; i++) { str = sc.next(); } for(int i = 0; i < 100000; i++ ) { if(check...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s287190438
p04045
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define lvector vector<ll> #define P pair<ll,ll> #define rep(i,n) for(ll (i)=0; (i)<(n); ++(i)) #define print(a) cout << (a) << endl int main() { ios::sync_with_stdio(false); cin.tie(0); ll N,k,d,ans=0;cin>>N>>k; ll l=to_string(N).length(); s...
a.cc: In function 'int main()': a.cc:23:10: error: 'n' was not declared in this scope 23 | if(i<n) V[1].insert(i); | ^
s366634486
p04045
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define lvector vector<ll> #define P pair<ll,ll> #define rep(i,n) for(ll (i)=0; (i)<(n); ++(i)) #define print(a) cout << (a) << endl int main() { ios::sync_with_stdio(false); cin.tie(0); ll N,k,d,ans=0;cin>>N>>k; ll l=to_string(N).length(); s...
a.cc: In function 'int main()': a.cc:23:10: error: 'n' was not declared in this scope 23 | if(i<n) V[1].insert(i); | ^ a.cc:29:32: error: return-statement with no value, in function returning 'int' [-fpermissive] 29 | if(!is_continue) {print(ans);return;} | ...
s908426976
p04045
C++
#include <bits/stdc++.h> using namespace std; bool check(int i, bool num[]){ string pay = to_string(i); for(int p = 0; p < pay.size(); p++){ if(num[pay[p]-'0']) return false; } return true; } int main(void){ int N, K; cin >> N >> K; bool num(10); for(int i = 0; i < K; i++){ int n; ...
a.cc: In function 'int main()': a.cc:19:12: error: invalid types 'bool[int]' for array subscript 19 | num[n] = true; | ^ a.cc:23:19: error: cannot convert 'bool' to 'bool*' 23 | if(check(i, num)){ | ^~~ | | | bo...
s908833583
p04045
C++
// BUGSBUNNY // IIT ROORKEE // _,add8ba, // ,d888888888b, // d8888888888888b _,ad8ba,_ // d888888888888888) ,d888888888b, // I88888888888888...
a.cc: In function 'void solve()': a.cc:102:24: error: 'temp' was not declared in this scope; did you mean 'tm'? 102 | cin >> temp , arr[temp] = 1; | ^~~~ | tm a.cc:111:25: error: use of an operand of type 'bool' in 'operator++' is forbidden in ...
s058378530
p04045
C++
#include <iostream> #include <vector> #include <string> #include <unordered_set> using namespace std; int main(void){ int N,K,i; cin >> N >> K; string s; unordered_set(int) D; while(getline(cin, s, ' ')){ D.insert(stoi(s)); } int n = N; int a,b,c,d; for(;n < 10000;++n){ a = n / 1000; b = (n - 1000 * a) ...
a.cc: In function 'int main()': a.cc:11:22: error: missing template arguments before '(' token 11 | unordered_set(int) D; | ^ a.cc:11:23: error: expected primary-expression before 'int' 11 | unordered_set(int) D; | ^~~ a.cc:13:17: error: 'D' w...
s358090667
p04045
C++
#include <iostream> #include <vector> #include <string> #include <unordered_set> using namespace std; int main(void){ int N,K,i; cin << N >> K; string s; unordered_set(int) D; while(getline(cin, s, ' ')){ D.insert(stoi(s)); } int n = N; int a,b,c,d; for(;n < 10000;++n){ a = n / 1000; b = (n - 1000 * a) ...
a.cc: In function 'int main()': a.cc:9:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 9 | cin << N >> K; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>...
s419609139
p04045
C++
n, k = map(int,input().split()) d = list(map(str, input().split())) while(n>0): S = str(n) t = 0 for i in S: if i not in d: t += 1 if t == len(S): print(int(S)) break else: n += 1
a.cc:1:1: error: 'n' does not name a type 1 | n, k = map(int,input().split()) | ^
s551667271
p04045
C++
#include <bits/stdc++.h> using namespace std; bool check_digit(int arr[], int, int); int main(){ int K; string N; cin >> N >> K; int *arr = new int[K]; int num = 0; int c, flag = 0; for(int i = 0; N[i] != '\0'; i++){ c = (N[i] - '0')*pow(10,N.size...
a.cc: In function 'int main()': a.cc:35:50: error: expected ';' before 'Top' 35 | 1,24 Top | ^ ~~~ | ; a.cc:35:63: error: expected '}' at end of ...
s947561151
p04045
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.at(i); } while(1){ bool flag=true; do{ int x=N%10; for(int i=0;i<K;i++){ if(x==D.at(i)){ flag=false; break; } ...
a.cc: In function 'int main()': a.cc:28:8: error: 'falg' was not declared in this scope; did you mean 'flag'? 28 | if(falg){ | ^~~~ | flag
s149456471
p04045
C++
#include<bits/stdc++.h> #define ll long long #define mp make_pair #define F first #define S second #define db double #define pb push_back using namespace std; bool compare(const pair<ll,ll>&a,const pair<ll,ll>&b) { return a.second<b.second; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ...
a.cc: In function 'int main()': a.cc:43:16: error: expected initializer before 'ans' 43 | ans+=to_string(small); | ^~~
s778920589
p04045
C++
#include <bits/stdc++.h> using namespace std; int main(){ int k,s,n; //string s; cin>>s>>k; vector<bool> v(10); while(k--){ cin>>n; v[n]=true; } n=s; for(;n<=100000;n++){ bool x = true; string ks = n.to_string(); for(int j=0;j<(int)ks.size();j++){ if(v[ks[j]-'0']) x=false; } ...
a.cc: In function 'int main()': a.cc:15:19: error: request for member 'to_string' in 'n', which is of non-class type 'int' 15 | string ks = n.to_string(); | ^~~~~~~~~