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
p00730
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <...
[ "control_flow.branch.if.condition.change" ]
66,714
66,715
u207430593
cpp
p00730
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define MAX_N 5000 #define INF 10000000 int cake[MAX_N][5]; // num,x1,y1,x2,y2// int N, H, W, P, S; int X1, Y1, X2, Y2, pos; int W1, H1, C1, C2, C3, C4, A, SIS, SIS1, mens, enshu; vector<int> cake2; void MEMSET() { for (int i = 0; i < ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define MAX_N 5000 #define INF 10000000 int cake[MAX_N][5]; // num,x1,y1,x2,y2// int N, H, W, P, S; int X1, Y1, X2, Y2, pos; int W1, H1, C1, C2, C3, C4, A, SIS, SIS1, mens, enshu; vector<int> cake2; void MEMSET() { for (int i = 0; i < ...
[]
66,721
66,722
u852311840
cpp
p00730
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define repr(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define rep(i, n) repl(i, 0, n) #define each(itr, v) for (auto itr : v) #define pb(s) push_back(s) #define all(x) (...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define repr(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define rep(i, n) repl(i, 0, n) #define each(itr, v) for (auto itr : v) #define pb(s) push_back(s) #define all(x) (...
[ "identifier.change", "call.function.change", "io.output.change", "call.arguments.add" ]
66,732
66,733
u534752820
cpp
p00730
#include <algorithm> #include <iostream> #include <utility> #include <vector> using namespace std; bool larger(pair<int, int> &a, pair<int, int> &b) { return a.first * a.second < b.first * b.second; } int main() { while (1) { int n, w, d; cin >> n >> w >> d; if (w == 0) break; vector<pair<i...
#include <algorithm> #include <iostream> #include <utility> #include <vector> using namespace std; bool larger(pair<int, int> &a, pair<int, int> &b) { return a.first * a.second < b.first * b.second; } int main() { while (1) { int n, w, d; cin >> n >> w >> d; if (w == 0) break; vector<pair<i...
[ "call.arguments.change" ]
66,738
66,739
u505990483
cpp
p00730
#include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; struct cake { int w, d, p; cake(int w_, int d_, int p_) { w = w_; d = d_; p = p_; } cake() { w = 0; d = 0; p = 0; } }; typedef pair<cake, cake> P; // c := 切ろうとしているケーキ, s := 切る位置 P cut(cake ...
#include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; struct cake { int w, d, p; cake(int w_, int d_, int p_) { w = w_; d = d_; p = p_; } cake() { w = 0; d = 0; p = 0; } }; typedef pair<cake, cake> P; // c := 切ろうとしているケーキ, s := 切る位置 P cut(cake ...
[]
66,743
66,744
u862297061
cpp
p00730
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #in...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #in...
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
66,745
66,746
u827448139
cpp
p00730
#include <algorithm> #include <cstdio> #include <vector> using namespace std; typedef #define hi(x) ((x) >> 16) #define lo(x) ((x)&0xffff) struct comp { bool operator()(const unsigned a, const unsigned b) { return hi(a) * lo(a) < hi(b) * lo(b); } }; int main() { int n, w, d; for (; scanf("%d%d%d", &n...
#include <algorithm> #include <cstdio> #include <vector> using namespace std; #define hi(x) ((x) >> 16) #define lo(x) ((x)&0xffff) struct comp { bool operator()(const unsigned a, const unsigned b) { return hi(a) * lo(a) < hi(b) * lo(b); } }; int main() { int n, w, d; for (; scanf("%d%d%d", &n, &w, &d), w...
[ "identifier.change", "literal.string.change", "call.arguments.change" ]
66,747
66,748
u300645821
cpp
p00730
#include <algorithm> #include <cstdio> #include <vector> using namespace std; #define hi(x) ((x) >> 16) #define lo(x) ((x)&0xffff) struct comp { bool operator()(const unsigned a, const unsigned b) { return hi(a) * lo(a) < hi(b) * lo(b); } }; int main() { int n, w, d; for (; scanf("%d%d%d", &n, &w, &d), n...
#include <algorithm> #include <cstdio> #include <vector> using namespace std; #define hi(x) ((x) >> 16) #define lo(x) ((x)&0xffff) struct comp { bool operator()(const unsigned a, const unsigned b) { return hi(a) * lo(a) < hi(b) * lo(b); } }; int main() { int n, w, d; for (; scanf("%d%d%d", &n, &w, &d), w...
[ "identifier.change" ]
66,749
66,748
u300645821
cpp
p00730
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> #define REP(i, a, b) for (i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) using namespace std; class Tpair { public: int first, second; Tpair(int x, int y) { first = x; second = y; } bool operator<(const T...
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> #define REP(i, a, b) for (i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) using namespace std; class Tpair { public: int first, second; Tpair(int x, int y) { first = x; second = y; } bool operator<(const T...
[ "call.remove", "call.add" ]
66,750
66,751
u260793477
cpp
p00726
#include <bits/stdc++.h> using namespace std; using P = pair<int, char>; string S; int n, it; int num() { int res = 0; while (it < n && isdigit(S[it])) { res = res * 10 + S[it] - '0'; it++; } return res; } P parser(int t) { P res(0, '0'); while (it < n && S[it] != ')') { if (isdigit(S[it])) {...
#include <bits/stdc++.h> using namespace std; using P = pair<int, char>; string S; int n, it; int num() { int res = 0; while (it < n && isdigit(S[it])) { res = res * 10 + S[it] - '0'; it++; } return res; } P parser(int t) { P res(0, '0'); while (it < n && S[it] != ')') { if (isdigit(S[it])) {...
[ "control_flow.break.add" ]
66,788
66,789
u527286045
cpp
p00726
#include <iostream> #include <string> using namespace std; string s; int n; void calc(string &p, int k) { // cout << p << " " << k << endl; if (k >= s.size()) return; if (p.size() > n) return; if (s[k] == ')') return; if (s[k] <= 'Z' && s[k] >= 'A') { p.push_back(s[k]); calc(p, k + 1); ...
#include <iostream> #include <string> using namespace std; string s; int n; void calc(string &p, int k) { // cout << p << " " << k << endl; if (k >= s.size()) return; if (p.size() > n) return; if (s[k] == ')') return; if (s[k] <= 'Z' && s[k] >= 'A') { p.push_back(s[k]); calc(p, k + 1); ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
66,796
66,797
u654128932
cpp
p00726
#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...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
66,808
66,809
u418253672
cpp
p00735
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; const int MAXN = 300000; vector<int> msprimes; bool isprime[MAXN + 1]; void seive() { for (int i = 0; i <= MAXN; i++) isprime[i] = true; isprime[0] = isprime[1] = false; for (int i = 2; i <= MAXN; i++) { if...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; const int MAXN = 300000; vector<int> msprimes; bool isprime[MAXN + 1]; void seive() { for (int i = 0; i <= MAXN; i++) isprime[i] = true; isprime[0] = isprime[1] = false; for (int i = 2; i <= MAXN; i++) { if...
[]
66,891
66,892
u014557234
cpp
p00735
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define rep(i, b) for (int i = 0; i < b; i++) using namespace std; bool smp[300001...
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define rep(i, b) for (int i = 0; i < b; i++) using namespace std; bool smp[300001...
[ "expression.operation.binary.remove", "io.output.change" ]
66,895
66,896
u142756656
cpp
p00735
#include <bits/stdc++.h> using namespace std; const int N_MAX = 300010; vector<int> primes; void sieve() { vector<bool> is_prime(N_MAX, true); int cnt = 1; while (true) { for (int i = -1; i <= 2; i += 2) { int x = cnt * 7 + i; if (is_prime[x]) { for (int j = 2 * x; j < N_MAX; j += x) ...
#include <bits/stdc++.h> using namespace std; const int N_MAX = 300010; vector<int> primes; void sieve() { vector<bool> is_prime(N_MAX, true); int cnt = 1; while (true) { for (int i = -1; i <= 2; i += 2) { int x = cnt * 7 + i; if (is_prime[x]) { for (int j = 2 * x; j < N_MAX; j += x) ...
[ "call.add" ]
66,897
66,898
u063091489
cpp
p00735
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include ...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include ...
[ "control_flow.loop.condition.change" ]
66,901
66,902
u767384157
cpp
p00735
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> using namespace std; bool G[300000] = {}; int main() { for (int i = 8; i <= 300000; i += 7) { G[i] = true; for (int j = 6; j * j <= i; j += 7) { if (i % (j) == 0 || i % (j + 2) == 0) { G[i] = false; ...
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> using namespace std; bool G[300000] = {}; int main() { for (int i = 8; i <= 300000; i += 7) { G[i] = true; for (int j = 6; j * j <= i; j += 7) { if (i % (j) == 0 || i % (j + 2) == 0) { G[i] = false; ...
[]
66,903
66,904
u745328149
cpp
p00735
#include <algorithm> #include <math.h> #include <stdio.h> using namespace std; #define FOR(i, init, n) for (int i = init; i < n; i++) #define REP(i, n) FOR(i, 0, n) #define MON 1 #define SAT 6 int isPrime(int cand) { // int i, limit; int limit = sqrt(cand); // limit = (int)sqrt((double)cand); int i = limit...
#include <algorithm> #include <math.h> #include <stdio.h> using namespace std; #define FOR(i, init, n) for (int i = init; i < n; i++) #define REP(i, n) FOR(i, 0, n) #define MON 1 #define SAT 6 int isPrime(int cand) { // int i, limit; int limit = sqrt(cand); // limit = (int)sqrt((double)cand); int i = limit...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change" ]
66,911
66,912
u652178722
cpp
p00735
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define INF 1000000000 #define rep(i, n) for (int i = 0; i < n; i...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define INF 1000000000 #define rep(i, n) for (int i = 0; i < n; i...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change" ]
66,913
66,914
u534550471
cpp
p00735
#include <iostream> #include <vector> using namespace std; #define rep(i, x, y) for (int(i) = (x); (i) < (y); (i)++) int main() { while (true) { vector<int> temp; rep(i, 0, 300001) { temp.push_back(i); } int n; cin >> n; if (n == 1) { break; } cout << n << ":"; rep(i, 6, 30...
#include <iostream> #include <vector> using namespace std; #define rep(i, x, y) for (int(i) = (x); (i) < (y); (i)++) int main() { while (true) { vector<int> temp; rep(i, 0, 300001) { temp.push_back(i); } int n; cin >> n; if (n == 1) { break; } cout << n << ":"; rep(i, 6, 30...
[]
66,924
66,925
u841711018
cpp
p00735
// #define USE_CPP11 // #define USE_PRINTF #include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #in...
// #define USE_CPP11 // #define USE_PRINTF #include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #in...
[ "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "control_flow.loop.for.initializer.change" ]
66,926
66,927
u728992264
cpp
p00735
// #define USE_CPP11 // #define USE_PRINTF #include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #in...
// #define USE_CPP11 // #define USE_PRINTF #include <algorithm> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #in...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change" ]
66,928
66,927
u728992264
cpp
p00735
#include <cmath> #include <iostream> using namespace std; const int MAX = 300200; int p[MAX]; int q[MAX]; int l = 0; void prime() { int n = 0; for (int i = 6; i < MAX; i++) { bool flag = 1; if (i % 7 == 1 || i % 7 == 6) { q[n] = i; for (int j = 0; q[j] < sqrt(i); j++) { if (i % q[j] ...
#include <cmath> #include <iostream> using namespace std; const int MAX = 300200; int p[MAX]; int q[MAX]; int l = 0; void prime() { int n = 0; for (int i = 6; i < MAX; i++) { bool flag = 1; if (i % 7 == 1 || i % 7 == 6) { q[n] = i; for (int j = 0; q[j] < i; j++) { if (i % q[j] == 0) ...
[ "control_flow.loop.for.condition.change", "call.remove", "control_flow.branch.if.condition.change" ]
66,929
66,930
u229094612
cpp
p00735
#include <algorithm> #include <array> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <un...
#include <algorithm> #include <array> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <un...
[ "literal.string.change", "io.output.change" ]
66,936
66,937
u287295208
cpp
p00735
#include <algorithm> #include <math.h> #include <queue> #include <stdio.h> #include <utility> bool CheckMSPrime(int _n) { for (int i = 2; (i * i) <= _n; i++) { if (_n % i == 0) { if (i % 7 == 1 || i % 7 == 6) { return false; } } } return true; } void PrintPrime(int _n) { printf("%d...
#include <algorithm> #include <math.h> #include <queue> #include <stdio.h> #include <utility> bool CheckMSPrime(int _n) { for (int i = 2; (i * i) <= _n; i++) { if (_n % i == 0) { if (i % 7 == 1 || i % 7 == 6) { return false; } } } return true; } void PrintPrime(int _n) { printf("%d...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
66,944
66,943
u717748888
cpp
p00735
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, init, n) for (int i = init; i < (n); i++) using namespace std; using ll = long long int; using P = pair<int, int>; using T = tuple<int, int, int>; using edge = struct { int to, cost; }; const int MOD = 1e9 + 7; const int iINF = 1...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, init, n) for (int i = init; i < (n); i++) using namespace std; using ll = long long int; using P = pair<int, int>; using T = tuple<int, int, int>; using edge = struct { int to, cost; }; const int MOD = 1e9 + 7; const int iINF = 1...
[]
66,947
66,948
u464296040
cpp
p00735
#include <algorithm> #include <cstdio> using namespace std; #define MAX 300000 int n; bool prime[MAX]; int main() { for (int i = 0; i < MAX; i++) prime[i] = true; for (int i = 6; i * i < MAX; i++) if (i % 7 == 1 || i % 7 == 6) if (prime[i]) for (int j = i; i * j < MAX; j++) if (j...
#include <algorithm> #include <cstdio> using namespace std; #define MAX 300000 int n; bool prime[MAX]; int main() { for (int i = 0; i < MAX; i++) prime[i] = true; for (int i = 6; i * i < MAX; i++) if (i % 7 == 1 || i % 7 == 6) if (prime[i]) for (int j = i; i * j < MAX; j++) if (j...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change" ]
66,952
66,953
u834861649
cpp
p00735
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i =...
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i =...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
66,954
66,955
u505648358
cpp
p00735
#include <iostream> #include <vector> using namespace std; int main() { bool num[300001] = {true, true, false}; for (int i = 0; i < 300001; i++) { if (i % 7 != 1 && i % 7 != 6) { num[i] = true; } if (num[i] == false) { for (int j = i * 2; j < 300001; j += i) { num[j] = true; } ...
#include <iostream> #include <vector> using namespace std; int main() { bool num[300001] = {true, true, false}; for (int i = 0; i < 300001; i++) { if (i % 7 != 1 && i % 7 != 6) { num[i] = true; } if (num[i] == false) { for (int j = i * 2; j < 300001; j += i) { num[j] = true; } ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
66,971
66,972
u712500775
cpp
p00735
#include <iostream> using namespace std; #define MAX_N 300000 int pl[MAX_N]; char ip[MAX_N]; int p = 0; main() { int i, n = 300000; for (i = 0; i <= n; i++) ip[i] = 1; ip[0] = ip[1] = 0; for (i = 2; i <= n; i++) { if (i % 7 != 1 && i % 7 != 6) ip[i] = 0; if (ip[i]) { for (int j = 2 * i;...
#include <iostream> using namespace std; #define MAX_N 300000 int pl[MAX_N + 2]; char ip[MAX_N + 2]; int p = 0; main() { int i, n = 300000; for (i = 0; i <= n; i++) ip[i] = 1; ip[0] = ip[1] = 0; for (i = 2; i <= n; i++) { if (i % 7 != 1 && i % 7 != 6) ip[i] = 0; if (ip[i]) { for (int j ...
[ "variable_declaration.array_dimensions.change", "expression.operation.binary.add" ]
66,973
66,974
u914809068
cpp
p00735
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define MAX 300001 typedef long long ll; int main() { bool p[MAX]; vector<ll> ms; int n; memset(p, true, sizeof(p)); for (int i = 1; i < MAX; i++) { if (i % 7 == 1 || i % 7 == 6) ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define MAX 300001 typedef long long ll; int main() { bool p[MAX]; vector<ll> ms; int n; memset(p, true, sizeof(p)); for (int i = 1; i < MAX; i++) { if (i % 7 == 1 || i % 7 == 6) ...
[ "assignment.value.change", "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
66,975
66,976
u263247628
cpp
p00735
#include <iostream> #include <vector> using namespace std; #define MAX 300001 bool check[MAX]; void print(int n) { cout << n << ':'; } void init() { fill(check, check + MAX, false); } int main() { int n; while (cin >> n, n != 1) { vector<int> v; init(); print(n); for (int i = 2; i <= n; i++) {...
#include <iostream> #include <vector> using namespace std; #define MAX 300001 bool check[MAX]; void print(int n) { cout << n << ": "; } void init() { fill(check, check + MAX, false); } int main() { int n; while (cin >> n, n != 1) { vector<int> v; init(); print(n); for (int i = 2; i <= n; i++) ...
[]
66,988
66,989
u881100444
cpp
p00735
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<bool> VB; VI ms_prime_factor(void) { const int SIZE = 300010; VB is_ms_prime_number(SIZE, false); VI res; for (int i = 1; 7 * i + 10 < SIZE; ++i) { is_ms_prime_number[7 * i + 1] = true; ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<bool> VB; VI ms_prime_factor(void) { const int SIZE = 300010; VB is_ms_prime_number(SIZE, false); VI res; for (int i = 0; 7 * i + 10 < SIZE; ++i) { is_ms_prime_number[7 * i + 1] = true; ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
66,990
66,991
u107564203
cpp
p00731
#include <algorithm> #include <iostream> using namespace std; #define H 60 #define W 30 #define INF 10000 #define R 1 #define L 0 int w, h; char maps[H][W]; struct point { int x, y; }; bool invalid(int x, int y) { return (x < 0 || x >= w || y < 0 || y >= h); } int dijkstra() { int d[H][W][2]; bool used[H][W][2...
#include <algorithm> #include <iostream> using namespace std; #define H 60 #define W 30 #define INF 10000 #define R 1 #define L 0 int w, h; char maps[H][W]; struct point { int x, y; }; bool invalid(int x, int y) { return (x < 0 || x >= w || y < 0 || y >= h); } int dijkstra() { int d[H][W][2]; bool used[H][W][2...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
67,008
67,007
u973278521
cpp
p00731
#include <algorithm> #include <iostream> #include <queue> #define INF (1e9) #define H 60 #define W 30 using namespace std; typedef pair<int, int> P; typedef pair<char, P> P1; typedef pair<int, P1> P2; int dijkstra(int, int, char); int w, h, dl[H][W], dr[H][W], ans; char s[H][W]; int main() { while (1) { cin >> w...
#include <algorithm> #include <iostream> #include <queue> #define INF (1e9) #define H 60 #define W 30 using namespace std; typedef pair<int, int> P; typedef pair<char, P> P1; typedef pair<int, P1> P2; int dijkstra(int, int, char); int w, h, dl[H][W], dr[H][W], ans; char s[H][W]; int main() { while (1) { cin >> w...
[ "expression.operation.unary.add", "identifier.change", "control_flow.branch.if.condition.change", "call.arguments.change" ]
67,020
67,019
u084540620
cpp
p00731
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stri...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stri...
[ "control_flow.loop.condition.change" ]
67,047
67,048
u915761101
cpp
p00737
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "assignment.variable.change" ]
67,112
67,113
u018134297
cpp
p00737
#include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <memory.h> #include <memory> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; typedef pair<int, pair<int, int>> pip; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int w, h; int are...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <memory.h> #include <memory> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; typedef pair<int, pair<int, int>> pip; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int w, h; int are...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
67,121
67,122
u551847319
cpp
p00737
#include <iostream> #include <map> #include <queue> using namespace std; int c[4]; struct State { int x, y, d, cost; }; bool operator<(const State a, State b) { return a.cost > b.cost; } int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; void calc(int w, int h) { int direction[30][30]; for (int i = 0; i <...
#include <iostream> #include <map> #include <queue> using namespace std; int c[4]; struct State { int x, y, d, cost; }; bool operator<(const State a, State b) { return a.cost > b.cost; } int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; void calc(int w, int h) { int direction[30][30]; for (int i = 0; i <...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
67,123
67,124
u420446254
cpp
p00737
#include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using n...
#include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using n...
[]
67,125
67,126
u636586431
cpp
p00740
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i < (b); i++) #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define sort(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define fi first #define se second #d...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i < (b); i++) #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define sort(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define fi first #define se second #d...
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change" ]
67,154
67,155
u661495829
cpp
p00741
#include <iostream> using namespace std; int myMap[50][50]; int w, h; int ans; bool safe(int x, int y) { return (0 <= x && 0 <= y) && (x < w && y < h); } void del(int x, int y) { myMap[x][y] = 0; if (safe(x + 1, y) && myMap[x + 1][y]) del(x + 1, y); if (safe(x + 1, y + 1) && myMap[x + 1][y + 1]) del(x ...
#include <iostream> using namespace std; int myMap[51][51]; int w, h; int ans; bool safe(int x, int y) { return (0 <= x && 0 <= y) && (x < h && y < w); } void del(int x, int y) { myMap[x][y] = 0; if (safe(x + 1, y) && myMap[x + 1][y]) del(x + 1, y); if (safe(x + 1, y + 1) && myMap[x + 1][y + 1]) del(x ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "identifier.change", "function.return_value.change", "expression.operation.binary.change", "control_flow.loop.condition.change" ]
67,169
67,170
u866596794
cpp
p00741
#include <iostream> using namespace std; int myMap[50][50]; int w, h; int ans; bool safe(int x, int y) { return (0 <= x && 0 <= y) && (x < h && y < w); } void del(int x, int y) { myMap[x][y] = 0; if (safe(x + 1, y) && myMap[x + 1][y]) del(x + 1, y); if (safe(x + 1, y + 1) && myMap[x + 1][y + 1]) del(x ...
#include <iostream> using namespace std; int myMap[51][51]; int w, h; int ans; bool safe(int x, int y) { return (0 <= x && 0 <= y) && (x < h && y < w); } void del(int x, int y) { myMap[x][y] = 0; if (safe(x + 1, y) && myMap[x + 1][y]) del(x + 1, y); if (safe(x + 1, y + 1) && myMap[x + 1][y + 1]) del(x ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "identifier.change", "control_flow.loop.condition.change" ]
67,172
67,170
u866596794
cpp
p00741
#include <iostream> using namespace std; int w, h; int m[50][50]; void solve(int x, int y) { if (m[y][x] == 1) { m[y][x] = 0; for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { if (i == 0 && j == 0) { continue; } if (y + i >= 0 && y + i < h && x + i >= 0 &&...
#include <iostream> using namespace std; int w, h; int m[50][50]; void solve(int x, int y) { if (m[y][x] == 1) { m[y][x] = 0; for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { if (i == 0 && j == 0) { continue; } if (y + i >= 0 && y + i < h && x + j >= 0 &&...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
67,177
67,176
u556502730
cpp
p00741
#include <cstdio> using namespace std; int w, h; int field[50][51]; void dfs(int x, int y) { field[x][y] = 0; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { int nx = x + dx; int ny = y + dy; if (0 <= nx && nx < w && 0 <= ny && ny < h && field[nx][ny] == 1) d...
#include <cstdio> using namespace std; int w, h; int field[50][51]; void dfs(int x, int y) { field[x][y] = 0; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { int nx = x + dx; int ny = y + dy; if (0 <= nx && nx < h && 0 <= ny && ny < w && field[nx][ny] == 1) d...
[ "identifier.change", "control_flow.branch.if.condition.change", "function.parameters.parameter.add", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
67,190
67,191
u841781726
cpp
p00741
#include <cstdio> using namespace std; int w, h; int field[50][51]; void dfs(int x, int y) { field[x][y] = 0; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { int nx = x + dx; int ny = y + dy; if (0 <= nx && nx < w && 0 <= ny && ny < h && field[nx][ny] == 1) d...
#include <cstdio> using namespace std; int w, h; int field[50][51]; void dfs(int x, int y) { field[x][y] = 0; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { int nx = x + dx; int ny = y + dy; if (0 <= nx && nx < h && 0 <= ny && ny < w && field[nx][ny] == 1) d...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
67,192
67,191
u841781726
cpp
p00741
#include <iostream> using namespace std; int ans; int map[100][100]; void dfs(int x, int y, int w, int h); int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int main() { int w, h; while (cin >> w >> h) { ans = 0; if (w == 0 && h == 0) break; for (int i = 0; i < h; i++)...
#include <iostream> using namespace std; int ans; int map[100][100]; void dfs(int x, int y, int w, int h); int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int main() { int w, h; while (cin >> w >> h) { ans = 0; if (w == 0 && h == 0) break; for (int i = 0; i < h; i++)...
[ "call.arguments.change", "call.arguments.add" ]
67,193
67,194
u749493116
cpp
p00736
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 100000000 using namespace std; string s, t; int a, p; int A(int x) { return x == 2 ? 0 : x == 1 ? 1 : 2; } int B(int x, int y) { return x == 0 || y == 0 ? 0 : x == 1 || y == 1 ? 1 : 2; } int C(int x, int y) { return x == 2 || y == 2 ? ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 100000000 using namespace std; string s, t; int a, p; int A(int x) { return x == 2 ? 0 : x == 1 ? 1 : 2; } int B(int x, int y) { return x == 0 || y == 0 ? 0 : x == 1 || y == 1 ? 1 : 2; } int C(int x, int y) { return x == 2 || y == 2 ? ...
[ "control_flow.return.add" ]
67,219
67,220
u343612457
cpp
p00736
#include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> #define rep(i, n) for ((i) = 0; (i) < (n); i++) using namespace std; int p, q, r, now; string s; int formula() { if (isdigit(s[now])) return s[now] - '0'; else if (s[now] == 'P') { now++; return p; } el...
#include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> #define rep(i, n) for ((i) = 0; (i) < (n); i++) using namespace std; int p, q, r, now; string s; int formula() { if (isdigit(s[now])) { return s[now++] - '0'; } else if (s[now] == 'P') { now++; return p; ...
[ "function.return_value.change" ]
67,221
67,222
u047988051
cpp
p00736
#include <algorithm> #include <cctype> #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 namesp...
#include <algorithm> #include <cctype> #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 namesp...
[ "identifier.change", "call.function.change" ]
67,223
67,224
u176230644
cpp
p00736
#include <algorithm> #include <iostream> #include <string> using namespace std; string S, T; int pos; int solve() { if (T[pos] == '0') { pos++; return 0; } if (T[pos] == '1') { pos++; return 1; } if (T[pos] == '2') { pos++; return 2; } if (T[pos] == '-') { pos++; return 2 -...
#include <algorithm> #include <iostream> #include <string> using namespace std; string S, T; int pos; int solve() { if (T[pos] == '0') { pos++; return 0; } if (T[pos] == '1') { pos++; return 1; } if (T[pos] == '2') { pos++; return 2; } if (T[pos] == '-') { pos++; return 2 -...
[ "expression.unary.arithmetic.add" ]
67,225
67,226
u823513038
cpp
p00736
#include <algorithm> #include <iostream> #include <string> using namespace std; string S, T; int pos; int solve() { switch (T[pos++]) { case '0': return 0; case '1': return 1; case '2': return 2; case '-': return 2 - solve(); case '(': int a = solve(); switch (T[pos++]) { case '+...
#include <algorithm> #include <iostream> #include <string> using namespace std; string S, T; int pos; int solve() { switch (T[pos++]) { case '0': return 0; case '1': return 1; case '2': return 2; case '-': return 2 - solve(); case '(': int a = solve(); switch (T[pos++]) { case '+...
[ "control_flow.break.add" ]
67,227
67,228
u823513038
cpp
p00736
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i, a, b) for (i = a; i < b; ++i) #define rep(i, n) REP(i, 0, n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) (a).begin(), (a).end() #define ifnot(a) if (not a) #define dump(x) cerr << #...
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i, a, b) for (i = a; i < b; ++i) #define rep(i, n) REP(i, 0, n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) (a).begin(), (a).end() #define ifnot(a) if (not a) #define dump(x) cerr << #...
[ "literal.number.change", "control_flow.branch.if.condition.change", "identifier.change" ]
67,229
67,230
u075842827
cpp
p00736
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i, a, b) for (i = a; i < b; ++i) #define rep(i, n) REP(i, 0, n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) (a).begin(), (a).end() #define ifnot(a) if (not a) #define dump(x) cerr << #...
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i, a, b) for (i = a; i < b; ++i) #define rep(i, n) REP(i, 0, n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) (a).begin(), (a).end() #define ifnot(a) if (not a) #define dump(x) cerr << #...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
67,231
67,230
u075842827
cpp
p00736
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) using namespace std; string s; int p, q, r, i; int dfs() { int t[2] = {}, c = 0, m = 0, w = 0, k = 0, a = 0, pp = 0; t[0] = t[1] = -100; if (s[i] == '(') i++; for (; i < s.size(); i++) { pp = 0; if (s[i] == '(') t[c++] = dfs(...
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) using namespace std; string s; int p, q, r, i; int dfs() { int t[2] = {}, c = 0, m = 0, w = 0, k = 0, a = 0, pp = 0; t[0] = t[1] = -100; if (s[i] == '(') i++; for (; i < s.size(); i++) { pp = 0; if (s[i] == '(') t[c++] = dfs(...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
67,235
67,236
u962041986
cpp
p00736
#include <bits/stdc++.h> using namespace std; #define State string::const_iterator class ParseError {}; int expression(State &begin); // int term(State &begin); int number(State &begin); int factor(State &begin); int denial(State &begin); void consume(State &begin, char expected); int p, q, r; string input; // 四則演算の...
#include <bits/stdc++.h> using namespace std; #define State string::const_iterator class ParseError {}; int expression(State &begin); // int term(State &begin); int number(State &begin); int factor(State &begin); int denial(State &begin); void consume(State &begin, char expected); int p, q, r; string input; // 四則演算の...
[ "identifier.change", "call.function.change" ]
67,244
67,245
u088476226
cpp
p00736
#include <iostream> #include <string> using namespace std; #define N_MAX 80 string s, s_copy; int ans = 0; int point = 0; char ch(int i) { if (i == 0) return '0'; else if (i == 1) return '1'; else return '2'; } void set(int i, int j, int z) { s_copy = s; int c = s.size(); for (int k = 0; k < c...
#include <iostream> #include <string> using namespace std; #define N_MAX 80 string s, s_copy; int ans = 0; int point = 0; char ch(int i) { if (i == 0) return '0'; else if (i == 1) return '1'; else return '2'; } void set(int i, int j, int z) { s_copy = s; int c = s.size(); for (int k = 0; k < c...
[ "expression.unary.arithmetic.add" ]
67,246
67,247
u420446254
cpp
p00736
#include <cassert> #include <cstdio> #include <iostream> #include <set> using namespace std; string str; int P, Q, R; int Minus(int a) { return 2 - a; } int Prod(int a, int b) { if (a == 0) { return 0; } if (b == 0) { return 0; } if (a == 1) { return 1; } if (b == 1) { return 1; } ...
#include <cassert> #include <cstdio> #include <iostream> #include <set> using namespace std; string str; int P, Q, R; int Minus(int a) { return 2 - a; } int Prod(int a, int b) { if (a == 0) { return 0; } if (b == 0) { return 0; } if (a == 1) { return 1; } if (b == 1) { return 1; } ...
[ "misc.opposites", "call.arguments.change", "variable_declaration.value.change" ]
67,250
67,251
u871901071
cpp
p00736
#include <cassert> #include <cstdio> #include <iostream> #include <set> using namespace std; string str; int P, Q, R; int Minus(int a) { return 2 - a; } int Prod(int a, int b) { if (a == 0) { return 0; } if (b == 0) { return 0; } if (a == 1) { return 1; } if (b == 1) { return 1; } ...
#include <cassert> #include <cstdio> #include <iostream> #include <set> using namespace std; string str; int P, Q, R; int Minus(int a) { return 2 - a; } int Prod(int a, int b) { if (a == 0) { return 0; } if (b == 0) { return 0; } if (a == 1) { return 1; } if (b == 1) { return 1; } ...
[ "variable_declaration.value.change" ]
67,252
67,251
u871901071
cpp
p00736
#include <algorithm> // require sort next_permutation count __gcd reverse etc. #include <cctype> // require tolower, toupper #include <cfloat> #include <climits> #include <cmath> // require fabs #include <cstdio> // require scanf printf #include <cstdlib> // require abs exit atof atoi #include <cstring> // requir...
#include <algorithm> // require sort next_permutation count __gcd reverse etc. #include <cctype> // require tolower, toupper #include <cfloat> #include <climits> #include <cmath> // require fabs #include <cstdio> // require scanf printf #include <cstdlib> // require abs exit atof atoi #include <cstring> // requir...
[ "literal.number.change" ]
67,253
67,254
u597396610
cpp
p00738
#include <bits/stdc++.h> using namespace std; #define EPS (1e-10) typedef complex<double> P; //実数同士の比較 bool EQ(double a, double b) { return (abs(a - b) < EPS); } //二つのベクトルが等しいかどうか bool EQV(P a, P b) { return (EQ(a.real(), b.real()) && EQ(a.imag(), b.imag())); } //内積 double dot(P a, P b) { return (a.real() * b.real...
#include <bits/stdc++.h> using namespace std; #define EPS (1e-10) typedef complex<double> P; //実数同士の比較 bool EQ(double a, double b) { return (abs(a - b) < EPS); } //二つのベクトルが等しいかどうか bool EQV(P a, P b) { return (EQ(a.real(), b.real()) && EQ(a.imag(), b.imag())); } //内積 double dot(P a, P b) { return (a.real() * b.real...
[ "call.function.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
67,257
67,258
u339187218
cpp
p00738
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <st...
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <st...
[ "identifier.change", "call.function.change" ]
67,267
67,268
u915761101
cpp
p00741
#include <fstream> #include <iostream> using namespace std; ifstream fin; ofstream fout; // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1160&lang=jp int gomi = 0; int a[52][52] = {}; int check(int, int); int main() { fin.open("input.txt"); fout.open("output.txt"); // int w = 0, h = 0; int ...
#include <fstream> #include <iostream> using namespace std; ifstream fin; ofstream fout; // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1160&lang=jp int gomi = 0; int a[52][52] = {}; int check(int, int); int main() { fin.open("input.txt"); fout.open("output.txt"); // int w = 0, h = 0; int ...
[ "identifier.change", "expression.operation.binary.change" ]
67,412
67,413
u979136186
cpp
p00741
#include <algorithm> #include <iostream> using namespace std; int c[50][50]; int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; int ret; int w, h; void dfs(int x, int y) { if (c[x][y] == 0) return; c[x][y] = 0; for (int i = 0; i < 8; i++) { if (x + dx[i] < 0 || x + dx[...
#include <algorithm> #include <iostream> using namespace std; int c[50][50]; int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; int ret; int w, h; void dfs(int x, int y) { if (c[x][y] == 0) return; c[x][y] = 0; for (int i = 0; i < 8; i++) { if (x + dx[i] < 0 || x + dx[...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "call.arguments.change", "call.arguments.add" ]
67,414
67,415
u723364545
cpp
p00741
#include <algorithm> #include <iostream> using namespace std; int c[50][50]; int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; int ret; int w, h; void dfs(int x, int y) { if (c[x][y] == 0) return; c[x][y] = 0; for (int i = 0; i < 8; i++) { if (x + dx[i] < 0 || x + dx[...
#include <algorithm> #include <iostream> using namespace std; int c[50][50]; int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; int ret; int w, h; void dfs(int x, int y) { if (c[x][y] == 0) return; c[x][y] = 0; for (int i = 0; i < 8; i++) { if (x + dx[i] < 0 || x + dx[...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
67,416
67,415
u723364545
cpp
p00741
#define _USE_MATH_DEFINES #include <algorithm> #include <cfloat> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int x, y; int o[51][51]; queue<int> q; void tansaku(int ...
#define _USE_MATH_DEFINES #include <algorithm> #include <cfloat> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int x, y; int o[52][52]; queue<int> q; void tansaku(int ...
[ "literal.number.change", "variable_declaration.array_dimensions.change" ]
67,425
67,426
u681511075
cpp
p00741
#define _USE_MATH_DEFINES #include <algorithm> #include <cfloat> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int x, y; int o[52][52]; queue<int> q; void tansaku(int ...
#define _USE_MATH_DEFINES #include <algorithm> #include <cfloat> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int x, y; int o[52][52]; queue<int> q; void tansaku(int ...
[]
67,427
67,426
u681511075
cpp
p00741
#include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int area[50][50], cnt = 0; int w, h; void dfs(int x, int y) { area[x][y] = 0; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { int nx = x + dx, ny = y + dy; if (0 <= nx && nx < w && 0 <=...
#include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int area[50][50], cnt = 0; int w, h; void dfs(int x, int y) { area[x][y] = 0; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { int nx = x + dx, ny = y + dy; if (0 <= nx && nx < w && 0 <=...
[]
67,433
67,434
u699220987
cpp
p00741
#include <iostream> #include <queue> #include <stack> #include <utility> #include <vector> using namespace std; bool find1(vector<vector<int>> &C, vector<vector<int>> &check, int *findh, int *findw) { for (int i = 0; i < C.size(); ++i) for (int j = 0; j < C[0].size(); ++j) if (C[i][j] == 1 && che...
#include <iostream> #include <queue> #include <stack> #include <utility> #include <vector> using namespace std; bool find1(vector<vector<int>> &C, vector<vector<int>> &check, int *findh, int *findw) { for (int i = 0; i < C.size(); ++i) for (int j = 0; j < C[0].size(); ++j) if (C[i][j] == 1 && che...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "control_flow.loop.condition.change" ]
67,435
67,436
u910697883
cpp
p00741
#include <bits/stdc++.h> using namespace std; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1}; int field[51][51]; int h, w; void sol(int x, int y) { field[x][y] = 0; for (int i = 0; i < 8; i++) { if ((0 <= x + dx[i] && x + dx[i] < h) || (0 <= y + dy[i] && y + dy[i] <...
#include <bits/stdc++.h> using namespace std; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1}; int field[51][51]; int h, w; void sol(int x, int y) { field[x][y] = 0; for (int i = 0; i < 8; i++) { if ((0 <= x + dx[i] && x + dx[i] < h) || (0 <= y + dy[i] && y + dy[i] <...
[ "expression.operation.binary.remove", "control_flow.loop.condition.change" ]
67,453
67,454
u318910474
cpp
p00741
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define FOR(i, a, b) for (int i = int(a); i < int(b); i++) #define REP(i, b) FOR(i, 0, b) int read() { int i; scanf("%lld", &i); return i; } int land[100][100] = {0}; int dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dx[] = {-1, 0, 1...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define FOR(i, a, b) for (int i = int(a); i < int(b); i++) #define REP(i, b) FOR(i, 0, b) int read() { int i; scanf("%lld", &i); return i; } int land[100][100] = {0}; int dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dx[] = {-1, 0, 1...
[ "variable_declaration.name.change", "identifier.change" ]
67,459
67,460
u583163141
cpp
p00741
#include <iostream> #include <vector> using namespace std; int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; int dy[8] = {1, 0, -1, 0, 1, -1, 1, -1}; bool dfs(int sx, int sy, vector<vector<bool>> &c) { if (c[sx][sy] == false) return false; c[sx][sy] = false; for (int i = 0; i < 8; i++) { int nx = sx + dx[i]; ...
#include <iostream> #include <vector> using namespace std; int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; int dy[8] = {1, 0, -1, 0, 1, -1, 1, -1}; bool dfs(int sx, int sy, vector<vector<bool>> &c) { if (c[sx][sy] == false) return false; c[sx][sy] = false; for (int i = 0; i < 8; i++) { int nx = sx + dx[i]; ...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
67,465
67,466
u020019294
cpp
p00741
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<vector<in...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<vector<in...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
67,467
67,468
u734842171
cpp
p00741
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<vector<in...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<vector<in...
[ "literal.number.change" ]
67,469
67,468
u734842171
cpp
p00741
#include <iostream> #include <vector> using namespace std; const int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1}; const int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1}; void dfs(int x, int y, vector<vector<bool>> &canGo) { canGo[x][y] = false; for (int i = 0; i < 9; i++) if (canGo[x + dx[i]][y + dy[i]]) dfs(x + dx[i], y ...
#include <iostream> #include <vector> using namespace std; const int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1}; const int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1}; void dfs(int x, int y, vector<vector<bool>> &canGo) { canGo[x][y] = false; for (int i = 0; i < 8; i++) if (canGo[x + dx[i]][y + dy[i]]) dfs(x + dx[i], y ...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
67,470
67,471
u074575391
cpp
p00741
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) using namespace std; typedef long long ll; int INF = (1LL << 30) - 1; int MOD = 1e9 + 7; int H, W; void dfs(int h, int w, vector<vector<int>> &table) { // cout << h << " " << w << endl; table[h][w] = 0; int dx[] = {-1, -1, -1, 0, ...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) using namespace std; typedef long long ll; int INF = (1LL << 30) - 1; int MOD = 1e9 + 7; int H, W; void dfs(int h, int w, vector<vector<int>> &table) { // cout << h << " " << w << endl; table[h][w] = 0; int dx[] = {-1, -1, -1, 0, ...
[ "expression.operation.binary.remove", "identifier.change", "control_flow.loop.condition.change" ]
67,497
67,498
u920645217
cpp
p00741
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) using namespace std; typedef long long ll; int INF = (1LL << 30) - 1; int MOD = 1e9 + 7; int H, W; void dfs(int h, int w, vector<vector<int>> &table) { // cout << h << " " << w << endl; table[h][w] = 0; int dx[] = {-1, -1, -1, 0, ...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) using namespace std; typedef long long ll; int INF = (1LL << 30) - 1; int MOD = 1e9 + 7; int H, W; void dfs(int h, int w, vector<vector<int>> &table) { // cout << h << " " << w << endl; table[h][w] = 0; int dx[] = {-1, -1, -1, 0, ...
[ "expression.operation.binary.remove" ]
67,499
67,498
u920645217
cpp
p00724
// Tue Dec 22 22:01:34 JST 2009 #include <iostream> #include <queue> #include <set> using namespace std; #define REP(i, b, n) for (int i = b; i < n; i++) #define rep(i, n) REP(i, 0, n) #define mp make_pair int dx[] = {0, 1, 1, 0, -1, -1}; int dy[] = {-1, -1, 0, 1, 1, 0}; #define CONNECT true #define UNCONNECT false #de...
// Tue Dec 22 22:01:34 JST 2009 #include <iostream> #include <queue> #include <set> using namespace std; #define REP(i, b, n) for (int i = b; i < n; i++) #define rep(i, n) REP(i, 0, n) #define mp make_pair int dx[] = {0, 1, 1, 0, -1, -1}; int dy[] = {-1, -1, 0, 1, 1, 0}; #define CONNECT true #define UNCONNECT false #de...
[ "literal.number.change", "control_flow.branch.if.condition.change", "function.return_value.change" ]
67,535
67,536
u157643087
cpp
p00724
// Tue Dec 22 22:01:34 JST 2009 #include <iostream> #include <queue> #include <set> using namespace std; #define REP(i, b, n) for (int i = b; i < n; i++) #define rep(i, n) REP(i, 0, n) #define mp make_pair int dx[] = {0, 1, 1, 0, -1, -1}; int dy[] = {-1, -1, 0, 1, 1, 0}; #define CONNECT true #define UNCONNECT false #de...
// Tue Dec 22 22:01:34 JST 2009 #include <iostream> #include <queue> #include <set> using namespace std; #define REP(i, b, n) for (int i = b; i < n; i++) #define rep(i, n) REP(i, 0, n) #define mp make_pair int dx[] = {0, 1, 1, 0, -1, -1}; int dy[] = {-1, -1, 0, 1, 1, 0}; #define CONNECT true #define UNCONNECT false #de...
[ "literal.number.change", "control_flow.branch.if.condition.change", "function.return_value.change" ]
67,537
67,536
u157643087
cpp
p00724
// Tue Dec 22 22:01:34 JST 2009 #include <iostream> #include <queue> #include <set> using namespace std; #define REP(i, b, n) for (int i = b; i < n; i++) #define rep(i, n) REP(i, 0, n) #define mp make_pair int dx[] = {0, 1, 1, 0, -1, -1}; int dy[] = {-1, -1, 0, 1, 1, 0}; #define CONNECT true #define UNCONNECT false #de...
// Tue Dec 22 22:01:34 JST 2009 #include <iostream> #include <queue> #include <set> using namespace std; #define REP(i, b, n) for (int i = b; i < n; i++) #define rep(i, n) REP(i, 0, n) #define mp make_pair int dx[] = {0, 1, 1, 0, -1, -1}; int dy[] = {-1, -1, 0, 1, 1, 0}; #define CONNECT true #define UNCONNECT false #de...
[ "control_flow.branch.if.condition.change" ]
67,538
67,536
u157643087
cpp
p00725
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int w, h; int sx, sy; int res; int table[30]...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int w, h; int sx, sy; int res; int table[30]...
[ "literal.number.change", "assignment.value.change" ]
67,568
67,567
u197786702
cpp
p00725
using namespace std; #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #incl...
using namespace std; #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #incl...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
67,591
67,592
u336892997
cpp
p00725
#include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) int w, h; int f[20][20]; int ans; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, -1, 0, 1}; void rec(int n, int x, int y) { if (n > 10) return; rep(i, 4) { int mx = x + dx[i]; int my = y + dy[i]; if (f[my][mx] == 1) continue; ...
#include <iostream> #define rep(i, n) for (int i = 0; i < n; i++) int w, h; int f[20][20]; int ans; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, -1, 0, 1}; void rec(int n, int x, int y) { if (n >= ans) return; rep(i, 4) { int mx = x + dx[i]; int my = y + dy[i]; if (f[my][mx] == 1) continue...
[]
67,621
67,622
u956456895
cpp
p00725
#include <algorithm> #include <iostream> using namespace std; int w, h; int G[100][100]; int sx, sy; int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, -1, 1}; int ans; void dfs(int px, int py, int cnt) { if (cnt > 10) return; for (int i = 0; i < 4; i++) { int nx = px + dx[i], ny = py + dy[i]; if (!(0 <= nx && ...
#include <algorithm> #include <iostream> using namespace std; int w, h; int G[100][100]; int sx, sy; int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, -1, 1}; int ans; void dfs(int px, int py, int cnt) { if (cnt > 10) return; for (int i = 0; i < 4; i++) { int nx = px + dx[i], ny = py + dy[i]; if (!(0 <= nx && ...
[ "call.add", "call.arguments.add" ]
67,635
67,636
u107750881
cpp
p00746
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; class rectangle { private: int name, x, y; public: rectangle(int name, int x, int y) : name(name), x(x), y(y) {} int getX() { return x; } int getY() { return y; } }; int main() { int N; int n, d; int x, y; ...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; class rectangle { private: int name, x, y; public: rectangle(int name, int x, int y) : name(name), x(x), y(y) {} int getX() { return x; } int getY() { return y; } }; int main() { int N; int n, d; int x, y; ...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "control_flow.return.add", "control_flow.return.0.add" ]
67,664
67,665
u116384554
cpp
p00746
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; class rectangle { private: int name, x, y; public: rectangle(int name, int x, int y) : name(name), x(x), y(y) {} int getX() { return x; } int getY() { return y; } }; int main() { int N; int n, d; int x, y; ...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; class rectangle { private: int name, x, y; public: rectangle(int name, int x, int y) : name(name), x(x), y(y) {} int getX() { return x; } int getY() { return y; } }; int main() { int N; int n, d; int x, y; ...
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
67,666
67,665
u116384554
cpp
p00746
#include <algorithm> #include <iostream> using namespace std; struct point { int x; int y; }; int N, maxx = -200, maxy = -200, minx = 200, miny = 200, n, d; struct point map[200]; int main() { map[0].x = 0; map[0].y = 0; while (1) { cin >> N; if (N == 0) { break; } else { for (int i...
#include <algorithm> #include <iostream> using namespace std; struct point { int x; int y; }; int N, maxx = -200, maxy = -200, minx = 200, miny = 200, n, d; struct point map[200]; int main() { map[0].x = 0; map[0].y = 0; while (1) { cin >> N; if (N == 0) { break; } else { for (int i...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
67,669
67,670
u981364540
cpp
p00746
#include <algorithm> #include <iostream> using namespace std; struct point { int x; int y; }; int N, maxx = -200, maxy = -200, minx = 200, miny = 200, n, d; struct point map[200]; int main() { map[0].x = 0; map[0].y = 0; while (1) { cin >> N; if (N == 0) { break; } else { for (int i...
#include <algorithm> #include <iostream> using namespace std; struct point { int x; int y; }; int N, maxx = -200, maxy = -200, minx = 200, miny = 200, n, d; struct point map[200]; int main() { map[0].x = 0; map[0].y = 0; while (1) { cin >> N; if (N == 0) { break; } else { for (int i...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
67,671
67,670
u981364540
cpp
p00746
#include <algorithm> #include <iostream> #include <utility> using namespace std; typedef pair<int, int> P; int main() { int n; while (cin >> n) { P a[300]; a[0] = P(0, 0); for (int i = 1; i < n; i++) { int m, d; cin >> m >> d; if (d == 0) { a[i] = P(a[m].first - 1, a[m].second...
#include <algorithm> #include <iostream> #include <utility> using namespace std; typedef pair<int, int> P; int main() { int n; while (cin >> n, n) { P a[300]; a[0] = P(0, 0); for (int i = 1; i < n; i++) { int m, d; cin >> m >> d; if (d == 0) { a[i] = P(a[m].first - 1, a[m].sec...
[ "control_flow.loop.condition.change" ]
67,681
67,682
u705334572
cpp
p00746
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <stack> #include <string> #include <vector> using namespace std; int N; int main() { while (cin >> N, N) { vector<pair<int, int>> vp; vp.push_back({0, 0}); for (int i = 1; i < N; ++i) { int n, d; ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <stack> #include <string> #include <vector> using namespace std; int N; int main() { while (cin >> N, N) { vector<pair<int, int>> vp; vp.push_back({0, 0}); for (int i = 1; i < N; ++i) { int n, d; ...
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
67,687
67,688
u578258337
cpp
p00746
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int n; struct PLACE { int r; int l; int u; int d; }; void solve() { PLACE place[n + 1]; int target, cmd; // 0を基準としそれよりもどのくらい離れているか int maxR = 0; int maxL = 0; int maxU = 0; int maxD = 0; place[0]....
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int n; struct PLACE { int r; int l; int u; int d; }; void solve() { PLACE place[n + 1]; int target, cmd; // 0を基準としそれよりもどのくらい離れているか int maxR = 0; int maxL = 0; int maxU = 0; int maxD = 0; place[0]....
[ "assignment.value.change", "assignment.change" ]
67,689
67,690
u977158854
cpp
p00746
#include <iostream> #include <vector> using namespace std; struct pos { int x; int y; }; int main() { int n, n1, d1; int left, right, up, down; pos setpos; vector<pos> position; vector<pos>::iterator posit; while (1) { cin >> n; if (n == 0) break; //初期化 left = 0; right = 0;...
#include <iostream> #include <vector> using namespace std; struct pos { int x; int y; }; int main() { int n, n1, d1; int left, right, up, down; pos setpos; vector<pos> position; vector<pos>::iterator posit; while (1) { cin >> n; if (n == 0) break; //初期化 left = 0; right = 0;...
[ "call.add" ]
67,693
67,694
u171548894
cpp
p00748
#include <bits/stdc++.h> using namespace std; int all[1000001]; int odd[1000001]; int const INF = 1 << 29; int main() { fill(all, all + 1000001, INF); fill(odd, odd + 1000001, INF); all[0] = odd[0] = 0; for (int i = 1;; i++) { int n = i * (i + 1) * (i + 2); if (n > 1000000) break; for (...
#include <bits/stdc++.h> using namespace std; int all[1000001]; int odd[1000001]; int const INF = 1 << 29; int main() { fill(all, all + 1000001, INF); fill(odd, odd + 1000001, INF); all[0] = odd[0] = 0; for (int i = 1;; i++) { int n = i * (i + 1) * (i + 2) / 6; if (n > 1000000) break; f...
[ "assignment.change" ]
67,755
67,756
u228816757
cpp
p00748
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define INF 1000000 using namespace std; typedef list<int> L; typedef pair<int, int> P; typedef vector<int> V; typedef queue<int> Q; type...
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define INF 1000000 using namespace std; typedef list<int> L; typedef pair<int, int> P; typedef vector<int> V; typedef queue<int> Q; type...
[ "variable_declaration.value.change", "identifier.replace.add", "literal.replace.remove", "control_flow.loop.for.initializer.change", "identifier.change", "io.output.change" ]
67,757
67,758
u398354652
cpp
p00747
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
[ "literal.number.change", "io.output.change" ]
67,773
67,774
u102734449
cpp
p00747
#include <algorithm> #include <cstdio> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; const int INF = 1 << 29; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; int main() { for (int h, w; scanf("%d%d", &h, &w), h;) { int hor[50][50], ver[50][50]; rep(i, h) { rep(j, w - 1) ...
#include <algorithm> #include <cstdio> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; const int INF = 1 << 29; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; int main() { for (int h, w; scanf("%d%d", &w, &h), h;) { int hor[50][50], ver[50][50]; rep(i, h) { rep(j, w - 1) ...
[ "identifier.change", "control_flow.loop.for.condition.change", "call.arguments.change", "literal.number.change", "assignment.value.change", "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
67,777
67,778
u157859087
cpp
p00747
#include <cstdio> #include <cstdlib> #include <iostream> #define BUFFER_SIZE 1024 int bfs(int sx, int sy); const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}; struct queue { int buffer[BUFFER_SIZE]; int head; int tail; }; void init(struct queue *q) { q->head = 0; q->tail = -1; } void enqueue(struct queu...
#include <cstdio> #include <cstdlib> #include <iostream> #define BUFFER_SIZE 1024 int bfs(int sx, int sy); const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}; struct queue { int buffer[BUFFER_SIZE]; int head; int tail; }; void init(struct queue *q) { q->head = 0; q->tail = -1; } void enqueue(struct queu...
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
67,784
67,785
u611053131
cpp
p00747
#include <iostream> #include <queue> #include <vector> #define INF (1 << 29) using namespace std; const int dx[4] = {0, 1, 0, -1}; const int dy[4] = {-1, 0, 1, 0}; int main() { int H, W, T; vector<vector<vector<bool>>> M; while (true) { cin >> W >> H; if (W == 0 && H == 0) { break; } ...
#include <iostream> #include <queue> #include <vector> #define INF (1 << 29) using namespace std; const int dx[4] = {0, 1, 0, -1}; const int dy[4] = {-1, 0, 1, 0}; int main() { int H, W, T; vector<vector<vector<bool>>> M; while (true) { cin >> W >> H; if (W == 0 && H == 0) { break; } ...
[ "literal.number.change", "assignment.value.change" ]
67,791
67,792
u823513038
cpp
p00747
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int main() { while (true) { int w, h; cin >> w >> h; if (w == 0 && h == 0) { break; } vector<vector<int>> tatekabe(h, vector...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int main() { while (true) { int w, h; cin >> w >> h; if (w == 0 && h == 0) { break; } vector<vector<int>> tatekabe(h, vector...
[]
67,815
67,816
u841711018
cpp
p00747
#include <iostream> #include <queue> using namespace std; int main() { int w, h; int map [30] [30]; //?£???????,???,???,??????????????????????????????1,2,4,8???????????? while (cin >> w >> h && w > 0 && h > 0) { for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) map[i][j] = 0;...
#include <iostream> #include <queue> using namespace std; int main() { int w, h; int map [30] [30]; //?£???????,???,???,??????????????????????????????1,2,4,8???????????? while (cin >> w >> h && w > 0 && h > 0) { for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) map[i][j] = 0;...
[]
67,828
67,829
u231716965
cpp