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 |
|---|---|---|---|---|---|---|---|
p03104 | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const ll LINF = 1LL << 50;
const int NIL = -1;
const ll MAX = 1e+12 + 1;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
vector<ll> c... | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const ll LINF = 1LL << 50;
const int NIL = -1;
const ll MAX = 1e+12 + 1;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
vector<ll> c... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 911,501 | 911,502 | u603234915 | cpp |
p03104 | #include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
/*
A ~ B => 0 ~ B - 0 ~ (A - 1)
累積和とかと同じ考え方
ex)
4 ~ 8 -> (0 ~ 8) - (0 ~ 3)
A xor B = C
=> C xor A = B
0 ~ 8 0 ~ 3 4 ~ 8
こう考えると
問題は,0 ~ A のxorの値を求める.
*/
ll calc(ll A) {
if (A <= 0)
return 0;
A++;
... | #include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
/*
A ~ B => 0 ~ B - 0 ~ (A - 1)
累積和とかと同じ考え方
ex)
4 ~ 8 -> (0 ~ 8) - (0 ~ 3)
A xor B = C
=> C xor A = B
0 ~ 8 0 ~ 3 4 ~ 8
こう考えると
問題は,0 ~ A のxorの値を求める.
*/
ll calc(ll A) {
if (A <= 0)
return 0;
A++;
... | [
"assignment.change"
] | 911,505 | 911,506 | u603234915 | cpp |
p03104 | #include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
ll ans = 0;
if (B == A) {
ans = A;
} else if (B - A <= 1) {
ans = A ^ B;
} else {
if (A % 2 == 1) {
ans ^= A;
A++;
}
if (B % 2 == 0) {
ans ^= B;
... | #include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
ll ans = 0;
if (B == A) {
ans = A;
} else if (B - A <= 1) {
ans = A ^ B;
} else {
if (A % 2 == 1) {
ans ^= A;
A++;
}
if (B % 2 == 0) {
ans ^= B;
... | [
"control_flow.branch.if.condition.change"
] | 911,507 | 911,508 | u603234915 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main() {
LL A, B;
cin >> A >> B;
if (A % 2 == 0) {
int a = (B - A) % 2;
if (B % 2 == 0) {
cout << (a ^ B) << endl;
} else {
cout << (a ^ 1) << endl;
}
} else {
int a = (B - A - 1) % 2;
if (B % 2 == 0) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main() {
LL A, B;
cin >> A >> B;
if (A % 2 == 0) {
int a = (B - A) / 2 % 2;
if (B % 2 == 0) {
cout << (a ^ B) << endl;
} else {
cout << (a ^ 1) << endl;
}
} else {
int a = (B - A - 1) / 2 % 2;
if (B % 2 ... | [
"assignment.change"
] | 911,520 | 911,521 | u067237725 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define lli long long unsigned int
#define REP(i, n) for (lli i = 0; i < n; i++)
#define DEBUG 0
#define LIM 1000000007
lli calc(lli num, lli b) {
lli sum = 0;
lli s = 1;
for (lli i = 0; i <= b; i++) {
s *= 2;
}
lli shalf = s / 2;
sum = num / s * shalf;
... | #include <bits/stdc++.h>
using namespace std;
#define lli long long unsigned int
#define REP(i, n) for (lli i = 0; i < n; i++)
#define DEBUG 0
#define LIM 1000000007
lli calc(lli num, lli b) {
lli sum = 0;
lli s = 1;
for (lli i = 0; i <= b; i++) {
s *= 2;
}
lli shalf = s / 2;
sum = num / s * shalf;
... | [
"control_flow.return.add",
"control_flow.return.0.add",
"literal.number.change",
"call.arguments.change"
] | 911,524 | 911,523 | u041513069 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (signed i = 0; i < n; ++i)
#define repi(n) rep(i, n)
#define int long long
#define str string
#define vint vector<int>
#define pint pair<int, int>
#define pb(a) push_back(a)
#define all(v) v.begin(), v.end()
#define yn(b) cout << ((b) ? "Yes" : "No") <... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (signed i = 0; i < n; ++i)
#define repi(n) rep(i, n)
#define int long long
#define str string
#define vint vector<int>
#define pint pair<int, int>
#define pb(a) push_back(a)
#define all(v) v.begin(), v.end()
#define yn(b) cout << ((b) ? "Yes" : "No") <... | [
"assignment.change"
] | 911,526 | 911,527 | u423624748 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (signed i = 0; i < n; ++i)
#define repi(n) rep(i, n)
#define int long long
#define str string
#define vint vector<int>
#define pint pair<int, int>
#define pb(a) push_back(a)
#define all(v) v.begin(), v.end()
#define yn(b) cout << ((b) ? "Yes" : "No") <... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (signed i = 0; i < n; ++i)
#define repi(n) rep(i, n)
#define int long long
#define str string
#define vint vector<int>
#define pint pair<int, int>
#define pb(a) push_back(a)
#define all(v) v.begin(), v.end()
#define yn(b) cout << ((b) ? "Yes" : "No") <... | [] | 911,529 | 911,527 | u423624748 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
ll calc(ll a) {
if (a <= 0) {
return 0;
}
a++;
ll ans = 0;
rep(i, 50) {
ll loop = (1LL << (i + 1))... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
ll calc(ll a) {
if (a <= 0) {
return 0;
}
a++;
ll ans = 0;
rep(i, 50) {
ll loop = (1LL << (i + 1))... | [
"expression.operation.binary.remove"
] | 911,530 | 911,531 | u828388155 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
ll calc(ll a) {
if (a <= 0) {
return 0;
}
ll ans = 0;
rep(i, 50) {
ll loop = (1LL << (i + 1));
l... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
ll calc(ll a) {
if (a <= 0) {
return 0;
}
a++;
ll ans = 0;
rep(i, 50) {
ll loop = (1LL << (i + 1))... | [
"expression.unary.arithmetic.add"
] | 911,532 | 911,531 | u828388155 | cpp |
p03104 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define each(x, y) ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define each(x, y) ... | [
"identifier.change",
"expression.operation.binary.change",
"function.return_value.change",
"call.arguments.change",
"literal.number.change",
"assignment.variable.change"
] | 911,537 | 911,538 | u908318580 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
signed main() {
lint A, B;
cin >> A >> B;
lint ans;
if (A % 2 == 0 && B % 2 == 0) {
if ((B - A) % 4 == 0)
ans = B;
else
ans = (1 ^ B);
}
if (A % 2 == 1 && B % 2 == 0) {
if ((B - A + 1) % 4 == 0)
ans = (A ^ 1... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
signed main() {
lint A, B;
cin >> A >> B;
lint ans;
if (A % 2 == 0 && B % 2 == 0) {
if ((B - A) % 4 == 0)
ans = B;
else
ans = (1 ^ B);
}
if (A % 2 == 1 && B % 2 == 0) {
if ((B - A + 1) % 4 == 0)
ans = (A ^ 1... | [
"literal.number.change",
"assignment.value.change"
] | 911,549 | 911,550 | u265359795 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
ll calc(ll a) {
if (a <= 0)
return 0;
++a;
ll ans = 0;
rep(i, 50) {
ll loop = (1LL << (i + 1));
ll cnt = (a / loop) * (loop / 2);
cnt += max(0LL, (a % loop) * (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
ll calc(ll a) {
if (a <= 0)
return 0;
++a;
ll ans = 0;
rep(i, 50) {
ll loop = (1LL << (i + 1));
ll cnt = (a / loop) * (loop / 2);
cnt += max(0LL, (a % loop) - (... | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 911,557 | 911,558 | u596311864 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <s... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <s... | [] | 911,569 | 911,570 | u617380180 | cpp |
p03104 | #include <bits/stdc++.h>
#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define lcm(a, b) (a) / __gcd((a), (b)) * (b)
#define endl '\n'
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
static const int INF = I... | #include <bits/stdc++.h>
#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define lcm(a, b) (a) / __gcd((a), (b)) * (b)
#define endl '\n'
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
static const int INF = I... | [
"io.output.change"
] | 911,581 | 911,582 | u254187258 | cpp |
p03104 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
#define intmax INT... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
#define intmax INT... | [
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add"
] | 911,588 | 911,589 | u006717664 | cpp |
p03104 | #include <iostream>
using namespace std;
int main() {
long long a, b;
cin >> a >> b;
if (a == 0) {
b = ((b + 1) / 2 % 2) ^ ((b % 2) ? 0 : b);
cout << b << endl;
}
a = ((a) / 2 % 2) ^ (((a - 1) % 2) ? 0 : a);
b = ((b + 1) / 2 % 2) ^ ((b % 2) ? 0 : b);
cout << (a ^ b) << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
long long a, b;
cin >> a >> b;
if (a == 0) {
b = ((b + 1) / 2 % 2) ^ ((b % 2) ? 0 : b);
cout << b << endl;
return 0;
}
a = ((a) / 2 % 2) ^ (((a - 1) % 2) ? 0 : a - 1);
b = ((b + 1) / 2 % 2) ^ ((b % 2) ? 0 : b);
cout << (a ^ b) << endl;
... | [
"control_flow.return.add",
"control_flow.return.0.add",
"assignment.change"
] | 911,592 | 911,591 | u110383054 | cpp |
p03104 | //---------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <numeric>
#include <sstream>
#include <vector>
//... | //---------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <numeric>
#include <sstream>
#include <vector>
//... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 911,606 | 911,607 | u825601908 | cpp |
p03104 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define IO ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define IO ... | [
"expression.operation.binary.remove"
] | 911,610 | 911,611 | u915401678 | cpp |
p03104 | //#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include <vec... | //#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include <vec... | [
"control_flow.branch.if.condition.change"
] | 911,618 | 911,619 | u876953939 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
ll ... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
ll ... | [] | 911,632 | 911,633 | u116774833 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
if (... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
if (... | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 911,634 | 911,635 | u116774833 | cpp |
p03104 | #include <bits/stdc++.h>
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define repr(i, a, n) for (ll i = n - 1; i >= a; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); ... | #include <bits/stdc++.h>
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define repr(i, a, n) for (ll i = n - 1; i >= a; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); ... | [
"function.return_value.change"
] | 911,636 | 911,637 | u688789047 | cpp |
p03104 | // C++ 14
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for (ll __x = __start; __x < __end; __x++)
int main() {
ll a, b;
cin >> a >> b;
if (a == b) {
cout << a << endl;
return 0;
}
if (b - a == 1) {
cout << 1 << endl;
return 0;
}
ll... | // C++ 14
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for (ll __x = __start; __x < __end; __x++)
int main() {
ll a, b;
cin >> a >> b;
if (a == b) {
cout << a << endl;
return 0;
}
if (b - a == 1) {
cout << 1 << endl;
return 0;
}
ll... | [] | 911,638 | 911,639 | u823862638 | cpp |
p03104 | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF LLONG_MAX / 3
#define eps LDBL_EPSILON
#define moder 1000000007
#define pie 3.141592653589793238462643383279
#define P std::pair<int, int>
#define prique priority_queue
using namespace std;
int ... | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF LLONG_MAX / 3
#define eps LDBL_EPSILON
#define moder 1000000007
#define pie 3.141592653589793238462643383279
#define P std::pair<int, int>
#define prique priority_queue
using namespace std;
int ... | [
"control_flow.branch.if.condition.change"
] | 911,642 | 911,643 | u379822620 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int A, B;
cin >> A >> B;
// 2 3 4 5 6 7
if (A % 2 == 0 && B % 2 == 0) {
int cnt = B - A;
cnt /= 2;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int A, B;
cin >> A >> B;
// 2 3 4 5 6 7
if (A % 2 == 0 && B % 2 == 0) {
int cnt = B - A;
cnt /= 2;
... | [
"identifier.change",
"io.output.change",
"assignment.value.change"
] | 911,644 | 911,645 | u237390401 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int A, B;
cin >> A >> B;
// 2 3 4 5 6 7
if (A % 2 == 0 && B % 2 == 0) {
int cnt = B - A;
cnt /= 2;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int A, B;
cin >> A >> B;
// 2 3 4 5 6 7
if (A % 2 == 0 && B % 2 == 0) {
int cnt = B - A;
cnt /= 2;
... | [
"expression.operation.binary.remove",
"identifier.change",
"io.output.change",
"assignment.value.change"
] | 911,646 | 911,645 | u237390401 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t A, B;
cin >> A >> B;
int64_t num;
int64_t ans = 0;
if (A % 2 == 0) {
if (B % 2 == 0) {
num = B - A;
ans = num / 2;
ans = ans % 2;
ans = ans ^ B;
} else {
num = B - A + 1;
ans = num / 2;
ans =... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t A, B;
cin >> A >> B;
int64_t num;
int64_t ans = 0;
if (A % 2 == 0) {
if (B % 2 == 0) {
num = B - A;
ans = num / 2;
ans = ans % 2;
ans = ans ^ B;
} else {
num = B - A + 1;
ans = num / 2;
ans =... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"assignment.change"
] | 911,657 | 911,658 | u124187388 | cpp |
p03104 | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using Graph = vector<vector<edge>>;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "YES";
string no = "no";
string No = "No";
string NO = "NO";
template <class T> inline bool chmax(T &a, T b) {... | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using Graph = vector<vector<edge>>;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "YES";
string no = "no";
string No = "No";
string NO = "NO";
template <class T> inline bool chmax(T &a, T b) {... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 911,659 | 911,660 | u539011156 | cpp |
p03104 | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using Graph = vector<vector<edge>>;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "YES";
string no = "no";
string No = "No";
string NO = "NO";
template <class T> inline bool chmax(T &a, T b) {... | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using Graph = vector<vector<edge>>;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "YES";
string no = "no";
string No = "No";
string NO = "NO";
template <class T> inline bool chmax(T &a, T b) {... | [
"expression.operation.binary.add"
] | 911,659 | 911,661 | u539011156 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#incl... | [
"expression.unary.arithmetic.add"
] | 911,665 | 911,666 | u809967037 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a, b;
cin >> a >> b;
if (a == b + 1) {
ll ans = a ^ b;
cout << ans << endl;
return 0;
}
if (a == b) {
cout << a << endl;
return 0;
}
ll ans;
if (a % 2 == 0) {
ll cnt = 0;
if (b % 2 == 0) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a, b;
cin >> a >> b;
if (a == b + 1) {
ll ans = a ^ b;
cout << ans << endl;
return 0;
}
if (a == b) {
cout << a << endl;
return 0;
}
ll ans;
if (a % 2 == 0) {
ll cnt = 0;
if (b % 2 == 0) {
... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"identifier.replace.add",
"literal.replace.remove"
] | 911,667 | 911,668 | u144029820 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, ini, n) for (int i = ini; i < n; i++)
#define _rep(i, ini, n) for (int i = ini; i >= n; i--)
#define ToEnd(a) a.begin(), a.end()
uint64_t MOD = 1000000007;
int64_t XORsum(int64_t n) {
int64_t v;
if (n % 2 == 0) {
v = (n % 4 > 0);
v += n;
} else... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, ini, n) for (int i = ini; i < n; i++)
#define _rep(i, ini, n) for (int i = ini; i >= n; i--)
#define ToEnd(a) a.begin(), a.end()
uint64_t MOD = 1000000007;
int64_t XORsum(int64_t n) {
int64_t v;
if (n % 2 == 0) {
v = (n % 4 > 0);
v += n;
} else... | [
"identifier.change",
"expression.operation.binary.change"
] | 911,669 | 911,670 | u190679129 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, int> pli;
typedef pair<int, int> pii;
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define qrep(q... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, int> pli;
typedef pair<int, int> pii;
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define qrep(q... | [
"literal.number.change",
"assignment.value.change",
"literal.number.type.widen.change"
] | 911,675 | 911,676 | u363005934 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
typedef long long LL;
constexpr long long INFLL = 1e18;
using namespace std;
LL solve(LL temp) {
LL ans;
LL count;
LL x = 0;
count = temp /... | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
typedef long long LL;
constexpr long long INFLL = 1e18;
using namespace std;
LL solve(LL temp) {
LL ans;
LL count;
LL x = 0;
count = temp /... | [] | 911,679 | 911,680 | u648287428 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
cin.tie(nullptr... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
cin.tie(nullptr... | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 911,683 | 911,684 | u093973314 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long A, B;
cin >> A >> B;
long long Asum, Bsum;
if (A % 2 == 1) {
Asum = (A / 2 + 1) % 2;
} else {
Asum = (A + 1 / 2 + 1) % 2;
Asum = Asum ^ (A + 1);
}
if (B % 2 == 1) {
Bsum = (B / 2 + 1) % 2;
} else {
Bsum = (B + 1 / 2... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long A, B;
cin >> A >> B;
long long Asum, Bsum;
if (A % 2 == 1) {
Asum = (A / 2 + 1) % 2;
} else {
Asum = ((A + 1) / 2 + 1) % 2;
Asum = Asum ^ (A + 1);
}
if (B % 2 == 1) {
Bsum = (B / 2 + 1) % 2;
} else {
Bsum = ((B + 1)... | [] | 911,697 | 911,698 | u924451152 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define INF 110000000000
#define MOD 1000000007
typedef long long ll;
typedef pair<ll, int> P;
ll sumXOR(ll x) {
ll n = (x + 1) / 2;
ll ans = n % 2;
if (x % 2 ==... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define INF 110000000000
#define MOD 1000000007
typedef long long ll;
typedef pair<ll, int> P;
ll sumXOR(ll x) {
ll n = (x + 1) / 2;
ll ans = n % 2;
if (x % 2 ==... | [
"identifier.change",
"function.return_value.change"
] | 911,709 | 911,710 | u591914971 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, n) for (long long i = 0; i < n; ++i)
#define REPP(i, m, n) for (long long i = m; i < n; ++i)
#define rep(i, n) for (long long i = n - 1; i >= 0; --i)
#define repp(i, n, m) for (long long i = n - 1; i >= m; --i)
#define ALL(N) (N.begin(), ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, n) for (long long i = 0; i < n; ++i)
#define REPP(i, m, n) for (long long i = m; i < n; ++i)
#define rep(i, n) for (long long i = n - 1; i >= 0; --i)
#define repp(i, n, m) for (long long i = n - 1; i >= m; --i)
#define ALL(N) (N.begin(), ... | [
"assignment.value.change"
] | 911,711 | 911,712 | u901397311 | cpp |
p03104 | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <vector>
const int mod = 1e9 + 7;
const int kmax = 510000;
long long fact[kmax], fact_inv[kmax], inv[kmax];
int gcd(int a, int b) {
if (!b) {
return a;
}
retur... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <vector>
const int mod = 1e9 + 7;
const int kmax = 510000;
long long fact[kmax], fact_inv[kmax], inv[kmax];
int gcd(int a, int b) {
if (!b) {
return a;
}
retur... | [
"identifier.change",
"expression.operation.binary.change"
] | 911,717 | 911,718 | u083910207 | cpp |
p03104 | #include <cmath>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <algorithm>
#include <bitset> // std::bitset<N>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream> // std::stringstream
#include <string>
using namespace... | #include <cmath>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <algorithm>
#include <bitset> // std::bitset<N>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream> // std::stringstream
#include <string>
using namespace... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 911,727 | 911,728 | u247576416 | cpp |
p03104 | #include <cmath>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <algorithm>
#include <bitset> // std::bitset<N>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream> // std::stringstream
#include <string>
using namespace... | #include <cmath>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <algorithm>
#include <bitset> // std::bitset<N>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream> // std::stringstream
#include <string>
using namespace... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change",
"variable_declaration.type.change"
] | 911,729 | 911,728 | u247576416 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <vector>
#define le... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <vector>
#define le... | [] | 911,730 | 911,731 | u146975530 | cpp |
p03104 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using lint = long long;
lint f(lint a) {
if (a == 0)
return 0;
if (a == 1)
return 1;
if (a == 2)
return 3;
if (a == 3)
return 0;
int i;
for (i = 62; (a & (1LL << i)) == 0; i--)
;
return f(a... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using lint = long long;
lint f(lint a) {
if (a == 0)
return 0;
if (a == 1)
return 1;
if (a == 2)
return 3;
if (a == 3)
return 0;
int i;
for (i = 62; (a & (1LL << i)) == 0; i--)
;
return f(a... | [
"io.output.change"
] | 911,732 | 911,733 | u781095600 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
#define rep(i, a) for (int i = (int)0; i ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
#define rep(i, a) for (int i = (int)0; i ... | [
"assignment.value.change",
"expression.operation.binary.change"
] | 911,739 | 911,740 | u698883164 | cpp |
p03104 | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using pii = pair<int, int>;
using ll = long l... | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using pii = pair<int, int>;
using ll = long l... | [
"assignment.add"
] | 911,741 | 911,742 | u008229752 | cpp |
p03104 | #include "stdio.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#inc... | #include "stdio.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#inc... | [
"expression.operation.binary.remove"
] | 911,751 | 911,752 | u468440945 | cpp |
p03104 | #include "stdio.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#inc... | #include "stdio.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#inc... | [
"variable_declaration.type.change",
"expression.operation.binary.remove"
] | 911,753 | 911,752 | u468440945 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long int llint;
#define MM 1000000000
#define MOD MM + 7
#define MAX 101000
#define MAP 110
#define initial_value -1
#define Pair pair<int, int>
#define chmax(a, b) (a < b ? a = b : 0)
#define chmin(a, b) (a > b ? a = b : 0)
int dx[4] = {-... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long int llint;
#define MM 1000000000
#define MOD MM + 7
#define MAX 101000
#define MAP 110
#define initial_value -1
#define Pair pair<int, int>
#define chmax(a, b) (a < b ? a = b : 0)
#define chmin(a, b) (a > b ? a = b : 0)
int dx[4] = {-... | [
"expression.operation.binary.change"
] | 911,754 | 911,755 | u342051078 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B;
cin >> A >> B;
if (A == B) {
cout << B << endl;
} else if (A + 1 == B) {
cout << long(A ^ B) << endl;
} else {
if (A % 2 == 0) {
// A^(A+1)=1,(A+2)^(A+3)=1, ...
// 1^1=0,0^1=1
if (B % 2 == 0) {
if (((... | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B;
cin >> A >> B;
if (A == B) {
cout << B << endl;
} else if (A + 1 == B) {
cout << long(A ^ B) << endl;
} else {
if (A % 2 == 0) {
// A^(A+1)=1,(A+2)^(A+3)=1, ...
// 1^1=0,0^1=1
if (B % 2 == 0) {
if (((... | [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 911,772 | 911,773 | u837190376 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
int a, b;
cin >> ... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
ll a, b;
cin >> a... | [
"variable_declaration.type.change"
] | 911,774 | 911,775 | u110336920 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
ll a, b;
cin >> a... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
ll a, b;
cin >> a... | [
"expression.operation.binary.add"
] | 911,776 | 911,775 | u110336920 | cpp |
p03104 | #include <bits/stdc++.h>
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ll long long
using namespace s... | #include <bits/stdc++.h>
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ll long long
using namespace s... | [
"expression.operation.binary.change"
] | 911,779 | 911,780 | u560322763 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return
// true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a
// > b) { a = b; return true; } return false; }
/* attention
long longのシフト演算には気をつけよう
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return
// true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a
// > b) { a = b; return true; } return false; }
/* attention
long longのシフト演算には気をつけよう
... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 911,783 | 911,784 | u052332717 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
ll A, B;
cin >> A >> B;
ll ans = 0;
ll q = (B - A + 1) % 4;
if (A % 2 == 0 && B % 2 == 1) {
for (int i = 0; i < q; i++) {
ans ^= (A + i);
}
} else if (A % 2 == 0) {
if (q == 1)
ans ^= B;
else {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
ll A, B;
cin >> A >> B;
ll ans = 0;
ll q = (B - A + 1) % 4;
if (A % 2 == 0 && B % 2 == 1) {
for (int i = 0; i < q; i++) {
ans ^= (A + i);
}
} else if (A % 2 == 0) {
if (q == 1)
ans ^= B;
else {
... | [
"assignment.variable.change",
"identifier.change"
] | 911,787 | 911,788 | u998251394 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll f(ll x) {
if (x < 0)
return 0LL;
if (x % 4 == 1)
return x;
if (x % 4 == 2)
return x + 1;
if (x % 4 == 3)
return 0;
return x;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll f(ll x) {
if (x < 0)
return 0LL;
if (x % 4 == 1)
return 1;
if (x % 4 == 2)
return x + 1;
if (x % 4 == 3)
return 0;
return x;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout... | [
"identifier.replace.remove",
"literal.replace.add",
"function.return_value.change"
] | 911,797 | 911,798 | u891061025 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll f(ll x) {
if (!x)
return 0LL;
if (x % 4 == 1)
return x;
if (x % 4 == 2)
return x + 1;
if (x % 4 == 3)
return 0;
return x;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.ti... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll f(ll x) {
if (x < 0)
return 0LL;
if (x % 4 == 1)
return 1;
if (x % 4 == 2)
return x + 1;
if (x % 4 == 3)
return 0;
return x;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout... | [
"expression.operation.unary.logical.remove",
"control_flow.branch.if.condition.change",
"identifier.replace.remove",
"literal.replace.add",
"function.return_value.change"
] | 911,799 | 911,798 | u891061025 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
ll res;
if (A % 2) {
if (B % 2) {
res = A ^ (((B - A) / 2) % 2);
} else {
res = A ^ B ^ (((B - A - 1) / 2) % 2);
}
} else {
if (B % 2) {
res = ((B - A) / 2) % 2;
} el... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll A, B;
cin >> A >> B;
ll res;
if (A % 2) {
if (B % 2) {
res = A ^ (((B - A) / 2) % 2);
} else {
res = A ^ B ^ (((B - A - 1) / 2) % 2);
}
} else {
if (B % 2) {
res = ((B - A + 1) / 2) % 2;
... | [
"assignment.change",
"expression.operation.binary.remove"
] | 911,802 | 911,803 | u703503553 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define int long long
int f(int n) {
n++;
switch (n % 4) {
case 0:
return 0;
case 1:
return n;
case 2:
return 1;
case 3:
return 1 ^ (n - 1);
}
}
signed main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int A, B;
cin >> A >> B;... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int f(int n) {
n++;
switch (n % 4) {
case 0:
return 0;
case 1:
return (n - 1);
case 2:
return 1;
case 3:
return 1 ^ (n - 1);
}
}
signed main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int A, B;
cin >> A... | [
"function.return_value.change"
] | 911,806 | 911,807 | u904833081 | cpp |
p03104 | // Created by sz
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long xor_sum(long long a) {
// xor sum: 0^1^2^...^a
if (a % 4 == 0)
return a;
if (a % 4 == 1)
return 1;
if (a % 4 == 2)
return a + 1;
return 0;
}
int main() {
#ifdef LOCAL
freopen("./input.txt", "r", st... | // Created by sz
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long xor_sum(long long a) {
// xor sum: 0^1^2^...^a
if (a % 4 == 0)
return a;
if (a % 4 == 1)
return 1;
if (a % 4 == 2)
return a + 1;
return 0;
}
int main() {
#ifdef LOCAL
freopen("./input.txt", "r", st... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"expression.operation.binary.remove"
] | 911,825 | 911,824 | u041075929 | cpp |
p03104 | // Created by sz
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long xor_sum(long long a) {
// xor sum: 0^1^2^...^a
if (a % 4 == 0)
return a;
if (a % 4 == 1)
return 1;
if (a % 4 == 2)
return a + 1;
return 0;
}
int main() {
#ifdef LOCAL
freopen("./input.txt", "r", st... | // Created by sz
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long xor_sum(long long a) {
// xor sum: 0^1^2^...^a
if (a % 4 == 0)
return a;
if (a % 4 == 1)
return 1;
if (a % 4 == 2)
return a + 1;
return 0;
}
int main() {
#ifdef LOCAL
freopen("./input.txt", "r", st... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 911,826 | 911,824 | u041075929 | cpp |
p03104 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define PB push_back
#define MP make_pair
#define ff first
#define pri 1000000007
#define ss second
using namespace std;
ll f(ll a) {
if (a % 4 == 0)
return a;
if (a % 4 == 1)
return 1;... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define PB push_back
#define MP make_pair
#define ff first
#define pri 1000000007
#define ss second
using namespace std;
ll f(ll a) {
if (a % 4 == 0)
return a;
if (a % 4 == 1)
return 1;... | [
"literal.number.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 911,835 | 911,836 | u514586602 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <time.h>
#include <unordered_map>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <time.h>
#include <unordered_map>
#include... | [
"expression.operation.binary.add"
] | 911,844 | 911,845 | u437722641 | cpp |
p03104 | #include <cmath>
#include <iostream>
using namespace std;
long long func(long long A, long long B) {
long long cA = A, cB = B;
int a[100], b[100];
int i = 0, j, k;
long long ans = 0;
while (cB != 0) {
i++;
b[i] = cB % 2;
cB = cB / 2;
}
k = i; // ketasuu
int c[k];
i = 0;
while (cA != 0) ... | #include <cmath>
#include <iostream>
using namespace std;
long long func(long long A, long long B) {
long long cA = A, cB = B;
int a[100], b[100];
int i = 0, j, k;
long long ans = 0;
while (cB != 0) {
i++;
b[i] = cB % 2;
cB = cB / 2;
}
k = i; // ketasuu
int c[k];
i = 0;
while (cA != 0) ... | [
"control_flow.branch.if.condition.change"
] | 911,852 | 911,853 | u839397805 | cpp |
p03104 | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for... | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for... | [
"assignment.add"
] | 911,866 | 911,867 | u838742270 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF 1e9
#define LINF 1e18
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int, P> Pi;
typedef pair<P, P> PP;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};
const int dx[] = {1, -1, 0, 0};
template <class T>... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF 1e9
#define LINF 1e18
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int, P> Pi;
typedef pair<P, P> PP;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};
const int dx[] = {1, -1, 0, 0};
template <class T>... | [
"control_flow.branch.if.condition.change"
] | 911,879 | 911,880 | u292929213 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <utility>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
int main(void) {
cout << std::fixed << std::setpr... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <utility>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
int main(void) {
cout << std::fixed << std::setpr... | [
"identifier.change",
"expression.operation.binary.change"
] | 911,884 | 911,885 | u844133200 | cpp |
p03104 |
#include <iostream>
using namespace std;
int main() {
long long A, B;
long long ans = 0;
cin >> A >> B;
if (A % 2) {
ans ^= A - 1;
}
while ((B - A + 1) % 4 != 0) {
ans ^= B + 1;
B++;
}
cout << ans;
}
|
#include <iostream>
using namespace std;
int main() {
long long A, B;
long long ans = 0;
cin >> A >> B;
if (A % 2) {
ans ^= A - 1;
A--;
}
while ((B - A + 1) % 4 != 0) {
ans ^= B + 1;
B++;
}
cout << ans;
}
| [
"expression.unary.arithmetic.add"
] | 911,892 | 911,893 | u913048763 | cpp |
p03104 | //
// main.cpp
// CoderTest
//
// Created by yuya on 2019/07/25.
// Copyright © 2019 yuya. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
ll XOR(ll a, ll b);
int main() {
ll A, B;
cin >> A >> B;
int res = (B - A) % 4;
if (A == ... | //
// main.cpp
// CoderTest
//
// Created by yuya on 2019/07/25.
// Copyright © 2019 yuya. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
ll XOR(ll a, ll b);
int main() {
ll A, B;
cin >> A >> B;
int res = (B - A) % 4;
if (A == ... | [
"expression.operation.binary.add"
] | 911,910 | 911,911 | u422769833 | cpp |
p03104 | // https://atcoder.jp/contests/abc121/tasks/abc121_d
// D - XOR World
// XORは結合と交換が成り立つ
//各位の結果は独立
//各位の値は周期的 -> 剰余でいい感じ -> もっといい感じにできる
//(logN)^2くらい?
// f(A,B) = f(0,A-1)^f(0,B)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll a, b;
ll f0(ll num) {
if (num <= 0)
return 0;
int edge = num... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll a, b;
ll f0(ll num) {
if (num <= 0)
return 0;
int edge = num % 2;
string res = to_string((num + 1) % 4 >= 2);
num >>= 1;
while (num) {
if (num & 1 && !edge)
res += "1";
else
res += "0";
num >>= 1;
}
revers... | [
"misc.opposites",
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 911,920 | 911,919 | u877476774 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define el '\n'
typedef long long ll;
int main() {
ll a, b;
cin >> a >> b;
a--;
ll tes = (a + 3) % 4;
if (tes == 1)
a = 1;
else if (tes == 2)
a++;
else if (tes == 3)
a = 0;
tes = (b + 3) % 4;
if (tes == 1)
b = 1;
else if (tes == 2)
b... | #include <bits/stdc++.h>
using namespace std;
#define el '\n'
typedef long long ll;
int main() {
ll a, b;
cin >> a >> b;
a--;
ll tes = (a + 4) % 4;
if (tes == 1)
a = 1;
else if (tes == 2)
a++;
else if (tes == 3)
a = 0;
tes = (b + 4) % 4;
if (tes == 1)
b = 1;
else if (tes == 2)
b... | [
"literal.number.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 911,925 | 911,926 | u420202803 | cpp |
p03104 | #include <iostream>
using namespace std;
int main() {
long long a, b;
cin >> a >> b;
int n, m;
n = a % 4;
m = (b + 1) % 4;
long long c = 0;
for (int i = 0; i < n; i++) {
c = c ^ (a + i);
}
for (int i = 0; i < m; i++) {
c = c ^ (b - i);
}
cout << c << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
long long a, b;
cin >> a >> b;
int n, m;
n = a % 4;
m = (b + 1) % 4;
long long c = 0;
for (int i = 0; i < (4 - n); i++) {
c = c ^ (a + i);
}
for (int i = 0; i < m; i++) {
c = c ^ (b - i);
}
cout << c << endl;
return 0;
}
| [
"control_flow.loop.for.condition.change"
] | 911,929 | 911,930 | u102334466 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long int
#define MAX 1000000007
using namespace std;
int main(void) {
ll a, b;
cin >> a >> b;
ll ans;
if (a % 2 == 0) {
if (b % 2 == 0)
ans = b + ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long int
#define MAX 1000000007
using namespace std;
int main(void) {
ll a, b;
cin >> a >> b;
ll ans;
if (a % 2 == 0) {
if (b % 2 == 0)
ans = b + ... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 911,931 | 911,932 | u582848517 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long int
#define MAX 1000000007
using namespace std;
int main(void) {
ll a, b;
cin >> a >> b;
ll ans;
if (a % 2 == 0) {
if (b % 2 == 0)
ans = b + ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ll long long int
#define MAX 1000000007
using namespace std;
int main(void) {
ll a, b;
cin >> a >> b;
ll ans;
if (a % 2 == 0) {
if (b % 2 == 0)
ans = b + ... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 911,933 | 911,932 | u582848517 | cpp |
p03104 | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define repe(i, s, n) for (int i = s; i <= n; i++)
using namespace std;
typedef long long ll;
ll f(ll a) {
ll n = (a + 1) / 2;
ll x = (n & 1) ? 1 : 0;
x ^= (a & 1) ? 0 : 1... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define repe(i, s, n) for (int i = s; i <= n; i++)
using namespace std;
typedef long long ll;
ll f(ll a) {
ll n = (a + 1) / 2;
ll x = (n & 1) ? 1 : 0;
x ^= (a & 1) ? 0 : a... | [
"identifier.replace.add",
"literal.replace.remove"
] | 911,942 | 911,943 | u685009987 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
typede... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
typede... | [
"literal.number.change",
"call.arguments.change"
] | 911,946 | 911,947 | u254521846 | cpp |
p03104 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long ret(vector<bool> da) { // 2進法を変換
long long ans = 0, x = 1;
for (int i = 0; i < 40; i++) {
if (da[i])
ans += x;
x *= 2;
}
return ans;
}
vector<bool> mak(long long n) { // 2進法に変換
vector<bool> ans(40);
for ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long ret(vector<bool> da) { // 2進法を変換
long long ans = 0, x = 1;
for (int i = 0; i < 40; i++) {
if (da[i])
ans += x;
x *= 2;
}
return ans;
}
vector<bool> mak(long long n) { // 2進法に変換
vector<bool> ans(40);
for ... | [
"assignment.change"
] | 911,950 | 911,951 | u057079894 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <tuple>
#include <vector>
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return (true);
} else {
return (false);
}
}
template <typename T> bool chmin(T &a, T b) {
... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <tuple>
#include <vector>
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return (true);
} else {
return (false);
}
}
template <typename T> bool chmin(T &a, T b) {
... | [] | 911,960 | 911,961 | u408910484 | cpp |
p03104 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int cnt;
int ans;
if (a % 2 == 1) {
if (b % 2 == 0) {
cnt += (b - a - 1) / 2;
(cnt % 2 == 0 ? ans = a ^ b : ans = a ^ b ^ 1);
} else {
cnt += (b - a) / 2;
(cnt % 2 == 0 ? ans = ... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long a, b;
cin >> a >> b;
long long cnt;
long long ans;
if (a % 2 == 1) {
if (b % 2 == 0) {
cnt += (b - a - 1) / 2;
(cnt % 2 == 0 ? ans = a ^ b : ans = a ^ b ^ 1);
} else {
cnt += (b - a) / 2;
(cnt... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 911,964 | 911,965 | u527806673 | cpp |
p03104 | #include <iostream>
int main() {
unsigned long long A, B;
std::cin >> A >> B;
auto as = A & 1 ? A + 1 : A;
auto be = B & 1 ? B : B - 1;
auto num = be - as + 1;
auto ans = num & 1;
if (A & 1)
ans ^= A;
if (B & 1 == 0)
ans ^= B;
std::cout << ans << std::endl;
return 0;
} | #include <iostream>
int main() {
unsigned long long A, B;
std::cin >> A >> B;
auto as = A & 1 ? A + 1 : A;
auto be = B & 1 ? B : B - 1;
auto num = be - as + 1;
auto ans = (num / 2) & 1;
if (A & 1)
ans ^= A;
if ((B & 1) == 0)
ans ^= B;
std::cout << ans << std::endl;
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 911,966 | 911,967 | u896932701 | cpp |
p03104 | #include <iostream>
using namespace std;
long long A, B;
long long FA, FB;
long long ans;
int main() {
cin >> A >> B;
if (A % 2 == 0) {
if ((A / 2) % 2 == 0)
FA = 0;
else
FA = 1;
} else {
if (((A - 1) / 2) % 2 == 0)
FA = A;
else
FA = (A - 1) ^ 1;
}
if ((B + 1) % 2 == ... | #include <iostream>
using namespace std;
long long A, B;
long long FA, FB;
long long ans;
int main() {
cin >> A >> B;
if (A % 2 == 0) {
if ((A / 2) % 2 == 0)
FA = 0;
else
FA = 1;
} else {
if (((A - 1) / 2) % 2 == 0)
FA = A - 1;
else
FA = (A - 1) ^ 1;
}
if ((B + 1) % 2... | [
"assignment.change"
] | 911,978 | 911,979 | u404710939 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll single(ll X) {
if (X & 1) {
return ((X + 1) / 2) & 1;
} else {
return ((X / 2) & 1) ^ X;
}
}
int main() {
ll A, B;
cin >> A >> B;
if (A == 0) {
cout << single(B) << endl;
} else {
ll ans = single(A) ^ single(B);
c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll single(ll X) {
if (X & 1) {
return ((X + 1) / 2) & 1;
} else {
return ((X / 2) & 1) ^ X;
}
}
int main() {
ll A, B;
cin >> A >> B;
if (A == 0) {
cout << single(B) << endl;
} else {
ll ans = single(A - 1) ^ single(B);
... | [
"assignment.change"
] | 911,980 | 911,981 | u826487371 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll single(ll X) {
if (X & 1) {
return ((X + 1) / 2) & 1;
} else {
return ((X >> 1) & 1) ^ X;
}
}
int main() {
ll A, B;
cin >> A >> B;
if (A == 0) {
ll ans = single(B);
cout << ans << endl;
} else {
ll ans = single(B... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll single(ll X) {
if (X & 1) {
return ((X + 1) >> 1) & 1;
} else {
return ((X >> 1) & 1) ^ X;
}
}
int main() {
ll A, B;
cin >> A >> B;
if (A == 0) {
ll ans = single(B);
cout << ans << endl;
} else {
ll ans = single(... | [
"expression.operation.binary.change"
] | 911,982 | 911,983 | u826487371 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll a, b;
cin >> a >> b;
ll left = 0, right = 0;
if (a & 1) {
left = a;
a++;
}
if ((b & 1) == false) {
right = b;
b--;
}
ll tot = (b - a + 1) / 2;
// cout << left << " "<< right << " ";
ll ans = 0;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll a, b;
cin >> a >> b;
ll left = 0, right = 0;
if (a & 1) {
left = a;
a++;
}
if ((b & 1) == false) {
right = b;
b--;
}
ll tot = (b - a + 1) / 2;
// cout << left << " "<< right << " ";
ll ans = 0;
... | [
"assignment.value.change"
] | 911,984 | 911,985 | u595786324 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
LL w(LL e) {
if (e % 4 == 0)
return e;
if (e % 4 == 1)
return e + 1;
if (e % 4 == 2)
return 1;
if (e % 4 == 3)
return 0;
}
int main() {
LL A, B;
cin >> A >> B;
cout << (w(B) ^ w(A - 1)) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using LL = long long;
LL w(LL e) {
if (e % 4 == 0)
return e;
if (e % 4 == 1)
return 1;
if (e % 4 == 2)
return e + 1;
if (e % 4 == 3)
return 0;
}
int main() {
LL A, B;
cin >> A >> B;
cout << (w(B) ^ w(A - 1)) << endl;
}
| [
"expression.operation.binary.remove"
] | 911,986 | 911,987 | u580402951 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iostream>
#include <list> //双方向リスト
#include <map> //連想配列
#include <queue>
#include <set> //集合
#include <stack>
#include <string>
#include <vector> //動的配列
//小さい順から取り出すヒープ
// priority_queue<ll, vector<ll>, greater<ll> > pque1;
typedef l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iostream>
#include <list> //双方向リスト
#include <map> //連想配列
#include <queue>
#include <set> //集合
#include <stack>
#include <string>
#include <vector> //動的配列
//小さい順から取り出すヒープ
// priority_queue<ll, vector<ll>, greater<ll> > pque1;
typedef l... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 911,988 | 911,989 | u652150585 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B;
cin >> A >> B;
long ans = 0;
if (A % 2 == 0) {
if (B % 2 == 0) {
if (((B - A) / 2) % 2 == 0)
ans = B;
else
ans = 1 ^ B;
} else {
if (((B - A + 1) / 2) % 2 == 0)
ans = 0;
else
ans... | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B;
cin >> A >> B;
long ans = 0;
if (A % 2 == 0) {
if (B % 2 == 0) {
if (((B - A) / 2) % 2 == 0)
ans = B;
else
ans = 1 ^ B;
} else {
if (((B - A + 1) / 2) % 2 == 0)
ans = 0;
else
ans... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 911,992 | 911,993 | u239087789 | cpp |
p03104 | #include <algorithm>
#include <functional>
#include <iostream>
#include <utility>
using namespace std;
int main() {
long int A, B;
cin >> A >> B;
long int xa = 0;
long int xb = 0;
if (A % 4 == 2 || A % 4 == 2)
xa += 1;
if (B % 4 == 2 || B % 4 == 2)
xb += 1;
long int one = 1;
long int i = 2;
w... | #include <algorithm>
#include <functional>
#include <iostream>
#include <utility>
using namespace std;
int main() {
long int A, B;
cin >> A >> B;
long int xa = 0;
long int xb = 0;
if (A % 4 == 2 || A % 4 == 1)
xa += 1;
if (B % 4 == 2 || B % 4 == 1)
xb += 1;
long int one = 1;
long int i = 2;
w... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 912,023 | 912,024 | u650243369 | cpp |
p03104 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define range(i, n) for (int i = 0; i < n; i++)
#define rrange(i, n) for (int i = n - 1; i >= 0; i--)
typedef long long int ll;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define range(i, n) for (int i = 0; i < n; i++)
#define rrange(i, n) for (int i = n - 1; i >= 0; i--)
typedef long long int ll;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if... | [
"control_flow.branch.if.condition.change"
] | 912,028 | 912,029 | u991974907 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
... | [
"assignment.change"
] | 912,030 | 912,031 | u938945369 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | [
"assignment.change",
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 912,047 | 912,048 | u617525345 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | [
"expression.operation.binary.remove",
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 912,049 | 912,048 | u617525345 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | [
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 912,050 | 912,048 | u617525345 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | [
"literal.number.change",
"control_flow.loop.condition.change",
"expression.operation.binary.remove",
"assignment.value.change",
"expression.operation.binary.change"
] | 912,051 | 912,048 | u617525345 | cpp |
p03104 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 100000000
#define ll long long int
using namespace std;
int main() {
ll A, B;
cin >> A >> B;
A = A - 1 > 0 ? A - 1 : 0;
l... | [
"literal.number.change",
"control_flow.loop.condition.change",
"expression.operation.binary.remove",
"assignment.value.change",
"expression.operation.binary.change"
] | 912,052 | 912,048 | u617525345 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vvd = vector<vd>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll>;
usin... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vvd = vector<vd>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll>;
usin... | [] | 912,053 | 912,054 | u364618491 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vvd = vector<vd>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll>;
usin... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vvd = vector<vd>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll>;
usin... | [
"expression.unary.arithmetic.add"
] | 912,055 | 912,056 | u364618491 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll A, B;
scanf("%lld%lld", &A, &B);
if (A % 2 == 0 && B % 2 == 1) {
printf("%lld\n", ((B - A) / 2) % 2);
}
if (A % 2 == 0 && B % 2 == 0) {
printf("%lld\n", B ^ (((B - A) / 2) % 2));
}
if (A % 2 == 1 && B % 2 == 1) {... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll A, B;
scanf("%lld%lld", &A, &B);
if (A % 2 == 0 && B % 2 == 1) {
printf("%lld\n", ((B - A + 1) / 2) % 2);
}
if (A % 2 == 0 && B % 2 == 0) {
printf("%lld\n", B ^ (((B - A) / 2) % 2));
}
if (A % 2 == 1 && B % 2 ==... | [
"expression.operation.binary.add"
] | 912,066 | 912,067 | u697421413 | cpp |
p03104 | #include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
template <class S, class T> using P = pair<S, T>;
template <class S, class T, class U> using TP = tuple<S, T, U>;
using ll = long long;
using ull = unsi... | #include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
template <class S, class T> using P = pair<S, T>;
template <class S, class T, class U> using TP = tuple<S, T, U>;
using ll = long long;
using ull = unsi... | [
"call.arguments.add",
"call.arguments.change"
] | 912,073 | 912,074 | u172929647 | cpp |
p03104 | #include <stdio.h>
#include <stdlib.h>
long p[111111], a[111111], b[111111];
int compare(const void *c, const void *d) {
return a[*(long *)c] - a[*(long *)d];
}
int main() {
long a, b, i, ans;
scanf("%ld%ld", &a, &b);
if (a % 2 == 0) {
if ((b - a) % 4 == 0)
ans = b;
if ((b - a) % 4 == 1)
ans... | #include <stdio.h>
#include <stdlib.h>
long p[111111], a[111111], b[111111];
int compare(const void *c, const void *d) {
return a[*(long *)c] - a[*(long *)d];
}
int main() {
long a, b, i, ans;
scanf("%ld%ld", &a, &b);
if (a % 2 == 0) {
if ((b - a) % 4 == 0)
ans = b;
if ((b - a) % 4 == 1)
ans... | [] | 912,077 | 912,078 | u933068010 | cpp |
p03104 | #include <stdio.h>
#include <stdlib.h>
long p[111111], a[111111], b[111111];
int compare(const void *c, const void *d) {
return a[*(long *)c] - a[*(long *)d];
}
int main() {
long a, b, pa[44], pb[44], i, ans = 0, ca, cb, t;
scanf("%ld%ld", &a, &b);
i = 0;
ca = a;
cb = b;
while (ca != 0) {
pa[i] = ca %... | #include <stdio.h>
#include <stdlib.h>
long p[111111], a[111111], b[111111];
int compare(const void *c, const void *d) {
return a[*(long *)c] - a[*(long *)d];
}
int main() {
long a, b, pa[44], pb[44], i, ans = 0, ca, cb, t;
scanf("%ld%ld", &a, &b);
i = 0;
ca = a;
cb = b;
while (ca != 0) {
pa[i] = ca %... | [
"expression.unary.arithmetic.add"
] | 912,079 | 912,080 | u933068010 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.