buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
a = list(map(int,input().split()))
num_5 = 0
num_7 = 0
for i in a:
if i=="5":
num_5 = num_5+1
if i=="7":
num_7 = num_7+1
if num_5=2 and num_7=1:
print "YES"
else:
print "NO" | a = list(map(int,input().split()))
num_5 = 0
num_7 = 0
for i in a:
if i==5:
num_5 = num_5+1
if i==7:
num_7 = num_7+1
if num_5==2 and num_7==1:
print("YES")
else:
print("NO") | [["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 654], ["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 655], ["-", 0, 656, 0, 57, 15, 679, 0, 42, 0, 32], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 60], ["-", 36, 36, 0, 656, 0, 57, 0, 42, 0, 32], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, ... | 5 | 71 |
A, B, C = map(int, input().split())
if A == 5 and B == 7 and C == 7:
print("YES")
elif A == 7 and B == 5 and C == 7:
print("YES")
elif A == 7 and B == 7 and C == 5:
print("YES")
else:
print("NO") | A, B, C = map(int, input().split())
if A == 5 and B == 5 and C == 7:
print("YES")
elif A == 5 and B == 7 and C == 5:
print("YES")
elif A == 7 and B == 5 and C == 5:
print("YES")
else:
print("NO") | [["-", 0, 57, 15, 679, 31, 679, 12, 666, 0, 612], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 0, 612], ["-", 75, 665, 15, 679, 31, 679, 31, 666, 0, 612], ["+", 75, 665, 15, 679, 31, 679, 31, 666, 0, 612], ["-", 75, 665, 15, 679, 31, 679, 12, 666, 0, 612], ["+", 75, 665, 15, 679, 31, 679, 12, 666, 0, 612], ["-", 0, 57, 75, ... | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int cnt5 = 0;
if ((A == 5 && B == 5 && C == 7) || (A == 7 && B == 5 && C == 5) ||
(A == 5 && B == 7 && C == 5)) {
cout << "YES" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int cnt5 = 0;
if ((A == 5 && B == 5 && C == 7) || (A == 7 && B == 5 && C == 5) ||
(A == 5 && B == 7 && C == 5)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 75, 76, 0, 9, 0, 1,... | 1 | 86 |
from sys import stdin, stdout
from time import perf_counter
import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7
n = sorted([int(item) for item in input().split()])
print("YES" if n[2] == 7 else "NO") | from sys import stdin, stdout
from time import perf_counter
import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7
l =sorted([int(item) for item in input().split()])
print("YES" if l == [5,5,7] else "NO") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 3, 4, 0, 41, 0, 666, 0, 206, 51, 22], ["-", 3, 4, 0, 41, 0, 666, 0, 206, 0, 70], ["-", 3, 4, 0, 41, 0, 666, 0, 206, 206, 612], ["-", 3, 4, 0, 41, 0, 666, 0, 206, 0, 73], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 3, 4... | 5 | 65 |
#include <iostream>
using namespace std;
int main() {
int a, b, c, a5 = 0, a7 = 0;
cin >> a >> b >> c;
if (a == 5)
a5++;
if (a == 7)
a7++;
if (b == 5)
a5++;
if (b == 7)
a7++;
if (c == 5)
a5++;
if (c == 7)
a7++;
if (a5 == 2 && a7 == 1)
cout << "YES";
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c, a5 = 0, a7 = 0;
cin >> a >> b >> c;
if (a == 5)
a5++;
if (a == 7)
a7++;
if (b == 5)
a5++;
if (b == 7)
a7++;
if (c == 5)
a5++;
if (c == 7)
a7++;
if (a5 == 2 && a7 == 1)
cout << "YES";
else
cout << "NO";... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 17, 151], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]] | 1 | 105 |
/*
Converted from Scratch by scratch2cpp
(https://github.com/yos1up/scratch2cpp).
*/
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define debug \
cerr << "--" << __LINE__ << "-... | /*
Converted from Scratch by scratch2cpp
(https://github.com/yos1up/scratch2cpp).
*/
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define debug \
cerr << "--" << __LINE__ << "-... | [["-", 31, 16, 12, 2, 3, 4, 0, 5, 0, 6], ["+", 31, 16, 12, 2, 3, 4, 0, 5, 0, 6]] | 1 | 1,809 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7)
printf("YES");
if (a == 5 && b == 7 && c == 5)
printf("YES");
if (a == 7 && b == 5 && c == 5)
printf("YES");
else
printf("NO");
return 0;
} | #include <cmath>
#include <cstdio>
#include <cstdlib>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7)
printf("YES\n");
else if (a == 5 && b == 7 && c == 5)
printf("YES\n");
else if (a == 7 && b == 5 && c == 5)
printf("YES\n");
else
printf("NO\n");
re... | [["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0... | 1 | 105 |
#include <stdio.h>
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7)
printf("YES\n");
else if (A = 5 && B == 7 && C == 5)
printf("YES\n");
else if (A == 7 && B == 5 && C == 5)
printf("YES\n");
else
printf("NO\n");
}
| #include <stdio.h>
int main() {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7) {
printf("YES");
} else if (A == 5 && B == 7 && C == 5) {
printf("YES");
} else if (A == 7 && B == 5 && C == 5) {
printf("YES");
} else
printf("NO");
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 75, 76, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 60], ["+", 0, 57, 75, 76, 0, 57, 6... | 1 | 108 |
#include <stdio.h>
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7)
printf("YES\n");
else if (A = 5 && B == 7 && C == 5)
printf("YES\n");
else if (A == 7 && B == 5 && C == 5)
printf("YES\n");
else
printf("NO\n");
}
| #include <stdio.h>
int main()
{
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7) {
printf("YES\n");
} else if (A == 5 && B == 7 && C == 5) {
printf("YES\n");
} else if (A == 7 && B == 5 && C == 5) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 75, 76, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 60], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 5... | 1 | 108 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int ct5 = 0, ct7 = 0;
if (a == 5) {
ct5 += 1;
} else if (a == 7) {
ct7 += 1;
}
if (b == 5) {
ct5 += 1;
} else if (b == 7) {
ct7 += 1;
}
if (c == 5) {
ct5 += 1;
} else if (c == 7) {
... | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int ct5 = 0, ct7 = 0;
if (a == 5) {
ct5 += 1;
} else if (a == 7) {
ct7 += 1;
}
if (b == 5) {
ct5 += 1;
} else if (b == 7) {
ct7 += 1;
}
if (c == 5) {
ct5 += 1;
} else if (c == 7) {
ct7 ... | [["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 141 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5) {
if ((b == 5 && c == 7) || (b == 7 && c == 5))
printf("YES\n");
} else if (b == 5) {
if ((a == 5 && c == 7) || (a == 7 && c == 5))
printf("YES\n");
} else if (c == 5) {
if ((a == 5 && b == 7) || (b =... | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5) {
if ((b == 5 && c == 7) || (b == 7 && c == 5))
printf("YES\n");
else
printf("NO\n");
} else if (b == 5) {
if ((a == 5 && c == 7) || (a == 7 && c == 5))
printf("YES\n");
else
printf("NO\... | [["+", 0, 57, 64, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 1, 0, 2, 63, 22], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 64, 9, 0, 57, 75, 76, 0, 1, 0, 35],... | 1 | 159 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 7 && c == 7) {
printf("YES");
} else if (a == 5 && b == 7 && c == 7) {
printf("YES");
} else if (b == 5 && a == 7 && c == 7) {
printf("YES");
} else if (c == 5 && a == 7 && b == 7) {
printf("YES")... | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a == 7 && b == 5 && c == 5) {
printf("YES");
} else if (a == 7 && b == 5 && c == 5) {
printf("YES");
} else if (b == 7 && a == 5 && c == 5) {
printf("YES");
} else if (c == 7 && a == 5 && b == 5) {
printf("YES")... | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 140 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7) {
printf("YES\n");
} else {
printf("NO\n");
}
if (a == 7 && b == 5 && c == 5) {
printf("YES\n");
} else {
printf("NO\n");
}
if (a == 5 && b == 7 && c == 5) {
printf("YES\n");
... | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7) {
printf("YES\n");
} else if (a == 7 && b == 5 && c == 5) {
printf("YES\n");
} else if (a == 5 && b == 7 && c == 5) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
| [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35], ["-", 8... | 0 | 139 |
#include <cstdio>
int main() {
int a = 0, b = 0, c = 0;
scanf("%d %d %d", &a, &b, &c);
if ((a == 5 && b == 5 && c == 7) || (a == 5 && b == 7 && c == 5) ||
(a == 7 && b == 5 && c == 5))
printf("yes\n");
else
printf("no\n");
return 0;
} | #include <cstdio>
int main() {
int a, b, c;
scanf(" %d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7 || a == 5 && b == 7 && c == 5 ||
a == 7 && b == 5 && c == 5)
printf("YES\n");
else
printf("NO\n");
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["-", 15, 339, 51, 16, ... | 1 | 101 |
#include <cstdio>
int sys5;
int sys7;
void Judge(int x) {
if (x == 5)
sys5++;
if (x == 7)
sys7++;
}
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
Judge(A);
Judge(B);
Judge(C);
if (sys5 == 2 && sys7 == 1) {
printf("YES\n");
printf("Using three phrases of length %d, %d and %d,... | #include <cstdio>
int sys5;
int sys7;
void Judge(int x) {
if (x == 5)
sys5++;
if (x == 7)
sys7++;
}
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
Judge(A);
Judge(B);
Judge(C);
if (sys5 == 2 && sys7 == 1)
printf("YES\n");
else
printf("NO\n");
return 0;
}
| [["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 62], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 44], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-"... | 1 | 129 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
freopen("in.txt", "r", stdin);
int a[3];
for (int i = 0; i < 3; i++)
scanf("%d", a + i);
int num5 = 0, num7 = 0;
for (int i = 0; i < 3; i++) {
if (a[i] == 5)
num5++;
if (a[i] == 7)
num7++;
}
if (num5 == 2 && ... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int a[3];
for (int i = 0; i < 3; i++)
scanf("%d", a + i);
int num5 = 0, num7 = 0;
for (int i = 0; i < 3; i++) {
if (a[i] == 5)
num5++;
if (a[i] == 7)
num7++;
}
if (num5 == 2 && num7 == 1)
printf("YES\n");
... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 137 |
#include <stdio.h>
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7)
printf("YES\n");
else if (A = 5 && B == 7 && C == 5)
printf("YES\n");
else if (A == 7 && B == 5 && C == 5)
printf("YES\n");
else
printf("NO\n");
}
| #include <stdio.h>
main() {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if
(A == 5 && B == 5 && C == 7) {
printf("YES");
} else if
(A == 5 && B == 7 && C == 5) {
printf("YES");
} else if
(A == 7 && B == 5 && C == 5) {
printf("YES");
} else
printf("NO");
}
| [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 30, 0, 9, 0, 57, 64, 9, 0, 45], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 30, 0, 9, 0, 57, 64, 9, 0, 46], ["-", 75, 76, 0, 57, 15, 23, 0, 11, 17, ... | 0 | 108 |
#include <stdio.h>
void main() {
int a, b, c;
scanf("%d", &a, &b, &c);
if ((a == 5 && b == 5 && c == 7) || (a == 5 && b == 7 && c == 5) ||
(a == 7 && b == 5 && c == 5))
printf("YES");
else
printf("NO");
} | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if ((a == 5 && b == 5 && c == 7) || (a == 5 && b == 7 && c == 5) ||
(a == 7 && b == 5 && c == 5))
printf("YES\n");
else
printf("NO\n");
return 0;
}
| [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 3... | 0 | 90 |
#include <stdio.h>
int main() {
int a[5];
printf("1 <= A, B, C <= 10 \n");
for (int i = 0; i <= 2; i++) {
scanf("%d", &a[i]);
}
if (a[0] == 5 && a[1] == 7 && a[2] == 5 ||
a[0] == 7 && a[1] == 5 && a[2] == 5 ||
a[0] == 5 && a[1] == 5 && a[2] == 7) {
printf("YES\n");
} else {
printf("N... | #include <stdio.h>
int main() {
int a[5];
for (int i = 0; i <= 2; i++) {
scanf("%d", &a[i]);
}
if (a[0] == 5 && a[1] == 7 && a[2] == 5 ||
a[0] == 7 && a[1] == 5 && a[2] == 5 ||
a[0] == 5 && a[1] == 5 && a[2] == 7) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 0 | 140 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
#define long long
using namespace std;
int m... | #include <algorithm>
#include <bits/stdc++.h>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
#define long long
using namespace std;
int m... | [["+", 0, 1, 0, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 152], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14... | 1 | 147 |
#include <iostream>
using namespace std;
bool search(int *p);
int main() {
int a[3];
int a_size = sizeof(a) / sizeof(a[0]);
for (int i = 0; i < a_size; i++) {
cout << "a[" << i << "]: ";
cin >> a[i];
}
if (search(a)) {
cout << "YES";
} else {
cout << "NO";
}
}
bool search(int *p) {
i... | #include <iostream>
using namespace std;
bool search(int *p);
int main() {
int a[3];
int a_size = sizeof(a) / sizeof(a[0]);
for (int i = 0; i < a_size; i++) {
cin >> a[i];
}
if (search(a)) {
cout << "YES";
} else {
cout << "NO";
}
}
bool search(int *p) {
if (*p == 5 && *(p + 1) == 5 && *... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 8, 9, 0, 1,... | 1 | 200 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == 5 && b == 5 && c == 7) {
cout << "YES";
}
if (a == 5 && b == 7 && c == 5) {
cout << "YES";
}
if (a == 7 && b == 5 && c == 5) {
cout << "YES";
} else {
cout << "NO";
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == 5 && b == 5 && c == 7)
cout << "YES";
else if (a == 5 && b == 7 && c == 5)
cout << "YES";
else if (a == 7 && b == 5 && c == 5)
cout << "YES";
else
cout << "NO";
}
| [["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 102 |
#pragma GCC optimize( \
"Ofast,no-stack-protector,unroll-loops,no-stack-protector,fast-math")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;
const int... | #pragma GCC optimize( \
"Ofast,no-stack-protector,unroll-loops,no-stack-protector,fast-math")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;
const int... | [["-", 0, 30, 0, 14, 8, 9, 0, 171, 0, 184], ["-", 0, 30, 0, 14, 8, 9, 0, 171, 141, 22], ["-", 8, 9, 0, 171, 0, 1, 0, 2, 63, 22], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 2... | 1 | 159 |
#include <stdio.h>
main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7)
printf("Yes");
else if (a == 5 && b == 7 && c == 5)
printf("Yes");
else if (a == 7 && b == 5 && c == 5)
printf("Yes");
else
printf("No");
} | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7) {
printf("YES");
} else if (a == 5 && b == 7 && c == 5) {
printf("YES");
} else if (a == 7 && b == 5 && c == 5) {
printf("YES");
} else {
printf("NO");
}
return 0;
} | [["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 46], ["+", 75, 76, 0, 57, 75, 76, 0,... | 1 | 103 |
#include <stdio.h>
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7) {
printf("YES\n");
} else if (A = 5 && B == 7 && C == 5) {
printf("YES\n");
} else if (A == 7 && B == 5 && C == 5) {
printf("YES\n");
} else {
printf("NO\n");
}
}
| #include <stdio.h>
main() {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if (A == 5 && B == 5 && C == 7) {
printf("YES\n");
} else if (A == 5 && C == 5 && B == 7) {
printf("YES\n");
} else if (B == 5 && C == 5 && A == 7) {
printf("YES\n");
} else {
printf("NO");
}
} | [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 75, 76, 0, 57, 15, 23, 0, 11, 17, 32], ["-", 15, 23, 0, 11, 12, 16, 31, 16, 31, 13], ["-", 15, 23, 0, 11, 12, 16, 31, 16, 17, 98], ["-", 0, 11, 12, 16, 31,... | 0 | 116 |
#include <stdio.h>
int main() {
int a[3], f = 0, s = 0, i, t;
for (i = 0; i < 3; i++) {
if (a[i] == 5)
f++;
else if (a[i] == 7)
s++;
}
t = f + s;
if (t == 3 && f == 2 && s == 1)
printf("YES");
else
printf("NO");
} | #include <stdio.h>
int main() {
int a[3], f = 0, s = 0, i, t;
for (i = 0; i < 3; i++) {
scanf("%d ", &a[i]);
if (a[i] == 5)
f++;
else if (a[i] == 7)
s++;
}
t = f + s;
if (t == 3 && f == 2 && s == 1)
printf("YES");
else
printf("NO");
} | [["+", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 2, 3, 4, 0, 66, 28, 69, 28, 22], ["+", 0, 2, 3, 4, 0, 66, 28, 69, 0, 70], ["+", ... | 0 | 101 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7 || a == 5 && b == 7 && c == 5 ||
a == 7 && b == 5 && c == 5) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if ((a == 5 && b == 5 && c == 7) || (a == 5 && b == 7 && c == 5) ||
(a == 7 && b == 5 && c == 5)) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
| [["+", 15, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 15, 23, 0, 16, 31, 16, 31, 23, 0, 25], ["+", 15, 23, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 15, 23, 0, 16, 31, 16, 12, 23, 0, 25], ["+", 0, 57, 15, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 23, 0, 16, 12, 23, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0,... | 0 | 91 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7 || a == 5 && b == 7 && c == 5 ||
a == 7 && b == 5 && c == 5) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | #include <stdio.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7 || a == 7 && b == 5 && c == 5 ||
a == 5 && b == 7 && c == 5)
printf("YES");
else
printf("NO");
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 31, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["-", 31, 16, 12, 16, 31, 16, 12, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["+", 0, 16... | 0 | 91 |
#include <stdio.h>
int main() {
int a, b, c, i = 0, count = 0, flag = 0;
scanf("%d%d%d", &a, &b, &c);
int d[3] = {a, b, c};
for (i = 0; i < 3; i++) {
if (d[i] == 5) {
count++;
}
if (d[i] == 7) {
flag = 1;
}
}
if (count == 2 && flag == 1) {
printf("YES\nUsing three phrases of ... | #include <stdio.h>
int main() {
int a, b, c, i = 0, count = 0, flag = 0;
scanf("%d%d%d", &a, &b, &c);
int d[3] = {a, b, c};
for (i = 0; i < 3; i++) {
if (d[i] == 5) {
count++;
}
if (d[i] == 7) {
flag = 1;
}
}
if (count == 2 && flag == 1) {
printf("YES");
} else {
printf... | [["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 44], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 62], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 144 |
#include <stdio.h>
int main() {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if ((A == 5 && B == 5 && C == 7) || (A == 5 && B == 7 && C == 5) ||
(A == 7 && B == 5 && C == 5))
printf("Yes\n");
else
printf("No\n");
return 0;
} | #include <stdio.h>
int main() {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if ((A == 5 && B == 7 && C == 5) || (A == 5 && B == 5 && C == 7) ||
(A == 7 && B == 5 && C == 5))
printf("YES");
else
printf("NO");
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 31, 23, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 13], ["-", 31, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 31, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["-", 12, 23, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 12, 23, 0... | 0 | 95 |
#include <stdio.h>
int main() {
int A, B, C;
printf("enter three numbers:\n");
scanf("%d %d %d", &A, &B, &C);
if (A == 5 && B == 7 && C == 5 || A == 5 && B == 5 && C == 7 ||
A == 7 && B == 5 && C == 5)
{
printf("YES\n");
}
else
{
printf("NO\n");
}
return 0;
} | #include <stdio.h>
int main() {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if (A == 5 && B == 7 && C == 5 || A == 5 && B == 5 && C == 7 ||
A == 7 && B == 5 && C == 5)
printf("YES\n");
else
printf("NO\n");
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, ... | 0 | 101 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7 || a == 5 && b == 7 && c == 5 ||
a == 7 && b == 5 && c == 5) {
printf("yes\n");
}
else {
printf("no\n");
}
return 0;
}
| #include <stdio.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7 || a == 5 && b == 7 && c == 5 ||
b == 5 && c == 5 && a == 7) {
printf("YES\n");
} else {
printf("NO\n");
}
}
| [["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 17, 60], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["-", 15, 23, 0, 16, 12, 16, 31, 16, 17, 98], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 98], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 31, 22], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 17, 60]... | 0 | 93 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int maxn = 10010;
int A[4], a, b, c;
int main() {
for (int i = 0; i < 3; i++) {
cin >> A[i];
}
a = A[0];
b = A[1];
c = A[2];
sort(A, A + 3);
if (A[0] == 5 && A[1] == 5 && A[2] == 7) {
cout << "... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int maxn = 10010;
int A[4], a, b, c;
int main() {
for (int i = 0; i < 3; i++) {
cin >> A[i];
}
a = A[0];
b = A[1];
c = A[2];
sort(A, A + 3);
if (A[0] == 5 && A[1] == 5 && A[2] == 7) {
cout << "... | [["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 62], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 150 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
vector<int> a;
int x, y, z;
a.push_back(x);
a.push_back(y);
a.push_back(z);
sort(a.begin(), a.end());
if (a[0] == 5 && a[1] == 5 && a[2] == 7) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
vector<int> a;
int x, y, z;
cin >> x >> y >> z;
a.push_back(x);
a.push_back(y);
a.push_back(z);
sort(a.begin(), a.end());
if (a[0] == 5 && a[1] == 5 && a[2] == 7) {
cout << "YES" << endl;
} else {
cout << "NO" <... | [["+", 0, 1, 0, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 152], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14... | 1 | 108 |
a,b,c=input().split()
if (int(a)+int(b)+int(c)==17 and int(a)<=10 and int(b)<=10 and int(c)<=10):
if ((int(a)==5 or int(a)==7) and (int(b)==5 or int(b)==7) and (int(c)==5 or int(c==7))):
print("YES")
else:
print("NO")
else:
print("NO")
| a,b,c=input().split()
if ((int(a)+int(b)+int(c)==17) and int(a)<=10 and int(b)<=10 and int(c)<=10 and int(a)>=1 and int(b)>=1 and int(c)>=1):
if ((int(a)==5 or int(a)==7) and (int(b)==5 or int(b)==7) and (int(c)==5 or int(c)==7)):
print("YES")
else:
print("NO")
else:
print("NO")
| [["+", 31, 679, 31, 679, 31, 679, 31, 23, 0, 24], ["+", 31, 679, 31, 679, 31, 679, 31, 23, 0, 25], ["+", 15, 23, 0, 679, 31, 679, 31, 679, 17, 355], ["+", 31, 679, 31, 679, 12, 666, 0, 652, 63, 22], ["+", 31, 679, 12, 666, 0, 652, 3, 4, 0, 24], ["+", 31, 679, 12, 666, 0, 652, 3, 4, 0, 22], ["+", 0, 679, 31, 679, 31, 67... | 5 | 127 |
a = map(int, input().split())
success_cases = [(a[0], a[1], a[2]), (a[1], a[2], a[0]), a[2], a[0], a[1])]
for c in success_cases:
if c == (5,7,5):
print("YES")
return
print("NO")
| a = list(map(int, input().split()))
success_cases = [(a[0], a[1], a[2]), (a[1], a[2], a[0]), (a[2], a[0], a[1])]
for c in success_cases:
if c == (5,7,5):
print("YES")
exit(0)
print("NO")
| [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 634, 0, 660, 0, 24], ["-", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, ... | 5 | 96 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string a, b, c;
cin >> a >> b >> c;
if (a.length() + b.length() + c.length() == 17)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a + b + c == 17)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 31, 16, 31, 16, 31, 2, 63, 118, 17, 131], ["-", 31, 16, 31, 16, 31, 2, 63, 118, 119, 120], ["-", 31, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["-", 31, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["-", 31, 16, 31, 16, 12, 2, 63, 118, 17, 131], ["-"... | 1 | 73 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define REP(i, k, n) for (int i = k; i < n; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define each(it, c) ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define REP(i, k, n) for (int i = k; i < n; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define each(it, c) ... | [["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 8, 9, 0... | 1 | 190 |
#include "bits/stdc++.h"
#ifndef err
#define err(...) (void)0
#endif
using namespace std;
#define CAT(a, b) a b
#define VASIZE(a, b, N, ...) N
template <class T> auto size(T &&a) -> decltype(a.size(), int()) {
return a.size();
}
template <class T, class = enable_if_t<is_integral<T>::value, T>>
int size(T a) {
retur... | #include "bits/stdc++.h"
#ifndef err
#define err(...) (void)0
#endif
using namespace std;
#define CAT(a, b) a b
#define VASIZE(a, b, N, ...) N
template <class T> auto size(T &&a) -> decltype(a.size(), int()) {
return a.size();
}
template <class T, class = enable_if_t<is_integral<T>::value, T>>
int size(T a) {
retur... | [["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1,... | 1 | 477 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i =... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i =... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24]... | 1 | 147 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
bool digits[10] = {false};
for (int i = 0; i < k; ++i) {
int x;
cin >> x;
digits[x] = true;
}
while (n < 10000) {
int tmp = n;
while (tmp) {
int d = t... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
bool digits[10] = {false};
for (int i = 0; i < k; ++i) {
int x;
cin >> x;
digits[x] = true;
}
int mx_int = ~(1 << 31);
while (n < mx_int) {
int tmp = n;
w... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 92], ["+", 0, 43, 49, 50, 51, 91, 28, 23, 0, 24], ["+", 49, 50, 51, 91, 28, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 91, 28, 23, 0, 16, 17, 151], ["+", 49, ... | 1 | 137 |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int cost = scanner.nextInt();
int numDigits = scanner.nextInt();
boolean[] badDigits = new boole... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int cost = scanner.nextInt();
int numDigits = scanner.nextInt();
boolean[] badDigits = new boole... | [["-", 8, 196, 0, 1, 0, 492, 500, 509, 500, 22], ["-", 8, 196, 0, 1, 0, 492, 500, 509, 0, 131], ["-", 8, 196, 0, 1, 0, 492, 500, 509, 119, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 492, 0, 131], ["-", 0, 7, 8, 196, 0, 1, 0, 492, 141, 22], ["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22], ["-",... | 3 | 208 |
n, k = map(int, input().split())
dl = list(map(int, input().split()))
for i in range(n, 10001):
money = list(map(int, str(i)))
for m in money:
if dl.count(m) != 0:
break
else:
print(i)
break
| n, k = map(int, input().split())
dl = list(map(int, input().split()))
i = n
while True:
money = list(map(int, str(i)))
for m in money:
if dl.count(m) != 0:
break
else:
print(i)
break
i += 1
| [["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 88], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 267], ["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 6... | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
vector<bool> Cost(100001, true);
int main() {
int64_t N, K, k;
cin >> N >> K;
for (int i = 0; i < K; i++) {
cin >> k;
for (int n = 0; n < 100000; n++) {
if (n >= 10000 && n / 10000 == k)
Cost.at(n) = false;
else if (n >= 1000 && n / 1000 =... | #include <bits/stdc++.h>
using namespace std;
vector<bool> Cost(100000, true);
int main() {
int64_t N, K, k;
cin >> N >> K;
for (int i = 0; i < K; i++) {
cin >> k;
for (int n = 0; n < 100000; n++) {
if (n >= 10000 && n / 10000 == k)
Cost.at(n) = false;
else if (n >= 1000 && (n % 10000... | [["-", 0, 30, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 109], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", ... | 1 | 221 |
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define chmax(x, y) x = max(x, y)
int INF = 1e9;
int main() {
... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define chmax(x, y) x = max(x, y)
int INF = 1e9;
int main() {
... | [["-", 0, 1, 0, 16, 31, 16, 31, 2, 63, 22], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 21], ["-", 31, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-", 31, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["-", 31, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["-", 31, 2, 3, 4,... | 1 | 349 |
n, k = map(int, input().split())
d = list(input().split())
n = 1000
flag = True
while flag:
flag2 = True
for si in str(n):
if si in d:
n += 1
flag2 = False
break
if flag2:
break
else:
flag = True
print(n) | n, k = map(int, input().split())
d = list(input().split())
while True:
flag2 = True
for si in str(n):
if si in d:
n += 1
flag2 = False
break
if flag2:
break
print(n) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 146], ["-", 36, 36, 36, 36, 0, 656, 0, 52, 15, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 52, 15, 146], ["-", 0, 52, 8, 196, 0, 57, 75, 76, 0, 95], [... | 5 | 73 |
N, L = map(int, input().split())
S = {int(x) for x in input().split()}
flag = False
while flag == False:
if N%10 in S:
N += 1
continue
if int((N%100-N%10)/10) in S and N >= 10:
N += 10
continue
if int((N%1000-N%100)/100) in S and N >= 100:
N += 100
continue
... | N, L = map(int, input().split())
S = {int(x) for x in input().split()}
flag = False
while 1:
if N%10 in S:
N += 1
continue
if int((N%100-N%10)/10) in S and N >= 10:
N += 1
continue
if int((N%1000-N%100)/100) in S and N >= 100:
N += 1
continue
if int((N%100... | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 60], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 0, 147], ["+", 36, 36, 36, 36, 0, 656, 0, 52, 15, 612], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["-", 0, 52, 8, 196, 0, 1, 0, 662, 31, ... | 5 | 164 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, ns, ne) for (int i = ns; i < ne; ++i)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, K, k;
cin >> N >> K;
set<int> set;
rep(i, 0, 10) { set.insert(i); }
rep(i, 0, K) {
cin >> k;
set.erase(k);
}
bool ok;
while (N <... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, ns, ne) for (int i = ns; i < ne; ++i)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, K, k;
cin >> N >> K;
set<int> set;
rep(i, 0, 10) { set.insert(i); }
rep(i, 0, K) {
cin >> k;
set.erase(k);
}
bool ok;
int ans = ... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 22], ["-", 64, 9, 0, 1, 0, 16... | 1 | 179 |
n, k = map(int, input().split())
arr = list(map(int, input().split()))
inf = float('inf')
min_cost = inf
for amount in range(n, 100000):
for e in arr:
if str(e) in str(amount):
break
min_cost = min(min_cost, amount)
print(min_cost) | n, k = map(int, input().split())
arr = list(map(int, input().split()))
inf = float('inf')
min_cost = inf
for amount in range(n, 100000):
for i, e in enumerate(arr):
if str(e) in str(amount):
break
if i == len(arr)-1:
min_cost = min(min_cost, amount)
print(min_cost) | [["+", 0, 7, 8, 196, 0, 7, 31, 684, 0, 22], ["+", 0, 7, 8, 196, 0, 7, 31, 684, 0, 21], ["+", 0, 7, 8, 196, 0, 7, 12, 652, 63, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, ... | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> D(10);
int d;
for (int i = 0; i < K; i++) {
cin >> d;
D[d] = 1;
}
for (; N <= 10000; N++) {
int c = N;
bool ok = true;
while (c) {
if (D[c % 10]) {
ok = false;
break;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> D(10);
int d;
for (int i = 0; i < K; i++) {
cin >> d;
D[d] = 1;
}
for (int i = N; N <= 10000; i++) {
int c = i;
bool ok = true;
while (c) {
if (D[c % 10]) {
ok = false;
... | [["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 0, 7, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 7, 8, 9, 0, 43... | 1 | 126 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool check(ll N, vector<ll> &D) {
while (N > 0) {
ll x = N % 10;
for (auto elm : D) {
if (x == elm)
return false;
}
N /= 10;
}
return true;
}
void solve(long long N, long long K, std::vector<long long> D) {
for ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool check(ll N, vector<ll> &D) {
while (N >= 0) {
ll x = N % 10;
for (auto elm : D) {
if (x == elm)
return false;
}
if (N < 10)
N = -1;
else
N /= 10;
}
return true;
}
void solve(long long N, long l... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 8, 9, 0, 57, 0, 121], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 8, 9, ... | 1 | 215 |
import sys
n,k=map(int,input().split())
d=list(map(int,input().split()))
allowed=set()
for i in range(10):
allowed.add(i)
for i in d:
allowed.remove(i)
for i in range(n,10**7):
b=str(i)
c=set()
for j in range(len(b)):
c.add(b[j])
if allowed.intersection(c)==set():
print(i)
sys.exit()
| import sys
n,k=map(int,input().split())
d=list(map(int,input().split()))
allowed=set()
for i in d:
allowed.add(i)
for i in range(n,10**7):
b=str(i)
c=set()
for j in range(len(b)):
c.add(int(b[j]))
if allowed.intersection(c)==set():
print(i)
sys.exit()
| [["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 102], ["-", 8, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 8, 196, 0, 1, 0, 652, 63, 319, 0, 131], ["-",... | 5 | 129 |
#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 i = n; i < 20000; i++) {
int m = i;
int ans = 1;
while (m > 0) {
if (binary_search(d.begin(), d.end(), m % 10)) {
ans = 0;
... | #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);
sort(d.begin(), d.end());
for (int i = n; i <= 100000; i++) {
int m = i;
int ans = 1;
while (m > 0) {
if (binary_search(d.begin(), d.end()... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]... | 1 | 141 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
string n;
int k;
bitset<10> avail;
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cin >> n >> k;
avail.set();
vector<int> a(k);
for (auto &i : a) {
cin >> i;
avail[i] = 0;
}
vector<bool> overload((int)n.size(), false);
f... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
string n;
int k;
bitset<10> avail;
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cin >> n >> k;
avail.set();
vector<int> a(k);
for (auto &i : a) {
cin >> i;
avail[i] = 0;
}
vector<bool> overload((int)n.size(), false);
f... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 91, 17, 111], ["-", 0, 57, 15, 339, 51, 16, 12, 91, 28, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125], ["+... | 1 | 415 |
from collections import Counter
def ok(n, D):
# Dに含まれる数字をnで使っていたらFalse
counter = Counter(str(n))
for d in D:
if counter[str(d)] > 0:
return False
return True
def main():
N, K = list(map(int, input().split(' ')))
D = list(map(int, input().split(' ')))
print(ok(1334, [0... | from collections import Counter
def ok(n, D):
# Dに含まれる数字をnで使っていたらFalse
counter = Counter(str(n))
for d in D:
if counter[str(d)] > 0:
return False
return True
def main():
N, K = list(map(int, input().split(' ')))
D = list(map(int, input().split(' ')))
while not ok(N, D... | [["-", 0, 14, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 612], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["-", 3, 4, 0, 652, 3, 4, 0, 634, 0, 70], ["-", 3, 4, 0, 652, 3... | 5 | 132 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> kirai(k);
for (int i = 0; i < k; i++) {
cin >> kirai[i];
}
for (int i = n; i < n * 200; i++) {
if (i == 2001) {
cout << i << endl;
}
int test = i;
bool brkflg = false;
while (1)... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> kirai(k);
for (int i = 0; i < k; i++) {
cin >> kirai[i];
}
for (int i = n; i < n * 200; i++) {
int test = i;
bool brkflg = false;
while (1) {
for (int j = 0; j < k; j++) {
if (t... | [["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["-", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 57, 15, 339, 0, 25], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 64, 9, 0, 1, 0... | 1 | 170 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
using P = pair<int, int>;
int main(... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
using P = pair<int, int>;
int main(... | [["-", 8, 9, 0, 9, 0, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 9, 0, 43, 49, 50, 0, 32], ["-", 8, 9, 0, 9, 0, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 9, 0, 43, 39, 40], ["+", 0, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49,... | 1 | 175 |
#include <bits/stdc++.h>
using namespace std;
set<int> get_digits(int n) {
set<int> s;
while (n != 0) {
s.insert(n % 10);
n /= 10;
}
return s;
}
int main() {
int N = 0, K = 0;
cin >> N >> K;
set<int> hate;
for (int i = 0; i < K; ++i) {
int n = 0;
cin >> n;
hate.insert(n);
}
... | #include <bits/stdc++.h>
using namespace std;
set<int> get_digits(int n) {
set<int> s;
while (n != 0) {
s.insert(n % 10);
n /= 10;
}
return s;
}
int main() {
int N = 0, K = 0;
cin >> N >> K;
set<int> hate;
for (int i = 0; i < K; ++i) {
int n = 0;
cin >> n;
hate.insert(n);
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 24], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["-", 0, 14, 8, 9, 0, 7, 26, 27... | 1 | 198 |
#include <stdio.h>
int main(void) {
int n, k;
scanf("%d %d", &n, &k);
int d[20];
int count = 0;
for (int i = 0; i < k; i++) {
scanf("%d", &d[i]);
}
int len = 0;
int another_n = n;
while (another_n > 0) {
another_n /= 10;
len++;
}
for (int i = n; i < 10 * n; i++) {
int tmp = i;
... | #include <stdio.h>
int main(void) {
int n, k;
scanf("%d %d", &n, &k);
int d[20];
int count = 0;
for (int i = 0; i < k; i++) {
scanf("%d", &d[i]);
}
int len = 0;
int another_n = n;
while (another_n > 0) {
another_n /= 10;
len++;
}
for (int i = n; i < 100000; i++) {
int tmp = i;
... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["+", 8, 9, 0, 57, ... | 0 | 190 |
n, k = map(int, input().split())
d = list(map(int, input().split()))
canidates = [i for i in range(10) if i not in d]
ok = False
ans = 10**9
def bfs(s):
global ans
if len(s) == len(str(n)):
res = int(s)
if res >= n and res < ans:
ans = res
else:
for i in canidates:
... | n, k = map(int, input().split())
d = list(map(int, input().split()))
canidates = [i for i in range(10) if i not in d]
ans = 10**9
def bfs(s):
global ans
if len(s) > len(str(n))+1:
return
if len(s) > 0:
res = int(s)
if res >= n and res < ans:
ans = res
for i in canid... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 147], ["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72... | 5 | 123 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
#define ll long long
#define fr(m) for (int i = 0; i < m; i++)
#define frj(m) for (int j = 0; j < m; j++)
#define frr(n) for (int i = n; i >= 0; i--)
#define pb push_back
#define orr ||
#define nl \n
#de... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
#define ll long long
#define fr(m) for (int i = 0; i < m; i++)
#define frj(m) for (int j = 0; j < m; j++)
#define frr(n) for (int i = n; i >= 0; i--)
#define pb push_back
#define orr ||
#define nl \n
#de... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 52, 8, 9, 0, 1... | 1 | 222 |
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[dislikeN];
for (int i = 0; i < dislikeN; i++) {
dislikeArray[... | 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[dislikeN];
for (int i = 0; i < dislikeN; i++) {
dislikeArray[... | [["+", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 0, 32], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["-", 0, 57, 15, 15, 0, 16, 12, 16,... | 3 | 233 |
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.val... | 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++) {
iList[i] = sc.nextInt()... | [["+", 8, 196, 0, 1, 0, 11, 31, 504, 516, 22], ["+", 8, 196, 0, 1, 0, 11, 31, 504, 0, 70], ["+", 8, 196, 0, 1, 0, 11, 31, 504, 71, 22], ["+", 8, 196, 0, 1, 0, 11, 31, 504, 0, 73], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 500, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 0, 131], ["+", 8... | 3 | 181 |
// struct cmp {bool operator()(const pair<int, char> &a, const pair<int, char>
// &b) {if (a.first == b.first) {return a.second > b.second;} else {return
// a.first > b.first;}}};
#include <bits/stdc++.h>
#define endl "\n"
#define _ \
ios_base::sync... | // struct cmp {bool operator()(const pair<int, char> &a, const pair<int, char>
// &b) {if (a.first == b.first) {return a.second > b.second;} else {return
// a.first > b.first;}}};
#include <bits/stdc++.h>
#define endl "\n"
#define _ \
ios_base::sync... | [["-", 0, 30, 0, 14, 8, 9, 0, 171, 0, 184], ["-", 0, 30, 0, 14, 8, 9, 0, 171, 141, 22], ["-", 8, 9, 0, 171, 0, 1, 0, 2, 63, 22], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 2... | 1 | 268 |
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
n = [int(i) for i in list(str(n))] #価格(int)をリストに分解
while set([int(i) for i in list(str(n))])-b !={} : # 使用可能な数字のみでなければ
n += 1
print(n) | n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
while set([int(i) for i in list(str(n))])-b !=set() : # 使用可能な数字のみでなければ
n += 1
print(n)
| [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 1, 0, 662, 12, 658, 0, 70], ["-", 0, 1, 0, 662, 12, 658, 8, 652, 63, 22], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 24], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 22], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 25], ["-"... | 5 | 117 |
n, k = map(int, input().split())
d = list(map(int, input().split()))
lis = []
for i in range(10):
if not i in d:
lis.append(i)
inf = 1001001001
ans = inf
def dfs(s, n):
if len(s) >= len(str(n)) + 2:
if int(s) >= n:
global ans
ans = min(ans, int(s))
return
else... | n, k = map(int, input().split())
d = list(map(int, input().split()))
lis = []
for i in range(10):
if not i in d:
lis.append(i)
inf = 1001001001
ans = inf
def dfs(s, n):
if len(s) >= len(str(n)) + 2:
return
if len(s) > 0 and int(s) >= n:
global ans
ans = min(ans, int(s))
e... | [["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38], ["+", 0, 57, 15, 679, 31, 666, 0, 652, 63, 22], ["+", 15, 679, 31, 666, 0, 652, 3, 4, 0, 24], ["+", 15, 679, 31, 666, 0, 652, 3, 4, 0, 22], ["+", 15, 679, 31, 666, 0, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 679, 31, 666, ... | 5 | 138 |
#include <iostream>
#include <set>
#include <string>
#include <vector>
bool search(const std::string &s, const std::set<int> &ok_set, const int d,
const bool only_upper, std::vector<int> &result) {
const int v = s[d] - '0';
for (const int o : ok_set) {
if (only_upper && o < v) {
continue;
... | #include <iostream>
#include <set>
#include <string>
#include <vector>
bool search(const std::string &s, const std::set<int> &ok_set, const int d,
const bool only_upper, std::vector<int> &result) {
const int v = s[d] - '0';
bool tmp_only_upper = only_upper;
for (const int o : ok_set) {
if (tmp_on... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 0, 57, 75, 7... | 1 | 446 |
from collections import deque
n, k = map(int, input().split())
D = list(map(int, input().split()))
ok_lst = [x for x in range(0, 10) if x not in D]
stack = deque([x for x in ok_lst if x != 0])
while len(stack) > 0:
now_num = stack.popleft()
print(now_num)
if now_num >= n:
break
for x in ok_lst:
... | from collections import deque
n, k = map(int, input().split())
D = list(map(int, input().split()))
ok_lst = [x for x in range(0, 10) if x not in D]
stack = deque([x for x in ok_lst if x != 0])
while len(stack) > 0:
now_num = stack.popleft()
if now_num >= n:
print(now_num)
break
for x in ok_l... | [["-", 0, 52, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, ... | 5 | 122 |
#include <bits/stdc++.h>
using namespace std;
bool check(int x, vector<int> vec) {
int input, num;
input = x;
for (int i = 0; i < 4; i++) {
num = input % 10;
for (int j = 0; j < vec.size(); j++) {
if (vec.at(j) == num)
return true;
}
input = input / 10;
}
return false;
}
int mai... | #include <bits/stdc++.h>
using namespace std;
bool check(int x, vector<int> vec) {
int input, num;
input = x;
while (input != 0) {
num = input % 10;
for (int j = 0; j < vec.size(); j++) {
if (vec.at(j) == num)
return true;
}
input = input / 10;
}
return false;
}
int main() {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 79], ["-", 0, 14, 8, 9, 0,... | 1 | 180 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int bill = sc.nextInt();
int numCnt = sc.nextInt();
String[] array = new String[numCnt];
for (int i = 0; i < numCnt; i++) {
// System.out.println(sc.nextInt());
array[... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int bill = sc.nextInt();
int numCnt = sc.nextInt();
String[] array = new String[numCnt];
for (int i = 0; i < numCnt; i++) {
array[i] = String.valueOf(sc.nextInt());
}
... | [["-", 8, 498, 0, 195, 8, 196, 0, 7, 0, 88], ["+", 8, 498, 0, 195, 8, 196, 0, 52, 0, 89], ["-", 8, 196, 0, 7, 502, 503, 39, 506, 0, 507], ["-", 8, 196, 0, 7, 502, 503, 49, 200, 141, 22], ["-", 8, 196, 0, 7, 502, 503, 49, 200, 0, 32], ["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 22], ["-", 0, 195, 8, 196, 0, 7, 502, 503, ... | 3 | 208 |
N, K = map(int, input().split())
D = set(input().split())
frag = True
ans = 0
for i in range(1000000):
N += 1
if len(set(str(N)) & D) == 0:
ans = N
frag = False
break
print(N) | N, K = map(int, input().split())
D = set(input().split())
frag = True
ans = 0
N = N-1
for i in range(0, 1000000):
N += 1
if len(set(str(N)) & D) == 0:
ans = N
frag = False
break
print(N)
| [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 72 |
def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
from collections import defaultdict, deque
from sys import exit
import heapq
import math
import copy
from bi... | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
from collections import defaultdict, deque
from sys import exit
import heapq
import math
import copy
from bi... | [["-", 0, 14, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 0, 14, 8, 196, 0, 57, 15, 679, 17, 355], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 18], ["-", 36, 36, 0, 656, 0, 7, 12, 206, 0, 70], ["-", 0, 656, 0, 7, 12, 206, 206, 663... | 5 | 234 |
def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
from collections import defaultdict, deque
from sys import exit
import heapq
import math
import copy
from bi... | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
from collections import defaultdict, deque
from sys import exit
import heapq
import math
import copy
from bi... | [["-", 0, 14, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 612], ["-", 36, 36, 0, 656, 0, 7, 12, 206, 0, 70], ["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612], ["-", 36, 36, 0, 656, 0, 7, 12, 206, 0, 73], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], [... | 5 | 234 |
n,k=map(int,input().split())
d=list(map(int,input().split()))
n=[int(x) for x in str(n)]
ok=[]
for i in range(10):
if i not in d:
ok.append(i)
import bisect
for i in range(len(n)-1,-1,-1):
if n[i]>ok[len(ok)-1]:
for j in range(i,len(n)):
n[j]=str(ok[0])
if i>0:
... | n,k=map(int,input().split())
d=list(map(int,input().split()))
n=[int(x) for x in str(n)]
ok=[]
for i in range(10):
if i not in d:
ok.append(i)
import bisect
for i in range(len(n)-1,-1,-1):
if n[i]>ok[len(ok)-1]:
for j in range(i,len(n)):
n[j]=str(ok[0])
if i>0:
... | [["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, 121], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 73], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, ... | 5 | 230 |
#include <stdio.h>
int search(int d, int *arr, int k) {
int flag = 0;
for (int i = 0; i < k; i++) {
if (d == arr[i]) {
flag = 1;
break;
}
}
return flag;
}
int main() {
int n, k;
scanf("%d %d\n", &n, &k);
int arr[k];
int i;
for (i = 0; i < k; i++) {
scanf("%d ", &arr[i]);
}
... | #include <stdio.h>
#include <stdlib.h>
int search(int d, int *arr, int k) {
int flag = 0;
for (int i = 0; i < k; i++) {
if (d == arr[i]) {
flag = 1;
break;
}
}
return flag;
}
int main() {
int n, k;
scanf("%d %d\n", &n, &k);
int arr[k];
int i;
for (i = 0; i < k; i++) {
scanf("%d... | [["+", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 224 |
N, _ = input().split()
N = int(N)
dislike = list(map(int, input().split()))
like = []
ans = []
t = 0
a = N
f = True
l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
x = N
for i in l:
if i not in dislike:
like.append(i)
like = list(str(like))
dislike = list(str(dislike))
while f:
x = list(str(x))
for i in x:
... | N, _ = input().split()
N = int(N)
dislike = list(map(int, input().split()))
like = []
f = True
l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
x = N
for i in l:
if i not in dislike:
like.append(i)
like = list(str(like))
dislike = list(str(dislike))
while f:
x = list(str(x))
for i in x:
if i not in dislik... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 70], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 73], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+... | 5 | 165 |
#include <cmath>
#include <iostream>
#include <set>
using namespace std;
int main() {
int N, K, input, temp, moto, min, keta, ans, fin, kakunin;
bool flag = false;
int toridashi(int N, int keta);
set<int> S;
cin >> N >> K;
for (int i = 0; i < K; i++) {
cin >> input;
S.insert(input);
}
int i;
... | #include <cmath>
#include <iostream>
#include <set>
using namespace std;
int main() {
int N, K, input, temp, moto, min, keta, ans, fin, kakunin;
bool flag = false;
int toridashi(int N, int keta);
set<int> S;
cin >> N >> K;
for (int i = 0; i < K; i++) {
cin >> input;
S.insert(input);
}
int i;
... | [["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 7, 8, 9, 0, ... | 1 | 213 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll n, k, d[10];
bool c[10];
int main(void) {
cin >> n >> k;
for (int i = 0; i < k; i++) {
cin >> d[i];
c[d[i]] = true;
}
n--;
while (n++) {
ll m = n;
bool x = true;
while (m != 0) {
ll D = m %... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll n, k, d[10];
bool c[10];
int main(void) {
cin >> n >> k;
for (int i = 0; i < k; i++) {
cin >> d[i];
c[d[i]] = true;
}
while (true) {
ll m = n;
bool x = true;
while (m != 0) {
ll D = m % 10;
... | [["-", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 52, 15, 339, 51, 27, 28, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 146], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0,... | 1 | 151 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<bool> dec(10, 1);
int x;
int mx = 0;
for (int i = 0; i < k; i++) {
cin >> x;
dec[x] = 0;
}
for (int i = 0; i < 10; i++) {
if (dec[i]) {
mx = i;
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<bool> dec(10, 1);
int x;
int mx = 0;
for (int i = 0; i < k; i++) {
cin >> x;
dec[x] = 0;
}
for (int i = 0; i < 10; i++) {
if (dec[i]) {
mx = i;
}... | [["-", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["-", 8, 9, 0, 52... | 1 | 223 |
#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define COUT(x) cout << (x) << "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define COUT(x) cout << (x) << "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 17, 131], ["+", 15, 339, 51, 16, 31, 2, 63, 118, 119, 12... | 1 | 392 |
from itertools import product
n,k = map(int, input().split())
d = list(map(int, input().split()))
nums = []
for i in range(10):
if i not in d: nums.append(i)
m = str(n)
for i in range(len(m), len(m)+1):
for j in product(nums, repeat=i):
ans = ""
for k in j: ans += str(k)
if int(ans) >= n:
print(... | from itertools import product
n,k = map(int, input().split())
d = list(map(int, input().split()))
nums = []
for i in range(10):
if i not in d: nums.append(i)
m = len(str(n))
for i in range(m, m+2):
for j in product(nums, repeat=i):
ans = ""
for k in j: ans += str(k)
if int(ans) >= n:
print(ans)
... | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 12, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["-", 3, 4... | 5 | 127 |
def check(n,s):
v=str(n)
for i in v:
if i in s:
return False
return True
def solve():
n,k=mp()
s=input().split()
s=set(s)
while True:
if check(n,s):
print(n)
break
else:
n+=1
for _ in range(1):
solve() | def check(n,s):
v=str(n)
for i in v:
if i in s:
return False
return True
def solve():
n,k=map(int,input().split())
s=input().split()
s=set(s)
while True:
if check(n,s):
print(n)
break
else:
n+=1
for _ in range(1):
... | [["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25],... | 5 | 87 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define PI 3.14159265358979323846
#define lp(i, n) for (int i = 0; i < n; i++)
#define rlp(i, n) for (int i = int(n); i >= 0; i--)
#define range1(i, a, b, c) for (int i... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define PI 3.14159265358979323846
#define lp(i, n) for (int i = 0; i < n; i++)
#define rlp(i, n) for (int i = int(n); i >= 0; i--)
#define range1(i, a, b, c) for (int i... | [["-", 0, 43, 49, 50, 51, 16, 31, 74, 51, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 51, 13], ["-", 8, 9, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 14, 8, 9, 0, 46], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 1... | 1 | 454 |
import sys
import numpy as np
from heapq import heappush, heappop
from bisect import bisect_left as bi_l, bisect_right as bi_r
from collections import deque, Counter, defaultdict
from itertools import combinations, product
import string
inf = float('inf')
MOD = 10**9+7
# MOD = 998244353
class NumberTheory():
def ... | import sys
import numpy as np
from heapq import heappush, heappop
from bisect import bisect_left as bi_l, bisect_right as bi_r
from collections import deque, Counter, defaultdict
from itertools import combinations, product
import string
inf = float('inf')
MOD = 10**9+7
# MOD = 998244353
class NumberTheory():
def ... | [["-", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 668, 8, 22], ["+", 0, 657, 31, 652, 3, 668, 0, 659, 0, 88], ["+", 0, 657, 31, 652, 3, 668, 0, 659, 31, 22], ["+", 0, 657, 31, 652, 3, 668, 0, 659, 0, 267], ["+", 0, 657, 31, 652, 3, 668, 0, 678, ... | 5 | 6,772 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 9, 0, 45], ["+", 0, 1... | 1 | 1,424 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define sz size()
#define pb(x) push_back(x)
#define bg begin()
#define ed end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i <= n; i++)
#define mp(x, y) make_pair(x, y)
const ll MOD = 100000... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define sz size()
#define pb(x) push_back(x)
#define bg begin()
#define ed end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i <= n; i++)
#define mp(x, y) make_pair(x, y)
const ll MOD = 100000... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+"... | 1 | 390 |
#include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
template <typename Container, class T> bool _contains(const Container &c, T v) {
return std::find(c.begin(), c.end(), v) != c.end();
}
/**
* check n has ng digits.
* \param n target value
* \param ngs ng digits
* return ... | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
template <typename Container, class T> bool _contains(const Container &c, T v) {
return std::find(c.begin(), c.end(), v) != c.end();
}
/**
* check n has ng digits.
* \param n target value
* \param ngs ng digits
* return ... | [["-", 39, 343, 141, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 343, 141, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 16, 12, 103, 0, 104], ["+", 0, 2, 3, 4, 0, 16, 12, 103, 0, 125], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, ... | 1 | 263 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rng(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, k;
cin >> n >> k;
set<int> a;
rep(i, k) {
int x;
cin >> x;
a.insert(x);
}
int ans = n;
while (ans... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rng(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, k;
cin >> n >> k;
set<int> a;
rep(i, k) {
int x;
cin >> x;
a.insert(x);
}
int ans = n;
while (ans... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["-", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["-", 0, 52, 8, ... | 1 | 156 |
amount,dislike = map(int,input().split())
l = list(map(str,input().split()))
temp = {"0","1","2","3","4","5","6","7","8","9"}
like = list(set(temp)-set(l))
i=0
for n in range(amount,10001):
k =[]
i = n
k.append(str(i%10))
i = i-i%10
if n>=10:
k.append(str(i%100//10))
i = i-i%100
if n>=100:
... | amount,dislike = map(int,input().split())
l = list(map(str,input().split()))
temp = {"0","1","2","3","4","5","6","7","8","9"}
like = list(set(temp)-set(l))
i=0
for n in range(amount,100000):
k =[]
i = n
k.append(str(i%10))
i = i-i%10
if n>=10:
k.append(str(i%100//10))
i = i-i%100
if n>=100:
... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], [... | 5 | 233 |
#pragma GCC optimize("Ofast", "unroll-loops")
#include <bits/stdc++.h>
using namespace std;
string N;
int K;
vector<int> can_use(10, true);
int mn_use;
void input(void) {
cin >> N >> K;
for (int i = 0; i < K; ++i) {
int di;
cin >> di;
can_use[di] = false;
}
for (int i = 0; i < 10; ++i) {
if ... | #pragma GCC optimize("Ofast", "unroll-loops")
#include <bits/stdc++.h>
using namespace std;
string N;
int K;
vector<int> can_use(10, true);
int mn_use;
void input(void) {
cin >> N >> K;
for (int i = 0; i < K; ++i) {
int di;
cin >> di;
can_use[di] = false;
}
for (int i = 0; i < 10; ++i) {
if ... | [["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 24], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 15,... | 1 | 405 |
#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;
while (b != 0) {
if (a[b % ... | #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;
while (b != 0) {
if (a[b % ... | [["+", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, ... | 1 | 130 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
var n, k int
fmt.Scanf("%d %d", &n, &k)
s := bufio.NewScanner(os.Stdin)
s.Scan()
split := strings.Split(s.Text(), " ")
d := make([]int, k)
for i, s := range split {
d[i], _ = strconv.Atoi(s)
}
base := []int{0, 1, 2, 3, 4, ... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
var n, k int
fmt.Scanf("%d %d", &n, &k)
s := bufio.NewScanner(os.Stdin)
s.Scan()
split := strings.Split(s.Text(), " ")
d := make([]int, k)
for i, s := range split {
d[i], _ = strconv.Atoi(s)
}
base := []int{0, 1, 2, 3, 4, ... | [["-", 12, 432, 0, 451, 8, 452, 0, 453, 0, 433], ["+", 12, 432, 0, 451, 8, 452, 0, 453, 0, 433], ["-", 0, 97, 0, 7, 0, 430, 15, 16, 12, 433], ["+", 0, 7, 0, 430, 15, 16, 12, 16, 31, 22], ["+", 0, 7, 0, 430, 15, 16, 12, 16, 17, 48], ["+", 0, 7, 0, 430, 15, 16, 12, 16, 12, 433], ["-", 0, 7, 8, 196, 0, 7, 8, 196, 0, 45], ... | 7 | 362 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
vector<char> d(k);
for (int i = 0; i < k; i++)
cin >> d[i];
int ans;
for (int i = n; i <= 10000; i++) {
string i_string = to_string(i);
bool can = true;
for (int j = 0; j < i_string.... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
vector<char> d(k);
for (int i = 0; i < k; i++) {
cin >> d[i];
}
int ans = 0;
for (int i = n; i <= 100000; i++) {
string tmp = to_string(i);
bool can = true;
for (int j = 0; j < tmp.s... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 7, 8, 9, 0, 43, 49, 5... | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
vector<char> d(k);
for (int i = 0; i < k; i++)
cin >> d[i];
int ans;
for (int i = n; i <= 10000; i++) {
string i_string = to_string(i);
bool can = true;
for (int j = 0; j < i_string.... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, k;
cin >> n >> k;
vector<char> d(k);
for (int i = 0; i < k; i++) {
char c;
cin >> c;
d[i] = c;
}
int ans;
for (int i = n; i <= 10 * n; i++) {
bool ok = true;
string tmp_i = to_string(i);
for (... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 49, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 0, 35], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["+... | 1 | 165 |
n, k = (input().split())
n = list(map(int, n));
dSet = set(map(int, input().split()))
okList = [i for i in range(10) if i not in dSet]
i = len(n)
while i >= 0:
i -= 1
if n[i] in okList:
continue
for y in okList:
if n[i] < y:
n[i] = y
j = i+1
while j < len(... | n, k = (input().split())
n = list(map(int, n));
dSet = set(map(int, input().split()))
okList = [i for i in range(10) if i not in dSet]
i = len(n)
while i >= 0:
i -= 1
if n[i] in okList:
continue
for y in okList:
if n[i] < y:
n[i] = y
j = i+1
while j < len(... | [["-", 0, 52, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 70], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 206, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 73], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 212 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1001001001;
const int mod = 100000... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1001001001;
const int mod = 100000... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 43,... | 1 | 225 |
#input of int(split by space)
def get_i()
return gets.chomp.split(" ").map(&:to_i)
end
#input of float(split by space)
def get_f()
return gets.chomp.split(" ").map(&:to_f)
end
#input of string(split by space)
def get()
return gets.chomp.split(" ")
end
#input of string(split per one character)
def get_nsp()
retu... | #input of int(split by space)
def get_i()
return gets.chomp.split(" ").map(&:to_i)
end
#input of float(split by space)
def get_f()
return gets.chomp.split(" ").map(&:to_f)
end
#input of string(split by space)
def get()
return gets.chomp.split(" ")
end
#input of string(split per one character)
def get_nsp()
retu... | [["-", 0, 662, 12, 738, 31, 652, 486, 652, 486, 743], ["-", 0, 662, 12, 738, 31, 652, 486, 652, 17, 131], ["-", 0, 662, 12, 738, 31, 652, 486, 652, 735, 22], ["-", 12, 738, 31, 652, 486, 652, 3, 4, 0, 24], ["-", 12, 738, 31, 652, 486, 652, 3, 4, 0, 743], ["-", 12, 738, 31, 652, 486, 652, 3, 4, 0, 25], ["-", 0, 493, 0, ... | 4 | 307 |
N, K = map(int, input().split())
D = set(input().split())
for n in range(N, 10001):
n = str(n)
for s in n:
if s in D:
break
else:
print(n)
exit()
| N, K = map(int, input().split())
D = set(input().split())
for n in range(N, 100001):
for s in str(n):
if s in D:
break
else:
print(n)
exit()
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["-", 0, 1, 0,... | 5 | 64 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int N, K;
int length;
int minValue = INT_MAX;
vector<bool> D(10, false);
void dfs(vector<int> pay) {
if (pay.size() == length) {
int cost = 0;
// rep(i, pay.size()) {
// cout << pa... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int N, K;
int minValue = INT_MAX;
vector<bool> D(10, false);
void dfs(vector<int> pay, int length) {
if (pay.size() == length) {
int cost = 0;
// rep(i, pay.size()) {
// cout << pa... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 49, 53, 54, 55, 0, 21], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 49, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 64, 9,... | 1 | 213 |
N, K = map(int, input().split())
D = set(map(int, input().split()))
f = True
while f:
if set(str(N)) == set(str(N)) - D:
print(N)
f = False
else:
N += 1 | N, K = map(int, input().split())
D = set(map(str, input().split()))
f = True
while f:
if set(list(str(N))) == set(list(str(N))) - D:
print(N)
f = False
else:
N += 1
| [["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["+", 15, 666, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 657, 31, 652, 3, 4, 0, 652, 63, 22], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 24]] | 5 | 70 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.