Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p00027
#include <cstdio> #include <iostream> int main(int argc, const char *argv[]) { int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int m, d; while (scanf("%d %d", &m, &d) != 0) { int cnt = 0; if (m == 0 && d == 0) { return 0; } for (int i = 0; i < m - 1; i++) { cnt += mo...
#include <cstdio> #include <iostream> int main(int argc, const char *argv[]) { int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int m, d; while (scanf("%d %d", &m, &d) != 0) { int cnt = 0; if (m == 0 && d == 0) { return 0; } for (int i = 0; i < m - 1; i++) { cnt += mo...
[ "assignment.value.change", "variable_access.subscript.index.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
20,848
20,847
u991779216
cpp
p00027
#include <stdio.h> int main() { int m, d; int i; int Days; while (1) { Days = 0; scanf("%d %d", &m, &d); if (m == 0 && d == 0) break; for (i = 1, Days += d; i < m; i++) { if (i == 2) { Days += 29; } else if (i == 4 || i == 6 || i == 9 || i == 11) { Days += 30...
#include <stdio.h> int main() { int m, d; int i; int Days; while (1) { Days = 0; scanf("%d %d", &m, &d); if (m == 0 && d == 0) break; for (i = 1, Days += d; i < m; i++) { if (i == 2) { Days += 29; } else if (i == 4 || i == 6 || i == 9 || i == 11) { Days += 30...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
20,849
20,850
u763657463
cpp
p00027
#include <iostream> using namespace std; int main() { int mth[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; char wks[][16] = {"Wedneday", "Thursday", "Friday", "Suturday", "Sunday", "Monday", "Tuesday"}; int m, d; while (cin >> m >> d, m) { int days = 0; for (int i ...
#include <iostream> using namespace std; int main() { int mth[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; char wks[][16] = {"Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"}; int m, d; while (cin >> m >> d, m) { int days = 0; for (int ...
[ "literal.string.change" ]
20,851
20,852
u238665355
cpp
p00027
#include <iostream> using namespace std; int main() { int mth[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; char wks[][16] = {"Wedneday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"}; int m, d; while (cin >> m >> d, m) { int days = 0; for (int i ...
#include <iostream> using namespace std; int main() { int mth[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; char wks[][16] = {"Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"}; int m, d; while (cin >> m >> d, m) { int days = 0; for (int ...
[ "literal.string.change" ]
20,853
20,852
u238665355
cpp
p00027
#include <iostream> #include <string> using namespace std; int month[] = {31, 29, 31, 30, 31, 31, 30, 31, 31, 30, 31, 30, 31}; string date[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; int main() { int M, D; while (cin >> M >> D, M) { int d = 3; for...
#include <iostream> #include <string> using namespace std; int month[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; string date[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; int main() { int M, D; while (cin >> M >> D, M) { int d = 3; for (in...
[]
20,854
20,855
u879745691
cpp
p00028
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iostream> #include <iterator> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <string> #include <time.h> #include <vector> using namespace std; #define FOR(I, F, N) for (int I = F; I < (int...
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iostream> #include <iterator> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <string> #include <time.h> #include <vector> using namespace std; #define FOR(I, F, N) for (int I = F; I < (int...
[ "call.arguments.change" ]
20,915
20,916
u092829549
cpp
p00028
#include <iostream> using namespace std; int main() { int n, max = 0; int s[101] = {0}; while (cin >> n) { s[n]++; } for (int i = 0; i <= 101; i++) { if (max < s[i]) max = s[i]; } for (int i = 0; i <= 101; i++) { if (max == s[i]) cout << i << endl; } }
#include <iostream> using namespace std; int main() { int n, max = 0; int s[101] = {0}; while (cin >> n) { s[n]++; } for (int i = 0; i < 101; i++) { if (max < s[i]) max = s[i]; } for (int i = 0; i < 101; i++) { if (max == s[i]) cout << i << endl; } }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
20,917
20,918
u681511075
cpp
p00028
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int a[100]; int main(void) { int n; int max = 0; for (int i = 0; i < 100; i++) a[i] = 0; while (scanf("%d", &n) != EOF) { a[n]++; } for (int i = 0; i < 100; i++) { if (a[i] > max) max = a[i]; } for (int ...
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int a[100]; int main(void) { int n; int max = 0; for (int i = 0; i < 100; i++) a[i] = 0; while (scanf("%d", &n) != EOF) { a[n]++; } for (int i = 0; i < 100; i++) { if (a[i] > max) max = a[i]; } for (int...
[ "assignment.change" ]
20,921
20,922
u496999590
cpp
p00028
#include <bits/stdc++.h> using namespace std; int main() { int t[101] = {}, tmp, k = 0, i; while (cin >> tmp) { t[tmp + 1]++; if (t[tmp] > k) { k = t[tmp]; } } for (i = 1; i <= 101; i++) { if (t[i] == k) { cout << i - 1 << endl; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int t[102] = {}, tmp, k = 0, i; while (cin >> tmp) { t[tmp + 1]++; if (t[tmp + 1] > k) { k = t[tmp + 1]; } } for (i = 1; i <= 102; i++) { if (t[i] == k) { cout << i - 1 << endl; } } return 0; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.branch.if.condition.change", "assignment.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
20,932
20,933
u399801521
cpp
p00028
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
[]
20,937
20,938
u261561433
cpp
p00028
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; int main(void) { int n, a[101], m = 0; rep(i, 1, 101) { a[i] = 0; } while (cin >> n) { a[n]++; } rep(i, 1, 101) { if (m...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; int main(void) { int n, a[101], m = 0; rep(i, 1, 101) { a[i] = 0; } while (cin >> n) { a[n]++; } rep(i, 1, 101) { if (m...
[]
20,950
20,951
u214278145
cpp
p00028
#include <algorithm> #include <iostream> using namespace std; int main() { int n, m; int a[10] = {0}; while (cin >> n) a[n - 1]++; m = *max_element(a, a + 10); for (int i = 0; i < 10; i++) { if (m == a[i]) cout << i + 1 << endl; } return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int n, m; int a[100] = {0}; while (cin >> n) a[n - 1]++; m = *max_element(a, a + 100); for (int i = 0; i < 100; i++) { if (m == a[i]) cout << i + 1 << endl; } return 0; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.for.condition.change" ]
20,952
20,953
u268155858
cpp
p00028
#include <algorithm> #include <iostream> using namespace std; int main() { int n, m; int a[100] = {0}; while (cin >> n) a[n - 1]++; m = *max_element(a, a + 100); for (int i = 0; i < 10; i++) { if (m == a[i]) cout << i + 1 << endl; } return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int n, m; int a[100] = {0}; while (cin >> n) a[n - 1]++; m = *max_element(a, a + 100); for (int i = 0; i < 100; i++) { if (m == a[i]) cout << i + 1 << endl; } return 0; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
20,954
20,953
u268155858
cpp
p00028
#include <iostream> using namespace std; int main() { int count[101] = {0}; int a; while (cin >> a) count[a]++; int max_freq = 0; for (int i = 1; i <= 100; i++) { if (max_freq < count[i]) max_freq = count[i]; } for (int i = 1; i <= 100; i++) { if (count[i] == max_freq) cout << ...
#include <iostream> using namespace std; int main() { int count[101] = {0}; int a; while (cin >> a) count[a]++; int max_freq = 0; for (int i = 1; i <= 100; i++) { if (max_freq < count[i]) max_freq = count[i]; } for (int i = 1; i <= 100; i++) { if (count[i] == max_freq) cout << ...
[]
20,963
20,964
u296194591
cpp
p00028
#include <stdio.h> int main() { int i; int seed, max = 0; int data[100] = {0}; int maxnum[100]; while ((scanf("%d", &seed)) != EOF) { data[seed] += 1; } for (i = 0; i < 100; i++) { if (data[i] > max) max = data[i]; } for (i = 0; i < 100; i++) { if (data[i] == max) printf("%d\...
#include <stdio.h> int main() { int i; int seed, max = 0; int data[100] = {0}; int maxnum[100]; while ((scanf("%d", &seed)) != EOF) { data[seed - 1] += 1; } for (i = 0; i < 100; i++) { if (data[i] > max) max = data[i]; } for (i = 0; i < 100; i++) { if (data[i] == max) printf("...
[ "assignment.change" ]
20,967
20,968
u619400176
cpp
p00028
#include <iostream> using namespace std; int list[101]; int main() { int n, i, max = 101; while (cin >> n) { list[n] += 1; } for (i = 1; i < 101; i++) { if (list[i] >= max) max = list[i]; } for (i = 1; i < 101; i++) { if (list[i] == max) cout << i << endl; } }
#include <iostream> using namespace std; int list[101]; int main() { int n, i, max = 0; while (cin >> n) { list[n] += 1; } for (i = 1; i < 101; i++) { if (list[i] >= max) max = list[i]; } for (i = 1; i < 101; i++) { if (list[i] == max) cout << i << endl; } }
[ "literal.number.change", "variable_declaration.value.change" ]
20,972
20,973
u373832724
cpp
p00028
#include <bits/stdc++.h> using namespace std; static const int MAX_N = 100; int a[MAX_N]; int main(void) { for (int i = 0; i < MAX_N; i++) { a[i] = 0; } int input; while (scanf("%d", &input) != EOF) { a[input]++; } int max_a = 0; for (int i = 0; i < MAX_N; i++) { if (a[i] > max_a) ma...
#include <bits/stdc++.h> using namespace std; static const int MAX_N = 100; int a[MAX_N]; int main(void) { for (int i = 0; i <= MAX_N; i++) { a[i] = 0; } int input; while (scanf("%d", &input) != EOF) { a[input]++; } int max_a = 0; for (int i = 0; i < MAX_N; i++) { if (a[i] > max_a) m...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "call.arguments.change" ]
20,976
20,977
u327125861
cpp
p00028
#include <stdio.h> int main() { int v, b[100] = {0}, c = 0; while (scanf("%d", &v) != EOF) { b[v - 1] += v; } for (int i = 0; i < 100; i++) { if (b[i] > c) { c = b[i]; } } for (int i = 0; i < 100; i++) { if (c == b[i]) { printf("%d\n", i + 1); } } return 0; }
#include <stdio.h> int main() { int v, b[100] = {0}, c = 0; while (scanf("%d", &v) != EOF) { b[v - 1] += 1; } for (int i = 0; i < 100; i++) { if (b[i] > c) { c = b[i]; } } for (int i = 0; i < 100; i++) { if (c == b[i]) { printf("%d\n", i + 1); } } return 0; }
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add" ]
20,978
20,979
u726704931
cpp
p00028
#include <iostream> int main() { int a, c = 0, t = 0; int b[101], f[101], z[101], x[101]; z[0] = 0; while (std::cin >> a) { c++; b[c] = a; } for (int g = 1; g <= 100; g++) { f[g] = 0; z[g] = 0; } for (int d = 1; d <= c; d++) { f[b[d]]++; } for (int g = 1; g <= 100; g++) { ...
#include <iostream> int main() { int a, c = 0, t = 0; int b[101], f[101], z[101], x[101]; z[0] = 0; while (std::cin >> a) { c++; b[c] = a; } for (int g = 1; g <= 100; g++) { f[g] = 0; z[g] = 0; } for (int d = 1; d <= c; d++) { f[b[d]]++; } for (int g = 1; g <= 100; g++) { ...
[ "identifier.change", "expression.operation.binary.change" ]
20,980
20,981
u691200007
cpp
p00028
#include <iostream> using namespace std; int main() { int datas[100] = {0}; int num, biggest_num = 0; while (cin >> num) { datas[num + 1]++; } for (int i = 0; i < 100; i++) { if (biggest_num < datas[i]) { biggest_num = datas[i]; } } for (int i = 0; i < 100; i++) { if (biggest_num ==...
#include <iostream> using namespace std; int main() { int datas[100] = {0}; int num, biggest_num = 0; while (cin >> num) { datas[num - 1]++; } for (int i = 0; i < 100; i++) { if (biggest_num < datas[i]) { biggest_num = datas[i]; } } for (int i = 0; i < 100; i++) { if (biggest_num ==...
[ "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
20,982
20,983
u506705885
cpp
p00028
#include <iostream> using namespace std; int main(void) { int n = 0, i, a[100], b[100] = {}; while (cin >> i) a[n++] = i; for (int i = 0; i < n; ++i) ++b[a[i]]; int max = 0; for (int i = 1; i <= 100; ++i) if (b[i] > max) max = b[i]; for (int i = 1; i <= 100; ++i) if (max == b[i]) ...
#include <iostream> using namespace std; int main(void) { int n = 0, i, a[100], b[101] = {}; while (cin >> i) a[n++] = i; for (int i = 0; i < n; ++i) ++b[a[i]]; int max = 0; for (int i = 1; i <= 100; ++i) if (b[i] > max) max = b[i]; for (int i = 1; i <= 100; ++i) if (max == b[i]) ...
[ "literal.number.change", "variable_declaration.array_dimensions.change" ]
20,984
20,985
u322168578
cpp
p00028
#include <iostream> int main() { int l[9999], i, f; for (i = 0; i < 999; i++) l[i] = 0; while (std::cin >> i) l[i - 1]++; for (i = 0, f = 0; i < 9999; i++) if (f < l[i]) f = l[i]; for (i = 0; i < 9999; i++) if (l[i] == f) std::cout << i + 1 << "\n"; }
#include <iostream> int main() { int l[99999], i, f; for (i = 0; i < 99999; i++) l[i] = 0; while (std::cin >> i) l[i - 1]++; for (i = 0, f = 0; i < 99999; i++) if (f < l[i]) f = l[i]; for (i = 0; i < 99999; i++) if (l[i] == f) std::cout << i + 1 << "\n"; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
20,986
20,987
u835866094
cpp
p00028
#include <iostream> int main() { int l[9999], i, f; for (i = 0; i < 999; i++) l[i] = 0; while (std::cin >> i) l[i - 1]++; for (i = 0, f = 0; i < 9999; i++) if (f < l[i]) f = l[i]; for (i = 0; i < 9999; i++) if (l[i] == f) std::cout << i + 1 << "\n"; }
#include <iostream> int main() { int l[999], i, f; for (i = 0; i < 999; i++) l[i] = 0; while (std::cin >> i) l[i - 1]++; for (i = 0, f = 0; i < 999; i++) if (f < l[i]) f = l[i]; for (i = 0; i < 999; i++) if (l[i] == f) std::cout << i + 1 << "\n"; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
20,986
20,988
u835866094
cpp
p00028
#include <iostream> int main() { int l[9999], i, f; for (i = 0; i < 999; i++) l[i] = 0; while (std::cin >> i) l[i - 1]++; for (i = 0, f = 0; i < 9999; i++) if (f < l[i]) f = l[i]; for (i = 0; i < 9999; i++) if (l[i] == f) std::cout << i + 1 << "\n"; }
#include <iostream> int main() { int l[99], i, f; for (i = 0; i < 99; i++) l[i] = 0; while (std::cin >> i) l[i - 1]++; for (i = 0, f = 0; i < 99; i++) if (f < l[i]) f = l[i]; for (i = 0; i < 99; i++) if (l[i] == f) std::cout << i + 1 << "\n"; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
20,986
20,989
u835866094
cpp
p00028
#include <iostream> #include <stdlib.h> using namespace std; int main(int argc, char **argv) { int tmp; int *array = (int *)calloc(10, sizeof(int)); while (cin >> tmp) { array[tmp]++; } tmp = 0; for (int i = 0; i < 10; i++) { if (tmp < array[i]) { tmp = array[i]; } } for (int i = ...
#include <iostream> #include <stdlib.h> using namespace std; int main(int argc, char **argv) { int tmp; int *array = (int *)calloc(1000, sizeof(int)); while (cin >> tmp) { array[tmp]++; } tmp = 0; for (int i = 0; i < 1000; i++) { if (tmp < array[i]) { tmp = array[i]; } } for (int ...
[ "literal.number.change", "call.arguments.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
20,990
20,991
u529013669
cpp
p00028
#include <algorithm> #include <iostream> using namespace std; int main() { int input = 0; int a[100]; int b[100][2]; for (int i = 0; i < 100; i++) { for (int j = 0; j < 2; j++) { b[i][j] = 0; } } int n = 0; while (cin >> input) { a[n] = input; n++; } sort(a, a + n); int i = 0...
#include <algorithm> #include <iostream> using namespace std; int main() { int input = 0; int a[100]; int b[100][2]; for (int i = 0; i < 100; i++) { for (int j = 0; j < 2; j++) { b[i][j] = 0; } } int n = 0; while (cin >> input) { a[n] = input; n++; } sort(a, a + n); int i = 0...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
20,994
20,995
u918188633
cpp
p00028
#include <cstring> #include <iostream> #include <vector> using namespace std; int bucket[101]; int ma = 0; int main() { int a; memset(bucket, 0, sizeof(bucket)); while (cin >> a, !cin.eof()) { cin >> a; bucket[a]++; ma = max(bucket[a], ma); } for (int i = 0; i < 101; i++) { if (bucket[i...
#include <cstring> #include <iostream> #include <vector> using namespace std; int bucket[101]; int ma = 0; int main() { int a; memset(bucket, 0, sizeof(bucket)); while (cin >> a, !cin.eof()) { bucket[a]++; ma = max(bucket[a], ma); } for (int i = 0; i < 101; i++) { if (bucket[i] == ma) ...
[]
20,998
20,999
u012934318
cpp
p00028
#include <iostream> using namespace std; int main(void) { int n; int a[10] = {0}; while (cin >> n) { a[n]++; } int max = 0; for (int i = 0; i < 10; i++) { if (a[i] > max) { max = a[i]; } } for (int i = 0; i < 10; i++) { if (a[i] == max) { cout << i << endl; } } retu...
#include <iostream> using namespace std; int main(void) { int n; int a[101] = {0}; while (cin >> n) { a[n]++; } int max = 0; for (int i = 0; i < 101; i++) { if (a[i] > max) { max = a[i]; } } for (int i = 0; i < 101; i++) { if (a[i] == max) { cout << i << endl; } } r...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
21,004
21,005
u174233867
cpp
p00028
#include <algorithm> #include <iostream> using namespace std; int main() { int a[101] = {0}; int input; while (cin >> input) { a[input]++; int m = 0; for (int i = 1; i < 101; i++) { if (m < a[i]) m = a[i]; // m = max(m, a[i]); } for (int i = 1; i < 101; i++) { if (m =...
#include <algorithm> #include <iostream> using namespace std; int main() { int a[101] = {0}; int input; while (cin >> input) { a[input]++; } int m = 0; for (int i = 1; i < 101; i++) { if (m < a[i]) m = a[i]; // m = max(m, a[i]); } for (int i = 1; i < 101; i++) { if (m == a[i]) { ...
[]
21,008
21,009
u171548894
cpp
p00028
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { int counter[10] = {0}; int a; int MAX = 0; int i = 0; while (cin >> a) { counter[a]++; } for (int j = 1; j < 10; j++) { MAX = max(MAX, counter[j]); } for (int k = 1; k < 10; k++) { if (MAX == c...
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { int counter[101] = {0}; int a; int MAX = 0; int i = 0; while (cin >> a) { counter[a]++; } for (int j = 1; j < 101; j++) { MAX = max(MAX, counter[j]); } for (int k = 1; k < 101; k++) { if (MAX =...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
21,012
21,013
u278285028
cpp
p00028
#include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <utility> using namespace std; int main() { map<int, int> iData; int iBuff, maxCount, maxElement[100]; pair<map<int, int>::iterator, bool> flag; while (cin >> iBuff) { flag = iData.insert(map<int, int>::value_type(iBuff, 1)...
#include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <utility> using namespace std; int main() { map<int, int> iData; int iBuff, maxCount = 0, maxElement[100]; pair<map<int, int>::iterator, bool> flag; while (cin >> iBuff) { flag = iData.insert(map<int, int>::value_type(iBuff...
[ "variable_declaration.value.change" ]
21,015
21,016
u092465441
cpp
p00028
#include <iostream> using namespace std; int main() { int a[105] = {}, b, c = 0; while (cin >> b) { a[b]++; } for (int i = 0; i < 101; i++) { if (c < a[b]) { c = a[b]; } } for (int i = 0; i < 101; i++) { if (a[b] == c) cout << b << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a[105] = {}, b, c = 0; while (cin >> b) { a[b]++; } for (int i = 0; i < 101; i++) { if (c < a[i]) { c = a[i]; } } for (int i = 0; i < 101; i++) { if (a[i] == c) cout << i << endl; } return 0; }
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "assignment.value.change", "io.output.change" ]
21,163
21,164
u341761787
cpp
p00028
//↓template↓ #include "bits/stdc++.h" using namespace std; #define Would #define you #define all(n) n.begin(), n.end() const long long INF = 1e18; const long long MOD = 1e9 + 7; const double pi = acos(-1); const int SIZE = 1 << 17; int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}, alp[30]; long long fac[200005], finv[20...
//↓template↓ #include "bits/stdc++.h" using namespace std; #define Would #define you #define all(n) n.begin(), n.end() const long long INF = 1e18; const long long MOD = 1e9 + 7; const double pi = acos(-1); const int SIZE = 1 << 17; int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}, alp[30]; long long fac[200005], finv[20...
[ "expression.operation.binary.remove" ]
21,165
21,166
u861198832
cpp
p00028
#include <iostream> #include <vector> using namespace std; int main() { vector<int> Times(101, 0); int x; while (cin >> x) { cin >> x; Times[x] += 1; } int ma = -1; for (int x = 1; x <= 100; x++) { if (ma < Times[x]) ma = Times[x]; } for (int x = 1; x <= 100; x++) { if (Times[x...
#include <iostream> #include <vector> using namespace std; int main() { vector<int> Times(101, 0); int x; while (cin >> x) { Times[x] += 1; } int ma = -1; for (int x = 1; x <= 100; x++) { if (ma < Times[x]) ma = Times[x]; } for (int x = 1; x <= 100; x++) { if (Times[x] == ma) ...
[]
21,167
21,168
u582754609
cpp
p00026
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #de...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #de...
[ "literal.number.change" ]
21,179
21,180
u505648358
cpp
p00026
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() {...
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() {...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
21,181
21,182
u270308012
cpp
p00026
#include <algorithm> #include <cstring> #include <iostream> #include <vector> using namespace std; int sdy[] = {-1, 0, 0, 1}; int sdx[] = {0, -1, 1, 0}; int mdy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1}; int mdx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; int ldy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1, 2, 0, 0, -2}; int ldx[] = {-1, 0, ...
#include <algorithm> #include <cstring> #include <iostream> #include <vector> using namespace std; int sdy[] = {-1, 0, 0, 1, 0}; int sdx[] = {0, -1, 1, 0, 0}; int mdy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1}; int mdx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; int ldy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1, 2, 0, 0, -2}; int ldx[] = {-...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
21,183
21,184
u266871004
cpp
p00026
#include <algorithm> #include <cstring> #include <iostream> #include <vector> using namespace std; int sdy[] = {-1, 0, 0, 1, 0}; int sdx[] = {0, -1, 1, 0, 0}; int mdy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1}; int mdx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; int ldy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1, 2, 0, 0, -2}; int ldx[] = {-...
#include <algorithm> #include <cstring> #include <iostream> #include <vector> using namespace std; int sdy[] = {-1, 0, 0, 1, 0}; int sdx[] = {0, -1, 1, 0, 0}; int mdy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1}; int mdx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; int ldy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1, 2, 0, 0, -2}; int ldx[] = {-...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
21,185
21,184
u266871004
cpp
p00026
#include <iostream> using namespace std; int main() { int cell[10][10] = {{0}}, x, y, size, i, j, max = 0, num = 0; char c; while (1) { cin >> x; if (cin.eof()) break; cin >> c >> y >> c >> size; switch (size) { case 1: for (i = y - 1; i <= y + 1; i++) { for (j = ((i == y -...
#include <iostream> using namespace std; int main() { int cell[10][10] = {{0}}, x, y, size, i, j, max = 0, num = 0; char c; while (1) { cin >> x; if (cin.eof()) break; cin >> c >> y >> c >> size; switch (size) { case 1: for (i = y - 1; i <= y + 1; i++) { for (j = ((i == y -...
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
21,190
21,191
u211630862
cpp
p00026
#include <iostream> using namespace std; main() { int map[10][10]; int x, y, size; // initialize for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { map[i][j] = 0; } } int white = 0, Max = 0; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { if (size == 1) { if (y >= ...
#include <iostream> using namespace std; main() { int map[10][10]; int x, y, size; // initialize for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { map[i][j] = 0; } } int white = 0, Max = 0; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { if (size == 1) { if (y >= ...
[ "io.output.change" ]
21,192
21,193
u125634664
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; int board[10][10]; void fill(int x, int y) { if (0 <= x && x < 10 && 0 <= y && y < 10) { board[y][x]++; } } int main() { int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) + 1) { if (size >= 1) { // small fill(x, y); fill(x +...
#include <cstdio> #include <iostream> using namespace std; int board[10][10]; void fill(int x, int y) { if (0 <= x && x < 10 && 0 <= y && y < 10) { board[y][x]++; } } int main() { int x, y, size; while (~scanf("%d,%d,%d", &x, &y, &size)) { if (size >= 1) { // small fill(x, y); fill(x + 1,...
[ "expression.operation.unary.add", "control_flow.loop.condition.change", "expression.operation.binary.remove", "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
21,194
21,195
u905192001
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y, t; int field[30][30] = {0}; for (;;) { if (scanf("%d,%d,%d", &x, &y, &t) == EOF) { break; } field[x + 10][y + 10]++; field[x + 9][y + 10]++; field[x + 11][y + 10]++; field[x + 10][y + 9]++; field[x ...
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y, t; int field[30][30] = {0}; for (;;) { if (scanf("%d,%d,%d", &x, &y, &t) == EOF) { break; } field[x + 10][y + 10]++; field[x + 9][y + 10]++; field[x + 11][y + 10]++; field[x + 10][y + 9]++; field[x ...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
21,200
21,201
u712500775
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; int main() { int board[10][10] = {0}; fill(board[0], board[0] + 10 * 10, 0); const int INK[3][14][2] = {{{6}, {0, -1}, {-1, 0}, {0, 0}, {1, 0}, {0, 1}}, {{10}, {-1, -1}, ...
#include <cstdio> #include <iostream> using namespace std; int main() { int board[10][10] = {0}; fill(board[0], board[0] + 10 * 10, 0); const int INK[3][14][2] = {{{6}, {0, -1}, {-1, 0}, {0, 0}, {1, 0}, {0, 1}}, {{10}, {-1, -1}, ...
[ "expression.operation.unary.arithmetic.remove" ]
21,202
21,203
u256940798
cpp
p00026
#include <stdio.h> int main() { int RB[10][10], i, j, k; for (i = 0; i < 10; i++) for (j = 0; j < 10; RB[i][j++] = 0) ; while (scanf("%d,%d,%d", &i, &j, &k) != EOF) { RB[i][j]++; if (i) RB[i - 1][j]++; if (i < 9) RB[i + 1][j]++; if (j) RB[i][j - 1]++; if (j < 9) ...
#include <stdio.h> int main() { int RB[10][10], i, j, k; for (i = 0; i < 10; i++) for (j = 0; j < 10; RB[i][j++] = 0) ; while (scanf("%d,%d,%d", &i, &j, &k) != EOF) { RB[i][j]++; if (i) RB[i - 1][j]++; if (i < 9) RB[i + 1][j]++; if (j) RB[i][j - 1]++; if (j < 9) ...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
21,204
21,205
u920785236
cpp
p00026
#include <iostream> using namespace std; int main() { int grid[14][14]; int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}}; int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}}; int x, y, size; int i, j; int max = 0; int blank; char comma; for (i = 0; i...
#include <iostream> using namespace std; int main() { int grid[14][14]; int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}}; int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}}; int x, y, size; int i, j; int max = 0; int blank = 0; char comma; for (i = ...
[ "variable_declaration.value.change", "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
21,206
21,207
u716038039
cpp
p00026
#include <iostream> using namespace std; int main() { int grid[14][14]; int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}}; int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}}; int x, y, size; int i, j; int max = 0; int blank = 0; char comma; for (i = ...
#include <iostream> using namespace std; int main() { int grid[14][14]; int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}}; int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}}; int x, y, size; int i, j; int max = 0; int blank = 0; char comma; for (i = ...
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
21,208
21,207
u716038039
cpp
p00026
#include <iostream> using namespace std; int main() { int grid[14][14]; int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}}; int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}}; int x, y, size; int i, j; int max = 0; int blank = 0; char comma; for (i = ...
#include <iostream> using namespace std; int main() { int grid[14][14]; int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}}; int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}}; int x, y, size; int i, j; int max = 0; int blank = 0; char comma; for (i = ...
[]
21,209
21,207
u716038039
cpp
p00026
#include <iostream> #include <stdio.h> using namespace std; int main() { int dec[10][10]; int x, y, size, num, max; char a; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { dec[i][j] = 0; } } while (cin >> y >> a >> x >> a >> size) { if (size == 1) { if (x + 1 < 10 && x...
#include <iostream> #include <stdio.h> using namespace std; int main() { int dec[10][10]; int x, y, size, num, max; char a; num = 0; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { dec[i][j] = 0; } } while (cin >> y >> a >> x >> a >> size) { if (size == 1) { if (x + ...
[ "assignment.add" ]
21,210
21,211
u437614372
cpp
p00026
#include <iostream> #include <string> #include <vector> enum InkSize { small = 0, middle, large }; InkSize Next(int x) { if (x < 0 || 2 < x) { std::cout << "Input Error.\n"; return small; } const InkSize ink[3] = {small, middle, large}; return ink[x]; } struct Board { Board(int a) { for (siz...
#include <iostream> #include <string> #include <vector> enum InkSize { small = 0, middle, large }; InkSize Next(int x) { if (x < 0 || 2 < x) { std::cout << "Input Error.\n"; return small; } const InkSize ink[3] = {small, middle, large}; return ink[x]; } struct Board { Board(int a) { for (siz...
[ "literal.string.change", "expression.operation.binary.change" ]
21,212
21,213
u965222365
cpp
p00026
#include <cstdio> int ds[][2] = {{0, 0}, {1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}, {2, 0}, {0, 2}, {-2, 0}, {0, -2}}; int map[10][10], kosa, rest = 100; int max(int a, int b) { return a > b ? a : b; } int drop(int x, int y) { if (x >= 0 && x < 10 && y >= 0 && y < 10) ...
#include <cstdio> int ds[][2] = {{0, 0}, {1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}, {2, 0}, {0, 2}, {-2, 0}, {0, -2}}; int map[10][10], kosa, rest = 100; int max(int a, int b) { return a > b ? a : b; } int drop(int x, int y) { if (x >= 0 && x < 10 && y >= 0 && y < 10) ...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
21,214
21,215
u746184552
cpp
p00026
#include <iostream> #include <stdio.h> int paper[10][10]; int vecx[] = {0, 1, 0, -1}, vecy[] = {-1, 0, 1, 0}; int main() { int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { switch (size) { case 1: paper[x][y]++; for (int i = 0; i < 4; i++) { int nx = x + vecx[i], ny = ...
#include <iostream> #include <stdio.h> int paper[10][10]; int vecx[] = {0, 1, 0, -1}, vecy[] = {-1, 0, 1, 0}; int main() { int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { switch (size) { case 1: paper[x][y]++; for (int i = 0; i < 4; i++) { int nx = x + vecx[i], ny = ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
21,216
21,217
u450407555
cpp
p00026
#include <cstring> #include <iostream> using namespace std; int f[10][10]; void solve() {} int dx[] = {1, 0, -1, 1, 1, 1, -1, -1, 2, 0, -2, 0}; int dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2}; int cnt, d; void ink(int x, int y, int s) { for (int i = 0; i < 4 * s; i++) { int nx = dx[i] + x; int ny = dy[i]...
#include <cstring> #include <iostream> using namespace std; int f[10][10]; void solve() {} int dx[] = {0, 1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0}; int dy[] = {0, 0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2}; int cnt, d; void ink(int x, int y, int s) { for (int i = 0; i <= 4 * s; i++) { int nx = dx[i] + x; int ny ...
[ "literal.number.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
21,228
21,229
u835092486
cpp
p00026
#include <cstring> #include <iostream> using namespace std; int f[10][10]; void solve() {} int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0}; int dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2}; int cnt, d; void ink(int x, int y, int s) { for (int i = 0; i < 4 * s; i++) { int nx = dx[i] + x; int ny = dy[i]...
#include <cstring> #include <iostream> using namespace std; int f[10][10]; void solve() {} int dx[] = {0, 1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0}; int dy[] = {0, 0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2}; int cnt, d; void ink(int x, int y, int s) { for (int i = 0; i <= 4 * s; i++) { int nx = dx[i] + x; int ny ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
21,230
21,229
u835092486
cpp
p00026
#include <ctype.h> #include <iostream> #include <math.h> #include <stdio.h> #include <string> using namespace std; int main() { int a[10][10] = {0}; int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { // size=1 if (size >= 1) { a[x][y]++; if (x - 1 > -1) { a[x - 1][y]++...
#include <ctype.h> #include <iostream> #include <math.h> #include <stdio.h> #include <string> using namespace std; int main() { int a[10][10] = {0}; int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { // size=1 if (size >= 1) { a[x][y]++; if (x - 1 > -1) { a[x - 1][y]++...
[ "io.output.change" ]
21,231
21,232
u471115210
cpp
p00026
#include <cstdio> #include <iostream> #include <stdio.h> using namespace std; int main() { int x, y, s, count = 0; int paper[14][14] = {0}; while (scanf("%d,%d,%d", &x, &y, &s) != EOF) { if (s == 1 || s == 2 || s == 3) { paper[x + 2][y + 2]++; paper[x + 1][y + 2]++; paper[x + 3][y + 2]++; ...
#include <cstdio> #include <iostream> #include <stdio.h> using namespace std; int main() { int x, y, s, count = 0; int paper[14][14] = {0}; while (scanf("%d,%d,%d", &x, &y, &s) != EOF) { if (s == 1 || s == 2 || s == 3) { paper[x + 2][y + 2]++; paper[x + 1][y + 2]++; paper[x + 3][y + 2]++; ...
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
21,233
21,234
u913726760
cpp
p00026
#include <algorithm> #include <cstdio> #include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int p[10][10]; int cnt = 0, Max = 0; void ink(int x, int y) { if (0 <= x && x < 10 || 0 <= y && y < 10) p[x][y]++; } int main() { rep(i, 10) rep(j, 10) { p[i][j] = 0; } int x, y, s...
#include <algorithm> #include <cstdio> #include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int p[10][10]; int cnt = 0, Max = 0; void ink(int x, int y) { if (0 <= x && x < 10 && 0 <= y && y < 10) p[x][y]++; } int main() { rep(i, 10) rep(j, 10) { p[i][j] = 0; } int x, y, s...
[ "misc.opposites", "control_flow.branch.if.condition.change", "assignment.change", "assignment.add" ]
21,237
21,238
u107750881
cpp
p00026
#include <algorithm> #include <cstdio> #include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int p[10][10]; int cnt = 0, Max = 0; void ink(int x, int y) { if (0 <= x && x < 10 || 0 <= y && y < 10) p[x][y]++; } int main() { rep(i, 10) rep(j, 10) { p[i][j] = 0; } int x, y, s...
#include <algorithm> #include <cstdio> #include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int p[10][10]; int cnt = 0, Max = 0; void ink(int x, int y) { if (0 <= x && x < 10 && 0 <= y && y < 10) p[x][y]++; } int main() { rep(i, 10) rep(j, 10) { p[i][j] = 0; } int x, y, s...
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
21,240
21,238
u107750881
cpp
p00026
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; int pos[10][10]; /*void p(){ for(int i=0;i<10;++i){ for(int j=0;j<10;++j){ cout<<pos[i][j]<<" "; } cout<<endl; } cout<<endl; }*/ main() { int...
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; int pos[10][10]; /*void p(){ for(int i=0;i<10;++i){ for(int j=0;j<10;++j){ cout<<pos[i][j]<<" "; } cout<<endl; } cout<<endl; }*/ main() { int...
[ "io.output.change" ]
21,241
21,242
u128939728
cpp
p00026
#include <iostream> using namespace std; int ds[3] = {4, 9, 13}; int dx[13] = {0, -1, 0, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0}; int dy[13] = {-1, 0, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2}; int main() { int x, y, size; char c; int map[14][14] = {0}; int cnt = 0; int map_max = 0; while (cin >> x >> c >> y >> c >...
#include <iostream> using namespace std; int ds[3] = {5, 9, 13}; int dx[13] = {0, -1, 0, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0}; int dy[13] = {-1, 0, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2}; int main() { int x, y, size; char c; int map[14][14] = {0}; int cnt = 0; int map_max = 0; while (cin >> x >> c >> y >> c >...
[ "literal.number.change" ]
21,251
21,252
u346042277
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y, s; int p[14][14] = {0}; while (scanf("%d,%d,%d", &x, &y, &s) > 0) { x += 2; y += 2; p[x][y] += 1; p[x + 1][y] += 1; p[x][y - 1] += 1; p[x][y + 1] += 1; p[x - 1][y] += 1; if (s == 1) continue; ...
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y, s; int p[14][14] = {0}; while (scanf("%d,%d,%d", &x, &y, &s) > 0) { x += 2; y += 2; p[x][y] += 1; p[x + 1][y] += 1; p[x][y - 1] += 1; p[x][y + 1] += 1; p[x - 1][y] += 1; if (s == 1) continue; ...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.variable.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
21,255
21,256
u238665355
cpp
p00026
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int grid[14][14] = {0}; void small(int x, int y) { grid[x][y]++; grid[x - 1][y]++; grid[x + 1][y]++; grid[x][y - 1]++; grid[x][y + 1]++; } void medium(int x, int y) { small(x, y); grid[x - 1][y - 1]++; grid[x + 1][y - 1]...
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int grid[14][14] = {0}; void small(int x, int y) { grid[x][y]++; grid[x - 1][y]++; grid[x + 1][y]++; grid[x][y - 1]++; grid[x][y + 1]++; } void medium(int x, int y) { small(x, y); grid[x - 1][y - 1]++; grid[x + 1][y - 1]...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
21,259
21,260
u946540531
cpp
p00026
#include <iostream> #include <vector> using namespace std; constexpr int paper_w = 10, paper_h = 10; constexpr int ink_w = 5, ink_h = 5; int inkarea[3][ink_h][ink_w] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0,...
#include <iostream> #include <vector> using namespace std; constexpr int paper_w = 10, paper_h = 10; constexpr int ink_w = 5, ink_h = 5; int inkarea[3][ink_h][ink_w] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0,...
[]
21,261
21,262
u445955169
cpp
p00026
#include <cmath> #include <cstdio> #include <iostream> using namespace std; // int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0}; int main() { int x, y, s; int board[10][10] = {{0}}; while (~scanf("%d,%d,%d", &x, &y, &s)) { if (s == 3) { for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { ...
#include <cmath> #include <cstdio> #include <iostream> using namespace std; // int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0}; int main() { int x, y, s; int board[10][10] = {{0}}; while (~scanf("%d,%d,%d", &x, &y, &s)) { if (s == 3) { for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
21,263
21,264
u879745691
cpp
p00026
// include //------------------------------------------ #include <bits/stdc++.h> // only for GCC using namespace std; // typedef //------------------------------------------ typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<string> vs; typedef vector<bool> vb; typedef vector<vb> vvb; typedef pair<int, in...
// include //------------------------------------------ #include <bits/stdc++.h> // only for GCC using namespace std; // typedef //------------------------------------------ typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<string> vs; typedef vector<bool> vb; typedef vector<vb> vvb; typedef pair<int, in...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
21,265
21,266
u925831343
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) for (int i = 0; i < a; i++) int maze[10][10]; int smallx[5] = {1, -1, 0, 0, 0}; int smally[5] = {0, 0, 0, 1, -1}; int midx[4] = {1, 1, -1, -1}; int midy[4] = {1, -1, 1, -1}; int largex[4] = {2...
#include <cstdio> #include <iostream> using namespace std; #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) for (int i = 0; i < a; i++) int maze[10][10]; int smallx[5] = {1, -1, 0, 0, 0}; int smally[5] = {0, 0, 0, 1, -1}; int midx[4] = {1, 1, -1, -1}; int midy[4] = {1, -1, 1, -1}; int largex[4] = {2...
[ "literal.number.change", "call.arguments.change", "variable_declaration.value.change" ]
21,475
21,476
u615353970
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) for (int i = 0; i < a; i++) int maze[10][10]; int smallx[5] = {1, -1, 0, 0, 0}; int smally[5] = {0, 0, 0, 1, -1}; int midx[4] = {1, 1, -1, -1}; int midy[4] = {1, -1, 1, -1}; int largex[4] = {2...
#include <cstdio> #include <iostream> using namespace std; #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) for (int i = 0; i < a; i++) int maze[10][10]; int smallx[5] = {1, -1, 0, 0, 0}; int smally[5] = {0, 0, 0, 1, -1}; int midx[4] = {1, 1, -1, -1}; int midy[4] = {1, -1, 1, -1}; int largex[4] = {2...
[ "literal.number.change", "call.arguments.change" ]
21,478
21,476
u615353970
cpp
p00026
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define reps(i, f, n) for (int i = f; i < int(n); i++) #define rep(i, n) reps(i, 0, n) #define X real...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define reps(i, f, n) for (int i = f; i < int(n); i++) #define rep(i, n) reps(i, 0, n) #define X real...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
21,480
21,481
u488108750
cpp
p00026
#include <algorithm> #include <cstdio> using namespace std; int field[10][10], x, y, s, cnt, ma; void s1() { if (y - 1 >= 0) field[x][y - 1]++; if (x - 1 >= 0) field[x - 1][y]++; if (y + 1 < 10) field[x][y + 1]++; if (x + 1 < 10) field[x + 1][y]++; } void s2() { s1(); if (x - 1 >= 0 && y ...
#include <algorithm> #include <cstdio> using namespace std; int field[10][10], x, y, s, cnt, ma; void s1() { if (y - 1 >= 0) field[x][y - 1]++; if (x - 1 >= 0) field[x - 1][y]++; if (y + 1 < 10) field[x][y + 1]++; if (x + 1 < 10) field[x + 1][y]++; } void s2() { s1(); if (x - 1 >= 0 && y ...
[]
21,482
21,483
u472197678
cpp
p00026
#include <iostream> #include <string> using namespace std; int main() { int area[10][10] = {0}; int x, nx, ny, y, size; int count = 0; int max = 0; char ch1, ch2; while (cin >> x >> ch1 >> y >> ch2 >> size) { nx = x + 2; ny = y + 2; switch (size) { case 3: area[nx - 2][ny]++; ar...
#include <iostream> #include <string> using namespace std; int main() { int area[14][14] = {0}; int x, nx, ny, y, size; int count = 0; int max = 0; char ch1, ch2; while (cin >> x >> ch1 >> y >> ch2 >> size) { nx = x + 2; ny = y + 2; switch (size) { case 3: area[nx - 2][ny]++; ar...
[ "literal.number.change", "variable_declaration.array_dimensions.change" ]
21,484
21,485
u706356703
cpp
p00026
#include <algorithm> #include <array> #include <chrono> #include <fstream> #include <functional> #include <iostream> #include <map> #include <math.h> #include <memory.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #pragma warning(disable : ...
#include <algorithm> #include <array> #include <chrono> #include <fstream> #include <functional> #include <iostream> #include <map> #include <math.h> #include <memory.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #pragma warning(disable : ...
[]
21,486
21,487
u520706050
cpp
p00026
#include <stdio.h> void tyu(int x, int y, int N[15][15]) { int xt, yt; xt = x - 1; yt = y - 1; for (int i = yt; i >= yt + 2; i++) for (int j = xt; j >= xt + 2; j++) N[i][j]++; } void syo(int x, int y, int N[15][15]) { N[y][x]++; N[y + 1][x]++; N[y - 1][x]++; N[y][x + 1]++; N[y][x - 1]++; } v...
#include <stdio.h> void tyu(int x, int y, int N[15][15]) { int xt, yt; xt = x - 1; yt = y - 1; for (int i = yt; i <= yt + 2; i++) for (int j = xt; j <= xt + 2; j++) N[i][j]++; } void syo(int x, int y, int N[15][15]) { N[y][x]++; N[y + 1][x]++; N[y - 1][x]++; N[y][x + 1]++; N[y][x - 1]++; } v...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove", "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.t...
21,496
21,497
u745328149
cpp
p00026
#include <stdio.h> void tyu(int x, int y, int N[15][15]) { int xt, yt; xt = x - 1; yt = y - 1; for (int i = yt; i <= yt + 2; i++) for (int j = xt; j <= xt + 2; j++) N[i][j]++; } void syo(int x, int y, int N[15][15]) { N[y][x]++; N[y + 1][x]++; N[y - 1][x]++; N[y][x + 1]++; N[y][x - 1]++; } v...
#include <stdio.h> void tyu(int x, int y, int N[15][15]) { int xt, yt; xt = x - 1; yt = y - 1; for (int i = yt; i <= yt + 2; i++) for (int j = xt; j <= xt + 2; j++) N[i][j]++; } void syo(int x, int y, int N[15][15]) { N[y][x]++; N[y + 1][x]++; N[y - 1][x]++; N[y][x + 1]++; N[y][x - 1]++; } v...
[ "identifier.change", "call.arguments.change", "io.output.change" ]
21,498
21,497
u745328149
cpp
p00026
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> using namespace std; int main() { int a[14][14]; int i; int ii; int kosuu = 0; int mol = 0; for (i = 0; i <= 13; i++) { for (ii = 0; ii <= 13; ii++) { a[i][ii] = 0; } } int x = 0; int y = 0; int size = 0; while ...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> using namespace std; int main() { int a[14][14]; int i; int ii; int kosuu = 0; int mol = 0; for (i = 0; i <= 13; i++) { for (ii = 0; ii <= 13; ii++) { a[i][ii] = 0; } } int x = 0; int y = 0; int size = 0; while ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
21,499
21,500
u178887942
cpp
p00026
#include <stdio.h> #include <stdlib.h> int main() { int table[10][10] = {{0}}; int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { switch (size) { case 1: { table[y][x]++; if (x - 1 >= 0) table[y][x - 1]++; if (x + 1 <= 9) table[y][x + 1]++; if (y - 1...
#include <stdio.h> #include <stdlib.h> int main() { int table[10][10] = {{0}}; int x, y, size; while (scanf("%d,%d,%d", &x, &y, &size) != EOF) { switch (size) { case 1: { table[y][x]++; if (x - 1 >= 0) table[y][x - 1]++; if (x + 1 <= 9) table[y][x + 1]++; if (y - 1...
[ "call.arguments.change", "call.arguments.add" ]
21,501
21,502
u192037914
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y, s; char com; int a[10][10]; for (int i = 0; i < 100; i++) a[i / 10][i % 10] = 0; while (cin >> x >> com >> y >> com >> s) { a[x][y]++; if (x > 0) a[x - 1][y]++; if (x < 9) a[x + 1][y]++; if (y > 0...
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y, s; char com; int a[10][10]; for (int i = 0; i < 100; i++) a[i / 10][i % 10] = 0; while (cin >> x >> com >> y >> com >> s) { a[x][y]++; if (x > 0) a[x - 1][y]++; if (x < 9) a[x + 1][y]++; if (y > 0...
[]
21,503
21,504
u313570264
cpp
p00026
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define fi first #define se second #define fcout(n) cout << fixed << setprecision((n...
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define fi first #define se second #define fcout(n) cout << fixed << setprecision((n...
[ "expression.unary.arithmetic.add" ]
21,513
21,514
u192345675
cpp
p00026
#include <algorithm> #include <cctype> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> using namespace std; int size(string x) { string::size_type size = x.size(); return size; } #define fu(l, k) for (int i = l; i < k; i++) ...
#include <algorithm> #include <cctype> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> using namespace std; int size(string x) { string::size_type size = x.size(); return size; } #define fu(l, k) for (int i = l; i < k; i++) ...
[ "variable_declaration.type.change" ]
21,517
21,518
u442849342
cpp
p00026
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <queue> #include <stack> #include <string> #include <utility> #include <vector> #define ll long long int #define ld long double #define INF 1000000000 #define EPS 0.0000000001 #define rep(i, n) for (i = 0; i < n; i++) using namespace s...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <queue> #include <stack> #include <string> #include <utility> #include <vector> #define ll long long int #define ld long double #define INF 1000000000 #define EPS 0.0000000001 #define rep(i, n) for (i = 0; i < n; i++) using namespace s...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
21,519
21,520
u467070262
cpp
p00026
#include <bits/stdc++.h> using namespace std; int main() { int a[15][15] = {0}, b = 0, c = 0, x, y, t; string s[50]; while (scanf("%d,%d,%d", &x, &y, &t) != EOF) { if (t == 3) { a[x + 2][y + 2]++; a[x + 1][y + 2]++; a[x][y + 2]++; a[x + 3][y + 2]++; a[x + 4][y + 2]++; a[x +...
#include <bits/stdc++.h> using namespace std; int main() { int a[15][15] = {0}, b = 0, c = 0, x, y, t; string s[50]; while (scanf("%d,%d,%d", &x, &y, &t) != EOF) { if (t == 3) { a[x + 2][y + 2]++; a[x + 1][y + 2]++; a[x][y + 2]++; a[x + 3][y + 2]++; a[x + 4][y + 2]++; a[x +...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove", "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "identifier.change", "io.output.change" ]
21,525
21,526
u962041986
cpp
p00026
#include <iostream> #include <map> #include <vector> class DrawAreaStrategy { public: DrawAreaStrategy() {} virtual ~DrawAreaStrategy() {} DrawAreaStrategy(const DrawAreaStrategy &) = delete; DrawAreaStrategy &operator=(const DrawAreaStrategy &) = delete; DrawAreaStrategy(DrawAreaStrategy &&) = delete; D...
#include <iostream> #include <map> #include <vector> class DrawAreaStrategy { public: DrawAreaStrategy() {} virtual ~DrawAreaStrategy() {} DrawAreaStrategy(const DrawAreaStrategy &) = delete; DrawAreaStrategy &operator=(const DrawAreaStrategy &) = delete; DrawAreaStrategy(DrawAreaStrategy &&) = delete; D...
[ "expression.operation.binary.change" ]
21,527
21,528
u684875789
cpp
p00026
#include "bits/stdc++.h" using namespace std; int main() { int x, y, s; char b; int n = 10; int x1[] = {1, 0, -1, 0}; int y1[] = {0, 1, 0, -1}; int x2[] = {1, 1, -1, -1}; int y2[] = {1, -1, 1, -1}; int x3[] = {2, 0, -2, 0}; int y3[] = {0, 2, 0, -2}; vector<vector<int>> a(n, vector<int>(n, 0)); w...
#include "bits/stdc++.h" using namespace std; int main() { int x, y, s; char b; int n = 10; int x1[] = {1, 0, -1, 0}; int y1[] = {0, 1, 0, -1}; int x2[] = {1, 1, -1, -1}; int y2[] = {1, -1, 1, -1}; int x3[] = {2, 0, -2, 0}; int y3[] = {0, 2, 0, -2}; vector<vector<int>> a(n, vector<int>(n, 0)); w...
[ "literal.number.change", "control_flow.branch.if.condition.change", "io.output.change" ]
21,529
21,530
u321462250
cpp
p00026
#include "bits/stdc++.h" using namespace std; int main() { int x, y, s; char b; int n = 10; int x1[] = {1, 0, -1, 0}; int y1[] = {0, 1, 0, -1}; int x2[] = {1, 1, -1, -1}; int y2[] = {1, -1, 1, -1}; int x3[] = {2, 0, -2, 0}; int y3[] = {0, 2, 0, -2}; vector<vector<int>> a(n, vector<int>(n, 0)); w...
#include "bits/stdc++.h" using namespace std; int main() { int x, y, s; char b; int n = 10; int x1[] = {1, 0, -1, 0}; int y1[] = {0, 1, 0, -1}; int x2[] = {1, 1, -1, -1}; int y2[] = {1, -1, 1, -1}; int x3[] = {2, 0, -2, 0}; int y3[] = {0, 2, 0, -2}; vector<vector<int>> a(n, vector<int>(n, 0)); w...
[ "io.output.change" ]
21,531
21,530
u321462250
cpp
p00026
#include <cstdio> #include <iostream> using namespace std; int main() { int masu[13][13], x, y, s; while (scanf("%d,%d,%d", &x, &y, &s) != EOF) { x += 2, y += 2; if (s == 1) { for (int i = x - 1; i <= x + 1; i++) masu[i][y]++; masu[x][y - 1]++; masu[x][y + 1]++; } else if (s ==...
#include <cstdio> #include <iostream> using namespace std; int main() { int masu[13][13] = {0}, x, y, s; while (scanf("%d,%d,%d", &x, &y, &s) != EOF) { x += 2, y += 2; if (s == 1) { for (int i = x - 1; i <= x + 1; i++) masu[i][y]++; masu[x][y - 1]++; masu[x][y + 1]++; } else if...
[ "variable_declaration.value.change" ]
21,534
21,535
u512111598
cpp
p00029
#include <algorithm> #include <iostream> #include <map> #include <string> using namespace std; int main() { string s, t; map<string, int> p; while (cin >> s) { if (p.find(s) != p.end()) p[s]++; else p[s] = 1; if (s.size() > t.size()) t = s; } int m = 0; for (map<string, in...
#include <algorithm> #include <iostream> #include <map> #include <string> using namespace std; int main() { string s, t; map<string, int> p; while (cin >> s) { if (p.find(s) != p.end()) p[s]++; else p[s] = 1; if (s.size() > t.size()) t = s; } int m = 0; for (map<string, in...
[]
21,676
21,677
u604920879
cpp
p00029
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define reps(i, f, n) for (int i = f; i < int(n); i++) #define rep(i, n) reps(i, 0, n) #define X real...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define reps(i, f, n) for (int i = f; i < int(n); i++) #define rep(i, n) reps(i, 0, n) #define X real...
[ "io.output.change" ]
21,680
21,681
u488108750
cpp
p00029
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double real; typedef pair<int, int> duo; #define TT template <typename T> TT T sq(T x) { return x * x; } TT int ubnd(vector<T> &v, T x) { return upper_bound(v.begin(), v.end(), x) - v.begin(); } TT int lbnd(vector<T> &v, T x) { retu...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double real; typedef pair<int, int> duo; #define TT template <typename T> TT T sq(T x) { return x * x; } TT int ubnd(vector<T> &v, T x) { return upper_bound(v.begin(), v.end(), x) - v.begin(); } TT int lbnd(vector<T> &v, T x) { retu...
[ "control_flow.branch.if.condition.change" ]
21,682
21,683
u490032117
cpp
p00029
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> typedef long long Int; #define REP(i, n) for (int i = 0; i < n; ++i) using namespace std; map<string, int> aa; set<str...
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> typedef long long Int; #define REP(i, n) for (int i = 0; i < n; ++i) using namespace std; map<string, int> aa; set<str...
[ "identifier.change", "io.output.change" ]
21,684
21,685
u520706050
cpp
p00029
#include <cstring> #include <iostream> #include <set> #include <string> #include <vector> using namespace std; #define rep2(x, from, to) for (int x = (from); x < (to); (x)++) #define rep(x, to) rep2(x, 0, to) int main() { string s; vector<string> str1; set<string> str2; while (cin >> s) { str1.push_back(s);...
#include <cstring> #include <iostream> #include <set> #include <string> #include <vector> using namespace std; #define rep2(x, from, to) for (int x = (from); x < (to); (x)++) #define rep(x, to) rep2(x, 0, to) int main() { string s; vector<string> str1; set<string> str2; while (cin >> s) { str1.push_back(s);...
[ "identifier.change", "io.output.change" ]
21,689
21,690
u811434779
cpp
p00029
#include <algorithm> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { string p[1001], s; int c; int st[1001] = {0}, l = 0, i, maxl = 0, maxn = 0; while ((c = getchar()) != '\n') { if (c == ' ') { for (i = 0; i < l; i++) { if (p[i] == s) { st[...
#include <algorithm> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { string p[1001], s; int c; int st[1001] = {0}, l = 0, i, maxl = 0, maxn = 0; while ((c = getchar()) != '\n') { if (c == ' ') { for (i = 0; i < l; i++) { if (p[i] == s) { st[...
[ "io.output.change" ]
21,691
21,692
u453728254
cpp
p00029
#include <algorithm> #include <iostream> #include <map> #include <string.h> #include <vector> using namespace std; int main() { map<string, int> m; string s; getline(cin, s); string tem = ""; for (int i = 0; i < s.length(); i++) { if (s[i] != ' ' && s[i] != '\n') tem += s[i]; else { if (m....
#include <algorithm> #include <iostream> #include <map> #include <string.h> #include <vector> using namespace std; int main() { map<string, int> m; string s; getline(cin, s); string tem = ""; for (int i = 0; i < s.length(); i++) { if (s[i] != ' ' && s[i] != '\n') tem += s[i]; else { if (m....
[ "io.output.change" ]
21,700
21,701
u296395710
cpp
p00029
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <stack> #include <string.h> #include <string> #include <utility> #define mp make_pair #define pii pair<int, int> #define ff first #define ss second #define ll long long #define vi ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <stack> #include <string.h> #include <string> #include <utility> #define mp make_pair #define pii pair<int, int> #define ff first #define ss second #define ll long long #define vi ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "expression.operator.compare.change", "control_flow.loop.condition.change" ]
21,706
21,707
u451212657
cpp
p00029
//?\???°?????? // 10??? #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { map<string, int> m; string s; vector<string> v; while (cin >> s) { if ('A' <= s[0] && s[0] <= 'Z') { s[0] = s[0] - 'A' + 'a'; } m[s]++; v.push_back(s); } int...
#include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { map<string, int> m; string s; vector<string> v; while (cin >> s) { if ('A' <= s[0] && s[0] <= 'Z') { s[0] = s[0] - 'A' + 'a'; } m[s]++; v.push_back(s); } int ans1 = -1; int ans2 =...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
21,708
21,709
u198011997
cpp
p00029
#include <cstdio> #include <cstring> #include <iostream> #include <map> #include <string> using namespace std; int main() { map<string, int> str; string word; int big = 0; int cnt = 0; string keepword; string keepstr = ""; string many = ""; while (!cin.eof()) { cin >> word; string kari(word); ...
#include <cstdio> #include <cstring> #include <iostream> #include <map> #include <string> using namespace std; int main() { map<string, int> str; string word; int big = 0; int cnt = 0; string keepword; string keepstr = ""; string many = ""; while (!cin.eof()) { cin >> word; string kari(word); ...
[ "identifier.change", "io.output.change" ]
21,710
21,711
u044226657
cpp
p00029
#include <iostream> #include <map> #include <string> using namespace std; int main() { string s, nmax, gmax; map<string, int> m; map<string, int>::iterator it; int nm = -1, gm = -1; while (cin >> s) { if (nm < s.length()) { nm = s.length(); nmax = s; } if (m.count(s)) m[s]++; ...
#include <iostream> #include <map> #include <string> using namespace std; int main() { string s, nmax, gmax; map<string, int> m; map<string, int>::iterator it; int nm = -1, gm = -1; while (cin >> s) { if (nm < (int)s.length()) { nm = (int)s.length(); nmax = s; } if (m.count(s)) m...
[ "control_flow.branch.if.condition.change" ]
21,715
21,716
u712035986
cpp
p00029
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define PRINT(STR) cout << STR << endl; #defi...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define PRINT(STR) cout << STR << endl; #defi...
[ "io.output.change" ]
21,719
21,720
u211905117
cpp
p00029
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s[1000]; int n = 0; while (cin >> s[n]) n++; sort(s, s + n); int m, c; m = c = 0; string t, ms, l; ms = t = s[0]; for (int i = 0; i < n; i++) { if (t == s[i]) c++; else { if (c ...
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s[1000]; int n = 0; while (cin >> s[n]) n++; sort(s, s + n); int m, c; m = c = 0; string t, ms, l; ms = t = s[0]; for (int i = 0; i < n + 1; i++) { if (t == s[i]) c++; else { if...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
21,721
21,722
u268155858
cpp
p00029
#include <bits/stdc++.h> using namespace std; typedef pair<string, int> p; vector<p> ls(0); int find(string s) { for (int i = 0; i < (int)ls.size(); i++) { if (s == ls[i].first) return true; } return -1; } int main() { string in; int max = 0, indx = 0; string maxs = ""; while (cin >> in) { ...
#include <bits/stdc++.h> using namespace std; typedef pair<string, int> p; vector<p> ls(0); int find(string s) { for (int i = 0; i < (int)ls.size(); i++) { if (s == ls[i].first) { return i; } } return -1; } int main() { string in; int max = 0, indx = 0; string maxs = ""; while (cin >> i...
[ "function.return_value.change" ]
21,723
21,724
u874419660
cpp
p00029
#include <cstdio> #include <iostream> #include <map> #include <string> using namespace std; int main() { map<string, int> t; string s, mxc, mxl; int freq, len; while (cin >> s) { if (t.find(s) == t.end()) { t[s] = 1; } else { t[s]++; } if (t[s] > freq) { freq = t[s]; mxc...
#include <cstdio> #include <iostream> #include <map> #include <string> using namespace std; int main() { map<string, int> t; string s, mxc, mxl; int freq = 1, len = 0; while (cin >> s) { if (t.find(s) == t.end()) { t[s] = 1; } else { t[s]++; } if (t[s] > freq) { freq = t[s]; ...
[ "variable_declaration.value.change" ]
21,727
21,728
u403618837
cpp
p00029
#include <cstdio> #include <iostream> #include <map> #include <string> using namespace std; int main() { map<string, int> t; string s, mxc, mxl; int freq, len; while (cin >> s) { if (t.find(s) == t.end()) { t[s] = 1; } else { t[s]++; } if (t[s] > freq) { freq = t[s]; mxc...
#include <cstdio> #include <iostream> #include <map> #include <string> using namespace std; int main() { map<string, int> t; string s, mxc, mxl; int freq = 0, len = 0; while (cin >> s) { if (t.find(s) == t.end()) { t[s] = 1; } else { t[s]++; } if (t[s] > freq) { freq = t[s]; ...
[ "variable_declaration.value.change" ]
21,727
21,729
u403618837
cpp
p00029
#include <cstdio> #include <cstring> #include <iostream> using namespace std; class Word { public: char w[33]; int length; int freq; public: Word() { strcpy(w, ""); length = 0; freq = 0; } }; int main() { char str[1001]; char buf[32]; char *p, *q; fgets(str, 1001, stdin); Word wl[32...
#include <cstdio> #include <cstring> #include <iostream> using namespace std; class Word { public: char w[33]; int length; int freq; public: Word() { strcpy(w, ""); length = 0; freq = 0; } }; int main() { char str[1001]; char buf[32]; char *p, *q; fgets(str, 1001, stdin); Word wl[32...
[ "io.output.change" ]
21,734
21,735
u296194591
cpp