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
p00819
#include <algorithm> #include <iostream> #include <string> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int cs, s; string ord, st; void op(char o) { if (o == 'A') reverse(st.begin(), st.end()); if (o == 'J') rotate(st.rbegin(), st.rbegin() + 1, st.rend()); if (o == 'C') rotate(st...
#include <algorithm> #include <iostream> #include <string> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int cs, s; string ord, st; void op(char o) { if (o == 'A') reverse(st.begin(), st.end()); if (o == 'J') rotate(st.rbegin(), st.rbegin() + 1, st.rend()); if (o == 'C') rotate(st...
[ "literal.number.change", "assignment.value.change", "expression.operation.binary.change" ]
70,914
70,915
u530523861
cpp
p00819
#include <algorithm> #include <cctype> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; while (n--) { string s, m; cin >> s >> m; int len = m.length(); for (int i = s.length() - 1; i >= 0; i--) { if (s[i] == 'J') rotate(m.begin(), m.begin() +...
#include <algorithm> #include <cctype> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; while (n--) { string s, m; cin >> s >> m; int len = m.length(); for (int i = s.length() - 1; i >= 0; i--) { if (s[i] == 'J') rotate(m.begin(), m.begin() +...
[ "expression.operation.binary.remove" ]
70,916
70,917
u157859087
cpp
p00819
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #inc...
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #inc...
[ "literal.string.change" ]
70,918
70,919
u274875240
cpp
p00820
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <v...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <v...
[ "control_flow.loop.for.initializer.change", "variable_declaration.type.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
70,942
70,943
u819979588
cpp
p00820
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <v...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <v...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
70,944
70,943
u819979588
cpp
p00820
#include <algorithm> #include <cstdio> #include <cstring> #include <ctype.h> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> using...
#include <algorithm> #include <cstdio> #include <cstring> #include <ctype.h> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> using...
[ "control_flow.loop.condition.change" ]
70,945
70,946
u877319405
cpp
p00820
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <st...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <st...
[ "control_flow.loop.condition.change" ]
70,959
70,960
u991779216
cpp
p00820
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
[]
70,967
70,968
u603085888
cpp
p00820
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.loop.condition.change" ]
70,969
70,970
u603085888
cpp
p00820
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
[ "control_flow.loop.condition.change" ]
70,971
70,970
u603085888
cpp
p00820
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
[ "literal.number.change", "assignment.variable.change", "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.loop.condition.change" ]
70,969
70,972
u603085888
cpp
p00820
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
[ "literal.number.change", "assignment.variable.change", "call.arguments.change", "control_flow.loop.condition.change" ]
70,971
70,972
u603085888
cpp
p00855
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { bool a[1300000] = {0}; a[1] = 1; for (int i = 2; i < 650001; i++) { if (a[i] == 1) continue; int j = 2 * i; while (j < 1300000) { a[j] = 1; j = j + i; } } int k; while (cin >> k &&...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { bool a[1300000] = {0}; a[1] = 1; for (int i = 2; i < 650001; i++) { if (a[i] == 1) continue; int j = 2 * i; while (j < 1300000) { a[j] = 1; j = j + i; } } int k; while (cin >> k &&...
[ "literal.number.change", "control_flow.loop.condition.change" ]
71,005
71,006
u835414158
cpp
p00855
#include <bits/stdc++.h> #define loop(n, i) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define HERE cout << "HERE: " << __LINE__ << endl; #define INSP(v) cout << v << " at " << __LINE__ << endl; using namespace std; typedef long long ll; int main() { int max = 1299710; vector<int> mat(max, 1);...
#include <bits/stdc++.h> #define loop(n, i) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define HERE cout << "HERE: " << __LINE__ << endl; #define INSP(v) cout << v << " at " << __LINE__ << endl; using namespace std; typedef long long ll; int main() { int max = 1299710; vector<int> mat(max, 1);...
[ "io.output.newline.add" ]
71,007
71,008
u124909914
cpp
p00855
#include <iostream> #include <vector> using namespace std; vector<bool> Eratos(1299710, true); int main() { int N, min, max; for (int i = 2; i < 1142;) { for (int j = 1; j <= 1299710; j += i) { if (j % i == 0) { Eratos[j] = false; } } for (i++; !Eratos[i]; i++) ; } while ...
#include <iostream> #include <vector> using namespace std; vector<bool> Eratos(1299710, true); int main() { int N, min, max; for (int i = 2; i < 1142;) { for (int j = i * 2; j <= 1299710; j += i) { if (j % i == 0) { Eratos[j] = false; } } for (i++; !Eratos[i]; i++) ; } wh...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.loop.for.initializer.change" ]
71,012
71,013
u527286045
cpp
p00855
#define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) #include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std...
#define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) #include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std...
[ "control_flow.loop.condition.change" ]
71,020
71,021
u763438901
cpp
p00855
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define each(a, b) for (auto(a) : (b)) #define all(v) (v).begin(), (v).end() #define fi first #define se second #define pb push_back #define show(x) cout << #x...
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define each(a, b) for (auto(a) : (b)) #define all(v) (v).begin(), (v).end() #define fi first #define se second #define pb push_back #define show(x) cout << #x...
[ "literal.number.change", "variable_declaration.value.change" ]
71,028
71,029
u131811591
cpp
p00855
#include <math.h> #include <stdio.h> #define MAXNUM 1299709 int main(void) { int flag[MAXNUM + 1], i, j, n; for (i = 0; i <= MAXNUM; i++) flag[i] = 1; for (i = 2; i <= sqrt((double)MAXNUM); i++) { for (j = i * 2; j <= MAXNUM; j += i) flag[j] = 0; } flag[0] = flag[1] = 0; while (1) { scanf...
#include <math.h> #include <stdio.h> #define MAXNUM 1299709 int main(void) { int flag[MAXNUM + 1], i, j, n; for (i = 0; i <= MAXNUM; i++) flag[i] = 1; for (i = 2; i <= sqrt((double)MAXNUM); i++) { for (j = i * 2; j <= MAXNUM; j += i) flag[j] = 0; } flag[0] = flag[1] = 0; while (1) { scanf...
[ "expression.operation.binary.remove" ]
71,041
71,042
u682037079
cpp
p00855
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<int> P; const int pmax = 1299709; bool iscomp[pmax + 1]; void init() { P.reserve(100000); for (int i = 2; i < pmax + 1; i++) { if (iscomp[i]) continue; P.push_back(i); for (int j = 2; i * j < pmax + 1; j++) ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<int> P; const int pmax = 1299709; bool iscomp[pmax + 1]; void init() { P.reserve(100000); for (int i = 2; i < pmax + 1; i++) { if (iscomp[i]) continue; P.push_back(i); for (int j = 2; i * j < pmax + 1; j++) ...
[ "expression.operation.binary.remove" ]
71,045
71,046
u977698428
cpp
p00821
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.000000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m;...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.0000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m; ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.branch.if.condition.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
71,073
71,074
u411874111
cpp
p00821
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.000000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m;...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.0000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m; ...
[ "literal.number.change", "variable_declaration.value.change" ]
71,075
71,074
u411874111
cpp
p00821
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.000000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m;...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.0000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m; ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.branch.if.condition.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
71,073
71,076
u411874111
cpp
p00821
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.000000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m;...
#include <algorithm> #include <iostream> #include <vector> using namespace std; const long double e = 0.0000001; long double f(long double x1, long double y1, long double x2, long double y2, long double X) { return (y1 * (x2 - X) + y2 * (X - x1)) / (x2 - x1); } int main() { while (1) { int m; ...
[ "literal.number.change", "variable_declaration.value.change" ]
71,075
71,076
u411874111
cpp
p00822
#include <bits/stdc++.h> using namespace std; struct state { int p, x, y, a, b, c, d; }; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; int n; int t[367][4][4]; bool visited[367][3][3][8][8][8][8]; int solve() { int K = 7; if (t[0][1][1] || t[0][1][2] || t[0][2][1] || t[0][2][2]) return 0; memset(vi...
#include <bits/stdc++.h> using namespace std; struct state { int p, y, x, a, b, c, d; }; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; int n; int t[367][4][4]; bool visited[367][3][3][8][8][8][8]; int solve() { int K = 7; if (t[0][1][1] || t[0][1][2] || t[0][2][1] || t[0][2][2]) return 0; memset(vi...
[ "control_flow.branch.if.condition.change" ]
71,081
71,082
u923320778
cpp
p00822
#include <bits/stdc++.h> using namespace std; struct state { int p, x, y, a, b, c, d; }; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; int n; int t[367][4][4]; bool visited[367][3][3][8][8][8][8]; int solve() { int K = 7; if (t[0][1][1] || t[0][1][2] || t[0][2][1] || t[0][2][2]) return 0; memset(vi...
#include <bits/stdc++.h> using namespace std; struct state { int p, y, x, a, b, c, d; }; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; int n; int t[367][4][4]; bool visited[367][3][3][8][8][8][8]; int solve() { int K = 7; if (t[0][1][1] || t[0][1][2] || t[0][2][1] || t[0][2][2]) return 0; memset(vi...
[]
71,083
71,082
u923320778
cpp
p00822
#include <bits/stdc++.h> using namespace std; const int MAXN = 400; const int R = 4; const int W = 7; const int di[] = {0, 1, 0, -1}; const int dj[] = {1, 0, -1, 0}; int N; int F[MAXN][R][R]; bool dp[MAXN][R][R][W][W][W][W]; int main() { while (cin >> N && N) { for (int k = 0; k < N; ++k) for (int i = 0; ...
#include <bits/stdc++.h> using namespace std; const int MAXN = 400; const int R = 4; const int W = 7; const int di[] = {0, 1, 0, -1}; const int dj[] = {1, 0, -1, 0}; int N; int F[MAXN][R][R]; bool dp[MAXN][R][R][W][W][W][W]; int main() { while (cin >> N && N) { for (int k = 0; k < N; ++k) for (int i = 0; ...
[ "literal.number.change", "assignment.variable.change", "variable_access.subscript.index.change" ]
71,084
71,085
u967850487
cpp
p00822
#include <algorithm> #include <iostream> using namespace std; const int N = 365; int dat[N][16], n; bool vis[N + 1][9][7][7][7][7]; int dfs(int d, int p, int k0, int k1, int k2, int k3) { static int dy[4] = {-1, 0, 1, 0}; static int dx[4] = {0, 1, 0, -1}; if (d == n) return 1; int nk0 = k0, nk1 = k1, nk...
#include <algorithm> #include <iostream> using namespace std; const int N = 365; int dat[N][16], n; bool vis[N + 1][9][7][7][7][7]; int dfs(int d, int p, int k0, int k1, int k2, int k3) { static int dy[4] = {-1, 0, 1, 0}; static int dx[4] = {0, 1, 0, -1}; if (d == n) return 1; int nk0 = k0, nk1 = k1, nk...
[ "literal.number.change", "io.output.change" ]
71,094
71,095
u622083648
cpp
p00823
#include <bits/stdc++.h> using namespace std; #define int long long #define all(v) begin(v), end(v) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++) const int inf = 1LL << 55; const int mod = 1e9 + 7; map<string, int> table; string mole; int idx; ...
#include <bits/stdc++.h> using namespace std; #define int long long #define all(v) begin(v), end(v) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++) const int inf = 1LL << 55; const int mod = 1e9 + 7; map<string, int> table; string mole; int idx; ...
[ "io.output.change" ]
71,111
71,112
u046809180
cpp
p00823
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) #define rep(i, n) repl(i, 0, n) #define all(x) (x).begin(), (x).end() #define dbg(x) cout << #x "=...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) #define rep(i, n) repl(i, 0, n) #define all(x) (x).begin(), (x).end() #define dbg(x) cout << #x "=...
[ "literal.string.change", "io.output.change" ]
71,116
71,117
u629590130
cpp
p00825
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) using namespace std; struct PrimalDual { const int INF = 1 << 28; typedef pair<int, int> P; struct edge { int to, cap, cost, rev; edge() {} edge(int to, int cap, int cost, int rev) : to(to), cap(cap), cost(cost), rev(rev) {}...
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) using namespace std; struct PrimalDual { const int INF = 1 << 28; typedef pair<int, int> P; struct edge { int to, cap, cost, rev; edge() {} edge(int to, int cap, int cost, int rev) : to(to), cap(cap), cost(cost), rev(rev) {}...
[ "literal.number.change", "call.arguments.change" ]
71,141
71,142
u962041986
cpp
p00825
#include <bits/stdc++.h> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) for (int i = 0; i < (b); i++) #define all(a) (a).begin(), (a).end() #define show(x) cerr << #x << " = " << (x) << endl; using namespace std; template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { rep(i, ...
#include <bits/stdc++.h> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) for (int i = 0; i < (b); i++) #define all(a) (a).begin(), (a).end() #define show(x) cerr << #x << " = " << (x) << endl; using namespace std; template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { rep(i, ...
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
71,143
71,144
u452212317
cpp
p00827
#include <bits/stdc++.h> using namespace std; #define for_(i, a, b) for (int i = (a); i < (b); ++i) int main() { int a, b, c; while (cin >> a >> b >> c, a != 0) { int min_sum_xy = 1L << 30, min_sum = 1L << 30, ans_x = -1, ans_y = -1; auto update = [&](int x, int y) { if (min_sum_xy > x + y) { ...
#include <bits/stdc++.h> using namespace std; #define for_(i, a, b) for (int i = (a); i < (b); ++i) int main() { int a, b, c; while (cin >> a >> b >> c, a != 0) { int min_sum_xy = 1L << 30, min_sum = 1L << 30, ans_x = -1, ans_y = -1; auto update = [&](int x, int y) { if (min_sum_xy > x + y) { ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
71,166
71,167
u942982291
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 2 - b; i <= 100000; i++) { x = i; if ((a * x + d) % b !=...
[ "control_flow.loop.for.initializer.change", "literal.number.change", "control_flow.loop.condition.change" ]
71,168
71,169
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 2 - b; i <= 100000; i++) { x = i; if ((a * x + d) % b !=...
[ "literal.number.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operation.binary.change", "control_flow.loop.condition.change" ]
71,170
71,169
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 2 - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 2 - b; i <= 100000; i++) { x = i; if ((a * x + d) % b !=...
[ "literal.number.change", "control_flow.loop.condition.change" ]
71,171
71,169
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= 100000; i++) { x = i; if ((a * x + d) % b !=...
[ "control_flow.loop.for.initializer.change", "literal.number.change", "control_flow.loop.condition.change" ]
71,168
71,172
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= 100000; i++) { x = i; if ((a * x + d) % b !=...
[ "literal.number.change", "control_flow.loop.condition.change" ]
71,170
71,172
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 2 - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= 100000; i++) { x = i; if ((a * x + d) % b !=...
[ "literal.number.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operation.binary.change", "control_flow.loop.condition.change" ]
71,171
71,172
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= b; i++) { x = i; if ((a * x + d) % b != 0) ...
[ "control_flow.loop.for.initializer.change", "identifier.replace.add", "literal.replace.remove", "control_flow.loop.condition.change" ]
71,168
71,173
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= b; i++) { x = i; if ((a * x + d) % b != 0) ...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.loop.condition.change" ]
71,170
71,173
u749493116
cpp
p00827
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 2 - b; i <= 1; i++) { x = i; if ((a * x + d) % b != 0) ...
#include <bits/stdc++.h> #define mp make_pair #define eps 1e-8 using namespace std; typedef pair<int, int> pii; int main() { int a, b, d; while (cin >> a >> b >> d, a) { int x = 0, y = 0; pii ans = mp(1e9, 1e9); for (int i = -(d / b) - 1 - b; i <= b; i++) { x = i; if ((a * x + d) % b != 0) ...
[ "literal.number.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operation.binary.change", "identifier.replace.add", "literal.replace.remove", "control_flow.loop.condition.change" ]
71,171
71,173
u749493116
cpp
p00827
#include <cmath> #include <cstdio> int abs(int x) { if (x < 0) return -x; return x; } #define INF 5e4 int extgcd(int a, int b, int &x, int &y) { int d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int a, b, d; int main(void) {...
#include <cmath> #include <cstdio> int abs(int x) { if (x < 0) return -x; return x; } #define INF 5e4 int extgcd(int a, int b, int &x, int &y) { int d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int a, b, d; int main(void) {...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change" ]
71,174
71,175
u117454239
cpp
p00827
#include <cmath> #include <iostream> #define LIMIT 50000 using namespace std; int a, b, d, mx, my; void update(int x, int y, int &mx, int &my) { if (y < 0) return; if (x + y == mx + my && a * x + b * y < a * mx + b * my) { mx = x; my = y; } else if (x + y < mx + my) { mx = x; my = y; } } m...
#include <cmath> #include <iostream> #define LIMIT 50000 using namespace std; int a, b, d, mx, my; void update(int x, int y, int &mx, int &my) { if (y < 0) return; if (x + y == mx + my && a * x + b * y < a * mx + b * my) { mx = x; my = y; } else if (x + y < mx + my) { mx = x; my = y; } } m...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change" ]
71,196
71,197
u435226340
cpp
p00827
#include <cmath> #include <iostream> #define LIMIT 50000 using namespace std; int a, b, d, mx, my; void update(int x, int y, int &mx, int &my) { if (y < 0) return; if (x + y == mx + my && a * x + b * y < a * mx + b * my) { mx = x; my = y; } else if (x + y < mx + my) { mx = x; my = y; } } m...
#include <cmath> #include <iostream> #define LIMIT 50000 using namespace std; int a, b, d, mx, my; void update(int x, int y, int &mx, int &my) { if (y < 0) return; if (x + y == mx + my && a * x + b * y < a * mx + b * my) { mx = x; my = y; } else if (x + y < mx + my) { mx = x; my = y; } } m...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
71,198
71,197
u435226340
cpp
p00827
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 16; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) & x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i + t)) { ...
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 17; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) && x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i...
[ "literal.number.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
71,203
71,204
u392015442
cpp
p00827
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 17; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) & x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i + t)) { ...
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 17; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) && x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i...
[ "control_flow.branch.if.condition.change" ]
71,205
71,204
u392015442
cpp
p00827
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 16; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) & x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i + t)) { ...
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 16; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) && x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i...
[ "control_flow.branch.if.condition.change" ]
71,203
71,206
u392015442
cpp
p00827
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 17; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) & x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i + t)) { ...
#include <iostream> main() { for (int a, b, d, x, y, i, t; std::cin >> a >> b >> d, d; printf("%d %d\n", x, y)) { x = y = 1 << 29; for (i = 1 << 16; i-- > 0;) { t = d - a * i; if (!(d < a * i | t % b) && x + y > i + t / b | (x + y == i + t / b & a * x + b * y > a * i...
[ "literal.number.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
71,205
71,206
u392015442
cpp
p00827
#include <algorithm> #include <cassert> #include <cmath> #include <iostream> #include <vector> using namespace std; int a, b, d; struct P { int x, y; P(int x = -1, int y = -1) : x(x), y(y) {} bool operator<(const P &p) const { if (x + y != p.x + p.y) return x + y < p.x + p.y; if (a * x + b * y != a...
#include <algorithm> #include <cassert> #include <cmath> #include <iostream> #include <vector> using namespace std; int a, b, d; struct P { int x, y; P(int x = -1, int y = -1) : x(x), y(y) {} bool operator<(const P &p) const { if (x + y != p.x + p.y) return x + y < p.x + p.y; if (a * x + b * y != a...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change" ]
71,210
71,211
u116766943
cpp
p00827
#include <iostream> using namespace std; typedef long long ll; const ll INF = 1000000000000000ll; bool compare(ll ax, ll ay, ll az, ll bx, ll by, ll bz) { if (ax + ay < bx + by) { return true; } if (ax + ay > bx + by) { return false; } return az < bz; } int main() { while (true) { ll a, b, d...
#include <iostream> using namespace std; typedef long long ll; const ll INF = 1000000000000000ll; bool compare(ll ax, ll ay, ll az, ll bx, ll by, ll bz) { if (ax + ay < bx + by) { return true; } if (ax + ay > bx + by) { return false; } return az < bz; } int main() { while (true) { ll a, b, d...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change" ]
71,212
71,213
u825925708
cpp
p00828
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } template <class T> inline T sqr(T x) { return x * x; } typedef vector<int> v...
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } template <class T> inline T sqr(T x) { return x * x; } typedef vector<int> v...
[ "literal.string.change", "io.output.change" ]
71,234
71,235
u690860505
cpp
p00828
#include <bits/stdc++.h> using namespace std; int n, m, p; int x[100], y[100]; int pegs[10][10][10]; int z_idx[10][10]; int dx[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}; int dy[] = {0, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1}; int dz[] = {-1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1}; bool sequence(int x, int y, i...
#include <bits/stdc++.h> using namespace std; int n, m, p; int x[500], y[500]; int pegs[10][10][10]; int z_idx[10][10]; int dx[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}; int dy[] = {0, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1}; int dz[] = {-1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1}; bool sequence(int x, int y, i...
[ "literal.number.change", "variable_declaration.array_dimensions.change" ]
71,238
71,239
u046809180
cpp
p00828
#include <bits/stdc++.h> using namespace std; int N, M, P; int field[10][10][10]; int diff[13][3] = {{0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 0}, {1, -1, 0}, {1, 0, 1}, {1, 0, -1}, {0, 1, 1}, {0, 1, -1}, {1, 1, 1}, {1, 1, -1}, {1, -1, 1}, {1, -1, -1}}; int sequence(int num)...
#include <bits/stdc++.h> using namespace std; int N, M, P; int field[10][10][10]; int diff[13][3] = {{0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 0}, {1, -1, 0}, {1, 0, 1}, {1, 0, -1}, {0, 1, 1}, {0, 1, -1}, {1, 1, 1}, {1, 1, -1}, {1, -1, 1}, {1, -1, -1}}; int sequence(int num)...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
71,247
71,248
u532353839
cpp
p00828
#include <algorithm> #include <cstring> #include <iostream> #include <vector> using namespace std; char field[7][7][7]; int dp[7][7][7][13]; int N; char get(int x, int y, int z) { if (x < 0 || N <= x || y < 0 || N <= y || z < 0 || N <= z) return '.'; return field[x][y][z]; } int dpget(int x, int y, int z, i...
#include <algorithm> #include <cstring> #include <iostream> #include <vector> using namespace std; char field[7][7][7]; int dp[7][7][7][13]; int N; char get(int x, int y, int z) { if (x < 0 || N <= x || y < 0 || N <= y || z < 0 || N <= z) return '.'; return field[x][y][z]; } int dpget(int x, int y, int z, i...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
71,256
71,257
u525048109
cpp
p00828
#include <algorithm> #include <iostream> using namespace std; const int SPACE = 0; const int BLACK = 1; const int WHITE = 2; const int MAXN = 8; int N, M, P; int G[MAXN][MAXN][MAXN]; int count(int x, int y, int z, int dx, int dy, int dz) { int c = G[z][y][x]; int res; res = 1; for (int i = 0; i < 2; ++i) { ...
#include <algorithm> #include <iostream> using namespace std; const int SPACE = 0; const int BLACK = 1; const int WHITE = 2; const int MAXN = 8; int N, M, P; int G[MAXN][MAXN][MAXN]; int count(int x, int y, int z, int dx, int dy, int dz) { int c = G[z][y][x]; int res; res = 1; for (int i = 0; i < 2; ++i) { ...
[ "control_flow.loop.for.condition.change" ]
71,265
71,266
u967850487
cpp
p00829
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <iostream> #include <stdio.h> #include <vector> using namespace std; #define ll long long #define ld long double #define P pair<ll, ll> #define FOR(i, n, m) for (ll i = n; i < (ll)m; i++) #define FORa(i, c) ...
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <iostream> #include <stdio.h> #include <vector> using namespace std; #define ll long long #define ld long double #define P pair<ll, ll> #define FOR(i, n, m) for (ll i = n; i < (ll)m; i++) #define FORa(i, c) ...
[ "expression.operation.binary.remove" ]
71,282
71,283
u470434409
cpp
p00848
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #in...
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #in...
[ "literal.number.change", "variable_declaration.array_dimensions.change" ]
71,301
71,302
u274875240
cpp
p00854
#include <bits/stdc++.h> #include <stdint.h> typedef uint32_t u32; typedef uint64_t u64; typedef std::pair<int, int> pii; int main() { for (;;) { int n, k, m; std::cin >> n >> k >> m; if (n == 0 and k == 0 and m == 0) break; int dp[20000]; dp[1] = 0; for (int i = 2; i <= n; ++i) { ...
#include <bits/stdc++.h> #include <stdint.h> typedef uint32_t u32; typedef uint64_t u64; typedef std::pair<int, int> pii; int main() { for (;;) { int n, k, m; std::cin >> n >> k >> m; if (n == 0 and k == 0 and m == 0) break; long dp[20000]; dp[1] = 0; for (int i = 2; i <= n; ++i) { ...
[ "variable_declaration.type.primitive.change", "literal.number.change", "expression.operation.binary.change" ]
71,325
71,326
u355552770
cpp
p00854
#include "bits/stdc++.h" #include <unordered_map> #pragma warning(disable : 4996) using namespace std; typedef long double ld; typedef complex<ld> Point; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(x) (x).begin(), (x).end() const ld eps = 1e-9, pi = acos(-1.0); const ld dtop = pi / 180.; const ld p...
#include "bits/stdc++.h" #include <unordered_map> #pragma warning(disable : 4996) using namespace std; typedef long double ld; typedef complex<ld> Point; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(x) (x).begin(), (x).end() const ld eps = 1e-9, pi = acos(-1.0); const ld dtop = pi / 180.; const ld p...
[ "identifier.replace.add", "literal.replace.remove", "io.output.change" ]
71,327
71,328
u186082958
cpp
p00854
#define _CRT_SECURE_NO_WARNINGS 1 #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <forward_list> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #in...
#define _CRT_SECURE_NO_WARNINGS 1 #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <forward_list> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #in...
[ "assignment.change" ]
71,329
71,330
u195954908
cpp
p00854
#include "bits/stdc++.h" using namespace std; int f(int n, int k) { if (n == 1) return 0; return (f(n - 1, k) + k) % n; } int main() { int n, k, m; while (scanf("%d %d %d", &n, &k, &m), n) { printf("%d\n", (m + f(n, k)) % n + 1); } }
#include "bits/stdc++.h" using namespace std; int f(int n, int k) { if (n == 1) return 0; return (f(n - 1, k) + k) % n; } int main() { int n, k, m; while (scanf("%d %d %d", &n, &k, &m), n) { printf("%d\n", (m + f(n - 1, k)) % n + 1); } }
[ "expression.operation.binary.add" ]
71,335
71,336
u006806475
cpp
p00854
#include <algorithm> #include <assert.h> #include <iostream> #include <math.h> #include <stdio.h> #include <string.h> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP...
#include <algorithm> #include <assert.h> #include <iostream> #include <math.h> #include <stdio.h> #include <string.h> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP...
[ "literal.number.change", "expression.operation.binary.change" ]
71,337
71,338
u211535951
cpp
p00854
#include <cstring> #include <iostream> using namespace std; int f(int n, int k) { if (n == 1) return 0; return (f(n - 1, k) + k) % n; } int main() { int n, m, k; while (cin >> n >> k >> m, n) { m = (m - k + 1 + n) % n; cout << (f(n, k) + m - 1) % n + 1 << endl; } }
#include <cstring> #include <iostream> using namespace std; int f(int n, int k) { if (n == 1) return 0; return (f(n - 1, k) + k) % n; } int main() { int n, m, k; while (cin >> n >> k >> m, n) { m = (m - k + 1 + n) % n; cout << (f(n, k) + m - 1 + n) % n + 1 << endl; } }
[ "expression.operation.binary.add" ]
71,339
71,340
u458173932
cpp
p00854
#include <iostream> using namespace std; int f(int n, int k) { if (n == 1) return 0; return (f(n - 1, k) + k) % n; } int main() { int n, k, m; while (cin >> n >> k >> m, n | k | m) { m = (m - k + 1) % n; cout << (f(n, k) + m - 1) % n + 1 << endl; } }
#include <iostream> using namespace std; int f(int n, int k) { if (n == 1) return 0; return (f(n - 1, k) + k) % n; } int main() { int n, k, m; while (cin >> n >> k >> m, n | k | m) { m = (m - k + 1 + n) % n; cout << (f(n, k) + m - 1 + n) % n + 1 << endl; } }
[ "assignment.change" ]
71,341
71,342
u392015442
cpp
p00854
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
// Enjoy your stay. #include <bits/stdc++.h> #define EPS 1e-9 #define INF 1070000000LL #define MOD 1000000007LL #define fir first #define foreach(it, X) for (auto it = (X).begin(); it != (X).end(); it++) #define ite iterator #define mp make_pair #define mt make_tuple #define rep(i, n) rep2(i, 0, n) #define rep2(i, m,...
[ "expression.operation.binary.remove" ]
71,343
71,344
u603085888
cpp
p00829
//?????????????????????(8??????????????????????????´??°??¨1?????????????????????????????§????????????)???????????????????????§, //???????±?????????? ?£(N[i]^K) = N9^K //(1???i???8)??¨??????K????±?????????°????????? 1??????????¢???????????????°OK // reading hard #include <stdio.h> #define int long long int T; int N[9];...
//?????????????????????(8??????????????????????????´??°??¨1?????????????????????????????§????????????)???????????????????????§, //???????±?????????? ?£(N[i]^K) = N9^K //(1???i???8)??¨??????K????±?????????°????????? 1??????????¢???????????????°OK // reading hard #include <stdio.h> #define int long long int T; int N[9];...
[ "literal.number.type.widen.change" ]
71,347
71,348
u911041619
cpp
p00829
#include <cstdio> #include <set> #define REP(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int cc; scanf("%d", &cc); while (cc-- > 0) { unsigned int n[9]; REP(i, 9) scanf("%xu", n + i); unsigned int key = 0; REP(i, 32) { long long sum = 0; REP(j, 8) { ...
#include <cstdio> #include <set> #define REP(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int cc; scanf("%d", &cc); while (cc-- > 0) { unsigned int n[9]; REP(i, 9) scanf("%xu", n + i); unsigned int key = 0; REP(i, 32) { long long sum = 0; REP(j, 8) { ...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
71,349
71,350
u609255173
cpp
p00829
#include <cstdio> using namespace std; int main() { unsigned n[9], k, t; int s; for (scanf("%d", &s); s--;) { for (int i = 0; i < 9; ++i) { scanf("%x", &n[i]); } k = 0; for (int i = 0; i < 32; ++i) { t = 0; for (int j = 0; j < 8; ++j) { t += n[j] ^ k; } k |=...
#include <cstdio> using namespace std; int main() { unsigned n[9], k, t; int s; for (scanf("%d", &s); s--;) { for (int i = 0; i < 9; ++i) { scanf("%x", &n[i]); } k = 0; for (int i = 0; i < 32; ++i) { t = 0; for (int j = 0; j < 8; ++j) { t += n[j] ^ k; } k |=...
[ "assignment.value.change", "expression.operation.binary.change" ]
71,351
71,352
u479246559
cpp
p00831
#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; int n, d; vector<string> vec; bool contain(string &a, string &b) { string s, t; if (a.size() > b.size()) s = a, t = b; else s = b, t = a; int pos = 0; for (int i = 0; i < s.size();...
#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; int n, d; vector<string> vec; bool contain(string &a, string &b) { string s, t; if (a.size() > b.size()) s = a, t = b; else s = b, t = a; int pos = 0; for (int i = 0; i < s.size();...
[ "control_flow.return.add" ]
71,367
71,368
u580482263
cpp
p00832
#include <bits/stdc++.h> using namespace std; struct die { int p[6]; void init() { for (int i = 0; i < 6; i++) p[i] = i + 1; } void roll(int a, int b, int c, int d) { int tmp = p[a]; p[a] = p[b]; p[b] = p[c]; p[c] = p[d]; p[d] = tmp; } void ra() { roll(0, 4, 5, 1); } void rb...
#include <bits/stdc++.h> using namespace std; struct die { int p[6]; void init() { for (int i = 0; i < 6; i++) p[i] = i + 1; } void roll(int a, int b, int c, int d) { int tmp = p[a]; p[a] = p[b]; p[b] = p[c]; p[c] = p[d]; p[d] = tmp; } void ra() { roll(0, 4, 5, 1); } void rb...
[ "control_flow.branch.else.add" ]
71,373
71,374
u923320778
cpp
p00833
#include <complex> #include <iostream> #include <map> #include <vector> using namespace std; typedef complex<double> P; typedef pair<P, P> L; #define X real() #define Y imag() const double EPS = (1e-7); const int INF = 1 << 20; double dot(P &a, P &b) { return a.X * b.X + a.Y * b.Y; } double cross(P &a, P &b) { return a...
#include <complex> #include <iostream> #include <map> #include <vector> using namespace std; typedef complex<double> P; typedef pair<P, P> L; #define X real() #define Y imag() const double EPS = (1e-7); const int INF = 1 << 20; double dot(P &a, P &b) { return a.X * b.X + a.Y * b.Y; } double cross(P &a, P &b) { return a...
[ "expression.operation.unary.arithmetic.remove", "control_flow.branch.if.condition.change" ]
71,377
71,378
u858560358
cpp
p00833
#include <cmath> #include <complex> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; const double eps = 1e-5; typedef complex<double> P; typedef vector<P> Polygon; typedef vector<Polygon> Country; double cross(P a, P b) { return (conj(a) * b).imag(); } double dot(P a, P b)...
#include <cmath> #include <complex> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; const double eps = 1e-9; typedef complex<double> P; typedef vector<P> Polygon; typedef vector<Polygon> Country; double cross(P a, P b) { return (conj(a) * b).imag(); } double dot(P a, P b)...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.branch.if.condition.change" ]
71,379
71,380
u766225878
cpp
p00833
#include <cmath> #include <complex> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; const double eps = 1e-9; typedef complex<double> P; typedef vector<P> Polygon; typedef vector<Polygon> Country; double cross(P a, P b) { return (conj(a) * b).imag(); } double dot(P a, P b)...
#include <cmath> #include <complex> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; const double eps = 1e-9; typedef complex<double> P; typedef vector<P> Polygon; typedef vector<Polygon> Country; double cross(P a, P b) { return (conj(a) * b).imag(); } double dot(P a, P b)...
[ "control_flow.branch.if.condition.change" ]
71,381
71,380
u766225878
cpp
p00833
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(a) (a).begin(), (a).end() #define fs first #define sc second #define pb push_back #define sz size() using namespace std; typedef pair<int, int> P; typedef pair<P, P> L; typedef vector<int> vi; inline int dot(const P &a, const P...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(a) (a).begin(), (a).end() #define fs first #define sc second #define pb push_back #define sz size() using namespace std; typedef pair<int, int> P; typedef pair<P, P> L; typedef vector<int> vi; inline int dot(const P &a, const P...
[ "control_flow.return.add" ]
71,382
71,383
u914140574
cpp
p00833
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #incl...
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #incl...
[ "function.return_value.change", "expression.operation.binary.change", "function.return_type.change" ]
71,386
71,387
u228816757
cpp
p00833
#include <bits/stdc++.h> #define EPS (1e-8) #define INF (1e9) #define X real() #define Y imag() #define N 105 #define M 15 using namespace std; typedef pair<string, string> P1; typedef complex<double> P; int n, a, b, Slen, mark[M], ans; vector<P> v[N]; set<string> S; string s[N]; string d[M]; set<P1> z; double dot(P A...
#include <bits/stdc++.h> #define EPS (1e-8) #define INF (1e9) #define X real() #define Y imag() #define N 105 #define M 15 using namespace std; typedef pair<string, string> P1; typedef complex<double> P; int n, a, b, Slen, mark[M], ans; vector<P> v[N]; set<string> S; string s[N]; string d[M]; set<P1> z; double dot(P A...
[ "identifier.change", "call.arguments.change" ]
71,388
71,389
u084540620
cpp
p00836
#include <algorithm> #include <iostream> using namespace std; int prime[200]; int main() { int top = 0; for (int i = 2; i < 1000; i++) { bool ok = true; for (int j = 0; j < top; j++) if (i % prime[j] == 0) ok = false; if (ok) { prime[top] = i; top++; } } int n; while ...
#include <algorithm> #include <iostream> using namespace std; int prime[2000]; int main() { int top = 0; for (int i = 2; i < 10000; i++) { bool ok = true; for (int j = 0; j < top; j++) if (i % prime[j] == 0) ok = false; if (ok) { prime[top] = i; top++; } } int n; whil...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
71,418
71,419
u455494700
cpp
p00864
#include <bits/stdc++.h> using namespace std; #define LOG(...) fprintf(stderr, __VA_ARGS__) //#define LOG(...) #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define RFOR(i, a, b) for (int i = (int)(b - 1); i >= (int)(a); --i) #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for...
#include <bits/stdc++.h> using namespace std; #define LOG(...) fprintf(stderr, __VA_ARGS__) //#define LOG(...) #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define RFOR(i, a, b) for (int i = (int)(b - 1); i >= (int)(a); --i) #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for...
[ "literal.number.change", "call.arguments.change" ]
71,423
71,424
u966401365
cpp
p00864
#include "bits/stdc++.h" using namespace std; int main() { int n, w; while (scanf("%d %d", &n, &w), n) { int cnt[11] = {0}; int m = 0, h = 0; for (int i = 0; i < n; i++) { int v; scanf("%d", &v); cnt[v / w]++; m = max(m, v / w); } for (int i = 0; i < n; i++) { h = m...
#include "bits/stdc++.h" using namespace std; int main() { int n, w; while (scanf("%d %d", &n, &w), n) { int cnt[11] = {0}; int m = 0, h = 0; for (int i = 0; i < n; i++) { int v; scanf("%d", &v); cnt[v / w]++; m = max(m, v / w); } for (int i = 0; i <= m; i++) { h = ...
[ "control_flow.loop.for.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
71,425
71,426
u006806475
cpp
p00864
#include "bits/stdc++.h" using namespace std; int main() { int n, w; while (scanf("%d %d", &n, &w), n) { int cnt[11] = {0}; int m = 0, h = 0; for (int i = 0; i < n; i++) { int v; scanf("%d", &v); cnt[v / w]++; m = max(m, v / w); } for (int i = 0; i < n; i++) { h = m...
#include "bits/stdc++.h" using namespace std; int main() { int n, w; while (scanf("%d %d", &n, &w), n) { int cnt[11] = {0}; int m = 0, h = 0; for (int i = 0; i < n; i++) { int v; scanf("%d", &v); cnt[v / w]++; m = max(m, v / w); } for (int i = 0; i <= m; i++) { h = ...
[ "control_flow.loop.for.condition.change" ]
71,427
71,426
u006806475
cpp
p00864
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int n, w; int dat[100]; int maxi; int l, r; double calc() { double ans = 0; for (int i = l; i <= r; ++i) { ans += ((double)(r - i) / (r - l)) * ((double)dat[i] / maxi); } return ans + 0.01; } main() { while ((cin >> n >> w) &...
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int n, w; int dat[100]; int maxi; int l, r; double calc() { double ans = 0; l = 0; for (int i = l; i <= r; ++i) { ans += ((double)(r - i) / (r - l)) * ((double)dat[i] / maxi); } return ans + 0.01; } main() { while ((cin >> ...
[ "assignment.add" ]
71,430
71,431
u480459673
cpp
p00864
#include <algorithm> #include <cstring> #include <iostream> using namespace std; int f[100]; int main() { int n, w, v; while (cin >> n >> w, n | w) { memset(f, 0, sizeof(f)); int rm = 0, maxh = 0; double s = 0; while (n--) { cin >> v; maxh = max(maxh, ++f[v / w]); rm = max(rm, v /...
#include <algorithm> #include <cstring> #include <iostream> using namespace std; int f[100]; int main() { int n, w, v; while (cin >> n >> w, n | w) { memset(f, 0, sizeof(f)); int rm = 0, maxh = 0; double s = 0; while (n--) { cin >> v; maxh = max(maxh, ++f[v / w]); rm = max(rm, v /...
[ "expression.operation.binary.add" ]
71,432
71,433
u393475075
cpp
p00864
#include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #incl...
#include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #incl...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove" ]
71,434
71,435
u660774699
cpp
p00865
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> #define REP(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, a) REP(i, 0, a) using namespace std; int n, m, k; int main(void) { while (cin >> n >> m >> k && n) { int dp[n][n * m + 1]; memset(dp, 0, sizeof(dp)); rep(i...
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> #define REP(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, a) REP(i, 0, a) using namespace std; int n, m, k; int main(void) { while (cin >> n >> m >> k && n) { int dp[n][n * m + 1]; memset(dp, 0, sizeof(dp)); rep(i...
[ "expression.operation.binary.remove", "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
71,457
71,458
u633068244
cpp
p00865
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define SZ(n) (int)n.size() #define dump(x) cerr << #x << " = " << (x) << endl; #d...
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define SZ(n) (int)n.size() #define dump(x) cerr << #x << " = " << (x) << endl; #d...
[ "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
71,459
71,460
u746860079
cpp
p00865
#include <algorithm> #include <assert.h> #include <iostream> #include <math.h> #include <stdio.h> #include <string.h> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP...
#include <algorithm> #include <assert.h> #include <iostream> #include <math.h> #include <stdio.h> #include <string.h> #include <vector> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP...
[ "variable_declaration.type.primitive.change" ]
71,476
71,477
u211535951
cpp
p00865
#include <cmath> #include <iostream> using namespace std; main() { int n, m, k; while (1) { cin >> n >> m >> k; if (n == 0 && m == 0 && k == 0) break; int num[100000000]; for (int i = 1; i <= n; i++) num[i] = 1; bool end = false; double ans = 0; double a = pow((double)m, (...
#include <cmath> #include <iostream> using namespace std; main() { int n, m, k; while (1) { cin >> n >> m >> k; if (n == 0 && m == 0 && k == 0) break; int num[10000]; for (int i = 1; i <= n; i++) num[i] = 1; bool end = false; double ans = 0; double a = pow((double)m, (doub...
[ "literal.number.change", "variable_declaration.array_dimensions.change" ]
71,480
71,479
u622083648
cpp
p00866
#include <bits/stdc++.h> using namespace std; namespace { template <class T> ostream &operator<<(ostream &os, const vector<T> &vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs.size(); i++) os << " " << vs[i]; return os << "]"; } int N; vector<int> S, T, U; bool inp...
#include <bits/stdc++.h> using namespace std; namespace { template <class T> ostream &operator<<(ostream &os, const vector<T> &vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs.size(); i++) os << " " << vs[i]; return os << "]"; } int N; vector<int> S, T, U; bool inp...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
71,487
71,488
u860016155
cpp
p00866
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; #define...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; #define...
[]
71,493
71,494
u266871004
cpp
p00864
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #define INF 1e9 #define MOD 1e9 + 7 #define rep(i, n) for (int...
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #define INF 1e9 #define MOD 1e9 + 7 #define rep(i, n) for (int...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
71,565
71,566
u794215091
cpp
p00864
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #define INF 1e9 #define MOD 1e9 + 7 #define rep(i, n) for (int...
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #define INF 1e9 #define MOD 1e9 + 7 #define rep(i, n) for (int...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change" ]
71,567
71,566
u794215091
cpp
p00864
#include <bits/stdc++.h> using namespace std; typedef ostringstream OSS; typedef istringstream ISS; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<double> VD; typedef vector<VD> VVD; typedef vector<str...
#include <bits/stdc++.h> using namespace std; typedef ostringstream OSS; typedef istringstream ISS; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<double> VD; typedef vector<VD> VVD; typedef vector<str...
[ "literal.number.change", "call.arguments.change" ]
71,574
71,575
u442290497
cpp
p00864
#include <bits/stdc++.h> using namespace std; typedef ostringstream OSS; typedef istringstream ISS; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<double> VD; typedef vector<VD> VVD; typedef vector<str...
#include <bits/stdc++.h> using namespace std; typedef ostringstream OSS; typedef istringstream ISS; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<double> VD; typedef vector<VD> VVD; typedef vector<str...
[ "literal.number.change", "call.arguments.change" ]
71,574
71,576
u442290497
cpp
p00864
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define INF 1000000000 #define rep(i, n) for (int i = 0; i < n; i...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define INF 1000000000 #define rep(i, n) for (int i = 0; i < n; i...
[]
71,577
71,578
u534550471
cpp
p00864
#include "bits/stdc++.h" #include <unordered_map> #pragma warning(disable : 4996) using namespace std; const int My_Inf = 2147483647; const long long int My_LInf = 9223372036854775807; struct action { int ac; int time; }; int main() { while (1) { int n, w; cin >> n >> w; if (!n) break; vect...
#include "bits/stdc++.h" #include <unordered_map> #pragma warning(disable : 4996) using namespace std; const int My_Inf = 2147483647; const long long int My_LInf = 9223372036854775807; struct action { int ac; int time; }; int main() { while (1) { int n, w; cin >> n >> w; if (!n) break; vect...
[ "literal.number.change", "call.arguments.change" ]
71,579
71,580
u186082958
cpp
p00864
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) (v).begin(), (v).end() #define INF 1e9 using namespace std; int main() { int n, w; while (cin >> n >> w and n + w) { vector<int> data(n); REP(i, n) { cin >> data[i]; } sort(ALL(data)); int maxim = data[n ...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) (v).begin(), (v).end() #define INF 1e9 using namespace std; int main() { int n, w; while (cin >> n >> w and n + w) { vector<int> data(n); REP(i, n) { cin >> data[i]; } sort(ALL(data)); int maxim = data[n ...
[]
71,581
71,582
u476368601
cpp
p00874
#include <iostream> using namespace std; int main() { for (int h, w; cin >> h >> w;) { int a[21] = {}, b[21] = {}, r = 0; for (int i = 0, t; i < h && cin >> t; i++) a[t]++; for (int i = 0, t; i < w && cin >> t; i++) b[t]++; for (int i = 0; i < 21; i++) { int t = min(a[i], b[i]); ...
#include <iostream> using namespace std; int main() { for (int h, w; cin >> h >> w, h;) { int a[21] = {}, b[21] = {}, r = 0; for (int i = 0, t; i < h && cin >> t; i++) a[t]++; for (int i = 0, t; i < w && cin >> t; i++) b[t]++; for (int i = 0; i < 21; i++) { int t = min(a[i], b[i]); ...
[]
71,585
71,586
u076398897
cpp
p00836
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<int> v; bool isPrime(int n) { for (int i = 0; i < v.size() && v[i] * v[i] <= n; i++) { if (n % v[i] == 0) return false; } return true; } int main() { v.push_back(2); v.push_back(3); for (int i = 5; i * i <= 1...
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<int> v; bool isPrime(int n) { for (int i = 0; i < v.size() && v[i] * v[i] <= n; i++) { if (n % v[i] == 0) return false; } return true; } int main() { v.push_back(2); v.push_back(3); for (int i = 5; i <= 10000...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
71,619
71,620
u214404619
cpp
p00840
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define INF 10000 #define N 10 typedef pair<double, double> P; typedef vector<P> V; int n; double w[N]; int getW(int bit) { int res = 0; for (int i = 0; i < n; i++) if (bit >> i & 1) res += w[i]; return res; ...
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define INF 10000 #define N 10 typedef pair<double, double> P; typedef vector<P> V; int n; double w[N]; int getW(int bit) { int res = 0; for (int i = 0; i < n; i++) if (bit >> i & 1) res += w[i]; return res; ...
[ "identifier.change", "expression.operation.binary.change" ]
71,649
71,650
u841011175
cpp
p00845
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdlib> #include <cstring> #include <deque> #include <exception> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <tuple> #include <v...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdlib> #include <cstring> #include <deque> #include <exception> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <tuple> #include <v...
[ "literal.number.change", "control_flow.branch.if.condition.change", "identifier.change", "variable_access.subscript.index.change" ]
71,667
71,668
u348323370
cpp