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
p00632
#include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int dir[] = {0, 1, 0, -1}; int H, W, dist[25][25]; string s[25], t; int main() { while (cin >> H >> W, H) { int ax = -1, ay = -1, bx = -1, by = -1; for (int i = 0; i < H; i++) { cin >> s[i]; for (int j = ...
#include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int dir[] = {0, 1, 0, -1}; int H, W, dist[25][25]; string s[25], t; int main() { while (cin >> H >> W, H) { int ax = -1, ay = -1, bx = -1, by = -1; for (int i = 0; i < H; i++) { cin >> s[i]; for (int j = ...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,603
62,604
u823513038
cpp
p00632
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define fr first #define sc second #define INFTY 1000000 typedef pair<int, int> Pt; typedef pair<pair<Pt...
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define fr first #define sc second #define INFTY 1000000 typedef pair<int, int> Pt; typedef pair<pair<Pt...
[ "expression.operation.binary.add" ]
62,626
62,627
u095377734
cpp
p00632
#include <algorithm> #include <iostream> #include <queue> #include <stdio.h> #define INF 99999999 using namespace std; queue<int> qy, qx, qcnt; int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; int n, m, x, y, cnt, nx, ny, mini, ansx, ansy; int t[20][20], sx, sy, tx, ty, vd[20][20]; string in; int main() { while (c...
#include <algorithm> #include <iostream> #include <queue> #include <stdio.h> #define INF 99999999 using namespace std; queue<int> qy, qx, qcnt; int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; int n, m, x, y, cnt, nx, ny, mini, ansx, ansy; int t[20][20], sx, sy, tx, ty, vd[20][20]; string in; int main() { while (c...
[ "control_flow.loop.for.condition.change" ]
62,628
62,629
u923320778
cpp
p00606
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <ss...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <ss...
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
62,638
62,639
u160041984
cpp
p00606
#include <algorithm> #include <cmath> #include <stack> #include <stdio.h> using namespace std; int b_row, b_col, memo[16][3][3]; char b[2]; bool rangeCheck(int row, int col) { if (row >= 0 && row <= 2 && col >= 0 && col <= 2) return true; else { return false; } } int translate(char ch) { switch (ch...
#include <algorithm> #include <cmath> #include <stack> #include <stdio.h> using namespace std; int b_row, b_col, memo[16][3][3]; char b[2]; bool rangeCheck(int row, int col) { if (row >= 0 && row <= 2 && col >= 0 && col <= 2) return true; else { return false; } } int translate(char ch) { switch (ch...
[ "assignment.value.change" ]
62,640
62,641
u697145890
cpp
p00606
#include <algorithm> #include <cmath> #include <stack> #include <stdio.h> using namespace std; int b_row, b_col, memo[16][3][3]; char b[2]; bool rangeCheck(int row, int col) { if (row >= 0 && row <= 2 && col >= 0 && col <= 2) return true; else { return false; } } int translate(char ch) { switch (ch...
#include <algorithm> #include <cmath> #include <stack> #include <stdio.h> using namespace std; int b_row, b_col, memo[16][3][3]; char b[2]; bool rangeCheck(int row, int col) { if (row >= 0 && row <= 2 && col >= 0 && col <= 2) return true; else { return false; } } int translate(char ch) { switch (ch...
[ "assignment.value.change" ]
62,640
62,642
u697145890
cpp
p00606
#include <iostream> #include <stdio.h> using namespace std; int main() { while (1) { int n, s, t, b, sum = 0; int ai[16][3][3] = {0}; char a, d, c; scanf("%d", &n); if (n == 0) break; cin >> a >> d >> c; s = a - 'A'; t = d - 'A'; b = c - 'A'; ai[0][s / 3][s % 3] = 1; ...
#include <iostream> #include <stdio.h> using namespace std; int main() { while (1) { int n, s, t, b, sum = 0; int ai[16][3][3] = {0}; char a, d, c; scanf("%d", &n); if (n == 0) break; cin >> a >> d >> c; s = a - 'A'; t = d - 'A'; b = c - 'A'; ai[0][s / 3][s % 3] = 1; ...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
62,643
62,644
u187737708
cpp
p00606
#include <iostream> #include <stdio.h> using namespace std; int main() { while (1) { int n, s, t, b, sum = 0; int ai[16][3][3] = {0}; char a, d, c; scanf("%d", &n); if (n == 0) break; cin >> a >> d >> c; s = a - 'A'; t = d - 'A'; b = c - 'A'; ai[0][s / 3][s % 3] = 1; ...
#include <iostream> #include <stdio.h> using namespace std; int main() { while (1) { int n, s, t, b, sum = 0; int ai[16][3][3] = {0}; char a, d, c; scanf("%d", &n); if (n == 0) break; cin >> a >> d >> c; s = a - 'A'; t = d - 'A'; b = c - 'A'; ai[0][s / 3][s % 3] = 1; ...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
62,645
62,644
u187737708
cpp
p00606
#include <iostream> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; const int dx[4] = {0, 0, 1, -1}; const int dy[4] = {1, -1, 0, 0}; int get_x(char c) { if (c == 'A' || c == 'D' || c == 'G') return 0; if (c == 'B' || c == 'E' || c == 'H') return 1; if (c == 'C' |...
#include <iostream> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; const int dx[4] = {0, 0, 1, -1}; const int dy[4] = {1, -1, 0, 0}; int get_x(char c) { if (c == 'A' || c == 'D' || c == 'G') return 0; if (c == 'B' || c == 'E' || c == 'H') return 1; if (c == 'C' |...
[ "variable_declaration.type.primitive.change" ]
62,646
62,647
u615727692
cpp
p00606
#include <iostream> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; const int dx[4] = {0, 0, 1, -1}; const int dy[4] = {1, -1, 0, 0}; int get_x(char c) { if (c == 'A' || c == 'D' || c == 'G') return 0; if (c == 'B' || c == 'E' || c == 'H') return 1; if (c == 'C' |...
#include <iostream> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; const int dx[4] = {0, 0, 1, -1}; const int dy[4] = {1, -1, 0, 0}; int get_x(char c) { if (c == 'A' || c == 'D' || c == 'G') return 0; if (c == 'B' || c == 'E' || c == 'H') return 1; if (c == 'C' |...
[ "variable_declaration.type.primitive.change", "assignment.change" ]
62,648
62,647
u615727692
cpp
p00606
#include "stdio.h" #include <cstring> #include <iostream> using namespace std; int dx[] = {-1, 0, 1, 0}; int dy[] = {0, -1, 0, 1}; int main() { int n; double prob[2][3][3]; bool junk[3][3]; while (cin >> n, n) { char s, t, b; cin >> s >> t >> b; double ans = 0.0; for (int i = 0; i < 2; i++) ...
#include "stdio.h" #include <cstring> #include <iostream> using namespace std; int dx[] = {-1, 0, 1, 0}; int dy[] = {0, -1, 0, 1}; int main() { int n; double prob[2][3][3]; bool junk[3][3]; while (cin >> n, n) { char s, t, b; cin >> s >> t >> b; double ans = 0.0; for (int i = 0; i < 2; i++) ...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.condition.change" ]
62,653
62,654
u032250180
cpp
p00606
#include <cstdio> #include <iostream> #include <map> // ABC // DEF // GHI using namespace std; ; typedef pair<int, int> P; int n, out, can, dx[] = {0, 0, -1, 1}, dy[] = {1, -1, 0, 0}, dp[3][3][16]; int gox, goy, mox, moy, stx, sty; int func(int y, int x, int bat) { if (dp[y][x][bat] >= 0) return dp[y][x][bat]; ...
#include <cstdio> #include <iostream> #include <map> // ABC // DEF // GHI using namespace std; ; typedef pair<int, int> P; int n, out, can, dx[] = {0, 0, -1, 1}, dy[] = {1, -1, 0, 0}, dp[3][3][16]; int gox, goy, mox, moy, stx, sty; int func(int y, int x, int bat) { if (dp[y][x][bat] >= 0) return dp[y][x][bat]; ...
[ "assignment.variable.change", "identifier.change" ]
62,655
62,656
u372785464
cpp
p00606
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using nam...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using nam...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
62,660
62,661
u823048060
cpp
p00606
#include <iostream> #include <string.h> using namespace std; int n; char room[10] = "ABCDEFGHI"; char s, t, b; int off[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; int x, y; double table[3][3]; double solve() { memset(&table[0][0], 0, sizeof(double) * 9); table[x][y] = 1.0; for (int k = 0; k < n; k++) { d...
#include <iostream> #include <string.h> using namespace std; int n; char room[10] = "ABCDEFGHI"; char s, t, b; int off[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; int x, y; double table[3][3]; double solve() { memset(&table[0][0], 0, sizeof(double) * 9); table[y][x] = 1.0; for (int k = 0; k < n; k++) { d...
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change" ]
62,662
62,663
u317038881
cpp
p00606
#include <cstring> #include <iomanip> #include <iostream> using namespace std; int main() { int n; while (cin >> n, n) { long double room[3][3][n + 1]; memset(room, 0, sizeof(room)); char s, t, b; cin >> s >> t >> b; int y = (s - 'A') / 3; int x = (s - 'A') % 3; int by = (b - 'A') / ...
#include <cstring> #include <iomanip> #include <iostream> using namespace std; int main() { int n; while (cin >> n, n) { long double room[3][3][n + 1]; memset(room, 0, sizeof(room)); char s, t, b; cin >> s >> t >> b; int y = (s - 'A') / 3; int x = (s - 'A') % 3; int by = (b - 'A') / ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
62,666
62,667
u860016155
cpp
p00606
#include <cstdio> #include <iostream> using namespace std; const int MAX = 16; const int NUM = 9; double f[MAX][NUM]; int main() { int n, s, t, b; char ts, tt, tb; while (cin >> n, n) { cin >> ts >> tt >> tb; s = ts - 'A'; t = tt - 'A'; b = tb - 'A'; fill((double *)f, (double *)f + MAX + NU...
#include <cstdio> #include <iostream> using namespace std; const int MAX = 16; const int NUM = 9; double f[MAX][NUM]; int main() { int n, s, t, b; char ts, tt, tb; while (cin >> n, n) { cin >> ts >> tt >> tb; s = ts - 'A'; t = tt - 'A'; b = tb - 'A'; fill((double *)f, (double *)(f + MAX), 0...
[ "call.arguments.change", "expression.operation.binary.change" ]
62,668
62,669
u685879631
cpp
p00606
#include <cstdio> #include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) #define ck(a) (0 <= (a) && (a) <= 9) int di[] = {-3, -1, 1, 3}; int main() { using namespace std; int n, s, t, b; char cs, ct, cb; while (cin >> n, n) { cin >> cs >> ct >> cb; s = cs - 'A'; t = ct - 'A'; b = ...
#include <cstdio> #include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) #define ck(a) (0 <= (a) && (a) < 9) int di[] = {-3, -1, 1, 3}; int main() { using namespace std; int n, s, t, b; char cs, ct, cb; while ((cin >> n), n) { cin >> cs >> ct >> cb; s = cs - 'A'; t = ct - 'A'; b =...
[ "expression.operator.compare.change", "preprocessor.define.value.change", "control_flow.loop.condition.change" ]
62,672
62,673
u228816757
cpp
p00606
#include <iostream> #include <stdio.h> using namespace std; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0. - 1}; double dp[3][3][16]; int n; char s, t, b; int S, T, B; double solve(int y, int x, int n) { if (dp[y][x][n] != -1.0) return dp[y][x][n]; if (n == 0) return dp[y][x][n] = (y * 3 + x == T ? 1.0 :...
#include <iostream> #include <stdio.h> using namespace std; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; double dp[3][3][16]; int n; char s, t, b; int S, T, B; double solve(int y, int x, int n) { if (dp[y][x][n] != -1.0) return dp[y][x][n]; if (n == 0) return dp[y][x][n] = (y * 3 + x == T ? 1.0 : ...
[ "misc.typo", "expression.operation.binary.change", "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
62,674
62,675
u923320778
cpp
p00606
#include <iostream> #include <stdio.h> using namespace std; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0. - 1}; double dp[3][3][16]; int n; char s, t, b; int S, T, B; double solve(int y, int x, int n) { if (dp[y][x][n] != -1.0) return dp[y][x][n]; if (n == 0) return dp[y][x][n] = (y * 3 + x == T ? 1.0 :...
#include <iostream> #include <stdio.h> using namespace std; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; double dp[3][3][16]; int n; char s, t, b; int S, T, B; double solve(int y, int x, int n) { if (dp[y][x][n] != -1.0) return dp[y][x][n]; if (n == 0) return dp[y][x][n] = (y * 3 + x == T ? 1.0 : ...
[ "misc.typo", "expression.operation.binary.change" ]
62,676
62,675
u923320778
cpp
p00609
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; vector<int> rows[10000]; int main() { int an, bn, r; while (cin >> an >> bn >> r, an | bn | r) { vector<int> xs(an), ys(an); for (int i = 0; i < an; i++) { cin >> xs[i] >> ys[i]; } for (int i = 0...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; vector<int> rows[10000]; int main() { int an, bn, r; while (cin >> an >> bn >> r, an | bn | r) { vector<int> xs(an), ys(an); for (int i = 0; i < an; i++) { cin >> xs[i] >> ys[i]; } for (int i = 0...
[ "identifier.change", "control_flow.loop.condition.change" ]
62,734
62,735
u393475075
cpp
p00609
#include <iostream> #include <list> #include <vector> #define POS_MAX 10000 #define GRID 40 #define GRID_NUM 250 // POS_MAX / GRID struct pos_t { pos_t() {} pos_t(int _x, int _y) : x(_x), y(_y) {} pos_t(std::istream *is) { (*is) >> x >> y; } int x, y; }; void process(const int AN, const int BN, const int R) {...
#include <iostream> #include <list> #include <vector> #define POS_MAX 10000 #define GRID 40 #define GRID_NUM 250 // POS_MAX / GRID struct pos_t { pos_t() {} pos_t(int _x, int _y) : x(_x), y(_y) {} pos_t(std::istream *is) { (*is) >> x >> y; } int x, y; }; void process(const int AN, const int BN, const int R) {...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
62,736
62,737
u284958946
cpp
p00609
#include <bits/stdc++.h> using namespace std; int A, B, R; vector<int> P[11000]; bool check(int x, int y, int x1, int y1) { if ((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y) > 16 * R * R) return false; return true; } int main() { cin.tie(0); ios::sync_with_stdio(false); while (cin >> A >> B >> R && (A ||...
#include <bits/stdc++.h> using namespace std; int A, B, R; vector<int> P[11000]; bool check(int x, int y, int x1, int y1) { if ((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y) > 16 * R * R) return false; return true; } int main() { cin.tie(0); ios::sync_with_stdio(false); while (cin >> A >> B >> R && (A ||...
[ "control_flow.loop.for.initializer.change", "call.add", "call.arguments.change" ]
62,741
62,742
u147939316
cpp
p00609
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret < r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; i ...
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret <= r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "identifier.change", "misc.opposites", "expression.operator.arithmetic.change" ]
62,745
62,746
u741328636
cpp
p00609
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret < r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; i ...
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret <= r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "identifier.change" ]
62,747
62,746
u741328636
cpp
p00609
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret < r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; i ...
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret <= r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "identifier.change" ]
62,748
62,746
u741328636
cpp
p00609
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret < r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; i ...
#include <algorithm> #include <iostream> #include <vector> #define MAX 110000 using namespace std; vector<int> ay[MAX]; int an, bn, x, y, r; int D(int t) { int ret = 0; while (ret * ret <= r * r - t * t) ret++; return ret - 1; } int main() { while (cin >> an >> bn >> r && an + bn) { for (int i = 0; ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
62,749
62,746
u741328636
cpp
p00609
#include <algorithm> #include <iostream> #include <vector> #define M 110000 using namespace std; vector<int> v[M]; int a, b, x, y, r; int D(int e) { int t = 0; while (e * e <= r * r - t * t) e++; return e - 1; } int main() { while (cin >> a >> b >> r && a + b) { for (int i = 0; i < M; i++) { v...
#include <algorithm> #include <iostream> #include <vector> #define F 110000 using namespace std; vector<int> v[F]; int a, b, x, y, r; int D(int t) { int e = 0; while (e * e <= r * r - t * t) e++; return e - 1; } int main() { while (cin >> a >> b >> r && a + b) { for (int i = 0; i < F; i++) { v...
[ "identifier.change", "variable_declaration.array_dimensions.change", "variable_declaration.name.change", "control_flow.loop.condition.change" ]
62,750
62,751
u741328636
cpp
p00609
#include <bits/stdc++.h> #define F 110000 using namespace std; vector<int> v[F]; int a, b, x, y, r, i; int D(int t) { int e = 0; while (e * e <= r * r - t * t) e++; return e - 1; } int main() { while (cin >> a >> b >> r && a + b) for (int i = 0; i < F; i++) v[i].clear(); r *= 4; for (i = 0; i ...
#include <bits/stdc++.h> #define F 110000 using namespace std; vector<int> v[F]; int a, b, x, y, r, i; int D(int t) { int e = 0; while (e * e <= r * r - t * t) e++; return e - 1; } int main() { while (cin >> a >> b >> r && a + b) { for (int i = 0; i < F; i++) v[i].clear(); r *= 4; for (i =...
[]
62,752
62,753
u455494700
cpp
p00609
#include <algorithm> #include <cassert> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <map> #include <numeric> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i) #d...
#include <algorithm> #include <cassert> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <map> #include <numeric> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i) #d...
[ "literal.number.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
62,766
62,767
u637379889
cpp
p00609
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) ...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) ...
[ "identifier.change", "call.arguments.change" ]
62,771
62,772
u505648358
cpp
p00609
#include <algorithm> #include <cmath> #include <cstdio> #include <vector> using namespace std; int main() { int an, bn, r, x, y; while (scanf("%d%d%d", &an, &bn, &r), an != 0) { r *= 4; vector<vector<double>> pos(10000); for (int i = 0; i < an; ++i) { scanf("%d%d", &x, &y); pos[x].push_bac...
#include <algorithm> #include <cmath> #include <cstdio> #include <vector> using namespace std; int main() { int an, bn, r, x, y; while (scanf("%d%d%d", &an, &bn, &r), an != 0) { r *= 4; vector<vector<double>> pos(10000); for (int i = 0; i < an; ++i) { scanf("%d%d", &x, &y); pos[x].push_bac...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.for.initializer.change" ]
62,776
62,777
u479246559
cpp
p00609
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #incl...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #incl...
[ "literal.number.change", "call.arguments.change", "expression.operation.binary.change" ]
62,782
62,783
u827448139
cpp
p00609
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <st...
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <st...
[ "variable_declaration.specifier.remove", "variable_declaration.type.change", "literal.number.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
62,786
62,787
u915761101
cpp
p00609
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <st...
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <st...
[ "variable_declaration.specifier.remove", "literal.number.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
62,788
62,787
u915761101
cpp
p00634
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) ...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) ...
[ "call.add" ]
62,811
62,812
u505648358
cpp
p00634
#include <algorithm> #include <climits> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; struct Tag { int pos, pat, cost; Tag() : pos(0), pat(0), cost(0) {} Tag(int p, int pat, int c) : pos(p), pat(pat), cost(c) {} bool operator<(const Tag &other) co...
#include <algorithm> #include <climits> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; struct Tag { int pos, pat, cost; Tag() : pos(0), pat(0), cost(0) {} Tag(int p, int pat, int c) : pos(p), pat(pat), cost(c) {} bool operator<(const Tag &other) co...
[ "expression.operation.binary.remove", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
62,815
62,814
u525048109
cpp
p00637
#include <stdio.h> int n, p, a[50]; int main() { while (~scanf("%d", &n), n) { for (int i = 0; i < n; i++) scanf("%d", &a[i]); p = 0; for (int i = 1; i < n; i++) { if (a[i - 1] + 1 != a[i]) { if (p - i != 1) printf("%d-%d ", a[p], a[i - 1]); else printf("%d ...
#include <stdio.h> int n, p, a[50]; int main() { while (~scanf("%d", &n), n) { for (int i = 0; i < n; i++) scanf("%d", &a[i]); p = 0; for (int i = 1; i < n; i++) { if (a[i - 1] + 1 != a[i]) { if (i - p != 1) printf("%d-%d ", a[p], a[i - 1]); else printf("%d ...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
62,847
62,848
u823513038
cpp
p00637
#include <stdio.h> int n, p, a[50]; int main() { while (~scanf("%d", &n), n) { for (int i = 0; i < n; i++) scanf("%d", &a[i]); p = 0; for (int i = 1; i < n; i++) { if (a[i - 1] + 1 != a[i]) { if (i - p != 1) printf("%d-%d ", a[p], a[i - 1]); else printf("%d ...
#include <stdio.h> int n, p, a[50]; int main() { while (~scanf("%d", &n), n) { for (int i = 0; i < n; i++) scanf("%d", &a[i]); p = 0; for (int i = 1; i < n; i++) { if (a[i - 1] + 1 != a[i]) { if (i - p != 1) printf("%d-%d ", a[p], a[i - 1]); else printf("%d ...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
62,849
62,848
u823513038
cpp
p00637
#include "bits/stdc++.h" using namespace std; //#define int long long #define DEBUG 1 #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--) #define all(a) (a).begin(), (a).end() #define dump(o) \ if...
#include "bits/stdc++.h" using namespace std; //#define int long long #define DEBUG 1 #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--) #define all(a) (a).begin(), (a).end() #define dump(o) \ if...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
62,864
62,865
u160041984
cpp
p00637
#include <cstdio> #include <iostream> using namespace std; int main() { int n; while (cin >> n, n) { int x[n]; int a = 0; for (int i = 0; i < n; i++) { cin >> x[i]; if (i > 0) { if (x[i] - 1 != x[i - 1]) { if (a != i - 1) { printf("%d-%d ", x[a], x[i - 1]); ...
#include <cstdio> #include <iostream> using namespace std; int main() { int n; while (cin >> n, n) { int x[n]; int a = 0; for (int i = 0; i < n; i++) { cin >> x[i]; if (i > 0) { if (x[i] - 1 != x[i - 1]) { if (a != i - 1) { printf("%d-%d ", x[a], x[i - 1]); ...
[ "io.output.change" ]
62,869
62,870
u505648358
cpp
p00637
/* * File: main.cpp * Author: 成诺 * * Created on 2011年8月27日, 下午12:34 */ #include <cstdio> #include <cstdlib> using namespace std; int main(int argc, char **argv) { int n; while (1 == scanf("%d", &n) && n) { int just; int t; bool need = false; for (int i = 0; i < n; ++i, just = ...
/* * File: main.cpp * Author: 成诺 * * Created on 2011年8月27日, 下午12:34 */ #include <cstdio> #include <cstdlib> using namespace std; int main(int argc, char **argv) { int n; while (1 == scanf("%d", &n) && n) { int just; int t; bool need = false; for (int i = 0; i < n; ++i, just = ...
[ "assignment.add" ]
62,879
62,880
u011621222
cpp
p00638
#include <iostream> #include <utility> using namespace std; int main(void) { int n, B[25], T[25], cnt, cnt2; while (1) { cin >> n; if (n == 0) break; cnt = 0; cnt2 = 0; for (int i = 0; i < n; i++) { cin >> T[i] >> B[i]; } for (int i = 0; i < n; i++) { for (int j...
#include <iostream> #include <utility> using namespace std; int main(void) { int n, B[25], T[25], cnt, cnt2; while (1) { cin >> n; if (n == 0) break; cnt = 0; cnt2 = 0; for (int i = 0; i < n; i++) { cin >> T[i] >> B[i]; } for (int i = 0; i < n; i++) { for (int j...
[ "control_flow.loop.for.initializer.change" ]
62,906
62,907
u645818618
cpp
p00638
#include <algorithm> #include <cstring> #include <ctype.h> #include <iostream> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REP(i, n) FOR...
#include <algorithm> #include <cstring> #include <ctype.h> #include <iostream> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REP(i, n) FOR...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,908
62,909
u877319405
cpp
p00638
#include <algorithm> #include <cstring> #include <ctype.h> #include <iostream> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REP(i, n) FOR...
#include <algorithm> #include <cstring> #include <ctype.h> #include <iostream> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REP(i, n) FOR...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,910
62,909
u877319405
cpp
p00638
#include <iostream> #include <vector> using namespace std; struct ISLAND { int treasure; int bridge; }; int main() { int n; while (cin >> n) { if (n == 0) break; vector<ISLAND> island; ISLAND temp; for (int i = 0; i < n; i++) { cin >> temp.treasure >> temp.bridge; island.push...
#include <iostream> #include <vector> using namespace std; struct ISLAND { int treasure; int bridge; }; int main() { int n; while (cin >> n) { if (n == 0) break; vector<ISLAND> island; ISLAND temp; for (int i = 0; i < n; i++) { cin >> temp.treasure >> temp.bridge; island.push...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
62,911
62,912
u484092586
cpp
p00638
#include <algorithm> #include <stdio.h> #include <utility> int main(void) { int n, sum; bool NGflag; // first... テ」ツ?敕」ツ?ョテ・ツウツカテ」ツ?ョテ・ツョツ敕」ツ?ョテゥツ?? // second... // テ」ツ?敕」ツ?ョテ・ツウツカテ」ツ?ョテヲツゥツ凝」ツ?ョティツ?静、ツケツ?・ツ環? std::pair<int, int> bridge[30]; while (true) { scanf("%d", &n); if (n == 0) { br...
#include <algorithm> #include <stdio.h> #include <utility> int main(void) { int n, sum; bool NGflag; // first... // テ」ツ?敕」ツ?ョテ・ツウツカテ」ツ?ョテヲツゥツ凝」ツ?ョティツ?静、ツケツ?・ツ環? // second... テ」ツ?敕」ツ?ョテ・ツウツカテ」ツ?ョテ・ツョツ敕」ツ?ョテゥツ?? std::pair<int, int> bridge[30]; while (true) { scanf("%d", &n); if (n == 0) { br...
[ "call.arguments.change", "assignment.value.change", "control_flow.branch.if.condition.change" ]
62,915
62,916
u074575391
cpp
p00638
#include <algorithm> #include <iostream> using namespace std; int n; pair<int, int> d[25]; int main() { while (cin >> n, n) { for (int i = 0; i < n; i++) cin >> d[i].first >> d[i].second; sort(d, d + n); int s = 0, f = 0; for (int i = 0; i < n; i++) { s += d[i].second; if (d[i].first...
#include <algorithm> #include <iostream> using namespace std; int n; pair<int, int> d[25]; int main() { while (cin >> n, n) { for (int i = 0; i < n; i++) cin >> d[i].second >> d[i].first; sort(d, d + n); int s = 0, f = 0; for (int i = 0; i < n; i++) { s += d[i].second; if (d[i].first...
[ "expression.operation.binary.change" ]
62,917
62,918
u823513038
cpp
p00638
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
[ "variable_declaration.value.change", "misc.opposites", "assignment.value.change" ]
62,919
62,920
u567478557
cpp
p00638
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
[ "variable_declaration.value.change" ]
62,921
62,920
u567478557
cpp
p00638
#include <bits/stdc++.h> using namespace std; #define int long long // <-----!!!!!!!!!!!!!!!!!!! #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rrep2(i, a, b) for (int i = (b)-1; i >= (a); i--) #define al...
#include <bits/stdc++.h> using namespace std; #define int long long // <-----!!!!!!!!!!!!!!!!!!! #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rrep2(i, a, b) for (int i = (b)-1; i >= (a); i--) #define al...
[ "expression.operation.binary.remove" ]
62,924
62,925
u529386725
cpp
p00638
#include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define REP(i, n) for (int i = 0; i < (n); i++) #define REP2(i, x, n) for (int i = x; i < (n); i++) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); while (true) { int N; cin >> N; if (N == 0) { ...
#include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define REP(i, n) for (int i = 0; i < (n); i++) #define REP2(i, x, n) for (int i = x; i < (n); i++) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); while (true) { int N; cin >> N; if (N == 0) { ...
[ "variable_declaration.type.change" ]
62,926
62,927
u021217762
cpp
p00638
#include <algorithm> #include <iostream> using namespace std; int n, z[25], h[25], wa, f; int main() { while (1) { wa = 0; f = 0; cin >> n; if (n == 0) break; for (int i = 0; i < n; i++) { cin >> z[i] >> h[i]; } for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - ...
#include <algorithm> #include <iostream> using namespace std; int n, z[25], h[25], wa, f; int main() { while (1) { wa = 0; f = 0; cin >> n; if (n == 0) break; for (int i = 0; i < n; i++) { cin >> z[i] >> h[i]; } for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
62,928
62,929
u864912244
cpp
p00638
// 8-11.cpp : 螳壻ケ画而蛻カ蜿ー蠎皮畑遞句コ冗噪蜈・蜿」轤ケ縲?// #include <algorithm> #include <iomanip> #include <iostream> #include <string> using namespace std; struct island { int v, t; }; struct island a[1000]; bool cmp(struct island a, struct island b) { return a.t < b.t; } int main() { int n; while (cin >> n && n != 0) { f...
// 8-11.cpp : 螳壻ケ画而蛻カ蜿ー蠎皮畑遞句コ冗噪蜈・蜿」轤ケ縲?// #include <algorithm> #include <iomanip> #include <iostream> #include <string> using namespace std; struct island { int v, t; }; struct island a[1000]; bool cmp(struct island a, struct island b) { return a.t < b.t; } int main() { int n; while (cin >> n && n != 0) { f...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,930
62,931
u011621222
cpp
p00638
#include <algorithm> #include <iostream> using namespace std; struct island { int bridge; int treasure; }; bool operator<(island i1, island i2) { return i1.treasure < i2.treasure; } int main() { int input, value; bool flag; while (1) { cin >> input; if (input == 0) { break; } is...
#include <algorithm> #include <iostream> using namespace std; struct island { int bridge; int treasure; }; bool operator<(island i1, island i2) { // if(i1.treasure == i2.treasure){ return i1.bridge < i2.bridge; // } // return i1.treasure < i2.treasure; } int main() { int input, value; bool flag;...
[ "function.return_value.change", "expression.operation.binary.change" ]
62,932
62,933
u088476226
cpp
p00638
#include <algorithm> #include <iostream> using namespace std; struct island { int bridge; int treasure; }; bool operator<(island i1, island i2) { return i1.treasure < i2.treasure; } int main() { int input, value; bool flag; while (1) { cin >> input; if (input == 0) { break; } is...
#include <algorithm> #include <iostream> using namespace std; struct island { int bridge; int treasure; }; bool operator<(island i1, island i2) { // if(i1.treasure == i2.treasure){ return i1.bridge < i2.bridge; // } // return i1.treasure < i2.treasure; } int main() { int input, value; bool flag;...
[ "function.return_value.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
62,934
62,933
u088476226
cpp
p00638
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<string> ans; int main() { while (1) { int n; cin >> n; if (n == 0) break; int it[25]; int bl[25]; int sindex[25]; for (int i = 0; i < n; i++) { cin >> it[i] >> bl[i]; sindex[i] = i...
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<string> ans; int main() { while (1) { int n; cin >> n; if (n == 0) break; int it[25]; int bl[25]; int sindex[25]; for (int i = 0; i < n; i++) { cin >> it[i] >> bl[i]; sindex[i] = i...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
62,935
62,936
u501508589
cpp
p00638
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; bool myComparison(const pair<int, int> &a, const pair<int, int> &b) { return a.second < b.second; } int main() { int n = 0; vector<int> re; while (cin >> n, n != 0) { vector<pair<int, int>> v; for (int i ...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; bool myComparison(const pair<int, int> &a, const pair<int, int> &b) { return a.second < b.second; } int main() { int n = 0; vector<int> re; while (cin >> n, n != 0) { vector<pair<int, int>> v; for (int i ...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,937
62,938
u538694664
cpp
p00638
#include <algorithm> #include <functional> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> #define PI 3.14159265 #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() typedef long long ll; #define SZ(x) ((in...
#include <algorithm> #include <functional> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> #define PI 3.14159265 #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() typedef long long ll; #define SZ(x) ((in...
[ "assignment.add" ]
62,947
62,948
u000096402
cpp
p00638
#include <cstdlib> #include <iostream> using namespace std; struct island { int tre; int bri; }; int compare(const island *a, const island *b) { if ((*a).bri == (*b).bri) return (*a).tre - (*b).tre; else return (*a).bri - (*b).bri; } island isls[25]; int main() { for (;;) { int isl; cin ...
#include <cstdlib> #include <iostream> using namespace std; struct island { int tre; int bri; }; int compare(const island *a, const island *b) { if ((*a).bri == (*b).bri) return (*a).tre - (*b).tre; else return (*a).bri - (*b).bri; } island isls[25]; int main() { for (;;) { int isl; cin ...
[ "literal.string.change", "io.output.change" ]
62,951
62,952
u250695201
cpp
p00638
#include <algorithm> #include <functional> #include <iostream> #include <vector> using namespace std; #define pii pair<int, int> int main() { int n; while (cin >> n, n) { vector<pii> v; for (int i = 0; i < n; i++) { int a, b; cin >> a >> b; v.push_back(pii(b, a)); } sort(v.begin(...
#include <algorithm> #include <functional> #include <iostream> #include <vector> using namespace std; #define pii pair<int, int> int main() { int n; while (cin >> n, n) { vector<pii> v; for (int i = 0; i < n; i++) { int a, b; cin >> a >> b; v.push_back(pii(b, a)); } sort(v.begin(...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,953
62,954
u505648358
cpp
p00638
#include <algorithm> #include <cstdio> #include <iostream> #include <vector> using namespace std; typedef struct { int weight, bridge; } sima; bool lessw(const sima &Left, const sima &Right) { return Left.weight < Right.weight; } bool lessb(const sima &Left, const sima &Right) { return Left.bridge < Right.brid...
#include <algorithm> #include <cstdio> #include <iostream> #include <vector> using namespace std; typedef struct { int weight, bridge; } sima; bool lessw(const sima &Left, const sima &Right) { return Left.weight < Right.weight; } bool lessb(const sima &Left, const sima &Right) { return Left.bridge < Right.brid...
[ "call.remove", "call.add" ]
62,955
62,956
u907421301
cpp
p00638
#include <algorithm> #include <stdio.h> using namespace std; pair<int, int> t[25]; int main() { int a; while (scanf("%d", &a), a) { for (int i = 0; i < a; i++) { scanf("%d%d", &t[i].first, &t[i].second); } std::sort(t, t + a); int now = 0; bool ok = true; for (int i = 0; i < a; i++) { ...
#include <algorithm> #include <stdio.h> using namespace std; pair<int, int> t[25]; int main() { int a; while (scanf("%d", &a), a) { for (int i = 0; i < a; i++) { scanf("%d%d", &t[i].second, &t[i].first); } std::sort(t, t + a); int now = 0; bool ok = true; for (int i = 0; i < a; i++) { ...
[ "call.arguments.change", "assignment.value.change", "control_flow.branch.if.condition.change" ]
62,957
62,958
u676399799
cpp
p00638
#include <cassert> #include <climits> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <sstream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <algorithm> #include <cctype> #include <cmath> #include <list> ...
#include <cassert> #include <climits> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <sstream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <algorithm> #include <cctype> #include <cmath> #include <list> ...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
62,959
62,960
u551847319
cpp
p00638
#include <algorithm> #include <map> #include <stdio.h> int main() { int n, i, s; std::pair<int, int> b[25]; while (scanf("%d", &n), n) { for (i = 0; i < n; ++i) scanf("%d%d", &b[i].second, &b[i].first); std::sort(b, b + n); for (i = s = 0; i < n; ++i) { s += b[i].second; if (s > b[i]...
#include <algorithm> #include <map> #include <stdio.h> int main() { int n, i, s; std::pair<int, int> b[25]; while (scanf("%d", &n), n) { for (i = 0; i < n; ++i) scanf("%d%d", &b[i].second, &b[i].first); std::sort(b, b + n); for (i = s = 0; i < n; ++i) { s += b[i].second; if (s > b[i]...
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
62,961
62,962
u260615292
cpp
p00662
#include <bits/stdc++.h> using namespace std; #define rep(X, Y) for (int(X) = 0; (X) < (Y); ++(X)) typedef long long ll; typedef pair<int, int> pii; #define all(X) (X).begin(), (X).end() #define pb push_back #define eb emplace_back #define rrep(X, Y) for (int(X) = (Y)-1; (X) >= 0; --(X)) #define X first #define Y sec...
#include <bits/stdc++.h> using namespace std; #define rep(X, Y) for (int(X) = 0; (X) < (Y); ++(X)) typedef long long ll; typedef pair<int, int> pii; #define all(X) (X).begin(), (X).end() #define pb push_back #define eb emplace_back #define rrep(X, Y) for (int(X) = (Y)-1; (X) >= 0; --(X)) #define X first #define Y sec...
[ "expression.operation.binary.add" ]
62,991
62,992
u182453220
cpp
p00662
#include <bits/stdc++.h> using namespace std; typedef long long ll; int A, B, C; int main() { int a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f && (a || b || c || d || e || f)) { A = a + d; B = b + e; C = c + f; // cout<< A << " "<< B << " " << C << endl; int n = min(A, min(B, ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int A, B, C; int main() { int a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f && (a || b || c || d || e || f)) { A = a + d; B = b + e; C = c + f; // cout<< A << " "<< B << " " << C << endl; int n = min(A, min(B, ...
[ "misc.opposites", "identifier.change", "call.function.change", "control_flow.loop.condition.change" ]
62,993
62,994
u147939316
cpp
p00662
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define forever for (;;) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecisio...
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define forever for (;;) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecisio...
[ "call.add", "call.arguments.change" ]
63,005
63,006
u449960815
cpp
p00663
#include <iostream> #include <vector> using namespace std; vector<string> split(const string &str, const string &delim) { vector<string> res; size_t current = 0, found, delimlen = delim.size(); while ((found = str.find(delim, current)) != string::npos) { res.push_back(string(str, current, found - current)); ...
#include <iostream> #include <vector> using namespace std; vector<string> split(const string &str, const string &delim) { vector<string> res; size_t current = 0, found, delimlen = delim.size(); while ((found = str.find(delim, current)) != string::npos) { res.push_back(string(str, current, found - current)); ...
[ "misc.opposites", "variable_declaration.value.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "assignment.value.change" ]
63,009
63,010
u834146348
cpp
p00664
#include <algorithm> #include <stdio.h> using namespace std; int d[51000]; int e[51000]; int f[51000]; int row[51000]; int col[51000]; int main() { int a, b, c; while (scanf("%d%d%d", &a, &b, &c), a) { for (int i = 0; i < a; i++) row[i] = 1; for (int j = 0; j < b; j++) col[j] = 1; for (int i...
#include <algorithm> #include <stdio.h> using namespace std; int d[51000]; int e[51000]; int f[51000]; int row[51000]; int col[51000]; int main() { int a, b, c; while (scanf("%d%d%d", &a, &b, &c), a) { for (int i = 0; i < a; i++) row[i] = 1; for (int j = 0; j < b; j++) col[j] = 1; for (int i...
[ "identifier.change", "assignment.value.change" ]
63,017
63,018
u676399799
cpp
p00664
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; int order[100000][3]; bool check_r[100000]; bool check_c[100000]; int main() { int r, c, q; while (true) { cin >> r >> c >> q; if (r == 0 && c == 0 ...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; int order[100000][3]; bool check_r[100000]; bool check_c[100000]; int main() { int r, c, q; while (true) { cin >> r >> c >> q; if (r == 0 && c == 0 ...
[ "variable_declaration.value.change", "identifier.change" ]
63,027
63,028
u467175809
cpp
p00664
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <sstream> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define fr(i, c) for (__typeof(c.begin()) i = c.begin(); i != c.end(); i...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <sstream> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define fr(i, c) for (__typeof(c.begin()) i = c.begin(); i != c.end(); i...
[ "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
63,029
63,030
u530523861
cpp
p00664
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <sstream> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define fr(i, c) for (__typeof(c.begin()) i = c.begin(); i != c.end(); i...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <sstream> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define fr(i, c) for (__typeof(c.begin()) i = c.begin(); i != c.end(); i...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
63,031
63,030
u530523861
cpp
p00664
#include <cstdio> #include <cstring> using namespace std; typedef long long int64; const int MAX_W = 50000; const int MAX_Q = 50000; int H, W, Q; int ts[MAX_Q], as[MAX_Q], cmd[MAX_Q]; bool visited[2][MAX_W]; bool init() { scanf("%d%d%d", &H, &W, &Q); for (int i = 0; i < Q; i++) { scanf("%d%d%d", ts + i, as ...
#include <cstdio> #include <cstring> using namespace std; typedef long long int64; const int MAX_W = 50000; const int MAX_Q = 50000; int H, W, Q; int ts[MAX_Q], as[MAX_Q], cmd[MAX_Q]; bool visited[2][MAX_W]; bool init() { scanf("%d%d%d", &H, &W, &Q); for (int i = 0; i < Q; i++) { scanf("%d%d%d", ts + i, as ...
[]
63,037
63,038
u213247212
cpp
p00665
#include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; struct P { int point; string name; P() {} P(int point, string name) : point{point}, name{name} {} bool operator<(const P &p) const { if (point != p.point) { return point > p.point; } return nam...
#include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; struct P { int point; string name; P() {} P(int point, string name) : point{point}, name{name} {} bool operator<(const P &p) const { if (point != p.point) { return point > p.point; } return nam...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
63,046
63,047
u796627333
cpp
p00638
#include <algorithm> #include <iostream> #include <numeric> #include <utility> #include <vector> using namespace std; typedef pair<int, int> P; int main() { for (int N; cin >> N, N;) { vector<P> v; for (int i = 0; i < N; i++) { int a, b; cin >> a >> b; v.push_back(make_pair(b, a)); } ...
#include <algorithm> #include <iostream> #include <numeric> #include <utility> #include <vector> using namespace std; typedef pair<int, int> P; int main() { for (int N; cin >> N, N;) { vector<P> v; for (int i = 0; i < N; i++) { int a, b; cin >> a >> b; v.push_back(make_pair(b, a)); } ...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
63,052
63,053
u434428594
cpp
p00638
#include <iostream> #include <set> using namespace std; int main(void) { int n; int temp1, temp2; int i1; int ok; while (1) { cin >> n; if (n == 0) break; set<pair<int, int>> w; int sum; for (i1 = 0; i1 < n; i1++) { cin >> temp1 >> temp2; w.insert(make_pair(temp2, te...
#include <iostream> #include <set> using namespace std; int main(void) { int n; int temp1, temp2; int i1; int ok; while (1) { cin >> n; if (n == 0) break; multiset<pair<int, int>> w; int sum; for (i1 = 0; i1 < n; i1++) { cin >> temp1 >> temp2; w.insert(make_pair(temp...
[ "variable_declaration.type.change" ]
63,054
63,055
u141322494
cpp
p00638
#include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define INF 100000000 typedef long long int lli; typedef pair<int, int> P; int ...
#include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define INF 100000000 typedef long long int lli; typedef pair<int, int> P; int ...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.loop.condition.change", "control_flow.branch.if.condition.change" ]
63,058
63,057
u313705878
cpp
p00638
#include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define INF 100000000 typedef long long int lli; typedef pair<int, int> P; int ...
#include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define INF 100000000 typedef long long int lli; typedef pair<int, int> P; int ...
[ "control_flow.branch.if.condition.change" ]
63,059
63,057
u313705878
cpp
p00639
#include <algorithm> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #define Epsilon 0.000001 using namespace std; double cal1(double x, double y) { return sqrt(x * x + y * y); } double cal2(double a, double b, double c, double d) { return a * b + c * d; } ...
#include <algorithm> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #define Epsilon 0.000001 using namespace std; double cal1(double x, double y) { return sqrt(x * x + y * y); } double cal2(double a, double b, double c, double d) { return a * b + c * d; } ...
[ "assignment.value.change", "identifier.change" ]
63,081
63,082
u686113309
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
63,084
63,085
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "expression.operation.unary.remove", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
63,086
63,085
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
63,088
63,085
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
63,084
63,089
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
63,086
63,089
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
63,088
63,089
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
63,084
63,090
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
63,086
63,090
u404739010
cpp
p00639
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
#include <algorithm> #include <complex> #include <vector> using namespace std; const double EPS = 1e-7; typedef complex<double> P; /* “_ */ typedef vector<P> G; /* ‘½ŠpŒ` */ struct L { P p, q; L(P p, P q) : p(p), q(q) {} }; /* ü•ª */ // “àÏEŠOÏEŠp“x double dot(P a, P b) { return real(conj(a) * b); } do...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
63,088
63,090
u404739010
cpp
p00639
// AOJ1053 Accelerated Railgun #include <complex> #include <iostream> using namespace std; typedef complex<double> P; double dot(P a, P b) { return real(conj(a) * b); } double cross(P a, P b) { return imag(conj(a) * b); } int main() { double d; while (cin >> d) { if (d == 0.0) break; double px, p...
// AOJ1053 Accelerated Railgun #include <complex> #include <iostream> using namespace std; typedef complex<double> P; double dot(P a, P b) { return real(conj(a) * b); } double cross(P a, P b) { return imag(conj(a) * b); } int main() { double d; while (cin >> d) { if (d == 0.0) break; double px, p...
[ "control_flow.branch.if.condition.change" ]
63,091
63,092
u032250180
cpp
p00639
#include <cmath> #include <iomanip> #include <iostream> #define PI (3.1415926535897932384626433832795) #define SQ(x) ((x) * (x)) #define LEN(x, y) (sqrt(SQ(x) + SQ(y))) using namespace std; bool eq(double a, double b) { return fabs(a - b) < 1e-8; } double prod(double x1, double y1, double x2, double y2) { return ...
#include <cmath> #include <iomanip> #include <iostream> #define PI (3.1415926535897932384626433832795) #define SQ(x) ((x) * (x)) #define LEN(x, y) (sqrt(SQ(x) + SQ(y))) using namespace std; bool eq(double a, double b) { return fabs(a - b) < 1e-8; } double prod(double x1, double y1, double x2, double y2) { return ...
[ "literal.string.change", "io.output.change" ]
63,095
63,096
u586681987
cpp
p00639
#include <bits/stdc++.h> using namespace std; #define EPS 1e-6 #define INF 1e8 typedef complex<double> P; double dot(P a, P b) { return real(conj(a) * b); } double cross(P a, P b) { return imag(conj(a) * b); } struct Point { double x, y; }; int main() { double D; while (true) { Point v, p; scanf("...
#include <bits/stdc++.h> using namespace std; #define EPS 1e-6 #define INF 1e8 typedef complex<double> P; double dot(P a, P b) { return real(conj(a) * b); } double cross(P a, P b) { return imag(conj(a) * b); } struct Point { double x, y; }; int main() { double D; while (true) { Point v, p; scanf("...
[ "control_flow.branch.if.condition.change", "expression.operator.compare.change" ]
63,099
63,100
u881100444
cpp
p00641
#include <bits/stdc++.h> using namespace std; using Int = long long; struct UnionFind { Int n; vector<Int> r, p; UnionFind(Int n) : n(n), r(n, 1), p(n) { iota(p.begin(), p.end(), 0); } Int find(Int x) { if (x == p[x]) return x; return p[x] = find(p[x]); } void unite(Int x, Int y) { x = ...
#include <bits/stdc++.h> using namespace std; using Int = long long; struct UnionFind { Int n; vector<Int> r, p; UnionFind(Int n) : n(n), r(n, 1), p(n) { iota(p.begin(), p.end(), 0); } Int find(Int x) { if (x == p[x]) return x; return p[x] = find(p[x]); } void unite(Int x, Int y) { x = fi...
[ "call.function.change", "call.arguments.change" ]
63,134
63,135
u914332902
cpp
p00641
#include <iostream> #include <map> #include <stack> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; typedef pair<int, int> PII; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c)...
#include <iostream> #include <map> #include <stack> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; typedef pair<int, int> PII; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c)...
[ "call.arguments.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
63,138
63,139
u615727692
cpp
p00642
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { int foo = 1; int bar = 1; for (int j = i + 1; j < n + 1 and j < i + 30; j++) { dp[...
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { long long int foo = 1; int bar = 1; for (int j = i + 1; j < n + 1 and foo < 1000000000; ...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "identifier.replace.remove", "literal.replace.add", "expression.operation.binary.remove" ]
63,165
63,166
u638610708
cpp
p00642
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { int foo = 1; int bar = 1; for (int j = i + 1; j < n + 1 and j < i + 40; j++) { dp[...
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { long long int foo = 1; int bar = 1; for (int j = i + 1; j < n + 1 and foo < 1000000000; ...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "identifier.replace.remove", "literal.replace.add", "expression.operation.binary.remove" ]
63,167
63,166
u638610708
cpp
p00642
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { long long int foo = 1; int bar = 1; for (int j = i + 1; j < n + 1 and j < i + 30; j++) {...
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { long long int foo = 1; long long int bar = 1; for (int j = i + 1; j < n + 1 and foo < 1e...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "identifier.replace.remove", "literal.replace.add", "expression.operation.binary.remove" ]
63,171
63,170
u638610708
cpp
p00642
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { long long int foo = 1; int bar = 1; for (int j = i + 1; j < n + 1 and j < i + 40; j++) {...
#include <cstdio> #include <iostream> using namespace std; #define NMAX 100000 double dp[NMAX + 1]; int main() { int n = NMAX; for (int i = 0; i < n + 1; i++) { dp[i] = 0.0; } for (int i = 0; i < n; i++) { long long int foo = 1; long long int bar = 1; for (int j = i + 1; j < n + 1 and foo < 1e...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "identifier.replace.remove", "literal.replace.add", "expression.operation.binary.remove" ]
63,172
63,170
u638610708
cpp
p00642
#include <bits/stdc++.h> #define N 100010 using namespace std; bool mem[N][50]; int used[N][50]; double dfs(int day, int cnt, double p) { if (day == 0) return 0; if (cnt >= 50) return 0; if (used[day][cnt]) return mem[day][cnt]; used[day][cnt] = 1; double res = 0; res += p * (1 + dfs(day - 1, c...
#include <bits/stdc++.h> #define N 100010 using namespace std; double mem[N][50]; bool used[N][50]; double dfs(int day, int cnt, double p) { if (day == 0) return 0; if (cnt >= 50) return 0; if (used[day][cnt]) return mem[day][cnt]; used[day][cnt] = 1; double res = 0; res += p * (1 + dfs(day - 1...
[ "variable_declaration.type.primitive.change" ]
63,184
63,185
u776402923
cpp
p00642
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory.h> #include <memory> #include <numeric> #include <queue> #include <set> #include <s...
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory.h> #include <memory> #include <numeric> #include <queue> #include <set> #include <s...
[ "literal.number.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
63,191
63,192
u551847319
cpp
p00642
#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...
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change" ]
63,198
63,199
u274875240
cpp