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
p01634
#include <cctype> #include <iostream> #include <string> using namespace std; int main() { bool ok1 = false, ok2 = false, ok3 = false, ok4 = false; string S; cin >> S; ok1 = (S.size() >= 6); for (int i = 0; i < S.size(); i++) { ok2 = ok2 & isdigit(S[i]); ok3 = ok3 & isupper(S[i]); ok4 = ok4 & ...
#include <cctype> #include <iostream> #include <string> using namespace std; int main() { bool ok1 = false, ok2 = false, ok3 = false, ok4 = false; string S; cin >> S; ok1 = (S.size() >= 6); for (int i = 0; i < S.size(); i++) { ok2 = ok2 | isdigit(S[i]); ok3 = ok3 | isupper(S[i]); ok4 = ok4 | ...
[ "assignment.value.change", "expression.operation.binary.change" ]
87,046
87,047
u823513038
cpp
p01634
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string s; cin >> s; bool nu = false, ca = false, sm = false; for (char c : s) { if ('0' <= c && c <= '9') nu = true; if ('a' <= c && c <= 'z') sm = true; if ('A' <= c && c <= 'Z') ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string s; cin >> s; bool nu = false, ca = false, sm = false; for (char c : s) { if ('0' <= c && c <= '9') nu = true; if ('a' <= c && c <= 'z') sm = true; if ('A' <= c && c <= 'Z') ...
[ "call.remove", "control_flow.branch.else.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "call.add" ]
87,048
87,049
u220324665
cpp
p01634
#include <iostream> #include <string> using namespace std; bool check_pass(string str) { if (str.length() < 6) { return false; } bool small, large, num; small = large = num = false; for (int i = 0; i < str.length(); ++i) { if (str[i] >= 'a' && str[i] <= 'z') { small = true; } if (str[i...
#include <iostream> #include <string> using namespace std; bool check_pass(string str) { if (str.length() < 6) { return false; } bool small, large, num; small = large = num = false; for (int i = 0; i < str.length(); ++i) { if (str[i] >= 'a' && str[i] <= 'z') { small = true; } if (str[i...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
87,052
87,053
u681860270
cpp
p01634
#include <cctype> #include <iostream> using namespace std; int main() { string str; getline(cin, str); bool f = 0, bad = 0; if (str.size() < 6) bad = 1; for (int i = 0; i < str.size(); i++) if (isdigit(str[i])) f = 1; if (!f) bad = 1; f = 0; for (int i = 0; i < str.size(); i++) if ...
#include <cctype> #include <iostream> using namespace std; int main() { string str; getline(cin, str); bool f = 0, bad = 0; if (str.size() < 6) bad = 1; for (int i = 0; i < str.size(); i++) if (isdigit(str[i])) f = 1; if (!f) bad = 1; f = 0; for (int i = 0; i < str.size(); i++) if ...
[ "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
87,055
87,056
u228816757
cpp
p01634
#include <iostream> #include <string> using namespace std; int main() { int length = 0, num = 0, big = 0, small = 0; string str; cin >> str; if (str.size() >= 6) length++; for (int i = 0; i < str.size() - 1; i++) { if (str[i] >= '0' && str[i] <= '9') num++; else if (str[i] >= 'a' && str[i]...
#include <iostream> #include <string> using namespace std; int main() { int length = 0, num = 0, big = 0, small = 0; string str; cin >> str; if (str.size() >= 6) length++; for (int i = 0; i < str.size(); i++) { if (str[i] >= '0' && str[i] <= '9') num++; else if (str[i] >= 'a' && str[i] <= ...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
87,059
87,060
u170709923
cpp
p01634
#include <cstring> #include <iostream> using namespace std; int main() { string p; cin >> p; bool min_length, has_number, has_upper, has_lower; min_length = 6U <= p.size(); for (int i = 0; i < (int)p.size(); ++i) { if (isdigit(p[i])) has_number = true; if (isupper(p[i])) has_upper = t...
#include <cstring> #include <iostream> using namespace std; int main() { string p; cin >> p; bool min_length, has_number = false, has_upper = false, has_lower = false; min_length = 6U <= p.size(); for (int i = 0; i < (int)p.size(); ++i) { if (isdigit(p[i])) has_number = true; if (isupper(p[...
[ "variable_declaration.value.change" ]
87,063
87,064
u703196441
cpp
p01635
#include <algorithm> #include <iostream> #include <string> using namespace std; typedef long long lli; lli get_digit(lli a) { lli res = 0, tmp = a; if (a == 0) return 1; while (tmp > 0) { res++; tmp /= 10; } return res; } lli mypow(lli a, lli b) { lli digit = get_digit(a); if (digit + b > ...
#include <algorithm> #include <iostream> #include <string> using namespace std; typedef long long lli; lli get_digit(lli a) { lli res = 0, tmp = a; if (a == 0) return 1; while (tmp > 0) { res++; tmp /= 10; } return res; } lli mypow(lli a, lli b) { lli digit = get_digit(a); if (digit * b > ...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "literal.number.change" ]
87,091
87,092
u622083648
cpp
p01636
#include <bits/stdc++.h> using namespace std; int main() { int co = 0; string a; cin >> a; string b = ""; while (a != "") { // cout << 1 << endl;; stringstream ssa(a); long long ai; ssa >> ai; if (a == "") ai = 0; stringstream ssb(b); long long bi; ssb >> bi; if (b ==...
#include <bits/stdc++.h> using namespace std; int main() { int co = 0; string a; cin >> a; string b = ""; while (a != "") { // cout << 1 << endl;; stringstream ssa(a); long long ai; ssa >> ai; if (a == "") ai = 0; stringstream ssb(b); long long bi; ssb >> bi; if (b ==...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
87,119
87,120
u959291807
cpp
p01646
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define ...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
87,164
87,165
u709185111
cpp
p01648
#define _USE_MATH_DEFINES #include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> usi...
#define _USE_MATH_DEFINES #include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> usi...
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
87,180
87,181
u822298456
cpp
p01677
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 10000001000 #define int long long using namespace std; signed main() { int n; while (cin >> n, n) { // cout << "--------------------------------------------" << endl; // cout << n << endl; vector<int> vec(n + 1); stri...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 10000001000 #define int long long using namespace std; signed main() { int n; while (cin >> n, n) { // cout << "--------------------------------------------" << endl; // cout << n << endl; vector<int> vec(n + 1); stri...
[ "literal.string.change", "io.output.change" ]
87,186
87,187
u851121794
cpp
p01677
#include <bits/stdc++.h> using namespace std; int go(vector<long long> v, int num) { vector<long long> diff; for (int i = 0; i < v.size(); i++) { if (v[i] == -1) v[i] = num; if (i) diff.push_back(v[i] - v[i - 1]); } for (int i = 0; i < diff.size(); i++) { if (((i % 2) ^ (diff[i] < 0)) |...
#include <bits/stdc++.h> using namespace std; int go(vector<long long> v, int num) { vector<long long> diff; for (int i = 0; i < v.size(); i++) { if (v[i] == -1e15) v[i] = num; if (i) diff.push_back(v[i] - v[i - 1]); } for (int i = 0; i < diff.size(); i++) { if (((i % 2) ^ (diff[i] < 0)...
[ "literal.number.change", "control_flow.branch.if.condition.change", "call.arguments.change" ]
87,192
87,193
u458173932
cpp
p01677
#include <bits/stdc++.h> using namespace std; int main() { int N; while (1) { cin >> N; if (N == 0) break; vector<string> vec; for (int i = 0; i < N; i++) { string in; cin >> in; vec.push_back(in); } bool flag = true; for (int i = 0; i < N; i++) { if (vec...
#include <bits/stdc++.h> using namespace std; int main() { int N; while (1) { cin >> N; if (N == 0) break; vector<string> vec; for (int i = 0; i < N; i++) { string in; cin >> in; vec.push_back(in); } bool flag = true; for (int i = 0; i < N; i++) { if (vec...
[ "assignment.change" ]
87,198
87,199
u081053257
cpp
p01677
#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #define INF 1000000001 #define MIN -1000000002 #define MAX 1000000002 using namespace std; int main() { int n; while (cin >> n && n != 0) { long a[1000 + 1]; long mn = MIN; long mx = MAX; for (int i = 1; i <= n; i++) { ...
#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #define INF 1000000002 #define MIN -1000000002 #define MAX 1000000002 using namespace std; int main() { int n; while (cin >> n && n != 0) { long a[1000 + 1]; long mn = MIN; long mx = MAX; for (int i = 1; i <= n; i++) { ...
[ "preprocessor.define.value.change", "literal.integer.change", "literal.string.change", "io.output.change" ]
87,201
87,202
u507118101
cpp
p01677
#include <cstdlib> #include <iostream> #include <string> using namespace std; int main() { for (int N; cin >> N, N;) { string s[1234]; for (int i = 0; i < N; i++) { cin >> s[i]; } bool f = false; int lt = 1e9 + 9, ht = -1e9 + 9; for (int i = 0; i < N - 1; i++) { if (s[i][0] == 'x...
#include <cstdlib> #include <iostream> #include <string> using namespace std; int main() { for (int N; cin >> N, N;) { string s[1234]; for (int i = 0; i < N; i++) { cin >> s[i]; } bool f = false; int lt = 1e9 + 9, ht = -1e9 - 9; for (int i = 0; i < N - 1; i++) { if (s[i][0] == 'x...
[ "misc.opposites", "expression.operator.arithmetic.change", "expression.operation.binary.change", "expression.operator.compare.change", "assignment.value.change" ]
87,205
87,204
u766225878
cpp
p01677
#include <algorithm> #include <cstdlib> #include <iostream> using namespace std; #define MAX_N 1000000000 int main() { while (1) { int n; cin >> n; if (n == 0) break; long long int a[n]; for (int i = 0; i < n; i++) { string s; cin >> s; a[i] = s == "x" ? MAX_N + 1 : atoi(...
#include <algorithm> #include <cstdlib> #include <iostream> using namespace std; #define MAX_N 1000000000 int main() { while (1) { int n; cin >> n; if (n == 0) break; long long int a[n]; for (int i = 0; i < n; i++) { string s; cin >> s; a[i] = s == "x" ? MAX_N + 1 : atoi(...
[ "misc.opposites", "assignment.value.change" ]
87,209
87,210
u981364540
cpp
p01677
#include <iostream> #include <sstream> #include <string> using namespace std; int s2i(string str) { istringstream ss(str); int n; ss >> n; return n; } int main() { int n; cin >> n; int i, j, k; string str; while (n != 0) { int b, c; int f = 0; int o = 0; int xmin = -1000000010, xmax = ...
#include <iostream> #include <sstream> #include <string> using namespace std; int s2i(string str) { istringstream ss(str); int n; ss >> n; return n; } int main() { int n; cin >> n; int i, j, k; string str; while (n != 0) { int b, c; int f = 0; int o = 0; int xmin = -1000000010, xmax = ...
[ "assignment.add" ]
87,211
87,212
u924665348
cpp
p01677
#include <algorithm> #include <iostream> #include <string> #define INF 1000000007 using namespace std; int N, a[1000]; string s; int main() { while (cin >> N, N) { for (int i = 0; i < N; i++) { cin >> s; a[i] = s[0] != 'x' ? stoi(s) : INF; } int f = 1; for (int i = 0; i < N; i += 2) { ...
#include <algorithm> #include <iostream> #include <string> #define INF 1000000007 using namespace std; int N, a[1000]; string s; int main() { while (cin >> N, N) { for (int i = 0; i < N; i++) { cin >> s; a[i] = s[0] != 'x' ? stoi(s) : INF; } int f = 1; for (int i = 0; i < N; i += 2) { ...
[ "literal.string.change", "io.output.change", "control_flow.return.add", "control_flow.return.0.add" ]
87,213
87,214
u823513038
cpp
p01677
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define repl(i, a, b) for...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define repl(i, a, b) for...
[ "expression.operation.unary.add", "function.return_value.change" ]
87,217
87,218
u777126276
cpp
p01677
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; const int INF = 2e9; int change(string s) { int res = 0, i = 0; for (i = 0; i < s.size(); i++) { if (s[i] == '-') continue; res = res * 10 + (int)(s[i] - '0'); // cout << s[i] - '0' << " " << res << end...
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; const int INF = 2e9; int change(string s) { int res = 0, i = 0; for (i = 0; i < s.size(); i++) { if (s[i] == '-') continue; res = res * 10 + (int)(s[i] - '0'); // cout << s[i] - '0' << " " << res << end...
[ "literal.string.change", "io.output.change" ]
87,221
87,222
u188938853
cpp
p01677
#include "bits/stdc++.h" #define REP(i, n) for (ll i = 0; i < n; ++i) #define RREP(i, n) for (ll i = n - 1; i >= 0; --i) #define FOR(i, m, n) for (ll i = m; i < n; ++i) #define RFOR(i, m, n) for (ll i = n - 1; i >= m; --i) #define ALL(v) (v).begin(), (v).end() #define PB(a) push_back(a) #define UNIQUE(v) v.erase(uniqu...
#include "bits/stdc++.h" #define REP(i, n) for (ll i = 0; i < n; ++i) #define RREP(i, n) for (ll i = n - 1; i >= 0; --i) #define FOR(i, m, n) for (ll i = m; i < n; ++i) #define RFOR(i, m, n) for (ll i = n - 1; i >= m; --i) #define ALL(v) (v).begin(), (v).end() #define PB(a) push_back(a) #define UNIQUE(v) v.erase(uniqu...
[ "literal.string.change", "io.output.change" ]
87,223
87,224
u667297321
cpp
p01678
#include "bits/stdc++.h" #include <unordered_map> #pragma warning(disable : 4996) using namespace std; const int mod = 1000000007; struct Mod { public: int num; Mod() : num(0) { ; } Mod(long long int n) : num((n % mod + mod) % mod) { ; } Mod(int n) : num((n % mod + mod) % mod) { ; } operator int() { return n...
#include "bits/stdc++.h" #include <unordered_map> #pragma warning(disable : 4996) using namespace std; const int mod = 1000000007; struct Mod { public: int num; Mod() : num(0) { ; } Mod(long long int n) : num((n % mod + mod) % mod) { ; } Mod(int n) : num((n % mod + mod) % mod) { ; } operator int() { return n...
[ "assignment.change", "expression.operation.binary.remove" ]
87,232
87,233
u186082958
cpp
p01694
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define rer(i, a, b) for (int i = (int)a; i <= (int)b; ++i) #define each(i, c) \ for (__typeof((c).begin()) i = (c).begin(...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define rer(i, a, b) for (int i = (int)a; i <= (int)b; ++i) #define each(i, c) \ for (__typeof((c).begin()) i = (c).begin(...
[ "assignment.add" ]
87,275
87,276
u233660011
cpp
p01694
#include <fstream> #include <iostream> #include <string> using namespace std; ifstream fin; ofstream fout; int main() { fin.open("input.txt"); fout.open("output.txt"); bool left = false, right = false; // false??§???,true??§????????° int n; // input int count = 0; bool moveflag; bool pre, now; // tru...
#include <fstream> #include <iostream> #include <string> using namespace std; ifstream fin; ofstream fout; int main() { fin.open("input.txt"); fout.open("output.txt"); bool left = false, right = false; // false??§???,true??§????????° int n; // input int count = 0; bool moveflag; bool pre, now; // tru...
[ "identifier.change", "expression.operation.binary.change" ]
87,280
87,281
u979136186
cpp
p01694
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { for (int n; cin >> n;) { int c = 0, d = 0, C = ...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { for (int n; cin >> n && n;) { int c = 0, d = 0,...
[ "control_flow.loop.for.condition.change" ]
87,288
87,289
u160041984
cpp
p01694
#include <bits/stdc++.h> using namespace std; /*{{{*/ // template #define rep(i, n) for (int i = 0; i < n; i++) constexpr int INF = numeric_limits<int>::max() / 2; constexpr long long LINF = numeric_limits<long long>::max() / 3; #define mp make_pair #define pb push_back #define eb emplace_back #define fi first #define ...
#include <bits/stdc++.h> using namespace std; /*{{{*/ // template #define rep(i, n) for (int i = 0; i < n; i++) constexpr int INF = numeric_limits<int>::max() / 2; constexpr long long LINF = numeric_limits<long long>::max() / 3; #define mp make_pair #define pb push_back #define eb emplace_back #define fi first #define ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
87,298
87,299
u371289566
cpp
p01695
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; while (cin >> n) { if (n == 0) { break; } vector<string> str(n); for (int i = 0; i < n; i++) { cin >> str[i]; if (i == 0) { continue; } for (int j = 0; j < str[i]....
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; while (cin >> n) { if (n == 0) { break; } vector<string> str(n); for (int i = 0; i < n; i++) { cin >> str[i]; if (i == 0) { continue; } for (int j = 0; j < str[i]....
[ "control_flow.break.add" ]
87,323
87,324
u278285028
cpp
p01695
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; while (cin >> n) { if (n == 0) { break; } vector<string> str(n); for (int i = 0; i < n; i++) { cin >> str[i]; if (i == 0) { continue; } for (int j = 0; j < str[i]....
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; while (cin >> n) { if (n == 0) { break; } vector<string> str(n); for (int i = 0; i < n; i++) { cin >> str[i]; if (i == 0) { continue; } for (int j = 0; j < str[i]....
[]
87,325
87,324
u278285028
cpp
p01695
#include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; typedef vector<string> vs; void cat(vs &arr, int i, int j) { int cur = i; while (1) { if (++cur >= arr.size()) { break; } if (j > arr[cur].length()) { break; } if (arr[cur][j] == '+') { ...
#include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; typedef vector<string> vs; void cat(vs &arr, int i, int j) { int cur = i; while (1) { if (++cur >= arr.size()) { break; } if (j > arr[cur].length()) { break; } if (arr[cur][j] == '+') { ...
[ "control_flow.break.add" ]
87,340
87,341
u777217452
cpp
p01695
#include <algorithm> #include <iostream> #include <vector> #define reps(i, j, k) for (int i = (j); i <= (k); ++i) #define rep(i, j) reps(i, 0, (j)-1) #define fs first #define sc second #define pb push_back using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; int main() { int n; while (cin >>...
#include <algorithm> #include <iostream> #include <vector> #define reps(i, j, k) for (int i = (j); i <= (k); ++i) #define rep(i, j) reps(i, 0, (j)-1) #define fs first #define sc second #define pb push_back using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; int main() { int n; while (cin >>...
[ "control_flow.loop.for.initializer.change" ]
87,352
87,351
u643705886
cpp
p01695
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change" ]
87,353
87,354
u230901651
cpp
p01695
#include "bits/stdc++.h" using namespace std; #define mod 1000000007 #define all(c) begin(c), end(c) template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } using ll = long long; using vi = vector<int>; using vs = vector<strin...
#include "bits/stdc++.h" using namespace std; #define mod 1000000007 #define all(c) begin(c), end(c) template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } using ll = long long; using vi = vector<int>; using vs = vector<strin...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
87,362
87,363
u746333947
cpp
p01695
#include "bits/stdc++.h" using namespace std; #define mod 1000000007 #define all(c) begin(c), end(c) template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } using ll = long long; using vi = vector<int>; using vs = vector<strin...
#include "bits/stdc++.h" using namespace std; #define mod 1000000007 #define all(c) begin(c), end(c) template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } using ll = long long; using vi = vector<int>; using vs = vector<strin...
[]
87,364
87,363
u746333947
cpp
p01695
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define loop(i, s, n) for (int i = s; i < n; i++) #define all(in) in.begin(), in.end() #define rep(i, n) for (int i = 0; i < n; i++) #define loop(i, s, n) for (int i = s; i < n; i++) #define all(in) in.begin(), in.end() #define MP make_pair #define ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define loop(i, s, n) for (int i = s; i < n; i++) #define all(in) in.begin(), in.end() #define rep(i, n) for (int i = 0; i < n; i++) #define loop(i, s, n) for (int i = s; i < n; i++) #define all(in) in.begin(), in.end() #define MP make_pair #define ...
[ "assignment.add" ]
87,367
87,368
u287295208
cpp
p01695
#include <iostream> using namespace std; int main(void) { while (1) { int n; scanf("%d", &n); if (n == 0) break; char s[n][114]; for (int i = 0; i < n; i++) scanf("%s", s[i]); int a[n]; for (int i = 0; i < n; i++) for (int j = 0;; j++) { if (s[i][j] != '.') { ...
#include <iostream> using namespace std; int main(void) { while (1) { int n; scanf("%d", &n); if (n == 0) break; char s[n][1919]; for (int i = 0; i < n; i++) scanf("%s", s[i]); int a[n]; for (int i = 0; i < n; i++) for (int j = 0;; j++) { if (s[i][j] != '.') { ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "assignment.change" ]
87,369
87,370
u931207793
cpp
p01695
#include <iostream> using namespace std; int main(void) { while (1) { int n; scanf("%d", &n); if (n == 0) break; char s[n][1919]; for (int i = 0; i < n; i++) scanf("%s", s[i]); int a[n]; for (int i = 0; i < n; i++) for (int j = 0;; j++) { if (s[i][j] != '.') { ...
#include <iostream> using namespace std; int main(void) { while (1) { int n; scanf("%d", &n); if (n == 0) break; char s[n][1919]; for (int i = 0; i < n; i++) scanf("%s", s[i]); int a[n]; for (int i = 0; i < n; i++) for (int j = 0;; j++) { if (s[i][j] != '.') { ...
[ "assignment.change" ]
87,371
87,370
u931207793
cpp
p01650
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define srep(i, n, m) for (int i = (int)n; i <= (int)m; i++) int n, m; int dp[52][52][52][52]; bool ok[52][52][52][52]; int inf = 1000000; vector<string...
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define srep(i, n, m) for (int i = (int)n; i <= (int)m; i++) int n, m; int dp[52][52][52][52]; bool ok[52][52][52][52]; int inf = 1000000; vector<string...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
87,387
87,388
u654128932
cpp
p01650
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> &o) { out << "(" << o.first << "," << o.second << ")"; return out; } tem...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> &o) { out << "(" << o.first << "," << o.second << ")"; return out; } tem...
[ "assignment.add" ]
87,389
87,390
u929568713
cpp
p01650
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> &o) { out << "(" << o.first << "," << o.second << ")"; return out; } tem...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> &o) { out << "(" << o.first << "," << o.second << ")"; return out; } tem...
[ "assignment.add" ]
87,391
87,392
u929568713
cpp
p01650
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #includ...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change", "identifier.change", "variable_access.subscript.index.change", "assignment.value.change", "call.arguments.change" ]
87,393
87,394
u418253672
cpp
p01653
#include <cstdlib> #include <iostream> #include <queue> #include <set> #include <vector> using namespace std; struct edge { long long x, v, c; }; struct S { long long x, v, c; bool operator<(S s) const { return c > s.c; } }; vector<edge> G[123][1234]; long long d[123][1234]; set<long long> cands; void add_ca...
#include <cmath> #include <cstdlib> #include <iostream> #include <queue> #include <set> #include <vector> using namespace std; struct edge { long long x, v, c; }; struct S { long long x, v, c; bool operator<(S s) const { return c > s.c; } }; vector<edge> G[123][1234]; long long d[123][1234]; set<long long> ca...
[ "import.add", "identifier.change", "control_flow.branch.if.condition.change" ]
87,404
87,405
u766225878
cpp
p01653
#include <cmath> #include <cstdlib> #include <iostream> #include <queue> #include <set> #include <vector> using namespace std; struct edge { long long x, v, c; }; struct S { long long x, v, c; bool operator<(S s) const { return c > s.c; } }; vector<edge> G[123][1234]; long long d[123][1234]; set<long long> ca...
#include <cmath> #include <cstdlib> #include <iostream> #include <queue> #include <set> #include <vector> using namespace std; struct edge { long long x, v, c; }; struct S { long long x, v, c; bool operator<(S s) const { return c > s.c; } }; vector<edge> G[123][1234]; long long d[123][1234]; set<long long> ca...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
87,406
87,405
u766225878
cpp
p01656
#include <algorithm> #include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) using namespace std; int main() { int n, q; cin >> n >> q; string ans = "kogakubo10goukan"; rep(i, n) { int y; string name; cin >> y >> name; if (y <= q)...
#include <algorithm> #include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) using namespace std; int main() { int n, q; cin >> n >> q; string ans = "kogakubu10gokan"; rep(i, n) { int y; string name; cin >> y >> name; if (y <= q) ...
[ "literal.string.change", "variable_declaration.value.change" ]
87,423
87,424
u615353970
cpp
p01656
#include <algorithm> #include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) using namespace std; int main() { int n, q; cin >> n >> q; string ans = "kogakubu10goukan"; rep(i, n) { int y; string name; cin >> y >> name; if (y <= q)...
#include <algorithm> #include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) using namespace std; int main() { int n, q; cin >> n >> q; string ans = "kogakubu10gokan"; rep(i, n) { int y; string name; cin >> y >> name; if (y <= q) ...
[ "literal.string.change", "variable_declaration.value.change" ]
87,425
87,424
u615353970
cpp
p01656
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define MP make_pair int main() { int n, q, max = 0; cin >> n >> q; vector<pair<int, string>> v(n); for (int i = 0; i < n; i++) { int y; string s; cin >> y >> s; v[i] = MP(y, s); if (v[i].first < q) { max ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define MP make_pair int main() { int n, q, max = -1; cin >> n >> q; vector<pair<int, string>> v(n); for (int i = 0; i < n; i++) { int y; string s; cin >> y >> s; v[i] = MP(y, s); if (v[i].first <= q) { ma...
[ "literal.number.change", "variable_declaration.value.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
87,426
87,427
u891508763
cpp
p01656
#include <iostream> #include <string> using namespace std; int main() { pair<int, string> prev, now; prev = make_pair(1, "kogakubu10gokan"); int N, Q; cin >> N >> Q; for (int i = 0; i < N; i++) { cin >> now.first >> now.second; if (prev.first <= Q && Q < now.first) { cout << prev.second <<...
#include <iostream> #include <string> using namespace std; int main() { pair<int, string> prev, now; prev = make_pair(1, "kogakubu10gokan"); int N, Q; cin >> N >> Q; for (int i = 0; i < N; i++) { cin >> now.first >> now.second; if (prev.first <= Q && Q < now.first) { cout << prev.second <<...
[ "assignment.add" ]
87,435
87,436
u823513038
cpp
p01656
#include <iostream> #include <string> using namespace std; string name[10000]; int y, a, b, n; string S[10000]; int main() { S[0] = "kogakubu10gokan"; cin >> a >> b; for (int i = 1; i <= a; i++) { cin >> y >> S[i]; for (int j = n; j < y; j++) { name[j - 1] = S[i - 1]; } n = y; } for (int...
#include <iostream> #include <string> using namespace std; string name[10000]; int y, a, b, n; string S[10000]; int main() { S[0] = "kogakubu10gokan"; cin >> a >> b; n = 0; for (int i = 1; i <= a; i++) { cin >> y >> S[i]; for (int j = n; j < y; j++) { name[j] = S[i - 1]; } n = y; } for...
[ "assignment.add", "expression.operation.binary.remove" ]
87,437
87,438
u852311840
cpp
p01682
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; // < "D:\D_Download\Visual Studio // 2015\Projects\programing_contest_c++\Debug\a.txt" int l ...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; // < "D:\D_Download\Visual Studio // 2015\Projects\programing_contest_c++\Debug\a.txt" int l ...
[ "literal.number.change", "call.arguments.change" ]
87,475
87,476
u186082958
cpp
p01682
#include <bits/stdc++.h> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) for (int i = 0; i < (b); i++) #define all(a) (a).*begin(), (a).end() #define show(x) cerr << #x << " = " << (x) << endl; using namespace std; const int M = 1000000007; string s; typedef string::const_iterator State; int...
#include <bits/stdc++.h> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) for (int i = 0; i < (b); i++) #define all(a) (a).*begin(), (a).end() #define show(x) cerr << #x << " = " << (x) << endl; using namespace std; const int M = 1000000007; string s; typedef string::const_iterator State; int...
[ "call.add", "call.arguments.add" ]
87,482
87,483
u452212317
cpp
p01682
#include <iostream> using ll = long long; constexpr ll MOD = (1e9) + 7; class Parser { private: std::string s; std::string::const_iterator it; public: Parser(std::string s) { this->s = s; it = s.begin(); } ll number() { ll res = 0; while (isdigit(*it)) { res *= 10; res += *it -...
#include <iostream> using ll = long long; constexpr ll MOD = (1e9) + 7; class Parser { private: std::string s; std::string::const_iterator it; public: Parser(std::string s) { this->s = s; it = this->s.begin(); } ll number() { ll res = 0; while (isdigit(*it)) { res *= 10; res +=...
[]
87,484
87,485
u796627333
cpp
p01682
// g++ -std=c++11 a.cpp #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <typeinfo> #include <utility> #inc...
// g++ -std=c++11 a.cpp #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <typeinfo> #include <utility> #inc...
[ "literal.number.change", "assignment.value.change", "call.arguments.change" ]
87,486
87,487
u214600613
cpp
p01682
// g++ -std=c++11 a.cpp #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <typeinfo> #include <utility> #inc...
// g++ -std=c++11 a.cpp #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <typeinfo> #include <utility> #inc...
[ "call.add", "call.arguments.add" ]
87,488
87,487
u214600613
cpp
p01687
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #includ...
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #includ...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
87,529
87,530
u396948350
cpp
p01687
#include <algorithm> #include <iostream> #include <string> using namespace std; string S, T = "AIZUNYAN", U = "AADINNUY"; int main() { cin >> S; int W = S.size() - 7; for (int i = 0; i < W; i++) { string V = S.substr(i, 8); sort(V.begin(), V.end()); if (V == U) { for (int j = 0; j < 8; j++) { ...
#include <algorithm> #include <iostream> #include <string> using namespace std; string S, T = "AIZUNYAN", U = "AADINNUY"; int main() { cin >> S; int W = S.size() - 7; for (int i = 0; i < W; i++) { string V = S.substr(i, 8); sort(V.begin(), V.end()); if (V == U) { for (int j = 0; j < 8; j++) { ...
[ "assignment.add" ]
87,539
87,540
u852311840
cpp
p01687
#include <algorithm> #include <iostream> using namespace std; string S, T, V = "AIZUNYAN"; int main() { cin >> S; T = S; if (S.size() < 8) { cout << S << endl; return 0; } for (int i = 0; i < S.size() - 7; i++) { string U = S.substr(i, 8); char p[8]; for (int j = 0; j < 8; j++) { p[j...
#include <algorithm> #include <iostream> using namespace std; string S, T, V = "AIZUNYAN"; int main() { cin >> S; T = S; if (S.size() < 8) { cout << S << endl; return 0; } for (int i = 0; i < S.size() - 7; i++) { string U = S.substr(i, 8); char p[8]; for (int j = 0; j < 8; j++) { p[j...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
87,541
87,542
u852311840
cpp
p01687
#include <bits/stdc++.h> using namespace std; string s; bool check(string s) { sort(s.begin(), s.end()); if (s == "AADINNUY") return true; return false; } void change(int x) { string t = "AIZUNYAN"; for (int i = 0; i < t.size(); i++, x++) s[x] = t[i]; } int main() { cin >> s; for (int i = 0; i ...
#include <bits/stdc++.h> using namespace std; string s; bool check(string s) { sort(s.begin(), s.end()); if (s == "AADINNUY") return true; return false; } void change(int x) { string t = "AIZUNYAN"; for (int i = 0; i < (int)t.size(); i++, x++) s[x] = t[i]; } int main() { cin >> s; for (int i = ...
[ "control_flow.loop.for.condition.change" ]
87,543
87,544
u084540620
cpp
p01687
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, a, b) fo...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define FOR(i, a, b) fo...
[ "assignment.variable.change", "assignment.change" ]
87,545
87,546
u529214876
cpp
p01687
#include <algorithm> #include <cstdio> #include <iostream> #include <string> using namespace std; string r = "AIZUNYAN"; int main() { string a; int b; cin >> a; for (b = 0; b <= (int)(a.length()) - 8; b++) { int A, N, I, Z, Y, U; A = N = I = Z = Y = U = 0; for (int c = 0; c < 8; c++) { switch...
#include <algorithm> #include <cstdio> #include <iostream> #include <string> using namespace std; string r = "AIZUNYAN"; int main() { string a; int b; cin >> a; for (b = 0; b <= (int)(a.length()) - 8; b++) { int A, N, I, Z, Y, U; A = N = I = Z = Y = U = 0; for (int c = 0; c < 8; c++) { switch...
[ "assignment.add" ]
87,547
87,548
u584110575
cpp
p01687
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <valarray> #include <...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <valarray> #include <...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
87,554
87,555
u505648358
cpp
p01687
#include <bits/stdc++.h> using namespace std; string AIZUNYAN = "AIZUNYAN"; string AIDUNYAN = "AIDUNYAN"; bool check(string s) { sort(s.begin(), s.end()); string tmp = AIDUNYAN; sort(tmp.begin(), tmp.end()); return tmp == s; } int main() { string s; cin >> s; string ans = s; for (int i = 0; i + 8 < s.si...
#include <bits/stdc++.h> using namespace std; string AIZUNYAN = "AIZUNYAN"; string AIDUNYAN = "AIDUNYAN"; bool check(string s) { sort(s.begin(), s.end()); string tmp = AIDUNYAN; sort(tmp.begin(), tmp.end()); return tmp == s; } int main() { string s; cin >> s; string ans = s; for (int i = 0; i + 7 < s.si...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
87,558
87,559
u937978414
cpp
p01690
#include <bits/stdc++.h> using namespace std; int dp[101][101]; int dp2[10001]; int dp3[101][101]; void Max(int &a, int b) { a = max(a, b); } int main() { int s, t, u, n, o, d, e[101], c[101], h[101], a[101]; cin >> s >> t >> u >> n >> o >> d; for (int i = 0; i < t; i++) cin >> e[i] >> c[i]; for (int i =...
#include <bits/stdc++.h> using namespace std; int dp[101][101]; int dp2[10001]; int dp3[101][101]; void Max(int &a, int b) { a = max(a, b); } int main() { int s, t, u, n, o, d, e[101], c[101], h[101], a[101]; cin >> s >> t >> u >> n >> o >> d; for (int i = 0; i < t; i++) cin >> e[i] >> c[i]; for (int i =...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
87,589
87,590
u776402923
cpp
p01701
#include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <cstring> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <vector> #define V...
#include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <cstring> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <vector> #define V...
[]
87,613
87,612
u358260180
cpp
p01701
#include <cmath> #include <iostream> #include <string> using namespace std; /* int main(){ while(1){ string str,str1; int f,cnt=-1,numer=0,denom=1; cin>>str; if(str=="#")break; for(int i=0;i<str.size();i++){ if(str[i]=='n' && f==0)f=1; else if(str[i]=='w' && f==0) f=2; if(f==1 && str[i]=='h'){cnt++...
#include <cmath> #include <iostream> #include <string> using namespace std; /* int main(){ while(1){ string str,str1; int f,cnt=-1,numer=0,denom=1; cin>>str; if(str=="#")break; for(int i=0;i<str.size();i++){ if(str[i]=='n' && f==0)f=1; else if(str[i]=='w' && f==0) f=2; if(f==1 && str[i]=='h'){cnt++...
[ "variable_declaration.value.change", "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
87,617
87,618
u952951927
cpp
p01701
#include <cmath> #include <iostream> #include <string> using namespace std; /* int main(){ while(1){ string str,str1; int f,cnt=-1,numer=0,denom=1; cin>>str; if(str=="#")break; for(int i=0;i<str.size();i++){ if(str[i]=='n' && f==0)f=1; else if(str[i]=='w' && f==0) f=2; if(f==1 && str[i]=='h'){cnt++...
#include <cmath> #include <iostream> #include <string> using namespace std; /* int main(){ while(1){ string str,str1; int f,cnt=-1,numer=0,denom=1; cin>>str; if(str=="#")break; for(int i=0;i<str.size();i++){ if(str[i]=='n' && f==0)f=1; else if(str[i]=='w' && f==0) f=2; if(f==1 && str[i]=='h'){cnt++...
[ "variable_declaration.value.change" ]
87,619
87,618
u952951927
cpp
p01702
#include <bits/stdc++.h> using namespace std; int n, m, q; string s[1000], b[1000]; int get(unsigned long long x) { int res = 0; while (x > 1) { res++; x >>= 1; } return res; } void solve() { for (int i = 1; i < q; i++) { for (int j = 0; j < n; j++) { s[i][j] = '0' + (s[i - 1][j] != s[i][...
#include <bits/stdc++.h> using namespace std; int n, m, q; string s[1000], b[1000]; int get(unsigned long long x) { int res = 0; while (x > 1) { res++; x >>= 1; } return res; } void solve() { for (int i = 1; i < q; i++) { for (int j = 0; j < n; j++) { s[i][j] = '0' + (s[i - 1][j] != s[i][...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
87,631
87,632
u334031393
cpp
p01702
#include <bits/stdc++.h> using namespace std; int main() { while (1) { char c, ans[1001]; int n, m, q, cnt = 0, f[37][1001], s[37] = {}, b[37] = {}; cin >> n >> m >> q; if (n + m + q == 0) break; for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) f[i][j] = 1; while (...
#include <bits/stdc++.h> using namespace std; int main() { while (1) { char c, ans[1001]; int n, m, q, cnt = 0, f[37][1001], s[37] = {}, b[1001]; cin >> n >> m >> q; if (n + m + q == 0) break; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) f[i][j] = 1; while (cn...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "identifier.change", "control_flow.loop.condition.change" ]
87,635
87,636
u849340810
cpp
p01702
#include <bits/stdc++.h> using namespace std; int main() { while (1) { char c, ans[1001]; int n, m, q, cnt = 0, f[37][1001], s[37] = {}, b[1001] = {}; cin >> n >> m >> q; if (n + m + q == 0) break; for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) f[i][j] = 1; while...
#include <bits/stdc++.h> using namespace std; int main() { while (1) { char c, ans[1001]; int n, m, q, cnt = 0, f[37][1001], s[37] = {}, b[1001]; cin >> n >> m >> q; if (n + m + q == 0) break; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) f[i][j] = 1; while (cn...
[ "identifier.change", "control_flow.loop.condition.change" ]
87,637
87,636
u849340810
cpp
p01696
#include <bits/stdc++.h> using namespace std; char next(char c, int n) { if (c == '?') return c; c += n % 26; if (c < 'A') c += 26; if (c > 'Z') c -= 26; return c; } string cip(const string &s, int &i); string str(const string &s, int &i); string let(const string &s, int &i); string cip(const s...
#include <bits/stdc++.h> using namespace std; char next(char c, int n) { if (c == '?') return c; c += n % 26; if (c < 'A') c += 26; if (c > 'Z') c -= 26; return c; } string cip(const string &s, int &i); string str(const string &s, int &i); string let(const string &s, int &i); string cip(const s...
[ "control_flow.loop.for.condition.change" ]
87,657
87,658
u827448139
cpp
p01696
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; const string lts = "ABCDEFGHIJKLMNOPQRSTUVWXYZ+-[]"; pair<string, int> parse(const string &, int); pair<string, int> letter(const string &s, int i) { if (i >= s.size()) throw "last"; if (s[i] == '+') { au...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; const string lts = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; pair<string, int> parse(const string &, int); pair<string, int> letter(const string &s, int i) { if (i >= s.size()) throw "last"; if (s[i] == '+') { auto r...
[ "literal.string.change", "variable_declaration.value.change" ]
87,659
87,660
u301090561
cpp
p01696
#include <algorithm> #include <iostream> #include <string> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define all(in) in.begin(), in.end() using namespace std; typedef long long ll; typedef int Def; typedef pair<Def, Def> pii; typedef vector<...
#include <algorithm> #include <iostream> #include <string> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define all(in) in.begin(), in.end() using namespace std; typedef long long ll; typedef int Def; typedef pair<Def, Def> pii; typedef vector<...
[ "identifier.change" ]
87,700
87,701
u909566417
cpp
p01696
#include <bits/stdc++.h> #define show(x) cerr << #x << " = " << (x) << endl using namespace std; string S; int pos; string Cipher(); int PM() { int ans = 0; for (; pos < S.size() and (S[pos] == '+' or S[pos] == '-'); pos++) { ans += (S[pos] == '+' ? 1 : -1); } return (26 + ans % 26) % 26; } string Letter() ...
#include <bits/stdc++.h> #define show(x) cerr << #x << " = " << (x) << endl using namespace std; string S; int pos; string Cipher(); int PM() { int ans = 0; for (; pos < S.size() and (S[pos] == '+' or S[pos] == '-'); pos++) { ans += (S[pos] == '+' ? 1 : -1); } return (26 + ans % 26) % 26; } string Letter() ...
[ "control_flow.loop.for.update.change" ]
87,705
87,706
u580955605
cpp
p01697
#include <bits/stdc++.h> using namespace std; struct edge { int to, c, t, r; }; struct state { int h, id, c; state(int h, int id, int c) : h(h), id(id), c(c) {} state() {} bool operator<(const state &st) const { return c > st.c; } }; int N, M, H, K; int S, T, P; vector<edge> G[111]; #define INF (1 << 29) in...
#include <bits/stdc++.h> using namespace std; struct edge { int to, c, t, r; }; struct state { int h, id, c; state(int h, int id, int c) : h(h), id(id), c(c) {} state() {} bool operator<(const state &st) const { return c > st.c; } }; int N, M, H, K; int S, T, P; vector<edge> G[111]; #define INF (1 << 29) in...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
87,713
87,714
u147939316
cpp
p01697
//================================= // Created on: 2018/07/04 16:12:54 //================================= #include <bits/stdc++.h> using namespace std; struct CostGraph { CostGraph(const int n) : V{n}, edge(n) {} void addEdge(const int from, const int to, const int cost, const int tim, const int lab...
//================================= // Created on: 2018/07/04 16:12:54 //================================= #include <bits/stdc++.h> using namespace std; struct CostGraph { CostGraph(const int n) : V{n}, edge(n) {} void addEdge(const int from, const int to, const int cost, const int tim, const int lab...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
87,731
87,730
u580955605
cpp
p01698
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e9; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(...
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e9; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(...
[ "literal.number.change", "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change" ]
87,751
87,752
u952951927
cpp
p01698
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e9; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(...
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e9; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change", "literal.number.change" ]
87,751
87,753
u952951927
cpp
p01698
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e9; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(...
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e9; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(...
[ "literal.number.change", "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change" ]
87,751
87,754
u952951927
cpp
p01698
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 1e4; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(x...
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 3e3; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(x...
[ "literal.number.change", "variable_declaration.value.change" ]
87,757
87,758
u952951927
cpp
p01698
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 3e3; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(x...
#include <bits/stdc++.h> #define double long double using namespace std; const double INF = 3e3; const double EPS = 1e-11; // ????¬???? struct P3 { double x, y, z; double vx, vy, vz; double r, vr; P3(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {} P3 operator+(const P3 &a) const { return P3(x...
[ "literal.number.change", "variable_declaration.value.change" ]
87,759
87,758
u952951927
cpp
p01560
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<int, P> P1; #define fr first #define...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<int, P> P1; #define fr first #define...
[ "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
87,763
87,764
u411874111
cpp
p01560
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<int, P> P1; #define fr first #define...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<int, P> P1; #define fr first #define...
[ "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
87,765
87,764
u411874111
cpp
p01560
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<int, P> P1; #define fr first #define...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> P; typedef pair<int, P> P1; #define fr first #define...
[ "control_flow.branch.if.condition.change" ]
87,766
87,764
u411874111
cpp
p01560
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define MAX_N 40 #define INF 9000000000000000000 #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<ll, double> P; ll n, m; ll dp[(1 << 20)]; P a[20]; vector<P> b; ll gcd(ll x, ll y) { while (y) { x %= y; swap...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define MAX_N 40 #define INF 9000000000000000000 #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<ll, double> P; ll n, m; ll dp[(1 << 20)]; P a[20]; vector<P> b; ll gcd(ll x, ll y) { while (y) { x %= y; swap...
[ "variable_declaration.type.change", "expression.operation.binary.remove" ]
87,768
87,769
u343612457
cpp
p01560
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define MAX_N 40 #define INF 9000000000000000000 #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<ll, double> P; ll n, m; ll dp[(1 << 20)]; P a[20]; vector<P> b; ll gcd(ll x, ll y) { while (y) { x %= y; swap...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define MAX_N 40 #define INF 9000000000000000000 #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<ll, double> P; ll n, m; ll dp[(1 << 20)]; P a[20]; vector<P> b; ll gcd(ll x, ll y) { while (y) { x %= y; swap...
[ "expression.operation.binary.remove" ]
87,770
87,769
u343612457
cpp
p01560
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- typedef long long ll; typedef long dou...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- typedef long long ll; typedef long dou...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
87,771
87,772
u114486177
cpp
p01561
#include <algorithm> #include <queue> #include <stdio.h> using namespace std; char str[60][60]; int key[11][60][60]; char in[60][60]; int bfs[1 << 10][60][60][2]; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int main() { int a, b; scanf("%d%d", &b, &a); for (int i = 0; i < a; i++) scanf("%s", str[i]); ...
#include <algorithm> #include <queue> #include <stdio.h> using namespace std; char str[60][60]; int key[11][60][60]; char in[60][60]; int bfs[1 << 10][60][60][2]; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int main() { int a, b; scanf("%d%d", &b, &a); for (int i = 0; i < a; i++) scanf("%s", str[i]); ...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "assignment.add" ]
87,786
87,787
u676399799
cpp
p01562
#include <bits/stdc++.h> using namespace std; const double EPS = 1e-4, PI = acos(-1), INF = 1e9; inline bool eq(double a, double b) { return abs(b - a) < EPS; } struct Point { double x, y; Point(){}; Point(double x, double y) : x(x), y(y){}; Point operator+(const Point &b) const { return Point(x + b.x, y...
#include <bits/stdc++.h> using namespace std; const double EPS = 1e-5, PI = acos(-1), INF = 1e9; inline bool eq(double a, double b) { return abs(b - a) < EPS; } struct Point { double x, y; Point(){}; Point(double x, double y) : x(x), y(y){}; Point operator+(const Point &b) const { return Point(x + b.x, y...
[ "literal.number.change", "variable_declaration.value.change" ]
87,799
87,798
u095377734
cpp
p01563
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "assignment.value.change" ]
87,810
87,811
u664278326
cpp
p01563
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define all(c) c.begin(), c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x, y) x = min(x, y) #define chmax(...
[ "literal.number.change", "assignment.value.change" ]
87,812
87,811
u664278326
cpp
p01563
#include <bits/stdc++.h> #define H 128 #define W 17 #define INF 1e4 using namespace std; int h, w; string str[H]; /* short mem[H][W][1<<W]; bool used[H][W][1<<W]; int dfs(int y,int x,int bit,int p,int u){ if( y == h ) return 0; if(p+(w-x) < str[y].size()) return -INF; if( x == w ) { if(p < (int)str[y].si...
#include <bits/stdc++.h> #define H 128 #define W 17 #define INF 1e4 using namespace std; int h, w; string str[H]; /* short mem[H][W][1<<W]; bool used[H][W][1<<W]; int dfs(int y,int x,int bit,int p,int u){ if( y == h ) return 0; if(p+(w-x) < str[y].size()) return -INF; if( x == w ) { if(p < (int)str[y].si...
[]
87,813
87,814
u952951927
cpp
p01563
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<int, int> P; int r, c; string str[130]; int dp[2][1 << 17]; vector<int> pat[17]; int main(void) { scanf("%d%d", &r, &c); for (int i = 0; i < r; i++) { cin >> str[i]; } int now = 1, prev = 0; memset(...
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<int, int> P; int r, c; string str[130]; int dp[2][1 << 17]; vector<int> pat[17]; int main(void) { scanf("%d%d", &r, &c); for (int i = 0; i < r; i++) { cin >> str[i]; } int now = 1, prev = 0; memset(...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
87,817
87,818
u117454239
cpp
p01563
#include <algorithm> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; type...
#include <algorithm> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; type...
[ "literal.number.change", "assignment.value.change" ]
87,819
87,820
u907421301
cpp
p01564
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <unordered_map> #include <unordered_set> #include <valarray> #include <vector> using namespace ...
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <unordered_map> #include <unordered_set> #include <valarray> #include <vector> using namespace ...
[ "literal.string.change", "call.arguments.change" ]
87,826
87,827
u849555829
cpp
p01564
#define _USE_MATH_DEFINES #include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numer...
#define _USE_MATH_DEFINES #include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numer...
[ "call.arguments.change", "call.arguments.add" ]
87,850
87,851
u270308012
cpp
p01564
#include <bits/stdc++.h> using namespace std; using ll = long long; struct RURMS { static const ll INF = 1e17; struct t1 { ll left, right, all, sum, size; t1() : left(-INF), right(-INF), all(-INF), sum(0), size(0) {} t1(ll val) : left(val), right(val), all(val), sum(val), size(1) {} t1(ll l, ll r, ...
#include <bits/stdc++.h> using namespace std; using ll = long long; struct RURMS { static const ll INF = 1e17; struct t1 { ll left, right, all, sum, size; t1() : left(-INF), right(-INF), all(-INF), sum(0), size(0) {} t1(ll val) : left(val), right(val), all(val), sum(val), size(1) {} t1(ll l, ll r, ...
[ "expression.operation.binary.add" ]
87,852
87,853
u527286045
cpp
p01564
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for (int i = 0; i < (n); i++) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define all(x) x.begin(), x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast...
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for (int i = 0; i < (n); i++) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define all(x) x.begin(), x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast...
[]
87,854
87,855
u379956761
cpp
p01570
#pragma comment(linker, "/STACK:204800000,204800000"); #include <algorithm> #include <cstdio> #include <vector> using namespace std; int n, sum, l[1000000], vis[1000000], S[1000000], stage[1000000], top; long long ans; vector<int> g[1000000]; int DFS(int v) { for (int i = 0; i < g[v].size(); i++) l[v] += DFS(g[v]...
#pragma comment(linker, "/STACK:204800000,204800000"); #include <algorithm> #include <cstdio> #include <vector> using namespace std; int n, sum, l[1000000], vis[1000000], S[4000000], stage[4000000], top; long long ans; vector<int> g[1000000]; int DFS(int v) { for (int i = 0; i < g[v].size(); i++) l[v] += DFS(g[v]...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "assignment.value.change", "identifier.replace.remove", "literal.replace.add" ]
87,879
87,880
u682440418
cpp
p01570
#pragma comment(linker, "/STACK:204800000,204800000"); #include <algorithm> #include <cstdio> #include <vector> using namespace std; int n, sum, l[1000000], vis[1000000], S[4000000], stage[4000000], top; long long ans; vector<int> g[1000000]; int DFS(int v) { for (int i = 0; i < g[v].size(); i++) l[v] += DFS(g[v]...
#pragma comment(linker, "/STACK:204800000,204800000"); #include <algorithm> #include <cstdio> #include <vector> using namespace std; int n, sum, l[1000000], vis[1000000], S[4000000], stage[4000000], top; long long ans; vector<int> g[1000000]; int DFS(int v) { for (int i = 0; i < g[v].size(); i++) l[v] += DFS(g[v]...
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add" ]
87,881
87,880
u682440418
cpp
p01570
#include <algorithm> #include <iostream> #include <queue> #include <vector> using namespace std; typedef long long ll; int len[1000001]; vector<int> child[1000001]; void bfs(int v, vector<int> &order) { queue<int> q; q.push(v); while (!q.empty()) { int v = q.front(); q.pop(); order.push_back(v); ...
#include <algorithm> #include <iostream> #include <queue> #include <vector> using namespace std; typedef long long ll; ll len[1000001]; vector<int> child[1000001]; void bfs(int v, vector<int> &order) { queue<int> q; q.push(v); while (!q.empty()) { int v = q.front(); q.pop(); order.push_back(v); ...
[ "variable_declaration.type.change", "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change" ]
87,892
87,893
u835866094
cpp
p01571
#include "bits/stdc++.h" using namespace std; vector<vector<vector<int>>> dp; vector<string> split(const string &str, char delim) { vector<string> res; size_t current = 0, found; while ((found = str.find_first_of(delim, current)) != string::npos) { res.push_back(string(str, current, found - current)); cu...
#include "bits/stdc++.h" using namespace std; vector<vector<vector<int>>> dp; vector<string> split(const string &str, char delim) { vector<string> res; size_t current = 0, found; while ((found = str.find_first_of(delim, current)) != string::npos) { res.push_back(string(str, current, found - current)); cu...
[ "call.add", "expression.operation.binary.change", "call.arguments.change" ]
87,898
87,899
u186082958
cpp
p01574
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; const ld eps = 1e-9; vector<int> primes; void hurui(const int amax) { static bool flag = false; if (flag) return; vector<int> sos; sos = vector<int>(amax +...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; const ld eps = 1e-9; vector<int> primes; void hurui(const int amax) { static bool flag = false; if (flag) return; vector<int> sos; sos = vector<int>(amax +...
[ "misc.opposites", "assignment.value.change" ]
87,904
87,905
u186082958
cpp