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
|
|---|---|---|---|---|
#include <cstdio>
#include <cstring>
char tb[128];
int main() {
int n, m;
while (scanf("%d", &n), n) {
memset(tb, sizeof(tb), 0);
for (int i = 0; i < n; i++) {
getchar();
char ch1 = getchar(), ch2 = (getchar(), getchar());
tb[ch1] = ch2;
}
scanf("%d", &m);
for (int i = 0; i < m; i++) {
getchar();
char ch = getchar();
if (tb[ch] == 0)
putchar(ch);
else
putchar(tb[ch]);
}
putchar('\n');
}
}
|
#include <cstdio>
#include <cstring>
char tb[128];
int main() {
int n, m;
while (scanf("%d", &n), n) {
memset(tb, 0, sizeof(tb));
for (int i = 0; i < n; i++) {
getchar();
char ch1 = getchar(), ch2 = (getchar(), getchar());
tb[ch1] = ch2;
}
scanf("%d", &m);
for (int i = 0; i < m; i++) {
getchar();
char ch = getchar();
if (tb[ch] == 0)
putchar(ch);
else
putchar(tb[ch]);
}
putchar('\n');
}
}
|
[["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
| 1
| 162
|
#include <iostream>
#include <map>
using namespace std;
int main(void) {
int n;
char c1, c2;
map<char, char> m;
while (cin >> n, n) {
for (int i = 0; i < n; i++) {
cin >> c1 >> c2;
m[c1] = c2;
}
cin >> n;
while (n--) {
cin >> c1;
if (m[c1])
cout << m[c1];
else
cout << c1;
}
cout << endl;
}
return 0;
}
|
#include <iostream>
#include <map>
using namespace std;
int main(void) {
int n;
char c1, c2;
map<char, char> m;
while (cin >> n, n) {
m.clear();
for (int i = 0; i < n; i++) {
cin >> c1 >> c2;
m[c1] = c2;
}
cin >> n;
while (n--) {
cin >> c1;
if (m[c1])
cout << m[c1];
else
cout << c1;
}
cout << endl;
}
return 0;
}
|
[["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 1
| 111
|
#include <iostream>
#include <string>
using namespace std;
int main() {
string str = "", cha, code1[50], code2[50];
int i, j, n, m, flag;
while (1) {
cin >> n;
if (!n) {
break;
}
for (i = 0; i < n; i++) {
cin >> code1[i] >> code2[i];
}
cin >> m;
for (i = 0; i < m; i++) {
cin >> cha;
flag = 0;
for (j = 0; j < n; j++) {
if (cha == code1[j]) {
str += code2[j];
flag = 1;
} else if (j == n - 1 && !flag) {
str += cha;
}
}
}
cout << str << endl;
}
return 0;
}
|
#include <iostream>
#include <string>
using namespace std;
int main() {
string str, cha, code1[50], code2[50];
int i, j, n, m, flag;
while (1) {
str = "";
cin >> n;
if (!n) {
break;
}
for (i = 0; i < n; i++) {
cin >> code1[i] >> code2[i];
}
cin >> m;
for (i = 0; i < m; i++) {
cin >> cha;
flag = 0;
for (j = 0; j < n; j++) {
if (cha == code1[j]) {
str += code2[j];
flag = 1;
} else if (j == n - 1 && !flag) {
str += cha;
}
}
}
cout << str << endl;
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 62], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 5, 0, 62], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 1
| 180
|
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m, i, j;
while (cin >> n && n) {
string A, B;
vector<string> a, b;
for (i = 0; i < n; i++) {
cin >> A;
cin >> B;
a.push_back(A);
b.push_back(B);
}
cin >> m;
string X;
vector<string> x;
for (i = 0; i < m; i++) {
cin >> X;
for (j = 0; j < n; j++) {
if (X == a[j])
X = b[j];
}
x.push_back(X);
}
for (i = 0; i < m; i++) {
cout << x[i];
}
cout << endl;
}
return 0;
}
|
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m, i, j;
while (cin >> n && n) {
string A, B;
vector<string> a, b;
for (i = 0; i < n; i++) {
cin >> A;
cin >> B;
a.push_back(A);
b.push_back(B);
}
cin >> m;
string X;
vector<string> x;
for (i = 0; i < m; i++) {
cin >> X;
for (j = 0; j < n; j++) {
if (X == a[j]) {
X = b[j];
break;
}
}
x.push_back(X);
}
for (i = 0; i < m; i++) {
cout << x[i];
}
cout << endl;
}
return 0;
}
|
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
| 1
| 184
|
#include <iostream>
#include <map>
int main() {
int n;
char d1, d2;
std::map<char, char> data;
while (std::cin >> n) {
if (n == 0) {
break;
}
for (int i = 0; i < n; ++i) {
std::cin >> d1 >> d2;
data.insert(std::map<char, char>::value_type(d1, d2));
}
std::string out;
std::cin >> n;
std::map<char, char>::iterator it;
for (int i = 0; i < n; ++i) {
std::cin >> d1;
it = data.find(d1);
if (it == data.end()) {
out += d1;
} else {
out += data[d1];
}
}
std::cout << out << std::endl;
}
}
|
#include <iostream>
#include <map>
int main() {
int n;
char d1, d2;
std::map<char, char> data;
while (std::cin >> n) {
data.clear();
if (n == 0) {
break;
}
for (int i = 0; i < n; ++i) {
std::cin >> d1 >> d2;
data.insert(std::map<char, char>::value_type(d1, d2));
}
std::string out;
std::cin >> n;
std::map<char, char>::iterator it;
for (int i = 0; i < n; ++i) {
std::cin >> d1;
it = data.find(d1);
if (it == data.end()) {
out += d1;
} else {
out += data[d1];
}
}
std::cout << out << std::endl;
}
}
|
[["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 1
| 183
|
#include <iostream>
#include <map>
using namespace std;
int main() {
int n;
map<char, char> mp;
while (cin >> n, n) {
for (int i = 0; i < n; i++) {
char a, b;
cin >> a >> b;
mp[a] = b;
}
int m;
cin >> m;
for (int i = 0; i < m; i++) {
char a;
cin >> a;
if (mp.find(a) != mp.end())
cout << mp[a];
else
cout << a;
}
cout << endl;
}
}
|
#include <iostream>
#include <map>
using namespace std;
int main() {
int n;
map<char, char> mp;
while (cin >> n, n) {
for (int i = 0; i < n; i++) {
char a, b;
cin >> a >> b;
mp[a] = b;
}
int m;
cin >> m;
for (int i = 0; i < m; i++) {
char a;
cin >> a;
if (mp.find(a) != mp.end())
cout << mp[a];
else
cout << a;
}
cout << endl;
mp.clear();
}
}
|
[["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 1
| 130
|
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int n;
while (true) {
map<char, char> dic;
vector<char> data;
cin >> n;
if (n == 0)
exit(0);
while (n-- > 0) {
char a, b;
cin >> a >> b;
dic[a] = b;
}
cin >> n;
while (n-- > 0) {
char a;
cin >> a;
auto buf = dic.find(a);
if (buf == dic.end())
cout << a;
else
cout << buf->second;
}
}
cout << endl;
}
|
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int n;
while (true) {
map<char, char> dic;
vector<char> data;
cin >> n;
if (n == 0)
exit(0);
while (n-- > 0) {
char a, b;
cin >> a >> b;
dic[a] = b;
}
cin >> n;
while (n-- > 0) {
char a;
cin >> a;
auto buf = dic.find(a);
if (buf == dic.end())
cout << a;
else
cout << buf->second;
}
cout << endl;
}
}
|
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 136
|
loop {
n = gets.to_i
break if n == 0
conv = Hash[*(1..n).map { gets.chomp.split }.flatten]
m = gets.to_i
puts (1..m).map{
s = gets.chomp
t = conv[s]
conv.delete(s)
t || s
}.join
}
|
loop {
n = gets.to_i
break if n == 0
conv = Hash[*(1..n).map { gets.chomp.split }.flatten]
m = gets.to_i
puts (1..m).map{
s = gets.chomp
t = conv[s]
t || s
}.join
}
|
[["-", 486, 652, 196, 196, 8, 734, 0, 652, 486, 22], ["-", 486, 652, 196, 196, 8, 734, 0, 652, 17, 131], ["-", 486, 652, 196, 196, 8, 734, 0, 652, 735, 22], ["-", 196, 196, 8, 734, 0, 652, 3, 4, 0, 24], ["-", 196, 196, 8, 734, 0, 652, 3, 4, 0, 22], ["-", 196, 196, 8, 734, 0, 652, 3, 4, 0, 25]]
| 4
| 72
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
while True:
dic = {}
n = int(input())
if n == 0:
break
for i in range(n):
key, value = input().split()
dic[key] = value
print(dic)
ret = ''
m = int(input())
for i in range(m):
s = input().split()[0]
ret += dic.get(s, s)
print(ret)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
while True:
dic = {}
n = int(input())
if n == 0:
break
for i in range(n):
key, value = input().split()
dic[key] = value
ret = ''
m = int(input())
for i in range(m):
s = input().split()[0]
ret += dic.get(s, s)
print(ret)
|
[["-", 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]]
| 5
| 98
|
while(1):
table = {}
output = ''
table_number = int(eval(input()))
if table_number == 0:
break
for i in range(table_number):
a, b = input().split()
table[a] = b
string_number = int(eval(input()))
for i in (string_number):
string = eval(input())
if string in table:
output += table[string]
else:
output += string
print(output)
|
while(1):
table = {}
output = ''
table_number = int(eval(input()))
if table_number == 0:
break
for i in range(table_number):
a, b = input().split()
table[a] = b
string_number = int(eval(input()))
for i in range(string_number):
string = input()[0]
if string in table:
output += table[string]
else:
output += string
print(output)
|
[["+", 0, 52, 8, 196, 0, 7, 12, 652, 63, 22], ["-", 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, 25], ["+", 8, 196, 0, 1, 0, 662, 12, 206, 0, 70], ["+", 8, 196, 0, 1, 0, 662, 12, 206, 206, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 206, 0, 73]]
| 5
| 101
|
out = []
while True:
n = int(input())
if n == 0: break
trans = {}
for i in range(n):
k,v = input().split()
trans[k] = v.rstrip()
cnt = int(input())
res = ""
for j in range(cnt):
a = input().rstrip()
if a in trans: a = trans[a]
res += a
out.append(a)
for o in out: print(o)
|
out = []
while True:
n = int(input())
if n == 0: break
trans = {}
for i in range(n):
k,v = input().split()
trans[k] = v.rstrip()
cnt = int(input())
res = ""
for j in range(cnt):
a = input().rstrip()
if a in trans: a = trans[a]
res += a
out.append(res)
for o in out: print(o)
|
[["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]]
| 5
| 112
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while (true) {
int n = scan.nextInt();
if (n == 0)
break;
Dice d = new Dice(1, 2, 3);
for (int i = 0; i < n; i++)
d.move(scan.next());
System.out.println(d.getTotal());
}
scan.close();
System.exit(0);
}
}
class Dice {
int u, f, r, total;
public Dice(int Up, int Front, int Right) {
u = Up;
f = Front;
r = Right;
total = 0;
}
public int getTotal() { return total; }
public void move(String oper) {
int tmp;
switch (oper) {
case "North":
tmp = 7 - u;
u = f;
f = tmp;
break;
case "East":
tmp = 7 - r;
r = u;
u = tmp;
break;
case "South":
tmp = 7 - f;
f = u;
u = tmp;
break;
case "West":
tmp = 7 - u;
u = r;
r = tmp;
break;
case "Right":
tmp = 7 - f;
f = r;
r = tmp;
break;
case "Left":
tmp = 7 - r;
r = f;
f = tmp;
break;
}
total += u;
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while (true) {
int n = scan.nextInt();
if (n == 0)
break;
Dice d = new Dice(1, 2, 3);
for (int i = 0; i < n; i++)
d.move(scan.next());
System.out.println(d.getTotal());
}
scan.close();
System.exit(0);
}
}
class Dice {
int u, f, r, total;
public Dice(int Up, int Front, int Right) {
u = Up;
f = Front;
r = Right;
total = u;
}
public int getTotal() { return total; }
public void move(String oper) {
int tmp;
switch (oper) {
case "North":
tmp = 7 - u;
u = f;
f = tmp;
break;
case "East":
tmp = 7 - r;
r = u;
u = tmp;
break;
case "South":
tmp = 7 - f;
f = u;
u = tmp;
break;
case "West":
tmp = 7 - u;
u = r;
r = tmp;
break;
case "Right":
tmp = 7 - f;
f = r;
r = tmp;
break;
case "Left":
tmp = 7 - r;
r = f;
f = tmp;
break;
}
total += u;
}
}
|
[["-", 0, 263, 8, 519, 0, 1, 0, 11, 12, 499], ["+", 0, 263, 8, 519, 0, 1, 0, 11, 12, 22]]
| 3
| 323
|
#include <stdio.h>
#include <string.h>
int main(void) {
int a, i, j, dice[6], ans, box;
char muki[6];
for (;;) {
scanf("%d", &a);
if (a == 0)
break;
int dice[6] = {1, 2, 6, 5, 3, 4};
ans = 1;
for (i = 0; i < a; i++) {
scanf("%s", muki);
if (!strcmp(muki, "North")) {
box = dice[0];
for (j = 0; j < 3; j++) {
dice[j] = dice[j + 1];
}
dice[3] = box;
ans += dice[0];
} else if (!strcmp(muki, "East")) {
box = dice[0];
dice[0] = dice[5];
dice[5] = dice[2];
dice[2] = dice[4];
dice[4] = box;
ans += dice[0];
} else if (!strcmp(muki, "West")) {
box = dice[0];
dice[0] = dice[4];
dice[4] = dice[2];
dice[2] = dice[5];
dice[5] = box;
ans += dice[0];
} else if (!strcmp(muki, "South")) {
box = dice[3];
for (j = 3; j > 0; j--) {
dice[j] = dice[j - 1];
}
dice[0] = box;
ans += dice[0];
} else if (!strcmp(muki, "Right")) {
box = dice[1];
dice[1] = dice[4];
dice[4] = dice[3];
dice[3] = dice[5];
dice[5] = box;
ans += dice[0];
} else if (!strcmp(muki, "Left")) {
box = dice[1];
dice[1] = dice[5];
dice[5] = dice[3];
dice[3] = dice[4];
dice[4] = box;
ans += dice[0];
}
printf("%d\n", ans);
}
}
return 0;
}
|
#include <stdio.h>
#include <string.h>
int main(void) {
int a, i, j, dice[6], ans, box;
char muki[6];
for (;;) {
scanf("%d", &a);
if (a == 0)
break;
int dice[6] = {1, 2, 6, 5, 3, 4};
ans = 1;
for (i = 0; i < a; i++) {
scanf("%s", muki);
if (!strcmp(muki, "North")) {
box = dice[0];
for (j = 0; j < 3; j++) {
dice[j] = dice[j + 1];
}
dice[3] = box;
ans += dice[0];
} else if (!strcmp(muki, "East")) {
box = dice[0];
dice[0] = dice[5];
dice[5] = dice[2];
dice[2] = dice[4];
dice[4] = box;
ans += dice[0];
} else if (!strcmp(muki, "West")) {
box = dice[0];
dice[0] = dice[4];
dice[4] = dice[2];
dice[2] = dice[5];
dice[5] = box;
ans += dice[0];
} else if (!strcmp(muki, "South")) {
box = dice[3];
for (j = 3; j > 0; j--) {
dice[j] = dice[j - 1];
}
dice[0] = box;
ans += dice[0];
} else if (!strcmp(muki, "Right")) {
box = dice[1];
dice[1] = dice[4];
dice[4] = dice[3];
dice[3] = dice[5];
dice[5] = box;
ans += dice[0];
} else if (!strcmp(muki, "Left")) {
box = dice[1];
dice[1] = dice[5];
dice[5] = dice[3];
dice[3] = dice[4];
dice[4] = box;
ans += dice[0];
}
}
printf("%d\n", ans);
}
return 0;
}
|
[["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46]]
| 0
| 508
|
a = -1, A = 65, d;
char *N = "GKSOCNWLDFVTBRXHAJUPEMQI", *E = "PHLTIDOXQAGWECSUMBKVJFNR", s[9];
main(c) {
for (; c - 48 && scanf("%s", s); a += d / 4 + 1)
(c = *s) < A ? ~a &&printf("%d\n", a),
a = d = 0 : 0,
d = (c == 78 ? d = N[d]
: c == 69 ? d = E[d]
: c == 83 ? d = N[N[N[d] - A] - A]
: c == 87 ? d = E[E[E[d] - A] - A]
: d + A) -
A,
c == 82 ? d = d & 28 | d % 4 + 1 % 3 : d,
c == 76 ? d = d & 28 | d % 4 + 3 % 3 : d;
}
|
a = -1, A = 65, d;
char *N = "GKSOCNWLDFVTBRXHAJUPEMQI", *E = "PHLTIDOXQAGWECSUMBKVJFNR", s[9];
main(c) {
for (; c - 48 && scanf("%s", s); a += d / 4 + 1)
(c = *s) < A ? ~a &&printf("%d\n", a),
a = d = 0 : 0,
d = (c == 78 ? d = N[d]
: c == 69 ? d = E[d]
: c == 83 ? d = N[N[N[d] - A] - A]
: c == 87 ? d = E[E[E[d] - A] - A]
: d + A) -
A,
c == 82 ? d = d & 28 | d % 4 + 1 & 3 : d,
c == 76 ? d = d & 28 | d % 4 + 3 & 3 : d;
}
|
[["-", 64, 11, 12, 16, 12, 16, 12, 16, 17, 109], ["+", 31, 41, 64, 11, 12, 16, 12, 16, 17, 67], ["+", 12, 41, 64, 11, 12, 16, 12, 16, 17, 67]]
| 0
| 204
|
N[] = {6, 14, 18, 10, 2, 9, 22, 15, 1, 17, 23, 7,
3, 5, 21, 19, 0, 13, 20, 11, 4, 8, 16, 12};
E[] = {13, 17, 9, 5, 8, 21, 14, 1, 16, 22, 6, 0,
4, 20, 18, 2, 12, 23, 10, 3, 11, 19, 15, 7};
R_[] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10,
15, 12, 13, 14, 19, 16, 17, 18, 23, 20, 21, 22};
a;
d;
T, F, R, t;
char s[9];
main(c) {
for (; c - 48 && scanf("%s", s); a += d / 4 + 1) {
c = *s;
if (c < 60)
a &&printf("%d\n", a + 1), a = d = 0, T = 1, F = 2, R = 3;
if (c == 78)
t = T, T = F, F = 7 - t, d = N[d];
if (c == 83)
t = F, F = T, T = 7 - t, d = N[N[N[d]]];
if (c == 69)
t = R, R = T, T = 7 - t, d = E[d];
if (c == 87)
t = T, T = R, R = 7 - t, d = E[E[E[d]]];
if (c == 82)
t = F, F = R, R = 7 - t, d = R_[d];
if (c == 76)
t = R, R = F, F = 7 - t, d = R_[R_[R_[d]]];
}
}
|
N[] = {6, 14, 18, 10, 2, 9, 22, 15, 1, 17, 23, 7,
3, 5, 21, 19, 0, 13, 20, 11, 4, 8, 16, 12};
E[] = {13, 17, 9, 5, 8, 21, 14, 1, 16, 22, 6, 0,
4, 20, 18, 2, 12, 23, 10, 3, 11, 19, 15, 7};
R_[] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10,
15, 12, 13, 14, 19, 16, 17, 18, 23, 20, 21, 22};
a;
d;
T, F, R, t;
char s[9];
main(c) {
for (; c - 48 && scanf("%s", s); a += d / 4 + 1) {
c = *s;
if (c < 60)
a &&printf("%d\n", a), a = d = 0, T = 1, F = 2, R = 3;
if (c == 78)
t = T, T = F, F = 7 - t, d = N[d];
if (c == 83)
t = F, F = T, T = 7 - t, d = N[N[N[d]]];
if (c == 69)
t = R, R = T, T = 7 - t, d = E[d];
if (c == 87)
t = T, T = R, R = 7 - t, d = E[E[E[d]]];
if (c == 82)
t = F, F = R, R = 7 - t, d = R_[d];
if (c == 76)
t = R, R = F, F = 7 - t, d = R_[R_[R_[d]]];
// if ( T != d/4+1 )
// while(1);
}
}
|
[["-", 31, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["-", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 439
|
a = map(int, input().split())
b = map(int, input().split())
print(max(sum(a,b)))
|
a = map(int, input().split())
b = map(int, input().split())
print(max(sum(a),sum(b)))
|
[["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24]]
| 5
| 40
|
<?php
// Input
$input = array();
for($loop_cnt = 0; 28 > $loop_cnt; $loop_cnt++)
{
$input[] = (int)trim(fgets(STDIN));
}
// Check
for($loop_cnt = 0; 30 >= $loop_cnt; $loop_cnt++)
{
if( in_array($loop_cnt, $input) )
{
echo $loop_cnt . "\n";
}
}
?>
|
<?php
// Input
$input = array();
for($loop_cnt = 0; 28 > $loop_cnt; $loop_cnt++)
{
$input[] = (int)trim(fgets(STDIN));
}
// Check
for($loop_cnt = 1; 30 >= $loop_cnt; $loop_cnt++)
{
if( !(in_array($loop_cnt, $input)) )
{
echo $loop_cnt . "\n";
}
}
?>
|
[["-", 36, 36, 0, 493, 0, 7, 0, 11, 12, 612], ["+", 36, 36, 0, 493, 0, 7, 0, 11, 12, 612], ["+", 0, 9, 0, 57, 15, 23, 0, 616, 0, 111], ["+", 0, 57, 15, 23, 0, 616, 0, 23, 0, 24], ["+", 0, 616, 0, 23, 0, 613, 3, 3, 0, 25]]
| 6
| 84
|
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int student[] = new int[30];
for (int i = 0; i < 30; i++) {
student[i] = 0;
}
for (int i = 0; i < 28; i++) {
student[scanner.nextInt() - 1] = 1;
}
for (int i = 0; i < 30; i++) {
if (student[i] == 0) {
System.out.println(i);
}
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int student[] = new int[30];
for (int i = 0; i < 30; i++) {
student[i] = 0;
}
for (int i = 0; i < 28; i++) {
student[scanner.nextInt() - 1] = 1;
}
for (int i = 0; i < 30; i++) {
if (student[i] == 0) {
System.out.println(i + 1);
}
}
}
}
|
[["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]]
| 3
| 134
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static int num[] = new int[28];
static boolean student[] = new boolean[30];
public static void main(String[] args) {
while (read()) {
solve();
}
}
public static boolean read() {
if (!sc.hasNext())
return false;
for (int i = 0; i < 28; i++) {
num[i] = sc.nextInt();
}
return true;
}
public static void solve() {
Arrays.fill(student, true);
for (int i = 0; i < num.length; i++) {
student[num[i]] = false;
}
for (int i = 0; i < student.length; i++) {
if (student[i])
System.out.println(i + 1);
}
}
}
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static int num[] = new int[28];
static boolean student[] = new boolean[30];
public static void main(String[] args) {
while (read()) {
solve();
}
}
public static boolean read() {
if (!sc.hasNext())
return false;
for (int i = 0; i < 28; i++) {
num[i] = sc.nextInt();
}
return true;
}
public static void solve() {
Arrays.fill(student, true);
for (int i = 0; i < num.length; i++) {
student[num[i] - 1] = false;
}
for (int i = 0; i < student.length; i++) {
if (student[i])
System.out.println(i + 1);
}
}
}
|
[["+", 0, 1, 0, 11, 31, 504, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 12, 499]]
| 3
| 210
|
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int a[] = new int[30];
for (int i = 0; i < 28; i++) {
int n = scan.nextInt() - 1;
a[n]++;
}
for (int i = 0; i < 30; i++) {
if (a[i] == 0)
System.out.println(i++);
}
}
}
|
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int a[] = new int[30];
for (int i = 0; i < 28; i++) {
int n = scan.nextInt() - 1;
a[n]++;
}
for (int i = 0; i < 30; i++) {
if (a[i] == 0)
System.out.println((i + 1));
}
}
}
|
[["+", 64, 1, 0, 492, 3, 4, 0, 23, 0, 24], ["-", 64, 1, 0, 492, 3, 4, 0, 27, 0, 29], ["+", 0, 492, 3, 4, 0, 23, 0, 16, 17, 72], ["+", 0, 492, 3, 4, 0, 23, 0, 16, 12, 499], ["+", 64, 1, 0, 492, 3, 4, 0, 23, 0, 25]]
| 3
| 113
|
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int a[] = new int[30];
for (int i = 0; i < 28; i++) {
int n = scan.nextInt() - 1;
a[n]++;
}
for (int i = 0; i < 30; i++) {
if (a[i] == 0)
System.out.println(i++);
}
}
}
|
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int a[] = new int[30];
for (int i = 0; i < 28; i++) {
int n = scan.nextInt() - 1;
a[n]++;
}
for (int i = 0; i < 30; i++) {
if (a[i] == 0)
System.out.println(++i);
}
}
}
|
[["-", 64, 1, 0, 492, 3, 4, 0, 27, 0, 22], ["+", 64, 1, 0, 492, 3, 4, 0, 27, 0, 22]]
| 3
| 113
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = null;
try {
scan = new Scanner(System.in);
boolean[] student = new boolean[30];
for (int i = 0; i < 28; i++) {
student[scan.nextInt()] = true;
}
for (int i = 0; i < student.length; i++) {
if (!student[i])
System.out.println(i);
}
} finally {
if (scan != null)
scan.close();
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = null;
try {
scan = new Scanner(System.in);
boolean[] student = new boolean[30];
for (int i = 0; i < 28; i++) {
student[scan.nextInt() - 1] = true;
}
for (int i = 0; i < student.length; i++) {
if (!student[i])
System.out.println(i + 1);
}
} finally {
if (scan != null)
scan.close();
}
}
}
|
[["+", 0, 1, 0, 11, 31, 504, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 12, 499], ["+", 64, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 64, 1, 0, 492, 3, 4, 0, 16, 12, 499]]
| 3
| 130
|
#include <stdio.h>
int main() {
int n[30];
int i, j;
for (i = 0; i < 30; i++)
n[i] = 0;
for (i = 0; i < 28; i++) {
scanf("%d", &j);
n[j - 1] = 1;
}
for (i = 0; i < 30; i++)
if (!n[i])
printf("%d", i + 1);
return 0;
}
|
#include <stdio.h>
int main() {
int n[30];
int i, j;
for (i = 0; i < 30; i++)
n[i] = 0;
for (i = 0; i < 28; i++) {
scanf("%d", &j);
n[j - 1] = 1;
}
for (i = 0; i < 30; i++)
if (!n[i])
printf("%d\n", i + 1);
return 0;
}
|
[["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 108
|
#include <stdio.h>
int main() {
char s[31] = {0};
int i, n;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
s[n] = 1;
}
for (i = 1; i <= 30; i++)
if (s[n] == 0)
printf("%d\n", i);
return 0;
}
|
#include <stdio.h>
int main() {
char s[31] = {0};
int i, n;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
s[n] = 1;
}
for (i = 1; i <= 30; i++)
if (s[i] == 0)
printf("%d\n", i);
return 0;
}
|
[["-", 8, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 8, 57, 15, 23, 0, 16, 31, 69, 71, 22]]
| 0
| 90
|
#include <stdio.h>
int main() {
int a[30] = {0};
int i, b, c;
for (i = 0; i < 28; i++) {
scanf("%d", &b);
a[b] = 1;
}
for (i = 0; i < 30; i++) {
if (a[i] == 0) {
printf("%d\n", i);
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int a[30] = {0};
int i, b, c;
for (i = 0; i < 28; i++) {
scanf("%d", &b);
a[b - 1] = 1;
}
for (i = 0; i < 30; i++) {
if (a[i] == 0) {
printf("%d\n", i + 1);
}
}
return 0;
}
|
[["+", 0, 1, 0, 11, 31, 69, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 96
|
#include <stdio.h>
int main(void) {
int a[30] = {0}, n, i;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n - 1] = 1;
}
for (i = 0; i < 28; i++) {
if (a[i] == 0) {
printf("%d\n", i);
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a[30] = {0}, n, i;
for (i = 0; i < 30; i++) {
scanf("%d", &n);
a[n - 1] = 1;
}
for (i = 0; i < 30; i++) {
if (a[i] == 0) {
printf("%d\n", i + 1);
}
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 96
|
#include <stdio.h>
int main(void) {
int t, a[30], q;
for (t = 0; t < 30; t++) {
a[t] = 1;
}
for (t = 0; t < 28; t++) {
scanf("%d", &q);
a[q] = 0;
}
for (t = 0; t < 30; t++) {
if (a[t]) {
printf("%d\n", t);
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int t, a[30], q;
for (t = 0; t < 30; t++) {
a[t] = 1;
}
for (t = 0; t < 28; t++) {
scanf("%d", &q);
a[q - 1] = 0;
}
for (t = 0; t < 30; t++) {
if (a[t]) {
printf("%d\n", t + 1);
}
}
return 0;
}
|
[["+", 0, 1, 0, 11, 31, 69, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 110
|
#include <stdio.h>
int main() {
int n[28], i, a = 0, b = 0, j, flag;
for (i = 0; i < 28; i++) {
scanf("%d\n", &n[i]);
}
for (i = 1; i <= 30; i++) {
for (j = 0; j < 28; j++) {
if (n[i] == i)
flag = 1;
}
if (flag = 0) {
if (a == 0)
a = i;
else
b = i;
} else {
flag = 0;
}
}
printf("%d\n%d\n", a, b);
return 0;
}
|
#include <stdio.h>
int main() {
int n[28], i, a = 0, b = 0, j, flag;
for (i = 0; i < 28; i++) {
scanf("%d\n", &n[i]);
}
for (i = 1; i <= 30; i++) {
for (j = 0; j < 28; j++) {
if (n[j] == i)
flag = 1;
}
if (flag == 0) {
if (a == 0)
a = i;
else
b = i;
} else {
flag = 0;
}
}
printf("%d\n%d\n", a, b);
return 0;
}
|
[["-", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]]
| 0
| 147
|
#include <stdio.h>
main() {
int Stu[30] = {0}, a, b;
for (a = 0; a < 28; a++) {
scanf("%d", &b);
Stu[b - 1] = 1;
}
for (a = 0; a < 30; a++) {
if (Stu[a] == 1)
printf("%d\n", a + 1);
}
return 0;
}
|
#include <stdio.h>
main() {
int Stu[30] = {0}, a, b;
for (a = 0; a < 28; a++) {
scanf("%d", &b);
Stu[b - 1] = 1;
}
for (a = 0; a < 30; a++) {
if (Stu[a] != 1) {
printf("%d\n", a + 1);
}
}
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
| 0
| 95
|
#include <stdio.h>
int main(void) {
int submit[30] = {0};
int i;
int k;
for (k = 0; k < 28; k++) {
scanf("%d", &i);
submit[i] = 1;
}
for (k = 1; k <= 30; k++) {
if (submit[k] == 0) {
printf("%d\n", k);
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int submit[31] = {0};
int i;
int k;
for (k = 0; k < 28; k++) {
scanf("%d", &i);
submit[i] = 1;
}
for (k = 1; k <= 30; k++) {
if (submit[k] == 0) {
printf("%d\n", k);
}
}
return 0;
}
|
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]]
| 0
| 96
|
#include <stdio.h>
int main(void) {
int a[31] = {0};
int i, n;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n] = 1;
}
for (i = 1; i <= 30; i++) {
if (!a[i])
printf("%d\n", a[i]);
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a[31] = {0};
int i, n;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n] = 1;
}
for (i = 1; i <= 30; i++) {
if (!a[i])
printf("%d\n", i);
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 64, 1, 0, 2, 3, 4, 0, 69, 0, 70], ["-", 64, 1, 0, 2, 3, 4, 0, 69, 0, 73]]
| 0
| 95
|
#include <stdio.h>
int main(void) {
int a, b, memo[30] = {0};
for (a = 0; a < 28; a++) {
scanf("%d", &b);
memo[b] = 1;
}
for (a = 1; a <= 30; a++) {
if (memo[a] == 0) {
printf("%d\n", a);
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, memo[30] = {0};
for (a = 0; a < 28; a++) {
scanf("%d", &b);
memo[b - 1] = 1;
}
for (a = 0; a < 30; a++) {
if (memo[a] == 0) {
printf("%d\n", a + 1);
}
}
return 0;
}
|
[["+", 0, 1, 0, 11, 31, 69, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 94
|
#include <stdio.h>
int main(void) {
int a[30];
int b, i;
for (i = 0; i < 30; i++) {
a[i] = 0;
}
for (i = 0; i < 28; i++) {
scanf("%d", &b);
a[b] = 1;
}
for (i = 1; i <= 28; i++) {
if (a[i] == 0) {
printf("%d\n", i);
}
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int a[31];
int b, i;
for (i = 1; i <= 30; i++) {
a[i] = 0;
}
for (i = 1; i <= 28; i++) {
scanf("%d", &b);
a[b] = 1;
}
for (i = 1; i <= 30; i++) {
if (a[i] == 0) {
printf("%d\n", i);
}
}
return (0);
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 115
|
#include <stdio.h>
int main(void) {
int N[31] = {0};
int i, j = 0;
for (i = 0; i < 29; i++) {
scanf("%d", &j);
N[j] = 1;
}
for (i = 0; i < 31; i++) {
if (N[i] == 0)
printf("%d\n", i);
}
return 0;
}
|
#include <stdio.h>
int main() {
int N[31] = {0};
int i, j;
for (i = 0; i < 29; i++) {
scanf("%d", &j);
N[j] = 1;
}
for (i = 1; i < 31; i++) {
if (N[i] == 0)
printf("%d\n", i);
}
return 0;
}
|
[["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 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, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
| 0
| 95
|
#include <stdio.h>
#include <stdlib.h>
int who[2];
int compar(const int *val1, const int *val2) {
if (*val1 < *val2) {
return -1;
} else if (*val1 == *val2) {
return 0;
} else {
return 1;
}
}
void detect(const int *pnt) {
int i = 1, j = 0;
int count = 0;
while (1) {
if (i != pnt[j]) {
who[count] = i;
count++;
i++;
if (count == 2) {
break;
}
} else {
i++;
j++;
}
}
}
int main(void) {
int stdntID[28];
int i, j;
for (i = 0; i < 28; i++) {
scanf("%d", &stdntID[i]);
}
qsort(stdntID, 5, sizeof(int), compar);
detect(stdntID);
printf("%d\n", who[0]);
printf("%d\n", who[1]);
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
int who[2];
int compar(const int *val1, const int *val2) {
if (*val1 < *val2) {
return -1;
} else if (*val1 == *val2) {
return 0;
} else {
return 1;
}
}
void detect(const int *pnt) {
int i = 1, j = 0;
int count = 0;
while (1) {
if (i != pnt[j]) {
who[count] = i;
count++;
i++;
if (count == 2) {
break;
}
} else {
i++;
j++;
}
}
}
int main(void) {
int stdntID[28];
int i, j;
for (i = 0; i < 28; i++) {
scanf("%d", &stdntID[i]);
}
qsort(stdntID, 28, sizeof(int), compar);
detect(stdntID);
printf("%d\n", who[0]);
printf("%d\n", who[1]);
return 0;
}
|
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
| 0
| 225
|
#include <stdio.h>
int main(void) {
int a[28], i, j, b[30];
for (i = 1; i < 31; i++) {
b[i - 1] = i;
}
for (i = 0; i < 28; i++) {
scanf("%d", &a[i]);
for (j = 0; j < 28; j++) {
if (a[i] == b[j]) {
b[j] = 0;
}
}
}
for (i = 0; i < 30; i++) {
if (b[i] != 0) {
printf("%d\n", b[i]);
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a[28], i, j, b[30];
for (i = 1; i < 31; i++) {
b[i - 1] = i;
}
for (i = 0; i < 28; i++) {
scanf("%d", &a[i]);
for (j = 0; j < 30; j++) {
if (a[i] == b[j]) {
b[j] = 0;
}
}
}
for (i = 0; i < 30; i++) {
if (b[i] != 0) {
printf("%d\n", b[i]);
}
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 154
|
#include <stdio.h>
#include <string.h>
int main(void) {
int a[30], i;
memset(a, 0, sizeof(a));
for (i = 0; i < 28; ++i) {
int t;
scanf("%d", &t);
a[t - 1] = 1;
}
for (i = 0; i < 30; ++i)
if (!a[i])
printf("%d\n", i);
return 0;
}
|
#include <stdio.h>
#include <string.h>
int main(void) {
int a[30], i;
memset(a, 0, sizeof(a));
for (i = 0; i < 28; ++i) {
int t;
scanf("%d", &t);
a[t - 1] = 1;
}
for (i = 0; i < 30; ++i)
if (!a[i])
printf("%d\n", i + 1);
return 0;
}
|
[["+", 64, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 102
|
p[31];
main(i) {
for (; ~scanf("%d", p) || i < 31 ? i += p[i] || printf("%d\n", i) : 0;)
p[*p] = 1;
}
|
p[];
main(i) {
for (; ~scanf("%d", p) || i < 31 && (i += p[i] || printf("%d\n", i));)
p[*p] = 1;
}
|
[["-", 36, 36, 0, 30, 0, 1, 0, 69, 71, 13], ["+", 0, 30, 0, 1, 0, 69, 0, 70, 0, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 41, 0, 101], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 98], ["+", 0, 7, 15, 16, 12, 16, 12, 23, 0, 24], ["-", 0, 14, 8, 9, 0, 7, 15, 41, 0, 102], ["-", 0, 14, 8, 9, 0, 7, 15, 41, 75, 13], ["+", 0, 7, 15, 16, 12, 16, 12, 23, 0, 25]]
| 0
| 56
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int i, j, k;
int a[35], n;
int main() {
for (i = 0; i < 30; i++)
a[i] = 0;
for (i = 0; i < 28; i++)
scanf("%d", &n), a[n] = 1;
for (i = 0; i < 30; i++)
if (a[i] == 0)
printf("%d\n", i);
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int i, j, k;
int a[35], n;
int main() {
for (i = 1; i <= 30; i++)
a[i] = 0;
for (i = 1; i <= 28; i++)
scanf("%d", &n), a[n] = 1;
for (i = 1; i <= 30; i++)
if (a[i] == 0)
printf("%d\n", i);
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
| 0
| 112
|
#include <stdio.h>
int main() {
int student[30];
int i;
for (i = 0; i < 30; i++) {
student[i] = 0;
}
for (i = 0; i < 28; i++) {
int x;
scanf("%d", &x);
student[x - 1] = 1;
}
for (i = 0; i < 30; i++) {
if (student[i] == 0) {
printf("%d\n", &student[i]);
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int student[30];
int i;
for (i = 0; i < 30; i++) {
student[i] = 0;
}
for (i = 0; i < 28; i++) {
int x;
scanf("%d", &x);
student[x - 1] = 1;
}
for (i = 0; i < 30; i++) {
if (student[i] == 0) {
printf("%d\n", i + 1);
}
}
return 0;
}
|
[["-", 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, 2, 3, 4, 0, 66, 28, 69, 0, 73], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 0
| 119
|
#include <stdio.h>
int main() {
int submit[31], i, x;
for (i = 0; i < 31; i++)
submit[i] = 0;
for (i = 0; i < 28; i++) {
scanf("%d", &x);
submit[x + 1] = 1;
}
for (i = 1; i < 31; i++) {
if (submit[i] == 0) {
printf("%d\n", i);
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int submit[31], i, x;
for (i = 0; i < 31; i++)
submit[i] = 0;
for (i = 0; i < 28; i++) {
scanf("%d", &x);
submit[x] = 1;
}
for (i = 1; i < 31; i++) {
if (submit[i] == 0) {
printf("%d\n", i);
}
}
return 0;
}
|
[["-", 0, 1, 0, 11, 31, 69, 71, 16, 17, 72], ["-", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13]]
| 0
| 111
|
#include <stdio.h>
int main() {
int sei[31] = {0}, i, a;
for (i = 1; i < 29; i++) {
scanf("%d", &a);
sei[a] = 1;
}
for (i = 1; i < 29; i++) {
if (sei[i] == 0)
printf("%d ", i);
}
return 0;
}
|
#include <stdio.h>
int main() {
int sei[31] = {0}, i, a;
for (i = 1; i < 29; i++) {
scanf("%d", &a);
sei[a] = 1;
}
for (i = 1; i < 31; i++) {
if (sei[i] == 0)
printf("%d\n", i);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 90
|
#include <stdio.h>
int main(void) {
int bucket[32] = {0};
int i, b;
for (i = 0; i < 28; i++) {
scanf("%d", &b);
bucket[i] = 1;
}
for (i = 1; i <= 30; i++) {
if (!bucket[i])
printf("%d\n", i);
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int bucket[32] = {0};
int i, b;
for (i = 0; i < 28; i++) {
scanf("%d", &b);
bucket[b] = 1;
}
for (i = 1; i <= 30; i++) {
if (!bucket[i])
printf("%d\n", i);
}
return (0);
}
|
[["-", 8, 9, 0, 1, 0, 11, 31, 69, 71, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 71, 22]]
| 0
| 94
|
#include <stdio.h>
int main() {
int a[30] = {0}, i, n;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n] = 1;
}
for (i = 1; i <= 30; i++) {
if (!a[i])
printf("%d\n", i);
}
return 0;
}
|
#include <stdio.h>
int main() {
int a[40] = {0}, i, n;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n] = 1;
}
for (i = 1; i <= 30; i++) {
if (a[i] == 0)
printf("%d\n", i);
}
return 0;
}
|
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 8, 9, 0, 57, 15, 23, 0, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]]
| 0
| 90
|
num_max = 5
syusseki = Array.new
i = 0
while line = gets.chomp.to_i
syusseki[i] = line
i += 1
if i > num_max then
break
end
end
k = 0
j = 1
absence = Array.new
while j <= 30
i = 0
findflg = false
while i <= num_max
if syusseki[i] == j then
findflg = true
break
end
i += 1
end
if findflg != true then
absence[k] = j
k += 1
end
j += 1
end
puts "anser"
puts absence
|
num_max = 28
syusseki = Array.new
i = 0
while line = gets.chomp.to_i
syusseki[i] = line
i += 1
if i >= num_max then
break
end
end
k = 0
j = 1
absence = Array.new
while j <= 30
i = 0
findflg = false
while i < num_max
if syusseki[i] == j then
findflg = true
break
end
i += 1
end
if findflg != true then
absence[k] = j
k += 1
end
j += 1
end
puts absence
|
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["-", 0, 89, 8, 170, 0, 121, 15, 738, 17, 47], ["+", 0, 89, 8, 170, 0, 121, 15, 738, 17, 20], ["-", 0, 89, 8, 170, 0, 89, 15, 738, 17, 19], ["+", 0, 89, 8, 170, 0, 89, 15, 738, 17, 18], ["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 62], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6]]
| 4
| 103
|
nums = []
28.times { nums << gets.chomp.to_i }
a = [1..30].to_a - nums
puts a.min
puts a.max
|
nums = []
28.times { nums << gets.chomp.to_i }
a = (1..30).to_a - nums
puts a.min
puts a.max
|
[["-", 0, 662, 12, 738, 31, 652, 486, 516, 0, 70], ["+", 0, 662, 12, 738, 31, 652, 486, 739, 0, 24], ["-", 0, 662, 12, 738, 31, 652, 486, 516, 0, 73], ["+", 0, 662, 12, 738, 31, 652, 486, 739, 0, 25]]
| 4
| 35
|
a = (1<<31)-1
print(a)
for i in range(28):
b = eval(input())
a -= 1<<(b-1)
for i in range(30):
if a & 1<<i: print(i+1)
|
a = (1<<31)-1
for i in range(28):
b = eval(input())
a -= 1<<(b-1)
for i in range(30):
if a & 1<<i: print(i+1)
|
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
| 5
| 59
|
students = list(range(30))
[students.remove(int(input())) for _ in range(28)]
[print(student) for student in students]
|
students = list(range(1, 31))
[students.remove(int(input())) for _ in range(28)]
[print(student) for student in students]
|
[["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 612], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 612], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21]]
| 5
| 39
|
print(' '.join(map(str, sorted(set(range(1, 31)) - set([int(input()) for i in range(28)])))))
|
print('\n'.join(map(str, sorted(set(range(1, 31)) - set([int(input()) for i in range(28)])))))
|
[["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 0, 652, 63, 319, 500, 557, 0, 6, 0, 44]]
| 5
| 46
|
data = [x + 1 for x in range(30)]
# print(data)
for i in range(30):
a = int(input())
data.remove(a)
# print(data)
for i in data:
print(i)
|
data = [x + 1 for x in range(30)]
# print(data)
for i in range(28):
a = int(input())
data.remove(a)
# print(data)
for i in data:
print(i)
|
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
| 5
| 47
|
ref = [i for i in range(1,31)]
for i in range(28):
ref.pop(int(input())-1)
for i in ref:
print(i)
|
ref = [i for i in range(1,31)]
for i in range(28):
ref.remove(int(input()))
for i in ref:
print(i)
|
[["-", 8, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 8, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
| 5
| 44
|
class Main {
public static void main(String[] z) {
String s = "";
for (char c : new java.util.Scanner(System.in).next().toCharArray())
s += (char)((c - 36) % 26 + 65);
System.out.println(s);
}
}
|
class Main {
public static void main(String[] z) {
String s = "";
for (char c : new java.util.Scanner(System.in).next().toCharArray())
s += (char)((c - 42) % 26 + 65);
System.out.println(s);
}
}
|
[["-", 0, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 499]]
| 3
| 73
|
#include <stdio.h>
int main(void) {
char a[1001], b[1001], temp, sa;
int i = 0;
scanf("%s", a);
while (1) {
if (a[i] == '\0') {
b[i] = '\0';
break;
}
temp = a[i];
temp = temp + 3;
if (temp > 'Z') {
;
temp = temp - 26;
}
b[i] = temp;
i++;
}
printf("%s\n", b);
return 0;
}
|
#include <stdio.h>
int main(void) {
char a[1001], b[1001], temp, sa;
int i = 0;
scanf("%s", a);
while (1) {
if (a[i] == '\0') {
b[i] = '\0';
break;
}
temp = a[i];
temp = temp - 3;
if (temp < 'A') {
;
temp = temp + 26;
}
b[i] = temp;
i++;
}
printf("%s\n", b);
return 0;
}
|
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["-", 0, 57, 15, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 23, 0, 16, 12, 103, 0, 125], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72]]
| 0
| 121
|
#include <stdio.h>
int main() {
char c;
while (scanf("%c", &c) != EOF) {
if (c != '\n') {
printf("%c", (c - 'A' + 24) % 26 + 'A');
}
}
printf("\n");
return 0;
}
|
#include <stdio.h>
int main() {
char c;
while (scanf("%c", &c) != EOF) {
if (c != '\n') {
printf("%c", (c - 'A' + 23) % 26 + 'A');
}
}
printf("\n");
return 0;
}
|
[["-", 0, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
| 0
| 70
|
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
char A[2][27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ", "DEFGHIJKLMNOPQRSTUVWXYZABC"};
int main() {
char *s = (char *)malloc(1001);
int i;
fscanf(stdin, "%[^\n]*s", s), getchar();
while (*s) {
for (i = 0; i < 26; i++)
if (*s == A[1][i])
fprintf(stdout, "%c", A[0][i]);
s++;
}
puts("");
free(s);
return 0;
}
|
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
char A[2][27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ", "DEFGHIJKLMNOPQRSTUVWXYZABC"};
int main() {
char *s = (char *)malloc(1001);
int i;
fscanf(stdin, "%[^\n]*s", s), getchar();
while (*s) {
for (i = 0; i < 26; i++)
if (*s == A[1][i])
fprintf(stdout, "%c", A[0][i]);
s++;
}
puts("");
// free(s);
return 0;
}
|
[["-", 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, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
| 0
| 131
|
#include <stdio.h>
int main(void) {
int i = -1;
char dr[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char dr_[27] = "DEFGHIJKLMNOPQRSTUVWXYZABC";
char ny[1001];
while (1) {
i++;
scanf("%c", &ny[i]);
if (ny[i] == 10)
break;
}
for (int s = 0; s < i; s++) {
for (int s_ = 0; s_ < 27; s_++) {
if (ny[s] == dr_[s_]) {
ny[s] = dr[s_];
}
}
}
for (int s = 0; s < i; s++) {
printf("%c", ny[s]);
}
printf("\n");
return 0;
}
|
#include <stdio.h>
int main(void) {
int i = -1;
char dr[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char dr_[26] = "DEFGHIJKLMNOPQRSTUVWXYZABC";
char ny[1001];
while (1) {
i++;
scanf("%c", &ny[i]);
if (ny[i] == 10)
break;
}
for (int s = 0; s < i; s++) {
for (int s_ = 0; s_ < 26; s_++) {
if (ny[s] == dr_[s_]) {
ny[s] = dr[s_];
break;
}
}
}
for (int s = 0; s < i; s++) {
printf("%c", ny[s]);
}
printf("\n");
return 0;
}
|
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
| 0
| 167
|
#include <stdio.h>
#include <string.h>
int main() {
char be[26] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
char af[26] = {'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', 'A', 'B', 'C'};
char str[1000];
int i, j, c;
scanf("%s", str);
c = strlen(str); //ツ閉カツ篠堋療アツづ個陳キツつウツづーツ堕ェツづゥ
for (i = 0; i < c; i++) {
for (j = 0; j < 26; j++) {
if (str[i] == af[j]) {
str[i] = be[j];
}
}
}
printf("%s\n", str);
return 0;
}
|
#include <stdio.h>
#include <string.h>
int main() {
char be[26] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
char af[26] = {'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', 'A', 'B', 'C'};
char str[1000];
int i, j, c;
scanf("%s", str);
c = strlen(str); //ツ閉カツ篠堋療アツづ個陳キツつウツづーツ堕ェツづゥ
for (i = 0; i < c; i++) {
for (j = 0; j < 26; j++) {
if (str[i] == af[j]) {
str[i] = be[j];
break;
}
}
}
printf("%s\n", str);
return 0;
}
|
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
| 0
| 331
|
c;
main() {
for (; c = read(0, &c, 1); putchar(c > 10 ? 65 + c % 68 % 42 : c))
;
}
|
i;
main(c) {
for (; i = read(0, &c, 1); putchar(c > 10 ? 65 + c % 68 % 42 : c))
;
}
|
[["-", 36, 36, 36, 36, 36, 36, 0, 30, 0, 78], ["+", 36, 36, 36, 36, 0, 30, 0, 1, 0, 22], ["+", 36, 36, 0, 30, 0, 14, 49, 65, 0, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 0, 30, 0, 9, 0, 7, 15, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 11, 31, 22]]
| 0
| 41
|
c;
main() {
for (; c = ~getchar(); putchar(~c / 64 * 65 - c % 68 % 43))
;
}
|
c;
main() {
for (; c = ~getchar(); putchar(~c / 64 * 65 + ~c % 68 % 42))
;
}
|
[["-", 0, 7, 26, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 7, 26, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 16, 31, 91, 17, 92], ["-", 26, 2, 3, 4, 0, 16, 12, 16, 12, 13], ["+", 26, 2, 3, 4, 0, 16, 12, 16, 12, 13]]
| 0
| 35
|
#include <ctype.h>
#include <stdio.h>
/** Application main entry point. */
int main(int argc, char *argv[]) {
for (;;) {
const int ch = getchar();
if (ch == EOF)
break;
putchar(isupper(ch) ? ((ch + 'Z' - 2 * 'A' - 3) % ('Z' - 'A' + 1)) + 'A'
: ch);
}
return (0);
}
|
#include <ctype.h>
#include <stdio.h>
/** Application main entry point. */
int main(int argc, char *argv[]) {
for (;;) {
const int ch = getchar();
if (ch == EOF)
break;
putchar(isupper(ch) ? ((ch + 'Z' - 2 * 'A' - 2) % ('Z' - 'A' + 1)) + 'A'
: ch);
}
return (0);
}
|
[["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
| 0
| 91
|
#include <stdio.h>
int main() {
char str[1002];
int i;
fgets(str, 1002, stdin);
for (i = 0; str[i] != '\n' || i < 1002; i++) {
str[i] -= (char)3;
if (str[i] < 'A') {
str[i] += (char)(-'A' + 'Z' + 1);
}
}
puts(str);
}
|
#include <stdio.h>
int main() {
char str[1002];
int i;
fgets(str, 1002, stdin);
for (i = 0; str[i] != '\n' && i < 1000; i++) {
str[i] -= (char)3;
if (str[i] < 'A') {
str[i] += (char)(-'A' + 'Z' + 1);
}
}
printf(str);
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 106], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 98], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
| 0
| 99
|
#include <stdio.h>
int main() {
int x[26] = {'X', 'Y', 'Z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W'};
char input[1001];
int i;
scanf("%s", input);
char c = input[0];
for (i = 0; (c != '\0'); i++) {
printf("%c", x[(c - 65)]);
c = x[i + 1];
}
putchar('\n');
return 0;
}
|
#include <stdio.h>
int main() {
int x[26] = {'X', 'Y', 'Z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W'};
char input[1001];
int i;
scanf("%s", input);
char c = input[0];
for (i = 0; (c != '\0'); i++) {
printf("%c", x[(c - 65)]);
c = input[i + 1];
}
putchar('\n');
return 0;
}
|
[["-", 8, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 69, 28, 22]]
| 0
| 200
|
// 2006
#include <iostream>
using namespace std;
int main(void) {
int i, s[31] = {0}, a = 0;
for (i = 1; i < 29; i++) {
cin >> a;
s[a] = 1;
}
for (i = 1; i < 31; i++) {
if (s[i] != 1) {
cout << a << endl;
}
}
return 0;
} // vuin @icloud.com,@gmail.com
|
// 2006
#include <iostream>
using namespace std;
int main(void) {
int i, s[31] = {0}, a = 0;
for (i = 1; i < 29; i++) {
cin >> a;
s[a] = 1;
}
for (i = 1; i < 31; i++) {
if (s[i] != 1) {
cout << i << endl;
}
}
return 0;
} // vuin @icloud.com,@gmail.com
|
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
| 1
| 92
|
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <utility>
using namespace std;
int main() {
bool e[30] = {0};
for (int i = 0; i < 28; i++) {
int n;
scanf("%d", &n);
e[n - 1] = 1;
}
for (int i = 0; i < 30; i++) {
if (!e[i])
printf("%d\n");
}
}
|
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <utility>
using namespace std;
int main() {
bool e[30] = {0};
for (int i = 0; i < 28; i++) {
int n;
scanf("%d", &n);
e[n - 1] = 1;
}
for (int i = 0; i < 30; i++) {
if (!e[i])
printf("%d\n", i + 1);
}
}
|
[["+", 0, 57, 64, 1, 0, 2, 3, 4, 0, 21], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 1
| 102
|
#include <cstdio>
int student[30];
int main() {
for (int i = 0; i < 28; i++) {
int n;
scanf("%d", &n);
student[n] = 1;
}
for (int i = 0; i < 30; i++) {
if (student[i] == 0) {
printf("%d\n", i + 1);
}
}
return (0);
}
|
#include <cstdio>
int student[30];
int main() {
for (int i = 0; i < 28; i++) {
int n;
scanf("%d", &n);
student[n - 1] = 1;
}
for (int i = 0; i < 30; i++) {
if (student[i] == 0) {
printf("%d\n", i + 1);
}
}
return (0);
}
|
[["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13]]
| 1
| 94
|
#include <iostream>
using namespace std;
int main() {
bool s[30];
for (int i = 0; i < 30; i++)
s[i] = false;
for (int i = 0; i < 28; i++) {
int a;
cin >> a;
s[a - 1] = true;
}
for (int i = 0; i < 30; i++) {
if (!s[i])
cout << i + 1;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
bool s[30];
for (int i = 0; i < 30; i++)
s[i] = false;
for (int i = 0; i < 28; i++) {
int a;
cin >> a;
s[a - 1] = true;
}
for (int i = 0; i < 30; i++) {
if (!s[i])
cout << i + 1 << endl;
}
return 0;
}
|
[["+", 8, 9, 0, 57, 64, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 57, 64, 1, 0, 16, 12, 22]]
| 1
| 104
|
#include <bits/stdc++.h>
using namespace std;
bool f[30];
int main() {
for (int i = 0; i < 28; i++) {
int a;
cin >> a;
--a;
f[a] = true;
}
for (int i = 0; i < 30; i++) {
if (f[i])
cout << i + 1 << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
bool f[30];
int main() {
for (int i = 0; i < 28; i++) {
int a;
cin >> a;
--a;
f[a] = true;
}
for (int i = 0; i < 30; i++) {
if (!f[i])
cout << i + 1 << endl;
}
return 0;
}
|
[["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
| 1
| 85
|
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
bool flag[32] = {false};
int num;
for (int i = 0; i < 28; i++) {
scanf("%d", &num);
flag[num] = true;
}
for (int i = 0; i < 30; i++) {
(flag[i]) ?: printf("%d\n", i);
}
return 0;
}
|
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
bool flag[32] = {false};
int num;
for (int i = 0; i < 28; i++) {
scanf("%d", &num);
flag[num] = true;
}
for (int i = 1; i <= 30; i++) {
(flag[i]) ?: printf("%d\n", i);
}
return 0;
}
/*
9
30
6
12
10
20
21
11
7
5
28
4
18
29
17
19
27
13
16
26
14
23
22
15
3
1
24
25
*/
|
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
| 1
| 100
|
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
bool die[31] = {};
int N;
for (int i = 0; i < 28; i++)
cin >> N, die[N] = true;
for (int i = 1; i <= 30; i++)
if (!die[N])
printf("%d\n", i);
return 0;
}
|
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
bool die[31] = {};
int N;
for (int i = 0; i < 28; i++) {
cin >> N;
die[N] = true;
}
for (int i = 1; i <= 30; i++) {
if (!die[i])
printf("%d\n", i);
}
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 8, 9, 0, 7, 8, 1, 0, 34, 0, 21], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 15, 339, 51, 91, 28, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 91, 28, 69, 341, 342, 0, 22]]
| 1
| 86
|
#include <iostream>
using namespace std;
int main() {
int s[31] = {};
for (int i = 0; i < 28; i++) {
int h;
cin >> h;
s[h] = 1;
}
for (int i = 1; i < 31; i++) {
if (s[i] == 1)
cout << i << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int s[31] = {};
for (int i = 0; i < 28; i++) {
int h;
cin >> h;
s[h] = 1;
}
for (int i = 1; i < 31; i++) {
if (s[i] == 0)
cout << i << endl;
}
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
| 1
| 85
|
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int tmp, num[35];
memset(num, -1, sizeof(num));
for (int i = 0; i < 28; i++) {
cin >> tmp;
num[tmp] = 1;
}
for (int i = 1; i < 31; i++) {
if (num[i] == -1)
cout << num[i] << endl;
}
}
|
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int tmp, num[35];
memset(num, -1, sizeof(num));
for (int i = 0; i < 28; i++) {
cin >> tmp;
num[tmp] = 1;
}
for (int i = 1; i < 31; i++) {
if (num[i] == -1)
cout << i << endl;
}
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73]]
| 1
| 95
|
#include <iostream>
int main() {
bool sub[30];
for (int i = 0; i < 30; i++)
sub[i] = false;
for (int i = 0; i < 28; i++) {
int d;
std::cin >> d;
sub[d] = true;
}
for (int i = 0; i < 30; i++) {
if (!sub[i])
std::cout << i << std::endl;
}
}
|
#include <iostream>
int main() {
bool sub[30];
for (int i = 0; i < 30; i++)
sub[i] = false;
for (int i = 0; i < 28; i++) {
int d;
std::cin >> d;
sub[d - 1] = true;
}
for (int i = 0; i < 30; i++) {
if (!sub[i])
std::cout << i + 1 << std::endl;
}
}
|
[["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 101
|
#include <stdio.h>
int main() {
long int list = 0;
int buf, i;
for (i = 0; 28 > i; i++) {
scanf("%d", &buf);
list |= 1 << buf - 1;
}
// printf("%d",list);
for (i = 0; 30 > i; i++) {
if (!(list & 1 << i))
printf("%d ", i + 1);
}
}
|
#include <stdio.h>
int main() {
long int list = 0;
int buf, i;
for (i = 0; 28 > i; i++) {
scanf("%d", &buf);
list |= 1 << buf - 1;
}
for (i = 0; 30 > i; i++) {
if (!(list & 1 << i))
printf("%d\n", i + 1);
}
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 90
|
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
const int max = 30;
vector<bool> ans(max, true);
for (int i = 0; i < max - 2; i++) {
int in;
cin >> in;
ans[--in] = false;
}
for (int i = 0; i < max; i++) {
if (ans[i])
cout << i << endl;
}
}
|
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
const int max = 30;
vector<bool> ans(max, true);
for (int i = 0; i < max - 2; i++) {
int in;
cin >> in;
ans[--in] = false;
}
for (int i = 0; i < max; i++) {
if (ans[i])
cout << i + 1 << endl;
}
}
|
[["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 94
|
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int s[31] = {0};
int a;
while (cin >> a)
s[a] = 1;
for (int i = 1; i <= 30; i++)
if (s[i] == 0)
cout << i << " ";
cout << endl;
return 0;
}
|
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int s[31] = {0};
int a;
while (cin >> a)
s[a] = 1;
for (int i = 1; i <= 30; i++)
if (s[i] == 0)
cout << i << endl;
return 0;
}
|
[["-", 8, 57, 64, 1, 0, 16, 12, 5, 0, 62], ["-", 8, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 7, 8, 57, 64, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151]]
| 1
| 78
|
#include <iostream>
#include <string>
using namespace std;
int main() {
bool submit[31] = {};
int n;
for (int i = 0; i < 28; ++i) {
cin >> n;
submit[n] = true;
}
for (int i = 1; i <= 30; ++i) {
if (submit[i]) {
cout << i << endl;
}
}
return 0;
}
|
#include <iostream>
#include <string>
using namespace std;
int main() {
bool submit[31] = {};
int n;
for (int i = 0; i < 28; ++i) {
cin >> n;
submit[n] = true;
}
for (int i = 1; i <= 30; ++i) {
if (!submit[i]) {
cout << i << endl;
}
}
return 0;
}
|
[["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
| 1
| 87
|
#include <iostream>
using namespace std;
int main() {
bool student[30];
int n;
for (int i = 0; i < 30; i++) {
student[i] = 0;
}
for (int i = 0; i < 30; i++) {
cin >> n;
student[n] = 1;
}
for (int i = 0; i < 30; i++) {
if (student[i] == 0)
cout << i << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
bool student[31];
int n;
for (int i = 0; i < 31; i++) {
student[i] = 0;
}
for (int i = 0; i < 28; i++) {
cin >> n;
student[n] = 1;
}
for (int i = 1; i < 31; i++) {
if (student[i] == 0)
cout << i << endl;
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
| 1
| 105
|
#include <iostream>
using namespace std;
int main() {
int a[30];
for (int i = 0; i <= 29; i++) {
a[i] = 0;
}
for (int ii = 1; ii <= 28; ii++) {
int n;
cin >> n;
a[n - 1] = 1;
}
for (int p = 0; p <= 29; p++) {
if (a[p - 1] == 0) {
cout << p - 1 << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int a[30];
for (int i = 0; i <= 29; i++) {
a[i] = 0;
}
for (int ii = 1; ii <= 28; ii++) {
int n;
cin >> n;
a[n - 1] = 1;
}
for (int p = 0; p <= 29; p++) {
if (a[p] == 0) {
cout << p + 1 << endl;
}
}
return 0;
}
|
[["-", 51, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
| 1
| 113
|
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(), in.end()
const double PI = acos(-1);
const double EPS = 1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main() {
vector<bool> in(31);
rep(i, 28) {
int a;
cin >> a;
in[a] = true;
}
loop(i, 1, 31) if (in[i]) cout << i << endl;
}
|
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(), in.end()
const double PI = acos(-1);
const double EPS = 1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main() {
vector<bool> in(31);
rep(i, 28) {
int a;
cin >> a;
in[a] = true;
}
loop(i, 1, 31) if (!in[i]) cout << i << endl;
}
|
[["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
| 1
| 143
|
#include <cstdio>
using namespace std;
bool count[30];
int main() {
for (int i = 0; i < 30; i++) {
count[i] = false;
}
for (int i = 0; i < 28; i++) {
int a;
scanf("%d", &a);
count[a - 1] = true;
}
for (int i = 0; i < 30; i++) {
if (count[i]) {
printf("%d\n", i + 1);
}
}
return 0;
}
|
#include <cstdio>
using namespace std;
bool count[30];
int main() {
for (int i = 0; i < 30; i++) {
count[i] = true;
}
for (int i = 0; i < 28; i++) {
int a;
scanf("%d", &a);
count[a - 1] = false;
}
for (int i = 0; i < 30; i++) {
if (count[i]) {
printf("%d\n", i + 1);
}
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 147], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 146], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 146], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 147]]
| 1
| 119
|
#include <stdio.h>
#define N 10
int main(void) {
int flg[N + 1];
int id;
for (int i = 1; i <= N; i++)
flg[i] = 0;
while (scanf("%d", &id) != EOF) {
flg[id] = 1;
}
for (int i = 1; i <= N; i++) {
if (flg[i] == 0)
printf("%d\n", i);
}
return 0;
}
|
#include <stdio.h>
#define N 30
int main(void) {
int flg[N + 1];
int id;
for (int i = 1; i <= N; i++)
flg[i] = 0;
while (scanf("%d", &id) != EOF) {
flg[id] = 1;
}
for (int i = 1; i <= N; i++) {
if (flg[i] == 0)
printf("%d\n", i);
}
return 0;
}
|
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]]
| 1
| 105
|
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#define MAX_N 100000000
using namespace std;
int main() {
int num[31] = {0};
int i;
int a;
for (int i = 1; i <= 28; i++) {
scanf("%d", &a);
num[a] = 1;
}
for (int i = 1; i <= 30; i++) {
if (num[i] != 0) {
printf("%d\n", i);
}
}
}
|
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#define MAX_N 100000000
using namespace std;
int main() {
int num[31] = {0};
int i;
int a;
for (int i = 1; i <= 28; i++) {
scanf("%d", &a);
num[a] = 1;
}
for (int i = 1; i <= 30; i++) {
if (num[i] == 0) {
printf("%d\n", i);
}
}
}
|
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
| 1
| 107
|
#include <algorithm>
#include <iostream>
#include <limits>
#include <vector>
bool table[100];
using namespace std;
int main(void) {
for (int i = 0; i < 28; i++) {
int buf;
cin >> buf;
table[buf] = true;
}
int i = 0;
for (; table[i]; i++)
;
cout << i++ << endl;
for (; table[i]; i++)
;
cout << i + 1 << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <limits>
#include <vector>
bool table[100];
using namespace std;
int main(void) {
for (int i = 0; i < 28; i++) {
int buf;
cin >> buf;
table[buf] = true;
}
int i = 1;
for (; table[i]; i++)
;
cout << i++ << endl;
for (; table[i]; i++)
;
cout << i << endl;
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 102
|
#include <iostream>
using namespace std;
int main() {
int num, a[32] = {};
for (int i = 0; i < 30; i++) {
cin >> num;
a[num] = 1;
}
for (int i = 1; i <= 30; i++) {
if (!a[i])
cout << a[i] << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int num, a[32] = {};
for (int i = 0; i < 28; i++) {
cin >> num;
a[num] = 1;
}
for (int i = 1; i <= 30; i++) {
if (!a[i])
cout << i << endl;
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 64, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73]]
| 1
| 86
|
#include <iostream>
using namespace std;
int a[30];
int main() {
int n, m = 28;
while (m--) {
cin >> n;
a[n]++;
}
for (int i = 0; i < 30; i++) {
if (a[i] == 0) {
cout << i << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int a[31];
int main() {
int n, m = 28;
while (m--) {
cin >> n;
a[n]++;
}
for (int i = 1; i <= 30; i++) {
if (a[i] == 0) {
cout << i << endl;
}
}
return 0;
}
|
[["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
| 1
| 78
|
#include <cstdio>
using namespace std;
int main() {
int a[28];
int b[30] = {};
for (int i = 0; i < 28; i++) {
scanf("%d", &a[i]);
}
for (int i = 0; i < 30; i++) {
for (int j = 0; j < 28; j++) {
if (i == a[j]) {
b[i] = 1;
}
}
}
for (int i = 0; i < 30; i++) {
if (b[i] == 0) {
printf("%d\n", i);
}
}
return 0;
}
|
#include <cstdio>
using namespace std;
int main() {
int a[28];
int b[30] = {};
for (int i = 0; i < 28; i++) {
scanf("%d", &a[i]);
}
for (int i = 0; i < 30; i++) {
for (int j = 0; j < 28; j++) {
if (i + 1 == a[j]) {
b[i] = 1;
}
}
}
for (int i = 0; i < 30; i++) {
if (b[i] == 0) {
printf("%d\n", i + 1);
}
}
return 0;
}
|
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 1
| 146
|
#include <iostream>
#define REP(i, a, n) for (int i = a; i < n; i++)
using namespace std;
int cnt[31];
int n;
int main(void) {
REP(i, 1, 30 + 1) { cnt[i] = 0; }
REP(i, 1, 28 + 1) {
cin >> n;
cnt[n] = 1;
}
REP(i, 1, 30 + 1) {
if (cnt[i] == 0) {
cout << n << endl;
}
}
return 0;
}
|
#include <iostream>
#define REP(i, a, n) for (int i = a; i < n; i++)
using namespace std;
int cnt[31];
int n;
int main(void) {
REP(i, 1, 30 + 1) { cnt[i] = 0; }
REP(i, 1, 28 + 1) {
cin >> n;
cnt[n] = 1;
}
REP(i, 1, 30 + 1) {
if (cnt[i] == 0) {
cout << i << endl;
}
}
return 0;
}
|
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
| 1
| 109
|
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> s(30);
for (int a = 0; a < 28; a++) {
int b;
cin >> b;
s.push_back(b - 1);
}
sort(s.begin(), s.end());
vector<int> d(0);
int f = 0;
for (int e = 0; e < 30; e++) {
if (s[e] != e + f) {
d.push_back(e);
if (f)
break;
f++;
}
}
sort(d.begin(), d.end());
cout << d[0] + 1 << endl << d[1] + 1 << endl;
}
|
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> s(0);
for (int a = 0; a < 28; a++) {
int b;
cin >> b;
s.push_back(b - 1);
}
sort(s.begin(), s.end());
vector<int> d(0);
int f = 0;
for (int e = 0; e < 30; e++) {
if (s[e] != e + f) {
d.push_back(e + f);
if (f)
break;
f++;
}
}
sort(d.begin(), d.end());
cout << d[0] + 1 << endl << d[1] + 1 << endl;
}
|
[["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]]
| 1
| 166
|
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
bool a[30];
int b;
int main() {
rep(i, 30) a[i] = false;
rep(i, 28) {
cin >> b;
a[b - 1] = true;
}
rep(i, 30) if (!a[i]) cout << i << endl;
return 0;
}
|
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
bool a[30];
int b;
int main() {
rep(i, 30) a[i] = false;
rep(i, 28) {
cin >> b;
a[b - 1] = true;
}
rep(i, 30) if (!a[i]) cout << i + 1 << endl;
return 0;
}
|
[["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 88
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int number[31], number2;
for (int i = 1; i <= 30; i++) {
number[i] = i;
}
for (int i = 1; i <= 28; i++) {
cin >> number2;
for (int j = 1; j <= 30; j++) {
if (number[j] == number2) {
number[j] = 0;
}
}
}
sort(number + 1, number + 31, greater<int>());
cout << number[2] << " " << number[1] << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int number[31], number2;
for (int i = 1; i <= 30; i++) {
number[i] = i;
}
for (int i = 1; i <= 28; i++) {
cin >> number2;
for (int j = 1; j <= 30; j++) {
if (number[j] == number2) {
number[j] = 0;
}
}
}
sort(number + 1, number + 31, greater<int>());
cout << number[2] << endl;
cout << number[1] << endl;
return 0;
}
|
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22]]
| 1
| 138
|
#include <iostream>
using namespace std;
int main() {
int i, a[31] = {0}, s;
for (i = 0; i < 28; i++) {
cin >> s;
a[s] = 1;
}
for (i = 0; i < 31; i++) {
if (a[i] == 0) {
cout << i + 1 << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int i, a[31] = {0}, s;
for (i = 0; i < 28; i++) {
cin >> s;
a[s] = 1;
}
for (i = 1; i < 31; i++) {
if (a[i] == 0) {
cout << i << endl;
}
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 89
|
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
typedef long long int ll;
using namespace std;
#define FOR(i, a, n) for (int i = (ll)a; i < (ll)n; ++i)
#define TFOR(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define ipair pair<int, int>
const int INF = 1LL << 30;
const ll LLINF = 1LL << 60;
int main() {
bitset<30> b;
TFOR(i, 28) {
int n;
cin >> n;
b[n - 1] = 1;
}
TFOR(i, 30) {
if (!b[i])
cout << i << endl;
}
return 0;
}
|
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
typedef long long int ll;
using namespace std;
#define FOR(i, a, n) for (int i = (ll)a; i < (ll)n; ++i)
#define TFOR(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define ipair pair<int, int>
const int INF = 1LL << 30;
const ll LLINF = 1LL << 60;
int main() {
bitset<30> b = {};
TFOR(i, 28) {
int n;
cin >> n;
b[n - 1] = 1;
}
TFOR(i, 30) {
if (!b[i])
cout << i + 1 << endl;
}
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 46], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 156
|
#include <algorithm>
#include <iostream>
int main() {
bool a[31];
int input;
for (int i = 0; i < 31; ++i) {
a[i] = false;
}
for (int i = 0; i < 28; ++i) {
std::cin >> input;
a[input] = true;
}
for (int i = 1; i < 31; ++i) {
if (a[i] == false) {
std::cout << i + 1 << std::endl;
}
}
return 0;
}
|
#include <algorithm>
#include <iostream>
int main() {
bool a[31];
int input;
for (int i = 0; i < 31; ++i) {
a[i] = false;
}
for (int i = 0; i < 28; ++i) {
std::cin >> input;
a[input] = true;
}
for (int i = 1; i < 31; ++i) {
if (a[i] == false) {
std::cout << i << std::endl;
}
}
return 0;
}
|
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 113
|
#include <algorithm>
#include <iostream>
int main() {
int n[30];
bool a[30] = {};
for (int i = 0; i < 30; ++i) {
n[i] = i + 1;
}
for (int i = 0; i < 28; ++i) {
int t;
std::cin >> t;
for (int j = 0; j < 30; ++j) {
if (t == n[j])
a[i] = true;
}
}
for (int i = 0; i < 30; ++i) {
if (!a[i]) {
std::cout << i + 1 << std::endl;
}
}
}
|
#include <algorithm>
#include <iostream>
int main() {
int n[30];
bool a[30] = {};
for (int i = 0; i < 30; ++i) {
n[i] = i + 1;
}
for (int i = 0; i < 28; ++i) {
int t;
std::cin >> t;
for (int j = 0; j < 30; ++j) {
if (t == n[j])
a[j] = true;
}
}
for (int i = 0; i < 30; ++i) {
if (!a[i]) {
std::cout << i + 1 << std::endl;
}
}
return 0;
}
|
[["-", 64, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 64, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
| 1
| 145
|
#include <algorithm>
#include <stdio.h>
using namespace std;
int seki[30];
int main() {
int buf;
int ans[2];
for (int a = 0; a < 28; a++) {
scanf("%d", &buf);
seki[buf] = 1;
}
for (int a = 0; a < 30; a++) {
if (seki[a] == 0) {
ans[0] = a + 1;
break;
}
}
for (int a = ans[0]; a < 30; a++) {
if (seki[a] == 0) {
ans[1] = a + 1;
break;
}
}
printf("%d %d\n", ans[0], ans[1]);
return 0;
}
|
#include <algorithm>
#include <stdio.h>
using namespace std;
int seki[30];
int main() {
int buf;
int ans[2];
for (int a = 0; a < 28; a++) {
scanf("%d", &buf);
seki[buf - 1] = 1;
}
for (int a = 0; a < 30; a++) {
if (seki[a] == 0) {
ans[0] = a + 1;
break;
}
}
for (int a = ans[0]; a < 30; a++) {
if (seki[a] == 0) {
ans[1] = a + 1;
break;
}
}
printf("%d\n%d\n", ans[0], ans[1]);
return 0;
}
|
[["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 162
|
#include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int a[30], t;
r(i, 30) a[i] = 0;
r(i, 28) {
cin >> t;
a[t]++;
}
r(i, 30) if (!a[i]) cout << i + 1 << endl;
}
|
#include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int a[30], t;
r(i, 30) a[i] = 0;
r(i, 28) {
cin >> t;
a[t - 1]++;
}
r(i, 30) if (!a[i]) cout << i + 1 << endl;
}
|
[["+", 0, 27, 28, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 27, 28, 69, 341, 342, 0, 16, 12, 13]]
| 1
| 83
|
#include <stdio.h>
int main() {
int a[31] = {0}, n, i;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n] = a[n] + 1;
}
for (i = 0; i < 30; i++) {
if (a[i] != 1) {
printf("%d\n", i);
}
}
}
|
#include <stdio.h>
int main() {
int a[31] = {0}, n, i;
for (i = 0; i < 28; i++) {
scanf("%d", &n);
a[n] = a[n] + 1;
}
for (i = 1; i < 31; i++) {
if (a[i] != 1) {
printf("%d\n", i);
}
}
}
|
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 1
| 95
|
#include <iostream>
using namespace std;
int main(void) {
int a, b, c[31] = {0}, d, e;
for (a = 0; a < 28; a++) {
cin >> b;
c[b] = 1;
}
for (a = 1; a < 31; a++) {
if (c[a] != 1) {
cout << c[a] << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int main(void) {
int a, b, c[31] = {0}, d, e;
for (a = 0; a < 28; a++) {
cin >> b;
c[b] = 1;
}
for (a = 1; a < 31; a++) {
if (c[a] != 1) {
cout << a << endl;
}
}
return 0;
}
|
[["-", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73]]
| 1
| 95
|
#include <stdio.h>
int main() {
bool sub[30] = {};
for (int i = 0; i < 28; i++) {
int n;
scanf("%d", &n);
sub[n - 1] = true;
}
for (int i = 0; i < 30; i++) {
if (!sub[i])
printf("%d?\n", i + 1);
}
return 0;
}
|
#include <stdio.h>
int main() {
bool sub[30] = {};
for (int i = 0; i < 28; i++) {
int n;
scanf("%d", &n);
sub[n - 1] = true;
}
for (int i = 0; i < 30; i++) {
if (!sub[i])
printf("%d\n", i + 1);
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 94
|
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int n;
int a[100] = {0};
for (int i = 0; i < 28; i++) {
cin >> n;
a[n] = 1;
}
for (int i = 0; i < 30; i++) {
if (a[i] == 0) {
cout << i << endl;
}
}
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int n;
int a[100] = {0};
for (int i = 1; i <= 28; i++) {
cin >> n;
a[n] = 1;
}
for (int i = 1; i <= 30; i++) {
if (a[i] == 0) {
cout << i << endl;
}
}
return 0;
}
|
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
| 1
| 96
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.