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
p02273
// // main.cpp // koch_curve // // Created by ???????????? on 2017/10/07. // Copyright ?? 2017 ????????????. All rights reserved. // #include <iostream> #include <stdio.h> //#include <cmath> #include <iomanip> #include <math.h> //#define PI 3.14159265 using namespace std; double param = 60.0 * M_PI / 180.0; st...
// // main.cpp // koch_curve // // Created by ???????????? on 2017/10/07. // Copyright ?? 2017 ????????????. All rights reserved. // #include <iostream> #include <stdio.h> //#include <cmath> #include <iomanip> #include <math.h> //#define PI 3.14159265 using namespace std; double param = 60.0 * M_PI / 180.0; st...
[ "identifier.change", "call.arguments.change" ]
118,170
118,171
u826441682
cpp
p02273
#include <cmath> #include <cstdio> using namespace std; struct Point { double x; double y; }; double sin60 = sqrt(3) / 2; double cos60 = 1.0 / 2.0; void kock(int depth, Point p1, Point p2) { if (depth == 0) return; Point s, t, u; s.x = (p1.x * 2 + p2.x) / 3; s.y = (p1.y * 2 + p2.y) / 3; t.x = (p1....
#include <cmath> #include <cstdio> using namespace std; struct Point { double x; double y; }; double sin60 = sqrt(3.0) / 2.0; double cos60 = 1.0 / 2.0; void kock(int depth, Point p1, Point p2) { if (depth == 0) return; Point s, t, u; s.x = (p1.x * 2 + p2.x) / 3; s.y = (p1.y * 2 + p2.y) / 3; t.x = ...
[ "literal.number.change", "call.arguments.change", "expression.operation.binary.change", "assignment.value.change" ]
118,176
118,177
u344726938
cpp
p02273
#include <algorithm> #include <array> #include <cstdio> #include <iostream> #include <list> #include <numeric> #include <queue> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #define _USE_MATH_DEFINES #include <map> #include <math.h> #define SENTINEL 1000000001 #define min...
#include <algorithm> #include <array> #include <cstdio> #include <iostream> #include <list> #include <numeric> #include <queue> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #define _USE_MATH_DEFINES #include <map> #include <math.h> #define SENTINEL 1000000001 #define min...
[ "control_flow.branch.if.add" ]
118,180
118,181
u456512109
cpp
p02273
#include <cmath> #include <cstdio> #include <iostream> const double PI = acos(-1.0); struct Point { double x; double y; }; void Koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0...
#include <cmath> #include <cstdio> #include <iostream> const double PI = acos(-1.0); struct Point { double x; double y; }; void Koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0...
[ "assignment.value.change", "expression.operation.binary.change" ]
118,182
118,183
u022192887
cpp
p02273
#include <cmath> #include <cstdio> #include <iostream> const double PI = 3.14159265; struct Point { double x, y; }; // 回転行列を掛け合わせる関数 void Rotation(const Point &s, const Point &t, Point &u) { double params = 60.0; double rad = params * PI / 180.0; double cos60 = cos(rad); double sin60 = sin(rad); u.x = c...
#include <cmath> #include <cstdio> #include <iostream> const double PI = 3.14159265; struct Point { double x, y; }; // 回転行列を掛け合わせる関数 void Rotation(const Point &s, const Point &t, Point &u) { double params = 60.0; double rad = params * PI / 180.0; double cos60 = cos(rad); double sin60 = sin(rad); u.x = c...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,184
118,185
u498222532
cpp
p02273
#include <cmath> #include <iomanip> #include <iostream> using namespace std; struct Point { double x; double y; }; void koch(int n, Point a, Point b) { if (n == 0) { return; } Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3; s.y = (2.0 * a.y + 1.0 * b.y) / 3; t.x...
#include <cmath> #include <iomanip> #include <iostream> using namespace std; struct Point { double x; double y; }; void koch(int n, Point a, Point b) { if (n == 0) { return; } Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3; s.y = (2.0 * a.y + 1.0 * b.y) / 3; t.x...
[ "assignment.value.change", "expression.operation.binary.change" ]
118,186
118,187
u047256438
cpp
p02273
#include <cstdio> #include <iostream> #define _USE_MATH_DEFINES #include <math.h> using namespace std; struct point { double x, y; }; void koch(int n, point a, point b) { if (n == 0) return; point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y...
#include <cstdio> #include <iostream> #define _USE_MATH_DEFINES #include <cmath> using namespace std; struct point { double x, y; }; void koch(int n, point a, point b) { if (n == 0) return; point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y)...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,190
118,191
u796290719
cpp
p02273
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <queue> #include <vector> using namespace std; double sin60 = sqrt(3.) / 2.; struct Pt { double x; double y; Pt operator+(const Pt &other) { return {x + other.x, y + other.y}; } Pt oper...
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <queue> #include <vector> using namespace std; double sin60 = sqrt(3.) / 2.; struct Pt { double x; double y; Pt operator+(const Pt &other) { return {x + other.x, y + other.y}; } Pt oper...
[ "identifier.change", "call.arguments.change" ]
118,195
118,196
u096346680
cpp
p02273
#include <math.h> #include <stdio.h> struct dot { double x; double y; }; void koch(struct dot d1, struct dot d2, int n) { if (n == 0) { return; } struct dot s; s.x = d1.x * 2 / 3 + d2.x * 1 / 3; s.y = d1.y * 2 / 3 + d2.y * 1 / 3; struct dot t; t.x = d1.x * 1 / 3 + d2.x * 2 / 3; t.y = d1.y * ...
#include <math.h> #include <stdio.h> struct dot { double x; double y; }; void koch(struct dot d1, struct dot d2, int n) { if (n == 0) { return; } struct dot s; s.x = d1.x * 2 / 3 + d2.x * 1 / 3; s.y = d1.y * 2 / 3 + d2.y * 1 / 3; struct dot t; t.x = d1.x * 1 / 3 + d2.x * 2 / 3; t.y = d1.y * ...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
118,197
118,198
u173597612
cpp
p02273
#include <algorithm> #include <cstdio> #include <iostream> #include <math.h> #define pi 3.1415926 using namespace std; struct point { double x, y; }; int n; double th = pi * 60 / 180; void koch(int n, point a, point b) { if (n == 0) return; point s, t, u; s.x = (b.x + 2 * a.x) / 3; s.y = (b.y + 2 * a.y)...
#include <algorithm> #include <cstdio> #include <iostream> #include <math.h> #define pi 3.1415926 using namespace std; struct point { double x, y; }; int n; double th = pi * 60 / 180; void koch(int n, point a, point b) { if (n == 0) return; point s, t, u; s.x = (b.x + 2 * a.x) / 3; s.y = (b.y + 2 * a.y)...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
118,199
118,200
u356390697
cpp
p02273
#include <iostream> #include <math.h> using namespace std; struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) { return; } Point s, t, u; double th = M_PI * 60 / 180; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0; t.x = (1.0 * a.x + 2.0 * ...
#include <iostream> #include <math.h> using namespace std; struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) { return; } Point s, t, u; double th = M_PI * 60 / 180; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0; t.x = (1.0 * a.x + 2.0 * ...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,202
118,203
u633823896
cpp
p02273
/* * ALDS1_5_C.cpp * * Created on: Apr 30, 2018 * Author: 13743 */ #include <cmath> #include <cstdio> double SQRT3 = sqrt(3); struct Point { double x; double y; }; void kochCurve(Point p1, Point p2, int n) { if (n == 0) { printf("%f %f\n", p1.x, p1.y); return; } double dx = p2.x - p1.x;...
/* * ALDS1_5_C.cpp * * Created on: Apr 30, 2018 * Author: 13743 */ #include <cmath> #include <cstdio> double SQRT3 = sqrt(3); struct Point { double x; double y; }; void kochCurve(Point p1, Point p2, int n) { if (n == 0) { printf("%f %f\n", p1.x, p1.y); return; } double dx = p2.x - p1.x;...
[ "misc.opposites", "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
118,207
118,208
u115352705
cpp
p02273
#include <cmath> #include <cstdio> #include <utility> using namespace std; struct Point { double x, y; }; void print(Point p) { printf("%f %f\n", p.x, p.y); } void koch(int d, Point p1, Point p2) { if (d == 0) { return; } Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * p1.x + 1.0 * p2....
#include <cmath> #include <cstdio> #include <utility> using namespace std; struct Point { double x, y; }; void print(Point p) { printf("%f %f\n", p.x, p.y); } void koch(int d, Point p1, Point p2) { if (d == 0) { return; } Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * p1.x + 1.0 * p2....
[ "assignment.value.change", "expression.operation.binary.change" ]
118,212
118,213
u775693229
cpp
p02273
#include <math.h> #include <stdio.h> struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0; t.x = (1.0 * a.x + 2.0 * b.x) / 3.0; t.y = (1.0 *...
#include <math.h> #include <stdio.h> struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0; t.x = (1.0 * a.x + 2.0 * b.x) / 3.0; t.y = (1.0 *...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
118,214
118,215
u411052298
cpp
p02273
#include <math.h> #include <stdio.h> struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point a1, b1, ab; double th = M_PI * 60.0 / 180.0; a1.x = (2.0 * a.x + 1.0 * b.x) / 3.0; a1.y = (2.0 * a.y + 1.0 * b.y) / 3.0; b1.x = (1.0 * a.x + b.x * 2.0) / 3.0; b1.y =...
#include <math.h> #include <stdio.h> struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point a1, b1, ab; double th = M_PI * 60.0 / 180.0; a1.x = (2.0 * a.x + 1.0 * b.x) / 3.0; a1.y = (2.0 * a.y + 1.0 * b.y) / 3.0; b1.x = (1.0 * a.x + b.x * 2.0) / 3.0; b1.y =...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,219
118,220
u578092577
cpp
p02273
#include <stdio.h> #define _USE_MATH_DEFINES #include <math.h> using namespace std; struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0; t.x ...
#include <stdio.h> #define _USE_MATH_DEFINES #include <math.h> using namespace std; struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = M_PI * 60.0 / 180.0; /* π/3 = 60° */ s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b....
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,224
118,225
u004129073
cpp
p02273
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI M_PI struct Point { double x; double y; void prt() { printf("%.6f %.6f\n", x, y); } }; void koch(int n, Point p1, Point p2) { if (n == 0) return; Point s, t, u; s.x = (2 * p1.x + p2.x) / 3; s.y = (2 * p1.y + p2.y) / 3;...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI M_PI struct Point { double x; double y; void prt() { printf("%.8f %.8f\n", x, y); } }; void koch(int n, Point p1, Point p2) { if (n == 0) return; Point s, t, u; s.x = (2 * p1.x + p2.x) / 3; s.y = (2 * p1.y + p2.y) / 3;...
[ "literal.string.change", "call.arguments.change", "io.output.change", "assignment.value.change", "expression.operation.binary.change" ]
118,226
118,227
u962560616
cpp
p02273
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI M_PI struct Point { double x; double y; void prt() { printf("%.10f %.10f\n", x, y); } }; void koch(int n, Point p1, Point p2) { if (n == 0) return; Point s, t, u; s.x = (2 * p1.x + p2.x) / 3; s.y = (2 * p1.y + p2.y) / ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI M_PI struct Point { double x; double y; void prt() { printf("%.8f %.8f\n", x, y); } }; void koch(int n, Point p1, Point p2) { if (n == 0) return; Point s, t, u; s.x = (2 * p1.x + p2.x) / 3; s.y = (2 * p1.y + p2.y) / 3;...
[ "literal.string.change", "call.arguments.change", "io.output.change", "assignment.value.change", "expression.operation.binary.change" ]
118,228
118,227
u962560616
cpp
p02273
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI M_PI struct Point { double x; double y; void prt() { printf("%.8f %.8f\n", x, y); } }; void koch(int n, Point p1, Point p2) { if (n == 0) return; Point s, t, u; s.x = (2 * p1.x + p2.x) / 3; s.y = (2 * p1.y + p2.y) / 3;...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI M_PI struct Point { double x; double y; void prt() { printf("%.8f %.8f\n", x, y); } }; void koch(int n, Point p1, Point p2) { if (n == 0) return; Point s, t, u; s.x = (2 * p1.x + p2.x) / 3; s.y = (2 * p1.y + p2.y) / 3;...
[ "assignment.value.change", "expression.operation.binary.change" ]
118,229
118,227
u962560616
cpp
p02273
#define _USE_MATH_DEFINES // used before importing cmath to enable math constant // M_PI #include <cmath> #include <iomanip> #include <iostream> struct Point { double x; double y; }; void koch(int depth, Point start, Point end) { using namespace std; cout.precision(8); cout << std...
#define _USE_MATH_DEFINES // used before importing cmath to enable math constant // M_PI #include <cmath> #include <iomanip> #include <iostream> struct Point { double x; double y; }; void koch(int depth, Point start, Point end) { using namespace std; cout.precision(8); cout << std...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "literal.number.change" ]
118,233
118,234
u291057603
cpp
p02273
#include <bits/stdc++.h> using namespace std; struct Point { double x, y; }; int N; void dfs(int n, Point p1, Point p2) { if (n == N) return; double th = M_PI * 60.0 / 180.0; Point s = {(2.0 * p1.x + p2.x) / 3.0, (2.0 * p1.y + p2.y) / 3.0}; Point t = {(p1.x + 2.0 * p2.x) / 3.0, (p1.y + 2.0 * p2.y) / 3...
#include <bits/stdc++.h> using namespace std; struct Point { double x, y; }; int N; void dfs(int n, Point p1, Point p2) { if (n == N) return; double th = M_PI * 60.0 / 180.0; Point s = {(2.0 * p1.x + p2.x) / 3.0, (2.0 * p1.y + p2.y) / 3.0}; Point t = {(p1.x + 2.0 * p2.x) / 3.0, (p1.y + 2.0 * p2.y) / 3...
[ "identifier.change", "call.arguments.change" ]
118,241
118,242
u695600391
cpp
p02273
//============================================================================ // Name : KochCurve.cpp // Author : Ken // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #incl...
//============================================================================ // Name : KochCurve.cpp // Author : Ken // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #incl...
[ "literal.number.change", "assignment.value.change", "expression.operation.binary.change" ]
118,243
118,244
u879863482
cpp
p02274
#include <iostream> #include <limits> #include <vector> using namespace std; void merge(vector<int> &A, int left, int mid, int right, long long int &count) { int n1 = mid - left; int n2 = right - mid; vector<int> L, R; L.resize(n1 + 1); R.resize(n2 + 1); for (int i = 0; i < n1; i++) { L[i] = A[left + i...
#include <iostream> #include <limits> #include <vector> using namespace std; void merge(vector<int> &A, int left, int mid, int right, long long int &count) { int n1 = mid - left; int n2 = right - mid; vector<int> L, R; L.resize(n1 + 1); R.resize(n2 + 1); for (int i = 0; i < n1; i++) { L[i] = A[left + i...
[ "expression.operation.binary.remove" ]
118,401
118,400
u050511799
cpp
p02274
#include <cstdio> #include <iostream> using namespace std; typedef long long ll; #define M 200000 ll cnt = 0; int A[M], L[M / 2 + 1], R[M / 2 + 1]; int merge(int l, int m, int r) { int n1 = m - l, n2 = r - m, i, j; for (i = 0; i < n1; i++) L[i] = A[i + l]; for (i = 0; i < n2; i++) R[i] = A[i + m]; i =...
#include <cstdio> #include <iostream> using namespace std; typedef long long ll; #define M 200000 long long cnt = 0; int A[M], L[M / 2 + 1], R[M / 2 + 1]; int merge(int l, int m, int r) { int n1 = m - l, n2 = r - m, i, j; for (i = 0; i < n1; i++) L[i] = A[i + l]; for (i = 0; i < n2; i++) R[i] = A[i + m]...
[ "variable_declaration.type.widen.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
118,432
118,433
u096656118
cpp
p02274
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> //#include <Windows.h> //#include "Library.h" //#include "Math.h" usin...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> //#include <Windows.h> //#include "Library.h" //#include "Math.h" usin...
[ "variable_declaration.type.change" ]
118,440
118,439
u660370248
cpp
p02274
#include <algorithm> #include <assert.h> #include <iostream> using namespace std; int tempmarge[1000100]; int N, A[10000000]; bool bsearch(const int array[], int left, int right, int value) { while (left + 1 < right) { int med = (left + right) / 2; if (array[med] > value) right = med; else ...
#include <algorithm> #include <assert.h> #include <iostream> using namespace std; int tempmarge[1000100]; int N, A[10000000]; bool bsearch(const int array[], int left, int right, int value) { while (left + 1 < right) { int med = (left + right) / 2; if (array[med] > value) right = med; else ...
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
118,444
118,445
u163847101
cpp
p02274
#include <algorithm> #include <iostream> using namespace std; static const int MAX = 100000; static const int sentinel = 1000000000; int ninvention = 0; int merge(int A[], int left, int mid, int right) { int n1 = mid - left; int n2 = right - mid; int L[n1 + 1], R[n2 + 1]; for (int i = 0; i < n1; i++) L[i]...
#include <algorithm> #include <iostream> using namespace std; static const int MAX = 200000; static const int sentinel = 1000000000; long int ninvention = 0; int merge(int A[], int left, int mid, int right) { int n1 = mid - left; int n2 = right - mid; int L[n1 + 1], R[n2 + 1]; for (int i = 0; i < n1; i++) ...
[ "literal.number.change", "variable_declaration.value.change", "variable_declaration.type.widen.change", "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
118,450
118,451
u947975951
cpp
p02274
#include <algorithm> #include <iostream> using namespace std; static const int MAX = 200000; static const int sentinel = 1000000000; int ninvention = 0; int merge(int A[], int left, int mid, int right) { int n1 = mid - left; int n2 = right - mid; int L[n1 + 1], R[n2 + 1]; for (int i = 0; i < n1; i++) L[i]...
#include <algorithm> #include <iostream> using namespace std; static const int MAX = 200000; static const int sentinel = 1000000000; long int ninvention = 0; int merge(int A[], int left, int mid, int right) { int n1 = mid - left; int n2 = right - mid; int L[n1 + 1], R[n2 + 1]; for (int i = 0; i < n1; i++) ...
[ "variable_declaration.type.widen.change" ]
118,453
118,451
u947975951
cpp
p02274
#include "bits/stdc++.h" using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int n, int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; ++...
#include "bits/stdc++.h" using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int n, int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; ++...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
118,455
118,456
u944777079
cpp
p02274
#include <iostream> using namespace std; #define MAX 19980328 #define SENTINEL 19980328777 typedef long long ll; int L[MAX / 2 + 2], R[MAX / 2 + 2]; ll merge(int A[], int n, int left, int mid, int right) { int i, j, k; ll cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) { L[...
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long ll; int L[MAX / 2 + 2], R[MAX / 2 + 2]; ll merge(int A[], int n, int left, int mid, int right) { int i, j, k; ll cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) { L[i] ...
[ "preprocessor.define.value.change", "literal.integer.change", "assignment.variable.change", "identifier.change" ]
118,495
118,496
u454221508
cpp
p02274
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <numeric> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int inf = 1000000000; int count(vector<int> a) { int cnt = 0; int n = a.size...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <numeric> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int inf = 1000000000; long long count(vector<int> &a) { long long cnt = 0; i...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
118,505
118,506
u991537731
cpp
p02274
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int n, int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) ...
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int n, int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) ...
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change" ]
118,520
118,521
u043039307
cpp
p02274
// ALDS1_5_B.cpp // Divide and Conquer - Merge Sort // ??????????????? // 1. ?????????L???R????????°??´???????????????????????¨??? // 2. ??????????¬???°??¶??????cnt++??????if??????if?????????????????¨????????? // 3. vector????§??????????????????°???vector<int> nums'(n)'! #include <iostream> #include <vector> using nam...
// ALDS1_5_B.cpp // Divide and Conquer - Merge Sort // ??????????????? // 1. ?????????L???R????????°??´???????????????????????¨??? // 2. ??????????¬???°??¶??????cnt++??????if??????if?????????????????¨????????? // 3. vector????§??????????????????°???vector<int> nums'(n)'! #include <iostream> #include <vector> using nam...
[ "call.remove" ]
118,526
118,525
u283553540
cpp
p02274
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) L[i] ...
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) L[i] ...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
118,533
118,534
u150984829
cpp
p02274
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) L[i] ...
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int mid, int right) { int i, j, k; llong cnt = 0; int n1 = mid - left; int n2 = right - mid; for (i = 0; i < n1; i++) L[i] ...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
118,533
118,536
u150984829
cpp
p02274
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int right, int mid) { int i = 0, j = 0; int n1 = mid - left, n2 = right - mid; llong cnt = 0; for (int k = 0; k < n1; k++) L[k]...
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int right, int mid) { int i = 0, j = 0; int n1 = mid - left, n2 = right - mid; llong cnt = 0; for (int k = 0; k < n1; k++) L[k]...
[]
118,565
118,566
u583707373
cpp
p02274
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int right, int mid) { int i = 0, j = 0; int n1 = mid - left, n2 = right - mid; llong cnt = 0; for (int k = 0; k < n1; k++) L[k]...
#include <iostream> using namespace std; #define MAX 200000 #define SENTINEL 2000000000 typedef long long llong; int L[MAX / 2 + 2], R[MAX / 2 + 2]; llong merge(int A[], int left, int right, int mid) { int i = 0, j = 0; int n1 = mid - left, n2 = right - mid; llong cnt = 0; for (int k = 0; k < n1; k++) L[k]...
[]
118,565
118,568
u583707373
cpp
p02274
#include <bits/stdc++.h> using namespace std; #define int long long template <typename T> struct BIT { int n; vector<T> bit; // 1-indexed BIT() : n(-1) {} BIT(int n_, T d) : n(n_), bit(n_ + 1, d) {} T sum(int i) { T s = bit[0]; for (int x = i; x > 0; x -= (x & -x)) s += bit[x]; return s...
#include <bits/stdc++.h> using namespace std; #define int long long template <typename T> struct BIT { int n; vector<T> bit; // 1-indexed BIT() : n(-1) {} BIT(int n_, T d) : n(n_), bit(n_ + 1, d) {} T sum(int i) { T s = bit[0]; for (int x = i; x > 0; x -= (x & -x)) s += bit[x]; return s...
[ "assignment.change" ]
118,571
118,572
u695600391
cpp
p02269
#include <stdio.h> #include <string.h> using namespace std; #define LIM 419430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long get...
#include <stdio.h> #include <string.h> using namespace std; #define LIM 19430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long getK...
[ "preprocessor.define.value.change", "literal.integer.change", "expression.operator.change", "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,603
118,608
u334460795
cpp
p02269
#include <stdio.h> #include <string.h> using namespace std; #define LIM 419430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long get...
#include <stdio.h> #include <string.h> using namespace std; #define LIM 19430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long getK...
[ "preprocessor.define.value.change", "literal.integer.change", "expression.operator.change" ]
118,605
118,608
u334460795
cpp
p02269
#include <stdio.h> #include <string.h> using namespace std; #define LIM 819430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long get...
#include <stdio.h> #include <string.h> using namespace std; #define LIM 19430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long getK...
[ "preprocessor.define.value.change", "literal.integer.change", "expression.operator.change" ]
118,606
118,608
u334460795
cpp
p02269
#include <stdio.h> #include <string.h> using namespace std; #define LIM 519430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long get...
#include <stdio.h> #include <string.h> using namespace std; #define LIM 19430400 #define LEN 13 char H[LIM][LEN]; int toInt(char str) { if (str == 'A') return 1; else if (str == 'C') return 2; else if (str == 'G') return 3; else if (str == 'T') return 4; else return 0; } long long getK...
[ "preprocessor.define.value.change", "literal.integer.change", "expression.operator.change" ]
118,607
118,608
u334460795
cpp
p02269
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() typedef long long ll; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define REP(i, num, n) for (ll i = num, i##_len = (n); i < i##_len; ++i) #define repprev(i, a, b) for (ll i = b - 1; i >= a; i--) #define reprev(i, n) repprev(i, 0, n) u...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() typedef long long ll; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define REP(i, num, n) for (ll i = num, i##_len = (n); i < i##_len; ++i) #define repprev(i, a, b) for (ll i = b - 1; i >= a; i--) #define reprev(i, n) repprev(i, 0, n) u...
[]
118,620
118,621
u142421784
cpp
p02269
#include <stdio.h> #include <string.h> // study of Hash table. #define M 1020001 // large prime number. #define L 14 // length of term. char H[M][L]; // Hash table. int getnum(char ch) // character to number. { if (ch == 'A') { return 1; } else if (ch == 'C') { return 2; } else if (ch == 'G') { ...
#include <stdio.h> #include <string.h> // study of Hash table. #define M 1020001 // large prime number. #define L 14 // length of term. char H[M][L]; // Hash table. int getnum(char ch) // character to number. { if (ch == 'A') { return 1; } else if (ch == 'C') { return 2; } else if (ch == 'G') { ...
[ "identifier.change", "call.function.change", "io.output.change" ]
118,712
118,713
u986478725
cpp
p02269
#include <iostream> #include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int makeint(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long ...
#include <iostream> #include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int makeint(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long ...
[ "literal.string.change", "call.arguments.change", "call.arguments.add" ]
118,767
118,768
u967088297
cpp
p02269
#include <algorithm> #include <cstdio> #include <iostream> #include <stack> #include <string.h> #include <vector> using namespace std; #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; // hash table int getChar(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch ==...
#include <algorithm> #include <cstdio> #include <iostream> #include <stack> #include <string.h> #include <vector> using namespace std; #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; // hash table int getChar(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch ==...
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
118,772
118,773
u387842620
cpp
p02269
// #include <bits/stdc++.h> // using namespace std; // map<string, bool> record; // int main(int argc, char const *argv[]) // { // int n; // string oper, s; // while (~scanf("%d", &n)) // { // record.clear(); // for (int i = 0; i < n; ++i) // { // cin >> oper >> s;...
#include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if ('A' == ch) return 1; else if ('C' == ch) return 2; else if ('G' == ch) return 3; else if ('T' == ch) return 4; else return 0; } long long getKey(char str[]) ...
[ "variable_declaration.remove", "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo", "identifier.replace.remove", "literal.replace.add", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
118,790
118,791
u443210488
cpp
p02269
// #include <bits/stdc++.h> // using namespace std; // map<string, bool> record; // int main(int argc, char const *argv[]) // { // int n; // string oper, s; // while (~scanf("%d", &n)) // { // record.clear(); // for (int i = 0; i < n; ++i) // { // cin >> oper >> s;...
#include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if ('A' == ch) return 1; else if ('C' == ch) return 2; else if ('G' == ch) return 3; else if ('T' == ch) return 4; else return 0; } long long getKey(char str[]) ...
[ "identifier.replace.remove", "literal.replace.add", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
118,792
118,791
u443210488
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long getKey(char str[]) {...
#include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long getKey(char str[]) {...
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,793
118,794
u014280919
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long getKey(char str[]) {...
#include <stdio.h> #include <string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if (ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long getKey(char str[]) { ...
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
118,793
118,795
u014280919
cpp
p02269
#include <iostream> #include <string> using namespace std; const int M = 1046527; string table[M]; int get_char(char c) { if (c == 'A') return 1; else if (c == 'C') return 2; else if (c == 'G') return 3; else if (c == 'T') return 4; else return 0; } long long get_key(string &text) { ...
#include <iostream> #include <string> using namespace std; const int M = 1046527; string table[M]; int get_char(char c) { if (c == 'A') return 1; else if (c == 'C') return 2; else if (c == 'G') return 3; else if (c == 'T') return 4; else return 0; } long long get_key(string &text) { ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "expression.operation.unary.logical.remove", "control_flow.branch.if.condition.change" ]
118,803
118,804
u140534897
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
[ "identifier.change", "variable_declaration.array_dimensions.change", "call.arguments.change", "control_flow.branch.if.condition.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
118,819
118,820
u311689129
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
118,821
118,820
u311689129
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
118,822
118,820
u311689129
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
[ "literal.number.change", "assignment.value.change", "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
118,822
118,823
u311689129
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
[ "literal.number.change", "assignment.value.change", "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
118,821
118,824
u311689129
cpp
p02269
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
#include <stdio.h> #include <string.h> #define M 1046527 #define L 14 char H[M][L]; //?°?????¬??????¬??¢?????°??? int getChar(char c) { switch (c) { case 'A': return 1; case 'C': return 2; case 'G': return 3; case 'T': return 4; default: return 0; } } //?°?????¬??????¬??¢?????°?????¶?...
[ "literal.number.change", "assignment.value.change", "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
118,822
118,824
u311689129
cpp
p02275
#include <array> #include <cstdio> using namespace std; typedef array<int, 10001> v; static inline int in() { int c, n = 0; while ((c = getchar_unlocked()) >= '0' && c <= '9') n = 10 * n + (c - '0'); return n; } int main() { int n = in(), c = n; v b = {}; while (n--) b[in()]++; bool f = true...
#include <array> #include <cstdio> using namespace std; typedef array<int, 10001> v; static inline int in() { int c, n = 0; while ((c = getchar_unlocked()) >= '0' && c <= '9') n = 10 * n + (c - '0'); return n; } int main() { int n = in(), c = n; v b = {}; while (n--) b[in()]++; bool f = true...
[]
118,878
118,879
u621234548
cpp
p02275
#include <iostream> using namespace std; int n; int C[10000]; int CountingSort(int A[], int B[], int k) { for (int i = 0; i < k + 1; i++) { C[i] = 0; } for (int j = 1; j < n + 1; j++) { C[A[j]]++; } for (int i = 1; i < k + 1; i++) { C[i] = C[i] + C[i - 1]; } for (int j = n; j > -1; j--) { ...
#include <iostream> using namespace std; int n; int C[10000]; int CountingSort(int A[], int B[], int k) { for (int i = 0; i < k + 1; i++) { C[i] = 0; } for (int j = 1; j < n + 1; j++) { C[A[j]]++; } for (int i = 1; i < k + 1; i++) { C[i] = C[i] + C[i - 1]; } for (int j = n; j > 0; j--) { ...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,880
118,881
u338380084
cpp
p02275
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX(x, y) (((x) > (y)) ? (x) : (y)) int main() { int n, i, max; scanf("%d", &n); int A[n + 1]; int B[n + 1]; max = (1 << 30) * -1; for (i = 0; i < n; i++) { scanf("%hu", &A[i + 1]); max = MAX(max, A[i + 1]); } int C[max + 1];...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX(x, y) (((x) > (y)) ? (x) : (y)) int main() { int n, i, max; scanf("%d", &n); unsigned short A[n + 1]; unsigned short B[n + 1]; max = (1 << 30) * -1; for (i = 0; i < n; i++) { scanf("%hu", &A[i + 1]); max = MAX(max, A[i + 1]);...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
118,886
118,887
u657361950
cpp
p02275
#include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <typeinfo> #define MAX 2000001 #define VMAX 10000 using namespace std; int main() { unsigned short *A, *B; int C[VMAX + 1]; int n, i, j; cin >> n; A = static_cast<unsigned short *>(malloc(sizeof(short) * n + 1)); B = stati...
#include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <typeinfo> #define MAX 2000001 #define VMAX 10000 using namespace std; int main() { unsigned short *A, *B; int C[VMAX + 1]; int n, i, j; cin >> n; A = static_cast<unsigned short *>(malloc(sizeof(short) * n + 1)); B = stati...
[ "expression.operation.binary.remove" ]
118,888
118,889
u623735438
cpp
p02275
#include <iostream> using namespace std; #define VMAX 10000 void counting_sort(int A[], int B[], int C[], int k, int n) { // init C (counter) array for (int i = 0; i <= k; i++) { C[i] = 0; } // count the number of A[j] into C for (int j = 1; j <= n; j++) { C[A[j]]++; } // set the number which ...
#include <iostream> using namespace std; #define VMAX 10000 void counting_sort(int A[], int B[], int C[], int k, int n) { // init C (counter) array for (int i = 0; i <= k; i++) { C[i] = 0; } // count the number of A[j] into C for (int j = 1; j <= n; j++) { C[A[j]]++; } // set the number which ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,905
118,906
u419786871
cpp
p02275
#include <bits/stdc++.h> using namespace std; void CountingSort(vector<int> &A, vector<int> &B, vector<int> &C) { int n = A.size(); for (int i = 0; i < n; i++) { C[A[i]]++; } for (int i = 1; i < 10001; i++) { C[i] = C[i] + C[i - 1]; } for (int i = n - 1; i >= 0; i--) { B[C[A[i]] - 1] = A[i]; ...
#include <bits/stdc++.h> using namespace std; void CountingSort(vector<int> &A, vector<int> &B, vector<int> &C) { int n = A.size(); for (int i = 0; i < n; i++) { C[A[i]]++; } for (int i = 1; i < 10001; i++) { C[i] = C[i] + C[i - 1]; } for (int i = n - 1; i >= 0; i--) { B[C[A[i]] - 1] = A[i]; ...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
118,907
118,908
u808697998
cpp
p02275
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() typedef long long ll; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define REP(i, num, n) for (ll i = num, i##_len = (n); i < i##_len; ++i) #define repprev(i, a, b) for (ll i = b - 1; i >= a; i--) #define reprev(i, n) repprev(i, 0, n) u...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() typedef long long ll; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define REP(i, num, n) for (ll i = num, i##_len = (n); i < i##_len; ++i) #define repprev(i, a, b) for (ll i = b - 1; i >= a; i--) #define reprev(i, n) repprev(i, 0, n) u...
[ "expression.operation.binary.add" ]
118,913
118,914
u142421784
cpp
p02275
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,917
118,918
u443673068
cpp
p02275
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <ctype.h> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <ctype.h> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #includ...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "misc.off_by_one" ]
118,923
118,924
u021233305
cpp
p02275
#include <iostream> using namespace std; int main(void) { unsigned short A[2000001], B[2000001]; int C[10001], n; cin >> n; for (int i = 0; i <= 10000; i++) { C[i] = 0; } for (int i = 0; i < n; i++) { cin >> A[i + 1]; C[A[i + 1]]++; } for (int i = 1; i <= 10000; i++) C[i] += C[i - 1];...
#include <iostream> using namespace std; int main(void) { unsigned short A[2000001], B[2000001]; int C[10001], n; cin >> n; for (int i = 0; i <= 10000; i++) { C[i] = 0; } for (int i = 0; i < n; i++) { cin >> A[i + 1]; C[A[i + 1]]++; } for (int i = 1; i <= 10000; i++) C[i] += C[i - 1];...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,925
118,926
u783707634
cpp
p02275
#include <iostream> using namespace std; int main(void) { unsigned short A[2000001], B[2000001]; int C[10001], n; cin >> n; for (int i = 0; i <= 10000; i++) { C[i] = 0; } for (int i = 0; i < n; i++) { cin >> A[i + 1]; C[A[i + 1]]++; } for (int i = 1; i <= 10000; i++) C[i] += C[i - 1];...
#include <iostream> using namespace std; int main(void) { unsigned short A[2000001], B[2000001]; int C[10001], n; cin >> n; for (int i = 0; i <= 10000; i++) { C[i] = 0; } for (int i = 0; i < n; i++) { cin >> A[i + 1]; C[A[i + 1]]++; } for (int i = 1; i <= 10000; i++) C[i] += C[i - 1];...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,927
118,926
u783707634
cpp
p02275
#include <algorithm> #include <iostream> #include <vector> #define MAXVALUE 10000 #define rep(i, a) for (i = 0; i < a; i++) using namespace std; void CountingSort(vector<int> &A, vector<int> &B, int k) { int i, j; vector<int> C(k, 0); for (j = 0; j < A.size(); j++) { C[A[j]]++; } for (i = 1; i <= k; i++...
#include <algorithm> #include <iostream> #include <vector> #define MAXVALUE 10000 #define rep(i, a) for (i = 0; i < a; i++) using namespace std; void CountingSort(vector<int> &A, vector<int> &B, int k) { int i, j; vector<int> C(k + 1, 0); for (j = 0; j < A.size(); j++) { C[A[j]]++; } for (i = 1; i <= k;...
[ "assignment.change", "expression.operation.binary.remove" ]
118,932
118,933
u458804662
cpp
p02275
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctype.h> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using namespace std; #define pi 3.141592653589793 void Counting...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctype.h> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using namespace std; #define pi 3.141592653589793 void Counting...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,934
118,935
u571404136
cpp
p02275
#include <iostream> using namespace std; int main() { // your code goes here int n, l, ma = 0; cin >> n; int a[10010] = {0}; for (int i = 0; i < n; i++) { cin >> l; a[l]++; if (l > ma) ma = l; } for (int i = 0; i < 10010; i++) { if (a[i] == 0) continue; if (i != l) { ...
#include <iostream> using namespace std; int main() { // your code goes here int n, l, ma = 0; cin >> n; int a[10010] = {0}; for (int i = 0; i < n; i++) { cin >> l; a[l]++; if (l > ma) ma = l; } for (int i = 0; i < 10010; i++) { if (a[i] == 0) continue; if (i != ma) { ...
[ "identifier.change", "control_flow.branch.if.condition.change", "control_flow.return.add", "control_flow.return.0.add" ]
118,938
118,939
u835414158
cpp
p02275
#include <algorithm> #include <cstdio> using namespace std; int x[2000003], p[10003], n; int main() { scanf("%d", &n); getchar_unlocked(); for (int i = 0; i < n; i++) { while (true) { char c = getchar_unlocked(); if ('0' <= c && c <= '9') { x[i] = x[i] * 10 + (c - '0'); } else { ...
#include <algorithm> #include <cstdio> using namespace std; int x[2000003], p[10003], n; int main() { scanf("%d", &n); getchar_unlocked(); for (int i = 0; i < n; i++) { while (true) { char c = getchar_unlocked(); if ('0' <= c && c <= '9') { x[i] = x[i] * 10 + (c - '0'); } else { ...
[ "expression.unary.arithmetic.add" ]
118,942
118,943
u852311840
cpp
p02275
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; int n, k, A[2000000], B[2000001], C[10001]; int main(void) { scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", &A[i]); if (A[i] > k) { k = A[i]; } } for (int i = 0; i < n; ++i) { ...
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; int n, k, A[2000000], B[2000001], C[10001]; int main(void) { scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", &A[i]); if (A[i] > k) { k = A[i]; } } for (int i = 0; i < n; ++i) { ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
118,946
118,947
u566392363
cpp
p02275
#include "iostream" using namespace std; int main() { int in[2000000]; int ans[2000000]; int co[10001]; int n; cin >> n; for (int i = 0; i <= 10000; i++) { co[i] = 0; } for (int i = 0; i < n; i++) { cin >> in[i]; co[in[i]]++; } co[0]--; for (int i = 1; i <= 10000; i++) { co[...
#include "iostream" using namespace std; int main() { short in[2000000]; short ans[2000000]; int co[10001]; int n; cin >> n; for (int i = 0; i <= 10000; i++) { co[i] = 0; } for (int i = 0; i < n; i++) { cin >> in[i]; co[in[i]]++; } co[0]--; for (int i = 1; i <= 10000; i++) { ...
[ "variable_declaration.type.primitive.change" ]
118,948
118,949
u444120029
cpp
p02275
#include <algorithm> #include <iostream> #include <vector> typedef std::vector<int> TList; void CountingSort(const TList &A, TList &B, int k) { std::vector<int> C(k, 0); /* C[i] ??? i ???????????°????¨?????????? */ for (int j = 1; j < A.size(); ++j) { C[A[j]]++; } /* C[i] ??? i ??\????????°???????????°...
#include <algorithm> #include <iostream> #include <vector> typedef std::vector<int> TList; void CountingSort(const TList &A, TList &B, int k) { std::vector<int> C(k + 1, 0); /* C[i] ??? i ???????????°????¨?????????? */ for (int j = 0; j < A.size(); ++j) { C[A[j]]++; } /* C[i] ??? i ??\????????°????????...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "assignment.change" ]
118,956
118,957
u858711833
cpp
p02275
#include <iostream> #include <vector> const int N_MAX = 10000; int main(void) { std::ios_base::sync_with_stdio(false); int n = 0; std::cin >> n; std::vector<int> *v = new std::vector<int>(N_MAX + 1, -1); for (int i = 0; i < n; i++) { int a = 0; std::cin >> a; if (v->at(a) < 0) { v->a...
#include <iostream> #include <vector> const int N_MAX = 10000; int main(void) { std::ios_base::sync_with_stdio(false); int n = 0; std::cin >> n; std::vector<int> *v = new std::vector<int>(N_MAX + 1, -1); for (int i = 0; i < n; i++) { int a = 0; std::cin >> a; if (v->at(a) < 0) { v->a...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
118,958
118,959
u212165333
cpp
p02275
#include <iostream> #include <vector> typedef std::vector<int> Ints; void CountingSort(const Ints &A, Ints &B, int k) { Ints C(k, 0); // C[i] ??? i ???????????°????¨?????????? for (unsigned int j = 0; j < A.size(); j++) { C[A[j]]++; } // C[i] ??? i ??\????????°???????????°????¨?????????? for (int i =...
#include <iostream> #include <vector> typedef std::vector<int> Ints; void CountingSort(const Ints &A, Ints &B, int k) { Ints C(k + 1, 0); // C[i] ??? i ???????????°????¨?????????? for (unsigned int j = 0; j < A.size(); j++) { C[A[j]]++; } // C[i] ??? i ??\????????°???????????°????¨?????????? for (int...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "assignment.change" ]
118,960
118,961
u572975782
cpp
p02275
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; void countingSort(vector<int> &A, vector<int> &B, int k) { int n = A.size(); vector<int> freqs(k + 1, 0); for (int i = 0; i < n; ++i) { ++freqs[A[i]]; } for (int i = 1; i < n; ++i) { freqs[i] += freqs[i - 1]; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; void countingSort(vector<int> &A, vector<int> &B, int k) { int n = A.size(); vector<int> freqs(k + 1, 0); for (int i = 0; i < n; ++i) { ++freqs[A[i]]; } for (int i = 1; i <= k; ++i) { freqs[i] += freqs[i - 1];...
[ "control_flow.loop.for.condition.change" ]
118,962
118,963
u855775311
cpp
p02275
#include <cstdio> #include <iostream> using namespace std; #define maxn 2000005 int a[maxn], b[maxn], c[maxn]; void countingSort(int k) { for (int i = 1; i <= k; ++i) c[a[i]]++; for (int i = 1; i <= k; ++i) c[i] = c[i - 1] + c[i]; for (int i = k; i >= 1; --i) { b[c[a[i]]] = a[i]; c[a[i]]--; } } ...
#include <cstdio> #include <iostream> using namespace std; #define maxn 2000005 #define ma 10005 int a[maxn], b[maxn], c[maxn]; void countingSort(int k) { for (int i = 1; i <= k; ++i) c[a[i]]++; for (int i = 1; i <= ma; ++i) c[i] = c[i - 1] + c[i]; for (int i = k; i >= 1; --i) { b[c[a[i]]] = a[i]; ...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
119,831
119,832
u702548238
cpp
p02275
/* * CountingSort */ #include <iostream> #include <vector> using namespace std; void input(vector<int> &A) { int n = 0; cin >> n; A.resize(n); for (int i = 0; i < n; i++) { cin >> A[i]; } } void output(vector<int> &out) { int size = out.size(); // size = n; for (int i = 0; i < size; i++) { ...
/* * CountingSort */ #include <iostream> #include <vector> using namespace std; void input(vector<int> &A) { int n = 0; cin >> n; A.resize(n); for (int i = 0; i < n; i++) { cin >> A[i]; } } void output(vector<int> &out) { int size = out.size(); for (int i = 0; i < size; i++) { cout << out[i];...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one", "assignment.change", "literal.number.change", "call.arguments.change" ]
119,852
119,851
u979799212
cpp
p02275
/* * CountingSort */ #include <iostream> #include <vector> using namespace std; void input(vector<int> &A) { int n = 0; cin >> n; A.resize(n); for (int i = 0; i < n; i++) { cin >> A[i]; } } void output(vector<int> &out) { int size = out.size(); // size = n; for (int i = 0; i < size; i++) { ...
/* * CountingSort */ #include <iostream> #include <vector> using namespace std; void input(vector<int> &A) { int n = 0; cin >> n; A.resize(n); for (int i = 0; i < n; i++) { cin >> A[i]; } } void output(vector<int> &out) { int size = out.size(); for (int i = 0; i < size; i++) { cout << out[i];...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one", "expression.operator.compare.change", "expression.off_by_one", "expression.operation.binary.change", "assignment.change", "literal.number.change", "call.arguments.change" ]
119,853
119,851
u979799212
cpp
p02275
#include <algorithm> #include <iostream> #include <vector> using namespace std; void counting_sort(vector<int> &A) { int max_a = *max_element(A.begin(), A.end()); vector<int> C(max_a + 1, 0); for (const auto &a : A) C[a]++; for (int i = 1; i < C.size(); i++) C[i] += C[i - 1]; vector<int> B(A.size());...
#include <algorithm> #include <iostream> #include <vector> using namespace std; void counting_sort(vector<int> &A) { int max_a = *max_element(A.begin(), A.end()); vector<int> C(max_a + 1, 0); for (const auto &a : A) C[a]++; for (int i = 1; i < C.size(); i++) C[i] += C[i - 1]; vector<int> B(A.size());...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
119,855
119,856
u510526182
cpp
p02275
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; const int INF = 0x3f3f3f3f; int A[2000005], B[2000005], C[10005]; int main() { int n, temp = 0; cin >> n; for (int i = 1; i <= n; i++) scanf("%d", A + i); for (int i = 0; ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; const int INF = 0x3f3f3f3f; int A[2000005], B[2000005], C[10005]; int main() { int n, temp = 0; cin >> n; for (int i = 1; i <= n; i++) scanf("%d", A + i); for (int i = 1; ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "identifier.replace.remove", "literal.replace.add" ...
119,874
119,875
u324907960
cpp
p02275
#include <iostream> using namespace std; int a[2000000]; int main() { int n, c[10001] = {}; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; c[a[i]]++; } int j = 0; for (int i = 0; i < 10001; i++) { for (int k = 0; k < c[i]; k++) a[(j++) + k] = i; } for (int i = 0; i < n; i++) ...
#include <iostream> using namespace std; int a[2000000]; int main() { int n, c[10001] = {}; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; c[a[i]]++; } int j = 0; for (int i = 0; i < 10001; i++) { for (int k = 0; k < c[i]; k++) a[j++] = i; } for (int i = 0; i < n; i++) cout...
[ "expression.operation.binary.remove" ]
119,879
119,880
u505651850
cpp
p02275
#include <algorithm> #include <iostream> #include <vector> using namespace std; void counting_sort(vector<int> &A, int n) { int k = *max_element(A.begin(), A.end()); vector<int> B(n); vector<int> C(k); for (int i = 0; i < k; i++) C[i] = 0; for (int j = 0; j < n; j++) C[A[j]]++; for (int i = 1; i...
#include <algorithm> #include <iostream> #include <vector> using namespace std; void counting_sort(vector<int> &A, int n) { int k = *max_element(A.begin(), A.end()); vector<int> B(n + 1); vector<int> C(k + 1); for (int i = 0; i < k; i++) C[i] = 0; for (int j = 0; j < n; j++) C[A[j]]++; for (int ...
[ "assignment.change" ]
119,881
119,882
u007523040
cpp
p02275
#include <algorithm> // next_permutation #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <list> #include <numeric> //accumulate #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> //#include <unordered_map> //???????????\??¢??° #include <fstream> /...
#include <algorithm> // next_permutation #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <list> #include <numeric> //accumulate #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> //#include <unordered_map> //???????????\??¢??° #include <fstream> /...
[ "literal.number.change", "variable_declaration.value.change" ]
119,891
119,892
u713060520
cpp
p02275
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <stack> #include <vector> #define NMAX 2000000 #define VMAX 10000 using namespace std; int main() { unsigned short *A, *B; int n; int C[VMAX + 1]; scanf("%d", &n); for (int i = 0; i <= VMA...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <stack> #include <vector> #define NMAX 2000000 #define VMAX 10000 using namespace std; int main() { unsigned short *A, *B; int n; int C[VMAX + 1]; scanf("%d", &n); for (int i = 0; i <= VMA...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
119,895
119,896
u110158220
cpp
p02275
#include <cstdio> const int kMaxN = 2000000; const int kMaxAi = 10000; void CountingSort(int A[], int B[], int k, int n) { int i; int C[k + 1] = {}; for (i = 0; i < n; ++i) { ++C[A[i]]; } for (i = 1; i < k + 1; ++i) { C[i] += C[i - 1]; } for (i = n - 1; i > -1; --i) { B[C[A[i]]] = A[i]; ...
#include <cstdio> const int kMaxN = 2000000; const int kMaxAi = 10000; void CountingSort(int A[], int B[], int k, int n) { int i; int C[k + 1] = {}; for (i = 0; i < n; ++i) { ++C[A[i]]; } for (i = 1; i < k + 1; ++i) { C[i] += C[i - 1]; } for (i = n - 1; i > -1; --i) { B[C[A[i]] - 1] = A[i]; ...
[ "assignment.change" ]
119,898
119,899
u818475907
cpp
p02275
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <list> #include <queue> #include <stack> #include <vector> using namespace std; int a[2000010], b[2000010], c[2000010], n; int countingS(int a[], int b[], int k) { for (int i = 0; i <= k; i++) ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <list> #include <queue> #include <stack> #include <vector> using namespace std; int a[2000010], b[2000010], c[2000010], n; int countingS(int a[], int b[], int k) { for (int i = 0; i <= k; i++) ...
[ "literal.number.change", "call.arguments.change" ]
119,900
119,901
u974101748
cpp
p02275
#include <iostream> using namespace std; #define maxN 2000001 #define maxData 10001 int boxA[maxN], boxB[maxN], boxC[maxData]; int main(void) { /* *** initialize *** */ int dataN = 0; boxA[maxN] = {0}; boxB[maxN] = {0}; boxC[maxData] = {0}; /* *** input Data *** */ cin >> dataN; // cout << "dataN = ...
#include <iostream> using namespace std; #define maxN 2000001 #define maxData 10000 int boxA[maxN], boxB[maxN], boxC[maxData]; int main(void) { /* *** initialize *** */ int dataN = 0; boxA[maxN] = {0}; boxB[maxN] = {0}; boxC[maxData] = {0}; /* *** input Data *** */ cin >> dataN; // cout << "dataN = ...
[ "preprocessor.define.value.change", "literal.integer.change", "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
119,904
119,905
u138946205
cpp
p02275
// 計数ソート #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <stack> #include <vector> using namespace std; #define MAX_N 2000000 // const int INFTY = 2147483647; void CountingSort(int base[], int sort[], int n, int max); int main(void) { int...
// 計数ソート #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <stack> #include <vector> using namespace std; #define MAX_N 2000000 // const int INFTY = 2147483647; void CountingSort(int base[], int sort[], int n, int max); int main(void) { int...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
119,927
119,928
u444487239
cpp
p02275
#include <iostream> using namespace std; int A[2000005], B[2000005], C[10005]; void CountingSort(int n) { int k = 10000; for (int i = 0; i <= k; i++) C[i] = 0; for (int j = 0; j < n; j++) C[A[j]]++; for (int i = 1; i <= k; i++) C[i] += C[i - 1]; for (int j = n - 1; j >= 0; j--) { B[C[A[j]...
#include <iostream> using namespace std; int A[2000005], B[2000005], C[10005]; void CountingSort(int n) { int k = 10000; for (int i = 0; i <= k; i++) C[i] = 0; for (int j = 0; j < n; j++) C[A[j]]++; for (int i = 1; i <= k; i++) C[i] += C[i - 1]; for (int j = n - 1; j >= 0; j--) { B[C[A[j]...
[ "assignment.change" ]
119,932
119,933
u612715617
cpp
p02275
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <cmath> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) using namespace std; typedef long ...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <cmath> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) using namespace std; typedef long ...
[ "identifier.change", "call.function.change" ]
119,936
119,937
u147896162
cpp
p02275
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int A[2000010], B[2000010]; int C[100010]; int main() { int n; cin >> n; for (int i = 0; i < 100000; i++) C[i] = 0; for (int i = 0; i < n; i++) { cin >> A[i + 1]; C[A[i]]++; } for (int i = 1; i < 100000; i++) C[...
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int A[2000010], B[2000010]; int C[100010]; int main() { int n; cin >> n; for (int i = 0; i < 100000; i++) C[i] = 0; for (int i = 0; i < n; i++) { cin >> A[i + 1]; C[A[i + 1]]++; } for (int i = 1; i < 100000; i++) ...
[ "expression.operation.binary.add" ]
119,940
119,941
u347577008
cpp
p02275
#include <stdio.h> int main() { int n; scanf("%d", &n); int A[n + 1], B[n + 1], C[10000 + 1]; for (int i = 0; i < 10000 + 1; i++) { C[i] = 0; } for (int i = 0; i < n; i++) { scanf("%d", &A[i + 1]); C[A[i + 1]]++; } for (int i = 0; i < 10000 + 1; i++) C[i + 1] = C[i + 1] + C[i]; fo...
#include <stdio.h> int main() { int n; scanf("%d", &n); int A[n + 1], B[n + 1], C[10000 + 1]; for (int i = 0; i < 10000 + 1; i++) { C[i] = 0; } for (int i = 0; i < n; i++) { scanf("%d", &A[i + 1]); C[A[i + 1]]++; } for (int i = 0; i < 10000 + 1; i++) C[i + 1] = C[i + 1] + C[i]; fo...
[ "expression.operation.binary.add" ]
119,945
119,946
u815527706
cpp
p02275
#include <iostream> using namespace std; int n; int *A; int *C, *B; void bucketSort(int *A) { for (int i = 0; i < n; ++i) { C[A[i]]++; } for (int j = 1; j < 10000; ++j) { C[j] = C[j] + C[j - 1]; } for (int k = 0; k < n; k++) { B[C[A[k]] - 1] = A[k]; C[A[k]]--; } } int main() { cin >> n...
#include <iostream> using namespace std; int n; int *A; int *C, *B; void bucketSort(int *A) { for (int i = 0; i < n; ++i) { C[A[i]]++; } for (int j = 1; j < 10000; ++j) { C[j] = C[j] + C[j - 1]; } for (int k = 0; k < n; k++) { B[C[A[k]] - 1] = A[k]; C[A[k]]--; } } int main() { cin >> n...
[ "expression.operation.unary.logical.remove", "control_flow.branch.if.condition.change" ]
119,949
119,950
u011563519
cpp
p02275
//============================================================================ // Name : CountingSort.cpp // Author : Ken // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #i...
//============================================================================ // Name : CountingSort.cpp // Author : Ken // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #i...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "assignment.change" ]
119,958
119,959
u879863482
cpp
p02275
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); int A[10001] = {}; int n, num; cin >> n; for (int i = 0; i < n; i++) { cin >> num; A[num] += 1; } for (int i = 0; i < n; i++) { if (0 < A[i]) { cout << i; A[i] -= 1; break; } } ...
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); int A[10001] = {}; int n, num; cin >> n; for (int i = 0; i < n; i++) { cin >> num; A[num] += 1; } for (int i = 0; i < n; i++) { if (0 < A[i]) { cout << i; A[i] -= 1; break; } } ...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
119,966
119,967
u709310961
cpp
p02275
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); int A[10001] = {}; int n, num; cin >> n; for (int i = 0; i < n; i++) { cin >> num; A[num] += 1; } for (int i = 0; i < n; i++) { if (0 < A[i]) { cout << i; A[i] -= 1; break; } } ...
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); int A[10001] = {}; int n, num; cin >> n; for (int i = 0; i < n; i++) { cin >> num; A[num] += 1; } for (int i = 0; i < n; i++) { if (0 < A[i]) { cout << i; A[i] -= 1; break; } } ...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
119,968
119,967
u709310961
cpp
p02275
#include <iostream> #include <vector> using namespace std; int main() { int i, j, buf; int k = 10; int n; vector<int> A, B, C; cin >> n; for (i = 0; i < n; i++) { // cin >> A[i]; //?buf使わなくていいの? ->使わなきゃダメだったエラー[vector // subscript out of range] cin >> buf; A.push_back(buf); } for (i ...
#include <iostream> #include <vector> using namespace std; int main() { int i, j, buf; int k = 2000000; int n; vector<int> A, B, C; cin >> n; for (i = 0; i < n; i++) { // cin >> A[i]; //?buf使わなくていいの? ->使わなきゃダメだったエラー[vector // subscript out of range] cin >> buf; A.push_back(buf); } fo...
[ "literal.number.change", "variable_declaration.value.change" ]
119,969
119,970
u708195431
cpp