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 9
values |
|---|---|---|---|---|---|---|---|
p02994 | #include <algorithm>
#include <forward_list>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <vector>
#define mod 1000000007
using namespace std;
int main() {
int N, L;
cin >> N >> L;
if (L <= 0 && N + L - 1 < 0) { // 0をまたがずに負からはじまる
cout << (N - 1) * ... | #include <algorithm>
#include <forward_list>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <vector>
#define mod 1000000007
using namespace std;
int main() {
int N, L;
cin >> N >> L;
if (L <= 0 && N + L - 1 <= 0) { // 0をまたがずに負からはじまる
cout << (N - 1) *... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 804,221 | 804,220 | u998203751 | cpp |
p02994 | #include <algorithm>
#include <forward_list>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <vector>
#define mod 1000000007
using namespace std;
int main() {
int N, L;
cin >> N >> L;
if (L <= 0 && N + L - 1 <= 0) { // 0をまたがずに負からはじまる
cout << (N - 1) *... | #include <algorithm>
#include <forward_list>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <vector>
#define mod 1000000007
using namespace std;
int main() {
int N, L;
cin >> N >> L;
if (L <= 0 && N + L - 1 <= 0) { // 0をまたがずに負からはじまる
cout << (N - 1) *... | [
"expression.operation.binary.remove",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 804,223 | 804,220 | u998203751 | cpp |
p02994 | #include <algorithm>
#include <forward_list>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <vector>
#define mod 1000000007
using namespace std;
int main() {
int N, L;
cin >> N >> L;
if (L < 0 && N + L - 1 < 0) { // 0をまたがずに負からはじまる
cout << (N - 1) * (... | #include <algorithm>
#include <forward_list>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <vector>
#define mod 1000000007
using namespace std;
int main() {
int N, L;
cin >> N >> L;
if (L <= 0 && N + L - 1 <= 0) { // 0をまたがずに負からはじまる
cout << (N - 1) *... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 804,224 | 804,220 | u998203751 | cpp |
p02994 |
#include "iostream"
#include "vector"
using namespace std;
int main() {
int N = 0;
int L = 0;
cin >> N;
cin >> L;
int sum = 0;
for (int i = 1; i <= N; ++i) {
auto temp = L + i - 1;
sum += temp;
}
int tsumamiIndex = 0;
if (L >= 1) {
tsumamiIndex = 1;
} else if (L < -N) {
tsumamiI... |
#include "iostream"
#include "vector"
using namespace std;
int main() {
int N = 0;
int L = 0;
cin >> N;
cin >> L;
int sum = 0;
for (int i = 1; i <= N; ++i) {
auto temp = L + i - 1;
sum += temp;
}
int tsumamiIndex = 0;
if (L >= 1) {
tsumamiIndex = 1;
} else if (L <= -N) {
tsumami... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 804,227 | 804,228 | u884331834 | cpp |
p02994 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n, l;
std::cin >> n >> l;
int first = l, last = l + n - 1;
int sum;
if (n % 2) {
sum = (first + last) * (n / 2) + (first + last) / 2;
} else {
sum = (first + last) *... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n, l;
std::cin >> n >> l;
int first = l, last = l + n - 1;
int sum;
if (n % 2) {
sum = (first + last) * (n / 2) + (first + last) / 2;
} else {
sum = (first + last) *... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 804,229 | 804,230 | u832726997 | cpp |
p02994 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define whole(f, x, ...) \
([&](decltype((x)) whole) { \
return (f)(begin(whole), end(w... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define whole(f, x, ...) \
([&](decltype((x)) whole) { \
return (f)(begin(whole), end(w... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 804,231 | 804,232 | u369212307 | cpp |
p02994 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(a) (a).begin(), (a).end()
#define ll long long
int main() {
int N, L;
cin >> N >> L;
ll ans = N * (N - 1) / 2 + L * N;
if (L <= 0 && L - N + 1 >= 0)
cout << ans << endl;
else if (L > 0)
cout << an... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(a) (a).begin(), (a).end()
#define ll long long
int main() {
int N, L;
cin >> N >> L;
ll ans = N * (N - 1) / 2 + L * N;
if (L <= 0 && L + N - 1 >= 0)
cout << ans << endl;
else if (L > 0)
cout << an... | [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 804,235 | 804,236 | u154756110 | cpp |
p02994 | // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define BOOST \
ios_base::sync_with_stdi... | // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define BOOST \
ios_base::sync_with_stdi... | [
"call.add",
"call.arguments.change"
] | 804,239 | 804,240 | u691350599 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const long long INF = 1e18;
#define len(x) ((int)(x).size())
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const long long INF = 1e18;
#define len(x) ((int)(x).size())
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i =... | [
"identifier.change",
"expression.operation.binary.change"
] | 804,245 | 804,246 | u043589043 | cpp |
p02995 | #include <iostream>
using namespace std;
long long GCD(long long x, long long y) {
if (x < y)
swap(x, y);
if (x % y == 0) {
return y;
} else {
return (y, x % y);
}
}
long long num(long long n, long long c, long long d) {
long long G = GCD(c, d);
long long L = c / G * d;
return n - n / c - n /... | #include <iostream>
using namespace std;
long long GCD(long long x, long long y) {
if (x < y)
swap(x, y);
if (x % y == 0) {
return y;
} else {
return GCD(y, x % y);
}
}
long long num(long long n, long long c, long long d) {
long long G = GCD(c, d);
long long L = c / G * d;
return n - n / c - ... | [
"call.add",
"function.return_value.change"
] | 804,249 | 804,250 | u682413606 | cpp |
p02995 | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(I, a, b) for (int i = (a); i < (b); ++i)
using namespace std;
using ll = long long;
int main() {
ll a, b;
cin >> a >> b;
ll c, d;
cin >> c >> d;
ll sum = 0, dif = 0;
ll gc = gcd(c, d);
ll e = d ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(I, a, b) for (int i = (a); i < (b); ++i)
using namespace std;
using ll = long long;
int main() {
ll a, b;
cin >> a >> b;
ll c, d;
cin >> c >> d;
a--;
ll sum = 0, dif = 0;
ll gc = gcd(c, d);
ll ... | [
"expression.unary.arithmetic.add",
"expression.operation.binary.remove"
] | 804,251 | 804,252 | u514896542 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
ll a, b, c, d;
cin >> a... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
ll a, b, c, d;
cin >> a... | [
"identifier.change",
"expression.operation.binary.change"
] | 804,257 | 804,258 | u801916231 | cpp |
p02995 | #include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
ll f(ll x, ll y) {
if (x % y == 0) {
return y;
... | #include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
ll f(ll x, ll y) {
if (x % y == 0) {
return y;
... | [
"assignment.change"
] | 804,259 | 804,260 | u936877713 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define chmax(x, y) x = max(x, y);
ll a, b;
ll f(ll c) {
ll res = b / c - (a - 1) / c;
return res;
}
int main() {
ll c, d;
cin >> a >> b >> c >> d;
ll cd = c * d / _... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define chmax(x, y) x = max(x, y);
ll a, b;
ll f(ll c) {
ll res = b / c - (a - 1) / c;
return res;
}
int main() {
ll c, d;
cin >> a >> b >> c >> d;
ll cd = c * d / _... | [
"expression.operation.binary.remove"
] | 804,263 | 804,264 | u005006157 | cpp |
p02995 | // ConsoleApplication1.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string... | // ConsoleApplication1.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string... | [
"variable_declaration.type.primitive.change"
] | 804,274 | 804,275 | u065467277 | cpp |
p02995 | #include <algorithm>
#include <ciso646>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;
ll Max = 10 + 1e12;
int N = ... | #include <algorithm>
#include <ciso646>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;
ll Max = 10 + 1e12;
int N = ... | [] | 804,281 | 804,282 | u510989601 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define rep2(i, s, n) for (long long i = (s); i < (long long)(n); i++)
#define repi(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2i(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define rep2(i, s, n) for (long long i = (s); i < (long long)(n); i++)
#define repi(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2i(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(... | [] | 804,290 | 804,291 | u994630752 | cpp |
p02995 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
static const double PI = acos(-1);
ll lcm(ll x, ll y) {
ll ans;
ans = x / __gcd(x, y) * y;
return ans;
}
int main() {
ll a, b;
ll c,... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
static const double PI = acos(-1);
ll lcm(ll x, ll y) {
ll ans;
ans = x / __gcd(x, y) * y;
return ans;
}
int main() {
ll a, b;
ll c,... | [] | 804,302 | 804,303 | u849151695 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
using ll = long long;
string char_to_string(char val) { return string(1, val); }
int char_to_int(char val) { return val - '0'; }
template <class T> inline bool chmin(T ... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
using ll = long long;
string char_to_string(char val) { return string(1, val); }
int char_to_int(char val) { return val - '0'; }
template <class T> inline bool chmin(T ... | [] | 804,325 | 804,326 | u308463793 | cpp |
p02995 | #include <bits/stdc++.h>
#define speed_up \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define ll long long
#define ara(A, N) sort(A, A + N)
#define rev(A, N) sort(A, A + N, greater<long long>())
using na... | #include <bits/stdc++.h>
#define speed_up \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define ll long long
#define ara(A, N) sort(A, A + N)
#define rev(A, N) sort(A, A + N, greater<long long>())
using na... | [
"variable_declaration.type.change"
] | 804,331 | 804,332 | u782695198 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(ll a, ll b) {
if (0 < b)
return gcd(b, a % b);
else
return a;
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll f(ll a, ll b, ll c) {
int ans = a;
ans -= a / b;
ans -= ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(ll a, ll b) {
if (0 < b)
return gcd(b, a % b);
else
return a;
// return b ? gcd(b, a%b) : a;
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll f(ll a, ll b, ll c) {
ll an... | [
"variable_declaration.type.change"
] | 804,372 | 804,373 | u442855610 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll c, ll d) { return c * d / gcd(c, d); }
ll f(ll x, ll c, ll d) {
ll ans = x;
ans -= x / c;
ans -= x / d;
ans += lcm(c, d);
r... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll c, ll d) { return c * d / gcd(c, d); }
ll f(ll x, ll c, ll d) {
ll ans = x;
ans -= x / c;
ans -= x / d;
ans += x / lcm(c, d);
... | [
"assignment.change"
] | 804,374 | 804,375 | u442855610 | cpp |
p02995 | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n, k) for (int i = n; i < k; i++)
#define P(p) cout << (p) << endl;
#define sP(p) cout << setprecision(24) << fixed << p << endl;
#define vi vector<int>
#define printv(v) \
... | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n, k) for (int i = n; i < k; i++)
#define P(p) cout << (p) << endl;
#define sP(p) cout << setprecision(24) << fixed << p << endl;
#define vi vector<int>
#define printv(v) \
... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 804,383 | 804,384 | u687470137 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(s, t) \
for (int s = 0; s < t; s++) \
;
using namespace std;
using ll = long long;
int gcd(ll c, ll d) {
if (d == 0)
return c;
return gcd(d, c % d);
}
int lc... | #include <bits/stdc++.h>
#define rep(s, t) \
for (int s = 0; s < t; s++) \
;
using namespace std;
using ll = long long;
ll gcd(ll c, ll d) {
if (d == 0)
return c;
return gcd(d, c % d);
}
ll lcm(... | [] | 804,404 | 804,405 | u712098017 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
// 131_C
long long A, B, CD;
int C, D;
int gcd(int c, int d) {
if (c % d == 0)
return d;
else
return gcd(d, c % d);
}
int main() {
cin >> A >> B >> C >> D;
long long a, b;
CD = C * D / gcd(C, D);
b = (B / C) + (B / D) - (B / CD);
a = ((A - 1) / C) ... | #include <bits/stdc++.h>
using namespace std;
// 131_C
long long A, B, CD;
long long C, D;
int gcd(int c, int d) {
if (c % d == 0)
return d;
else
return gcd(d, c % d);
}
int main() {
cin >> A >> B >> C >> D;
long long a, b;
CD = C * D / gcd(C, D);
b = (B / C) + (B / D) - (B / CD);
a = ((A - 1)... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,418 | 804,419 | u455586058 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
using ll = long long;
const int INF = 1 << 30;
const ll INFll = 1LL << 62;
const int mod = int(1e9) + 7;
// const int mod=998244353;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using ld = long double;
using V = vector<int>;
using Vl... | #include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
using ll = long long;
const int INF = 1 << 30;
const ll INFll = 1LL << 62;
const int mod = int(1e9) + 7;
// const int mod=998244353;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using ld = long double;
using V = vector<int>;
using Vl... | [
"identifier.change",
"expression.operation.binary.change"
] | 804,426 | 804,427 | u525008368 | cpp |
p02995 | #include <cstdint>
#include <iostream>
#include <numeric>
using namespace std;
int main() {
int64_t a, b, c, d;
cin >> a >> b >> c >> d;
// CとDの最小公倍数
auto lcmn = lcm(c, d);
// A以上、B未満の間に存在するCの倍数の数 (B以下に存在する倍数の数 -
// A未満に存在する倍数の数)
auto cn = b / c - (a - 1) / c;
// A以上、B未満の間に存在するDの倍数の数
auto dn = b / d... | #include <cstdint>
#include <iostream>
#include <numeric>
using namespace std;
int main() {
int64_t a, b, c, d;
cin >> a >> b >> c >> d;
// CとDの最小公倍数
auto lcmn = lcm(c, d);
// A以上、B未満の間に存在するCの倍数の数 (B以下に存在する倍数の数 -
// A未満に存在する倍数の数)
auto cn = b / c - (a - 1) / c;
// A以上、B未満の間に存在するDの倍数の数
auto dn = b / d... | [] | 804,428 | 804,429 | u967915578 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;
int main() {
ll a, b, c, d, lcm;
cin >> a >> b >> c >> d;
lcm = c / __gcd(c, d) * d;
// cerr << "lcm" << lcm << endl;
ll e = b;
e -= b / c;
e -= b / d;
e += b / lcm;
ll f = a - 1;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;
int main() {
ll a, b, c, d, lcm;
cin >> a >> b >> c >> d;
lcm = c / __gcd(c, d) * d;
// cerr << "lcm" << lcm << endl;
ll e = b;
e -= b / c;
e -= b / d;
e += b / lcm;
ll f = a - 1;
... | [
"expression.operator.change"
] | 804,432 | 804,433 | u617826263 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void) {
ll A, B, C, D;
cin >> A >> B >> C >> D;
auto f = [&](ll N) { return N - (N / C + N / D - N / gcd... | #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void) {
ll A, B, C, D;
cin >> A >> B >> C >> D;
auto f = [&](ll N) { return N - (N / C + N / D - N / lcm... | [
"identifier.change",
"call.function.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 804,438 | 804,439 | u437633151 | cpp |
p02995 | #include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#include <algorithm>
#include <map>
#include <math.h>
#include <queue>
#include <set>
int gcd(int a, int b) {
if (a % b == 0) {
return (b);
} else {
ret... | #include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#include <algorithm>
#include <map>
#include <math.h>
#include <queue>
#include <set>
ll gcd(ll a, ll b) {
if (a % b == 0) {
return (b);
} else {
return... | [] | 804,440 | 804,441 | u872982453 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
// cout << setprecision(20) <<
ll gcd(ll x, ll y) { return y ? __gcd(y, x % y) : x; }
ll lcm(ll x, ll y) { return x / __gcd(x, y) * y; }
ll count(ll R, ll mul) { return floor((double)R / mul); }
int main() {
ll A, B, C... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
// cout << setprecision(20) <<
ll gcd(ll x, ll y) { return y ? __gcd(y, x % y) : x; }
ll lcm(ll x, ll y) { return x / __gcd(x, y) * y; }
ll count(ll R, ll mul) { return R / mul; }
int main() {
ll A, B, C, D;
cin >> A... | [
"call.remove",
"call.arguments.change"
] | 804,444 | 804,445 | u185821641 | cpp |
p02995 | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tup... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tup... | [] | 804,450 | 804,451 | u944804272 | cpp |
p02995 | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tup... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tup... | [
"literal.number.change",
"variable_declaration.value.change"
] | 804,452 | 804,451 | u944804272 | cpp |
p02995 | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tup... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tup... | [
"literal.number.change",
"variable_declaration.value.change"
] | 804,453 | 804,451 | u944804272 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
typedef long long ll;
ll f(ll x, int C, int D) {
ll res = x;
res -= x / C;
res -= x / D;
res += x / lcm(C, D);
return res;
}
int main() {
ll A, B;
int C, D;
cin >> A >> B >> C >> D;
ll ans = f(B, C, D) - f... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
typedef long long ll;
ll f(ll x, ll C, ll D) {
ll res = x;
res -= x / C;
res -= x / D;
res += x / lcm(C, D);
return res;
}
int main() {
ll A, B;
ll C, D;
cin >> A >> B >> C >> D;
ll ans = f(B, C, D) - f(A ... | [
"variable_declaration.type.change"
] | 804,457 | 804,458 | u714624983 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define endl '\n'
#define pii pair<int, int>
#define all(a) a.begin(), a.end()
template <typename T> inline T gcd(T a, T b) {
while (b != 0)
swap(b, a %= b);
return a;
}
ll f(ll n, ll x) {
if (n >= 0)
retur... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define endl '\n'
#define pii pair<int, int>
#define all(a) a.begin(), a.end()
template <typename T> inline T gcd(T a, T b) {
while (b != 0)
swap(b, a %= b);
return a;
}
ll f(ll n, ll x) {
if (n >= 0)
retur... | [
"expression.operation.binary.add"
] | 804,461 | 804,462 | u324973749 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B;
cin >> A >> B;
int C, D;
cin >> C >> D;
int ans = 0;
ans += B / C;
ans += B / D;
ans -= (A - 1) / C;
ans -= (A - 1) / D;
long S = gcd(C, D);
ans -= ((B / C) * S) / D;
ans += (((A - 1) / C) * S) / D;
cout << B - A + 1 - ans ... | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B;
cin >> A >> B;
long C, D;
cin >> C >> D;
long ans = 0;
ans += B / C;
ans += B / D;
ans -= (A - 1) / C;
ans -= (A - 1) / D;
long S = gcd(C, D);
ans -= ((B / C) * S) / D;
ans += (((A - 1) / C) * S) / D;
cout << B - A + 1 - an... | [
"variable_declaration.type.primitive.change"
] | 804,480 | 804,481 | u430394202 | cpp |
p02995 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
bool compare(int i, int j) { return i > j; }
long long num(long long A, long long B, long long M) {
// Add 1 explicitly as A is divisible by M
if (A % M == 0)
return (B / M) - (A / M) + 1;
// A is not divisible by M
return (B / M) - (A /... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
bool compare(int i, int j) { return i > j; }
long long num(long long A, long long B, long long M) {
// Add 1 explicitly as A is divisible by M
if (A % M == 0)
return (B / M) - (A / M) + 1;
// A is not divisible by M
return (B / M) - (A /... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 804,482 | 804,483 | u863370423 | cpp |
p02995 | #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 int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
/* function */
... | #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 int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
/* function */
... | [
"function.return_value.change"
] | 804,484 | 804,485 | u603234915 | cpp |
p02995 | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 804,492 | 804,493 | u633066470 | cpp |
p02995 | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef ... | [
"function.return_value.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 804,494 | 804,493 | u633066470 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll ans = b - a + 1;
ll cd = lcm(c, d);
ll cnt =
b / c + b / d - ((a - 1) / c + (a - 1) / d) - (b / cd + ((a ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll ans = b - a + 1;
ll cd = lcm(c, d);
ll cnt =
b / c + b / d - ((a - 1) / c + (a - 1) / d) - (b / cd - (a -... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 804,495 | 804,496 | u735909278 | cpp |
p02995 | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <st... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <st... | [
"expression.unary.arithmetic.add",
"expression.operation.binary.remove"
] | 804,508 | 804,509 | u631558039 | cpp |
p02995 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using namespace std;
constexpr int MOD = 1e9... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using namespace std;
constexpr int MOD = 1e9... | [] | 804,521 | 804,522 | u835805357 | cpp |
p02995 | #include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<long long, long long> P;
typedef pair<long long, P> P1;
typedef pair<P, P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#def... | #include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<long long, long long> P;
typedef pair<long long, P> P1;
typedef pair<P, P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#def... | [] | 804,523 | 804,524 | u069521477 | cpp |
p02995 | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
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) {
if (a < b) {
a = b;
return ... | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
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) {
if (a < b) {
a = b;
return ... | [] | 804,525 | 804,526 | u539011156 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {
if (a < b)
return gcd(b, a);
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll f(ll x, int c, int d) {
ll res = x;
res -= x / c;
res -= x / d;
res +=... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {
if (a < b)
return gcd(b, a);
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll f(ll x, ll c, ll d) {
ll res = x;
res -= x / c;
res -= x / d;
res += x... | [
"variable_declaration.type.change"
] | 804,531 | 804,532 | u161892443 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) \
{ \
for (auto i : x) { ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) \
{ \
for (auto i : x) { ... | [
"variable_declaration.type.change"
] | 804,535 | 804,536 | u600402037 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, j, n) for (int i = (j); i < (n); i++)
#define per(i, n, j) for (int i = (n); i >= (j); i--)
using ll = long long;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(... | #include <bits/stdc++.h>
#define rep(i, j, n) for (int i = (j); i < (n); i++)
#define per(i, n, j) for (int i = (n); i >= (j); i--)
using ll = long long;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(... | [
"expression.operator.change"
] | 804,547 | 804,548 | u437739548 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll c, ll d) {
if (d == 0) {
return c;
}
gcd(d, c % d);
}
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll c1 = (a + c - 1) / c;
ll c2 = b / c;
ll d1 = (a + c - 1) / d;
ll d2 = b / d;
ll Gcd = gcd(min(c, d), max(c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll c, ll d) {
if (d == 0) {
return c;
}
gcd(d, c % d);
}
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll c1 = (a + c - 1) / c;
ll c2 = b / c;
ll d1 = (a + d - 1) / d;
ll d2 = b / d;
ll Gcd = gcd(min(c, d), max(c... | [
"identifier.change",
"expression.operation.binary.change"
] | 804,549 | 804,550 | u166378830 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
ll GCD(ll c, ll d) {
if (c < d)
swap(c, d);
if (c % d == 0)
return c;
else {
return GCD(c % d, d);
}
}
int main() {
ll a... | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
ll GCD(ll c, ll d) {
if (c < d)
swap(c, d);
if (c % d == 0)
return d;
else {
return GCD(c % d, d);
}
}
int main() {
ll a... | [
"identifier.change",
"function.return_value.change"
] | 804,563 | 804,564 | u007463213 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
a--;
ll e = __gcd(c, d);
ll ans = b - (b / c) - (b / d) + (b / e) - a + (a / c) + (a / d) - (a / e);
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
a--;
ll e = c * d / __gcd(c, d);
ll ans = b - (b / c) - (b / d) + (b / e) - a + (a / c) + (a / d) - (a / e);
cout << ans << endl;
} | [
"assignment.change"
] | 804,573 | 804,574 | u582684800 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
#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 FOR(i, f, t) for (int i = int(f); i <= int(t); i++)
#define RFOR(i, f, t) for (int i = int(f); i >= int(t); i--)
#de... | #include <bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
#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 FOR(i, f, t) for (int i = int(f); i <= int(t); i++)
#define RFOR(i, f, t) for (int i = int(f); i >= int(t); i--)
#de... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 804,605 | 804,606 | u644495446 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
#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 FOR(i, f, t) for (int i = int(f); i <= int(t); i++)
#define RFOR(i, f, t) for (int i = int(f); i >= int(t); i--)
#de... | #include <bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
#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 FOR(i, f, t) for (int i = int(f); i <= int(t); i++)
#define RFOR(i, f, t) for (int i = int(f); i >= int(t); i--)
#de... | [
"call.arguments.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 804,607 | 804,606 | u644495446 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;... | [
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 804,643 | 804,644 | u981759938 | cpp |
p02995 | #define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
using namespace std;
// loops
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define OneToN(i, n) for (ll i = 1; i < (ll)(n + 1); i++)
#define ZeroToN(i, n) for (ll i = 0; i < (ll)(n + 1); i++)
#define AToB(i, a... | #define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
using namespace std;
// loops
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define OneToN(i, n) for (ll i = 1; i < (ll)(n + 1); i++)
#define ZeroToN(i, n) for (ll i = 0; i < (ll)(n + 1); i++)
#define AToB(i, a... | [
"expression.unary.arithmetic.add",
"expression.operation.binary.remove"
] | 804,661 | 804,662 | u105001881 | cpp |
p02995 |
// C
#include <bits/stdc++.h>
using namespace std;
long long A, B, C, D;
// nで割り切れるものの個数
int div(long long n) {
long long ans;
ans = B / n - (A - 1) / n;
return ans;
}
int LCM(long long a, long long b) {
long long tmp, r;
long long x = a * b;
if (a < b) {
tmp = a;
a = b;
b = tmp;
}
r = a... |
// C
#include <bits/stdc++.h>
using namespace std;
long long A, B, C, D;
// nで割り切れるものの個数
long long div(long long n) {
long long ans;
ans = B / n - (A - 1) / n;
return ans;
}
long long LCM(long long a, long long b) {
long long tmp, r;
long long x = a * b;
if (a < b) {
tmp = a;
a = b;
b = tmp;
... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,663 | 804,664 | u583701239 | cpp |
p02995 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long int gcd(long long int c, long long int d) {
if (max(c, d) % min(c, d) == 0)
return min(c, d);
return gcd(min(c, d), max(c, d) % min(c, d));
}
long long int LCM(long long int c, long long int d) {
return c * d / gcd(c... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long int gcd(long long int c, long long int d) {
if (max(c, d) % min(c, d) == 0)
return min(c, d);
return gcd(min(c, d), max(c, d) % min(c, d));
}
long long int LCM(long long int c, long long int d) {
return c * d / gcd(c... | [
"variable_declaration.type.widen.change"
] | 804,680 | 804,681 | u053035261 | cpp |
p02995 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long int gcd(long long int c, long long int d) {
if (max(c, d) % min(c, d) == 0)
return min(c, d);
return gcd(min(c, d), max(c, d) % min(c, d));
}
long long int LCM(long long int c, long long int d) {
return c * d / gcd(c... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long int gcd(long long int c, long long int d) {
if (max(c, d) % min(c, d) == 0)
return min(c, d);
return gcd(min(c, d), max(c, d) % min(c, d));
}
long long int LCM(long long int c, long long int d) {
return c * d / gcd(c... | [
"variable_declaration.type.widen.change"
] | 804,682 | 804,681 | u053035261 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<typename T> using gpp_set = tree<T, null_type, less<T>, rb_tree_tag,
tree_order_statistics_node_update>; template<typename T, typename L> using
gpp_map = tre... | #include <bits/stdc++.h>
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<typename T> using gpp_set = tree<T, null_type, less<T>, rb_tree_tag,
tree_order_statistics_node_update>; template<typename T, typename L> using
gpp_map = tre... | [] | 804,699 | 804,700 | u088608223 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
int main() {
long a, b, c, d, total = 0;
cin >> a >> b >> c >> d;
long a1 = (a - 1) / c, a2 = (a - 1) / d;
long b1 = b / c, b2 = b / d;
long r, cr = c, dr = d;
if (cr < dr) {
swap(cr, dr);
}
r = cr % dr;
while (r > 0) {
cr = dr;
dr = r; //最大... | #include <bits/stdc++.h>
using namespace std;
int main() {
long a, b, c, d, total = 0;
cin >> a >> b >> c >> d;
long a1 = (a - 1) / c, a2 = (a - 1) / d;
long b1 = b / c, b2 = b / d;
long r, cr = c, dr = d;
if (cr < dr) {
swap(cr, dr);
}
r = cr % dr;
while (r > 0) {
cr = dr;
dr = r; //最大... | [] | 804,701 | 804,702 | u475471747 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, s, e) for (int i = s; i < e; ++i)
#define sort_(a) stable_sort(a.begin(), a.end())
#define rsort(a) stable_sort(a.rbegin(), a.rend())
#define sum(a) accumulate(a.begin(), a.end(), 0LL)
#define join(a, d) ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, s, e) for (int i = s; i < e; ++i)
#define sort_(a) stable_sort(a.begin(), a.end())
#define rsort(a) stable_sort(a.rbegin(), a.rend())
#define sum(a) accumulate(a.begin(), a.end(), 0LL)
#define join(a, d) ... | [] | 804,707 | 804,708 | u125205981 | cpp |
p02995 | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#include <functional>
#incl... | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#include <functional>
#incl... | [
"expression.operation.binary.remove"
] | 804,709 | 804,710 | u683078179 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gd(ll x, ll y) {
if (x <= y)
return gd(y, x);
if (x % y == 0)
return y;
else
return gd(min(x, y), max(x, y) % min(x, y));
}
ll lm(ll x, ll y) { return (x * y) / gd(x, y); }
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gd(ll x, ll y) {
if (x < y)
return gd(y, x);
if (x % y == 0)
return y;
else
return gd(min(x, y), max(x, y) % min(x, y));
}
ll lm(ll x, ll y) { return (x * y) / gd(x, y); }
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 804,717 | 804,718 | u573433204 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
ll findGCD(ll c, ll d) {
if (d == 0)
return c;
return findGCD(d, c % d);
}
ll findLCM(ll c, ll d) { return c * d / findGCD(c, d); }
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
ll findGCD(ll c, ll d) {
if (d == 0)
return c;
return findGCD(d, c % d);
}
ll findLCM(ll c, ll d) { return c * d / findGCD(c, d); }
int main() {
ll a, b, c, d;
cin >> a >> b >> c >> d;
... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 804,727 | 804,728 | u862412671 | cpp |
p02995 | #include <iostream>
//#include <iomanip>
//#include <string>
//#include <vector>
//#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <deque>
//#include <bitset>
//#include <math.h>
using namespace std;
using ll = long long;
// using ld = long double ;
// using vll... | #include <iostream>
//#include <iomanip>
//#include <string>
//#include <vector>
//#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <deque>
//#include <bitset>
//#include <math.h>
using namespace std;
using ll = long long;
// using ld = long double ;
// using vll... | [] | 804,735 | 804,736 | u993074316 | cpp |
p02995 | #include <iostream>
using namespace std;
long long gcd(long long a, long long b) {
long long temp;
while (a % b != 0) {
temp = b;
b = a % b;
a = temp;
}
return b;
}
int main() {
long long A, B, C, D;
cin >> A >> B >> C >> D;
int count = 0;
count += (B / C) - ((A - 1) / C);
count += (B /... | #include <iostream>
using namespace std;
long long gcd(long long a, long long b) {
long long temp;
while (a % b != 0) {
temp = b;
b = a % b;
a = temp;
}
return b;
}
int main() {
long long A, B, C, D;
cin >> A >> B >> C >> D;
long long count = 0;
count += (B / C) - ((A - 1) / C);
count +... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,737 | 804,738 | u041513069 | cpp |
p02995 | #include <iostream>
using namespace std;
long long gcd(long long a, long long b) {
long long temp;
while (a % b != 0) {
temp = b;
b = a % b;
a = temp;
}
return b;
}
int main() {
long long A, B, C, D;
cin >> A >> B >> C >> D;
int count = 0;
count += (B / C) - ((A - 1) / C);
count += (B /... | #include <iostream>
using namespace std;
long long gcd(long long a, long long b) {
long long temp;
while (a % b != 0) {
temp = b;
b = a % b;
a = temp;
}
return b;
}
int main() {
long long A, B, C, D;
cin >> A >> B >> C >> D;
long long count = 0;
count += (B / C) - ((A - 1) / C);
count +... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,739 | 804,740 | u041513069 | cpp |
p02995 | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
const double PI = acos(-1);
long gcd(long a, long b) {
if (b > a) {
a = a ^ b;
b = a ^ ... | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
const double PI = acos(-1);
long gcd(long a, long b) {
if (b > a) {
a = a ^ b;
b = a ^ ... | [] | 804,747 | 804,748 | u470123394 | cpp |
p02995 | //#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using na... | //#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using na... | [
"identifier.change",
"call.function.change"
] | 804,751 | 804,752 | u081029414 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
if (y == 0)
return x;
else
return gcd(y, x % y);
}
int main() {
long long a, b, c, d;
cin >> a >> b >> c >> d;
long long ans = b - b / c - b / d + b / (c * d / gcd(c, d));
ans -= a - a / c - c / d + a / (c * d ... | #include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
if (y == 0)
return x;
else
return gcd(y, x % y);
}
int main() {
long long a, b, c, d;
cin >> a >> b >> c >> d;
a--;
long long ans = b - b / c - b / d + b / (c * d / gcd(c, d));
ans -= a - a / c - a / d + a / ... | [
"expression.unary.arithmetic.add",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 804,757 | 804,758 | u336145516 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using p = pair<int, int>;
#define INF 1001001001
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repX(i, n, x) for (int i = x; i < (int)(n); i++)
#define repBack(i, n) for (int i = n; i >= 0; i--)
#define dup(x, y) (((x) + (y)-1) / (y))
l... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using p = pair<int, int>;
#define INF 1001001001
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repX(i, n, x) for (int i = x; i < (int)(n); i++)
#define repBack(i, n) for (int i = n; i >= 0; i--)
#define dup(x, y) (((x) + (y)-1) / (y))
l... | [
"assignment.add",
"variable_declaration.type.change"
] | 804,779 | 804,780 | u911917041 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long A, B;
int C, D;
cin >> A >> B >> C >> D;
long long a, b, c, d, e, f, g, h;
a = (A - 1) / C;
b = (A - 1) / D;
c = (A - 1) / (C * D / __gcd(C, D));
d = (B) / C;
e = (B) / D;
f = (B) / (C * D / __gcd(C, D));
g = (A - 1) - a - b + c... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long A, B;
long long C, D;
cin >> A >> B >> C >> D;
long long a, b, c, d, e, f, g, h;
a = (A - 1) / C;
b = (A - 1) / D;
c = (A - 1) / (C * D / __gcd(C, D));
d = (B) / C;
e = (B) / D;
f = (B) / (C * D / __gcd(C, D));
g = (A - 1) - a -... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,783 | 804,784 | u442097733 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll bai(ll A, ll B, ll w) { return 1 + (B / w) + ((A + w - 1) / w); }
int main() {
ll A, B, C, D;
cin >> A >> B >> C >> D;
cout << (B - A + 1) - bai(A, B, C) - bai(A, B, D) +
(A, B, C / __gcd(C, D) * D)
<< endl;
return 0;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll bai(ll A, ll B, ll w) { return 1 + (B / w) - ((A + w - 1) / w); }
int main() {
ll A, B, C, D;
cin >> A >> B >> C >> D;
cout << (B - A + 1) - bai(A, B, C) - bai(A, B, D) +
bai(A, B, (C / __gcd(C, D)) * D)
<< endl;
retur... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change",
"call.add",
"call.arguments.change"
] | 804,792 | 804,793 | u083494782 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define F first
#define S second
#define PB push_back
#define MK make_pair
#define REP(i, a, b) for (int i = a; i < b; i++)
bool sort_by(pi c, pi d) { return c.S < d.S; }
int main() {
ll A, B, C... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define F first
#define S second
#define PB push_back
#define MK make_pair
#define REP(i, a, b) for (int i = a; i < b; i++)
bool sort_by(pi c, pi d) { return c.S < d.S; }
int main() {
ll A, B, C... | [] | 804,814 | 804,815 | u712837698 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll LINF = 1e18;
const int INF = 1e9;
const ll MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll LINF = 1e18;
const int INF = 1e9;
const ll MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool... | [] | 804,818 | 804,819 | u748757847 | cpp |
p02995 | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
ll a, b, c, d;
ll num_of_mul(int n) { // a以上b以下でnで割り切れるものの数
return b / n - (a + n - 1) / n + 1;
}
int m... | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
ll a, b, c, d;
ll num_of_mul(ll n) { // a以上b以下でnで割り切れるものの数
return b / n - (a + n - 1) / n + 1;
}
int ma... | [] | 804,830 | 804,831 | u168684371 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
in... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
in... | [
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 804,843 | 804,844 | u093973314 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
int gcd(int64_t x, int64_t y) {
if (x == 0 || y == 0)
return max(x, y);
else if (x < y)
return gcd(x, y % x);
else if (y < x)
return gcd(y, x % y);
else
return x;
}
int lcm(int64_t x, int64_t y) { return ((x * y) / gcd(x, y)); }
int main() {
int64_... | #include <bits/stdc++.h>
using namespace std;
int64_t gcd(int64_t x, int64_t y) {
if (x == 0 || y == 0)
return max(x, y);
else if (x < y)
return gcd(x, y % x);
else if (y < x)
return gcd(y, x % y);
else
return x;
}
int64_t lcm(int64_t x, int64_t y) { return ((x * y) / gcd(x, y)); }
int main() {
... | [
"function.return_type.change"
] | 804,853 | 804,854 | u101018317 | cpp |
p02995 | //----AUTHOR:kkdrummer----/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
// typedef unordered_set<ll> usll;
// typedef unordered_multiset<ll> umsll;
typedef multiset<ll> msll;
typedef set<ll> sl... | //----AUTHOR:kkdrummer----/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
// typedef unordered_set<ll> usll;
// typedef unordered_multiset<ll> umsll;
typedef multiset<ll> msll;
typedef set<ll> sl... | [
"expression.unary.arithmetic.remove"
] | 804,861 | 804,862 | u452240501 | cpp |
p02995 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define rep(i, cc, n) for (int i = cc; i <= n; ++i)
#define drep(i, cc, n) for (int i = cc; i >= n; --i)
typedef long long ll;
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
int lcm... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define rep(i, cc, n) for (int i = cc; i <= n; ++i)
#define drep(i, cc, n) for (int i = cc; i >= n; --i)
typedef long long ll;
using namespace std;
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll ... | [] | 804,871 | 804,872 | u374678351 | cpp |
p02995 | #include <bits/stdc++.h>
#include <regex>
#ifdef _DEBUG
#include "debug.h"
#endif
#define int ll
#define FOR(i, s, e) for (int i = int(s); i < int(e); ++i)
#define REP(i, e) FOR(i, 0, e)
#define all(v) (v).begin(), (v).end()
#define mkpr make_pair
#define mktp make_tuple
#define tv(tp, i) get<(i)>(tp)
#define CLEAR(obj... | #include <bits/stdc++.h>
#include <regex>
#ifdef _DEBUG
#include "debug.h"
#endif
#define int ll
#define FOR(i, s, e) for (int i = int(s); i < int(e); ++i)
#define REP(i, e) FOR(i, 0, e)
#define all(v) (v).begin(), (v).end()
#define mkpr make_pair
#define mktp make_tuple
#define tv(tp, i) get<(i)>(tp)
#define CLEAR(obj... | [
"assignment.change"
] | 804,887 | 804,888 | u404244809 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
long long a, b, c, d;
cin >> a >> b >> c >> d;
int g = c * d / __gcd(c, d);
cout << fixed << setprecision(0)
<< b - b / c - b / d + b / g -
(a - 1 - (a - 1) / c - (a - 1) / d + (a - 1) / g)
<< endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
long long a, b, c, d;
cin >> a >> b >> c >> d;
long long g = c * d / __gcd(c, d);
cout << fixed << setprecision(0)
<< b - b / c - b / d + b / g -
(a - 1 - (a - 1) / c - (a - 1) / d + (a - 1) / g)
<< endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,891 | 804,892 | u957377447 | cpp |
p02995 | #include <iostream>
using namespace std;
long long int GCD(long long int a, long long int b) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
return GCD(b, a % b);
}
int main() {
long long int A, B, C, D;
cin >> A >> B >> C >> D;
long long int c, d, cd;
c = B / C - (A - 1) / C;
d = B / D - (... | #include <iostream>
using namespace std;
long long int GCD(long long int a, long long int b) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
return GCD(b, a % b);
}
int main() {
long long int A, B, C, D;
cin >> A >> B >> C >> D;
long long int c, d, cd;
c = B / C - (A - 1) / C;
d = B / D - (... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 804,927 | 804,928 | u806657856 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int(i) = (a); (i) < (n); ++(i))
#define eFOR(i, a, n) for (int(i) = (a); (i) <= (n)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int(i) = (a); (i) < (n); ++(i))
#define eFOR(i, a, n) for (int(i) = (a); (i) <= (n)... | [
"expression.operator.change"
] | 804,934 | 804,935 | u863044225 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int(i) = (a); (i) < (n); ++(i))
#define eFOR(i, a, n) for (int(i) = (a); (i) <= (n)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int(i) = (a); (i) < (n); ++(i))
#define eFOR(i, a, n) for (int(i) = (a); (i) <= (n)... | [
"expression.operator.change"
] | 804,934 | 804,936 | u863044225 | cpp |
p02995 | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main(void) {
long long A, B, C, D;
cin >> A >> B >> C >> D;
A = A - 1;
long long a = B / C - A / C;
long long b = B / D - A / D;
long long x = C * D;
long long e, d... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main(void) {
long long A, B, C, D;
cin >> A >> B >> C >> D;
A = A - 1;
long long a = B / C - A / C;
long long b = B / D - A / D;
long long x = C * D;
long long e, d... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 804,940 | 804,941 | u845000384 | cpp |
p02995 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#in... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#in... | [] | 804,942 | 804,943 | u427344224 | cpp |
p02995 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define mod 1000000007
using namespace std;
typedef long long ll;
ll a, b, c, d, ans;
ll gcm(ll a, ll b) {
if (b == 0)
return a;
return gcm(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcm(a, b) * b; }
main() {
cin >> a >> b >> ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define mod 1000000007
using namespace std;
typedef long long ll;
ll a, b, c, d, ans;
ll gcm(ll a, ll b) {
if (b == 0)
return a;
return gcm(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcm(a, b) * b; }
main() {
cin >> a >> b >> ... | [] | 804,948 | 804,949 | u720321944 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int N = 3000;
LL a, b, c, d;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
cin >> a >> b >> c >> d;
LL sum1 = b / c - (a - 1) / c;
LL sum2 = b / d - (a - 1) / d;
LL lcm = c * d / g... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int N = 3000;
LL a, b, c, d;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
cin >> a >> b >> c >> d;
LL sum1 = b / c - (a - 1) / c;
LL sum2 = b / d - (a - 1) / d;
LL lcm = c * d / g... | [] | 804,959 | 804,960 | u866538547 | cpp |
p02995 |
// C - Anti-Division
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// const int INF = 2147483647;
// const ll INF = 9223372036854775807;
// const int MOD = 1e9 + 7;
ll get_gcd(ll x, ll y) {
if (x < y) {
swap(x, y);
}
ll m = x % y;
while (m != 0) {
x = y;
y = m;
m = x %... |
// C - Anti-Division
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// const int INF = 2147483647;
// const ll INF = 9223372036854775807;
// const int MOD = 1e9 + 7;
ll get_gcd(ll x, ll y) {
if (x < y) {
swap(x, y);
}
ll m = x % y;
while (m != 0) {
x = y;
y = m;
m = x %... | [
"variable_declaration.type.change"
] | 804,971 | 804,972 | u790272146 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll c, d;
int calc(ll n) { return n - n / c - n / d + n / (c * d / __gcd(c, d)); }
int main() {
ll a, b;
cin >> a >> b >> c >> d;
cout << calc(b) - calc(a - 1) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll c, d;
ll calc(ll n) { return n - n / c - n / d + n / (c * d / __gcd(c, d)); }
int main() {
ll a, b;
cin >> a >> b >> c >> d;
cout << calc(b) - calc(a - 1) << endl;
return 0;
} | [] | 804,981 | 804,982 | u804999113 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int c, d;
int calc(ll n) { return n - n / c - n / d + n / (c * d / __gcd(c, d)); }
int main() {
ll a, b;
cin >> a >> b >> c >> d;
cout << calc(b) - calc(a - 1) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll c, d;
ll calc(ll n) { return n - n / c - n / d + n / (c * d / __gcd(c, d)); }
int main() {
ll a, b;
cin >> a >> b >> c >> d;
cout << calc(b) - calc(a - 1) << endl;
return 0;
} | [
"variable_declaration.type.change"
] | 804,983 | 804,982 | u804999113 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int c, d;
int calc(int n) { return n - n / c - n / d + n / (c * d / __gcd(c, d)); }
int main() {
int a, b;
cin >> a >> b >> c >> d;
cout << calc(b) - calc(a - 1) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll c, d;
ll calc(ll n) { return n - n / c - n / d + n / (c * d / __gcd(c, d)); }
int main() {
ll a, b;
cin >> a >> b >> c >> d;
cout << calc(b) - calc(a - 1) << endl;
return 0;
} | [
"variable_declaration.type.change"
] | 804,984 | 804,982 | u804999113 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll get(ll l, ll r, ll x) { return (r / x) - ((l - 1) / x); }
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll lcm = a * b;
lcm /= __gcd(a, b);
ll num1 = get(a, b, c) + get(a, ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll get(ll l, ll r, ll x) { return (r / x) - ((l - 1) / x); }
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll a, b, c, d;
cin >> a >> b >> c >> d;
ll lcm = c * d;
lcm /= __gcd(c, d);
ll num1 = get(a, b, c) + get(a, ... | [
"identifier.change",
"expression.operation.binary.change",
"assignment.value.change",
"call.arguments.change"
] | 805,000 | 805,001 | u109635851 | cpp |
p02995 | #include <iostream>
using namespace std;
int main() {
long long a, b, c, d;
cin >> a >> b >> c >> d;
if (c > d)
swap(c, d);
long long dd = d;
long long cc = c;
// gcd
while (dd % cc != 0) {
dd = dd % cc;
swap(dd, cc);
}
long long gcd = cc;
long long lcm = c * d / gcd;
long long n =... | #include <iostream>
using namespace std;
int main() {
long long a, b, c, d;
cin >> a >> b >> c >> d;
if (c > d)
swap(c, d);
long long dd = d;
long long cc = c;
// gcd
while (dd % cc != 0) {
dd = dd % cc;
swap(dd, cc);
}
long long gcd = cc;
long long lcm = c * d / gcd;
long long n =... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 805,006 | 805,007 | u564377816 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c, d, ans = 0, r, l, lcm;
cin >> a >> b >> c >> d;
r = b / c;
l = (a - 1) / c;
ans = r - l;
r = b / d;
l = (a - 1) / d;
ans = ans + r - l;
lcm = (c * d) / __gcd(c, d);
r = b / lcm;
l = (a - 1) / lcm;
ans = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, c, d, ans = 0, r, l, lcm;
cin >> a >> b >> c >> d;
r = b / c;
l = (a - 1) / c;
ans = r - l;
r = b / d;
l = (a - 1) / d;
ans = ans + r - l;
lcm = (c * d) / __gcd(c, d);
r = b / lcm;
l = (a - 1) / lcm;
ans = ... | [] | 805,008 | 805,009 | u858155043 | cpp |
p02995 | #include <bits/stdc++.h>
using namespace std;
int lcm(long long x, long long y) { return x / __gcd(x, y) * y; }
int main() {
long long a, b, c, d;
cin >> a >> b >> c >> d;
long long l = lcm(c, d);
long long all = b - a + 1, cs = (a + c - 1) / c, ce = b / c,
ds = (a + d - 1) / d, de = b / d, ls = (a... | #include <bits/stdc++.h>
using namespace std;
long long lcm(long long x, long long y) { return x / __gcd(x, y) * y; }
int main() {
long long a, b, c, d;
cin >> a >> b >> c >> d;
long long l = lcm(c, d);
long long all = b - a + 1, cs = (a + c - 1) / c, ce = b / c,
ds = (a + d - 1) / d, de = b / d, l... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 805,016 | 805,017 | u441250130 | cpp |
p02995 | #include "bits/stdc++.h"
using namespace std;
using lint = long long;
#define low lower_bound
#define upp upper_bound
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, n) for (int i = int(n); i >= 0; --i)
#define all(vec) (vec).begin(), (vec).end()
#define cend printf("\n");
#define prique(T) priority_q... | #include "bits/stdc++.h"
using namespace std;
using lint = long long;
#define low lower_bound
#define upp upper_bound
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, n) for (int i = int(n); i >= 0; --i)
#define all(vec) (vec).begin(), (vec).end()
#define cend printf("\n");
#define prique(T) priority_q... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 805,018 | 805,019 | u054475353 | cpp |
p02995 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <st... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <st... | [
"expression.operation.binary.remove"
] | 805,025 | 805,026 | u303039933 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.