Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02579
#include <bits/stdc++.h> #define fi first #define se second #define mp make_pair using namespace std; typedef long long ll; typedef pair<int, int> pii; const double eps = 1e-8; const int NINF = 0xc0c0c0c0; const int INF = 0x3f3f3f3f; const ll mod = 1e9 + 7; const ll N = 1e3 + 5; int n, m, sx, sy, ex, ey; int vis[N][N...
#include <bits/stdc++.h> #define fi first #define se second #define mp make_pair using namespace std; typedef long long ll; typedef pair<int, int> pii; const double eps = 1e-8; const int NINF = 0xc0c0c0c0; const int INF = 0x3f3f3f3f; const ll mod = 1e9 + 7; const ll N = 1e3 + 5; int n, m, sx, sy, ex, ey; int vis[N][N...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
285,094
285,096
u375212600
cpp
p02579
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define eb emplace_back #define mt make_tuple #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define MOD 1000000007 typedef long long ll; typedef pair<int, int> ii; typedef pair<ll, ll> pll; typedef vector<int> vi; ty...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define eb emplace_back #define mt make_tuple #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define MOD 1000000007 typedef long long ll; typedef pair<int, int> ii; typedef pair<ll, ll> pll; typedef vector<int> vi; ty...
[ "identifier.change", "expression.operation.binary.change" ]
285,128
285,129
u034671639
cpp
p02579
#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 ...
[ "preprocessor.define.value.change" ]
285,150
285,151
u915401678
cpp
p02579
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i < n + 1; i++) #define all(A) A.begin(), A.end() typedef long long ll; int main() { int h, w; cin >> h >> w; int ch, cw, dh, dw; cin >> ch >> cw >> dh >> dw; vector<vector<char>> ma...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i < n + 1; i++) #define all(A) A.begin(), A.end() typedef long long ll; int main() { int h, w; cin >> h >> w; int ch, cw, dh, dw; cin >> ch >> cw >> dh >> dw; vector<vector<char>> ma...
[ "call.remove", "control_flow.branch.else.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "call.add" ]
285,153
285,154
u132364782
cpp
p02579
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i, s, n) for (int i = s; i < n; i++) #define NUM 2520 #define INF (1LL << 50) #define DEBUG 0 #define mp(a, b) make_pair(a, b) #define SORT(V) sort(V.begin(), V.end()) #define PI (3.141592653589794) #define TO_STRING(VariableName) #Var...
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i, s, n) for (int i = s; i < n; i++) #define NUM 2520 #define INF (1LL << 50) #define DEBUG 0 #define mp(a, b) make_pair(a, b) #define SORT(V) sort(V.begin(), V.end()) #define PI (3.141592653589794) #define TO_STRING(VariableName) #Var...
[ "identifier.change", "function.return_value.change", "expression.operation.binary.change" ]
285,174
285,175
u041513069
cpp
p02584
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; const int INF = 1001001001; using namespace std; int main() { ll x, k, d; cin >> x >> k >> d; x ...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; const int INF = 1001001001; using namespace std; int main() { ll x, k, d; cin >> x >> k >> d; x ...
[ "variable_declaration.type.change", "control_flow.branch.if.condition.change" ]
285,223
285,222
u904995051
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define F first #define S second void solve() { ll x, k, d; cin >> x >> k >> d; x = abs(x); if ((x / d) >= k) { ll y = x / d; x -= k *...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define F first #define S second void solve() { ll x, k, d; cin >> x >> k >> d; x = abs(x); if ((x / d) >= k) { ll y = x / d; x -= k *...
[ "io.output.change" ]
285,226
285,227
u459534977
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define F first #define S second void solve() { ll x, k, d; cin >> x >> k >> d; x = abs(x); if ((x / d) >= k) { ll y = x / d; x -= k *...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define F first #define S second void solve() { ll x, k, d; cin >> x >> k >> d; x = abs(x); if ((x / d) >= k) { ll y = x / d; x -= k *...
[ "io.output.change", "control_flow.branch.if.condition.change" ]
285,228
285,227
u459534977
cpp
p02584
#include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <iostream> #define ALL(x) (x).begin(), (x).end() #define sz(a) int(a.size()) #define rep(i, x, n) for (int i = x; i < n; i++) #define repd(i, x, n) for (int i = x; i <= n; i++) #define pii pair<int, int> #define pll pair<long long, long long> #def...
#include <algorithm> #include <bits/stdc++.h> #include <cstdio> #include <iostream> #define ALL(x) (x).begin(), (x).end() #define sz(a) int(a.size()) #define rep(i, x, n) for (int i = x; i < n; i++) #define repd(i, x, n) for (int i = x; i <= n; i++) #define pii pair<int, int> #define pll pair<long long, long long> #def...
[ "call.add", "call.arguments.change" ]
285,229
285,230
u220293451
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll simu(ll x, ll k, ll d) { if (k == 0) { // cout<<x<<endl; return x; } if (x > 0) { if (x - d < 0) { if (k % 2 == 0) return x; else return x - d; } // cout<<x<<" "<<k<<" "<<endl; ll n = min(x...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll simu(ll x, ll k, ll d) { if (k == 0) { // cout<<x<<endl; return x; } if (x > 0) { if (x - d < 0) { if (k % 2 == 0) return x; else return x - d; } // cout<<x<<" "<<k<<" "<<endl; ll n = min(x...
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
285,239
285,240
u395350106
cpp
p02584
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define vs vector<string> #define vpii ve...
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define vs vector<string> #define vpii ve...
[ "expression.operation.binary.remove" ]
285,246
285,247
u763467803
cpp
p02584
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define vs vector<string> #define vpii ve...
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define vs vector<string> #define vpii ve...
[ "expression.operation.binary.remove" ]
285,248
285,247
u763467803
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n)...
#include <bits/stdc++.h> using namespace std; #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n)...
[ "expression.operation.binary.remove", "expression.operation.binary.add", "call.add", "call.arguments.change" ]
285,249
285,250
u880956906
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n)...
#include <bits/stdc++.h> using namespace std; #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n)...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
285,251
285,250
u880956906
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n)...
#include <bits/stdc++.h> using namespace std; #define ll long long #define scn(n) scanf("%d", &n) #define lscn(n) scanf("%lld", &n) #define lpri(n) printf("%lld", n) #define pri(n) printf("%d", n) #define pln() printf("\n") #define priln(n) printf("%d\n", n) #define lpriln(n) printf("%lld\n", n) #define rep(i, init, n)...
[ "expression.operation.binary.remove", "identifier.change", "control_flow.branch.if.condition.change" ]
285,252
285,250
u880956906
cpp
p02584
#include <bits/stdc++.h> const int MAX = 1e6 + 10; const int modn = 1e9 + 7; typedef long long ll; #define endl '\n' #define cwk \ freopen("D:\\workplace\\CLion\\in.in", "r", stdin), \ freopen("D:\\workplace\\CLion\\out....
#include <bits/stdc++.h> const int MAX = 1e6 + 10; const int modn = 1e9 + 7; typedef long long ll; #define endl '\n' #define cwk \ freopen("D:\\workplace\\CLion\\in.in", "r", stdin), \ freopen("D:\\workplace\\CLion\\out....
[ "expression.operation.unary.add" ]
285,255
285,256
u255154774
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define debug(x) cerr << x << " = "(x) << endl; #define ll long long #define rep(i, x, y) for (int i = x; i < y; i++) #define rel(i, x, y) for (int i = x - 1; i >= y; i--) #define all(x) x.begin(), x.end() int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; #define debug(x) cerr << x << " = "(x) << endl; #define ll long long #define rep(i, x, y) for (int i = x; i < y; i++) #define rel(i, x, y) for (int i = x - 1; i >= y; i--) #define all(x) x.begin(), x.end() int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change", "identifier.change" ]
285,257
285,258
u352200121
cpp
p02584
#include <iostream> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X > K * D) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D); ans = X; } cout << ans << en...
#include <iostream> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D); ans = X; } cout << ans << en...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,261
285,262
u894134667
cpp
p02584
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) abs(X - D); ...
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D...
[ "assignment.change" ]
285,263
285,264
u894134667
cpp
p02584
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X > K * D) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D...
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,266
285,264
u894134667
cpp
p02584
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) abs(X - D); ...
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D...
[ "assignment.change" ]
285,267
285,264
u894134667
cpp
p02584
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X > K * D) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) abs(X - D); ...
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; ll ans; X = abs(X); if (X / D > K) { ans = X - (K * D); } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 1) X = abs(X - D...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "assignment.change" ]
285,268
285,264
u894134667
cpp
p02584
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; X = abs(X); if (X >= K * D) { cout << X - (K * D) << endl; } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 0) cout << X <...
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main(void) { ll X, K, D; cin >> X >> K >> D; X = abs(X); if (X / D > K) { cout << X - (K * D) << endl; } else { ll e = (X / D); K -= e; X -= e * D; if (K % 2 == 0) cout << X <<...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,270
285,271
u894134667
cpp
p02584
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> typedef long long ll; using namespace std; ll x, k, d; int main() { cin >> x >> k >> d; if (x < 0) x = -x; ll ans = 0; if (x >= k * d) { ans = x - k * d; } else { ll num = x / d; ll a = x - num * d; ll b = abs(a...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> typedef long long ll; using namespace std; ll x, k, d; int main() { cin >> x >> k >> d; if (x < 0) x = -x; ll ans = 0; if (x / d >= k) { ans = x - k * d; } else { ll num = x / d; ll a = x - num * d; ll b = abs(a...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,277
285,278
u692113277
cpp
p02584
/* * Created By: 'Present_Sir' * Created On: Sunday 16 August 2020 12:24:48 PM IST */ #include <bits/stdc++.h> #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define int long long usin...
/* * Created By: 'Present_Sir' * Created On: Sunday 16 August 2020 12:24:48 PM IST */ #include <bits/stdc++.h> #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define int long long usin...
[ "call.add", "call.arguments.change" ]
285,286
285,287
u017126737
cpp
p02584
/* * Created By: 'Present_Sir' * Created On: Sunday 16 August 2020 12:24:48 PM IST */ #include <bits/stdc++.h> #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define int long long usin...
/* * Created By: 'Present_Sir' * Created On: Sunday 16 August 2020 12:24:48 PM IST */ #include <bits/stdc++.h> #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define int long long usin...
[ "call.add", "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
285,288
285,287
u017126737
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int NMAX = 2e5 + 10; const int MOD = 1e9 + 7; int main(int argc, char const *argv[]) { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); x = abs(x); if (x >= k * d) return 0 * printf("%lld\n", x - k * d); printf("%lld\n", abs(x - (x /...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int NMAX = 2e5 + 10; const int MOD = 1e9 + 7; int main(int argc, char const *argv[]) { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); x = abs(x); if (x / d >= k) return 0 * printf("%lld\n", x - k * d); printf("%lld\n", abs(x - (x /...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,289
285,290
u395313349
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int NMAX = 2e5 + 10; const int MOD = 1e9 + 7; int main(int argc, char const *argv[]) { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); x = abs(x); if (x >= k * d) return 0 * printf("%lld\n", x - k * d); ll block = x / d; printf("%...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int NMAX = 2e5 + 10; const int MOD = 1e9 + 7; int main(int argc, char const *argv[]) { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); x = abs(x); if (x / d >= k) return 0 * printf("%lld\n", x - k * d); ll block = x / d; printf("%...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,291
285,292
u395313349
cpp
p02584
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; typedef long long ll; typedef pair<ll, ll> PLL; typedef vector<int> VI; typedef vector<char> VC; typedef vector<double> VD; typedef vector<string> VS; typedef vector<ll> VLL; typedef vector<PLL> VP; const static int INF = 1000000000; const stat...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; typedef long long ll; typedef pair<ll, ll> PLL; typedef vector<int> VI; typedef vector<char> VC; typedef vector<double> VD; typedef vector<string> VS; typedef vector<ll> VLL; typedef vector<PLL> VP; const static int INF = 1000000000; const stat...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,293
285,294
u690326065
cpp
p02584
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; typedef long long ll; typedef pair<ll, ll> PLL; typedef vector<int> VI; typedef vector<char> VC; typedef vector<double> VD; typedef vector<string> VS; typedef vector<ll> VLL; typedef vector<PLL> VP; const static int INF = 1000000000; const stat...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; typedef long long ll; typedef pair<ll, ll> PLL; typedef vector<int> VI; typedef vector<char> VC; typedef vector<double> VD; typedef vector<string> VS; typedef vector<ll> VLL; typedef vector<PLL> VP; const static int INF = 1000000000; const stat...
[ "expression.operation.binary.remove" ]
285,295
285,294
u690326065
cpp
p02584
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #define dout cout #define debug() if (true) #define dvout(v) vout(v) #else #define dout \ if (false) \ cout #define debug()...
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #define dout cout #define debug() if (true) #define dvout(v) vout(v) #else #define dout \ if (false) \ cout #define debug()...
[ "assignment.variable.change" ]
285,312
285,313
u111937495
cpp
p02584
#include <cstdlib> #include <algorithm> #include <cmath> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const ...
#include <cstdlib> #include <algorithm> #include <cmath> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const ...
[ "control_flow.branch.if.condition.change" ]
285,315
285,316
u475844288
cpp
p02584
#include <cstdlib> #include <algorithm> #include <cmath> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const ...
#include <cstdlib> #include <algorithm> #include <cmath> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const ...
[ "control_flow.branch.if.condition.change" ]
285,317
285,316
u475844288
cpp
p02584
#include <cstdlib> #include <algorithm> #include <cmath> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const ...
#include <cstdlib> #include <algorithm> #include <cmath> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const ...
[ "control_flow.branch.if.condition.change" ]
285,318
285,319
u475844288
cpp
p02584
// Problem : // C - Walking Takahashi // Editorial // // Contest : AtCoder - AtCoder Beginner Contest 175 // URL : https://atcoder.jp/contests/abc175/tasks/abc175_c // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) // #pragma GCC optimize("Ofast") /...
// Problem : // C - Walking Takahashi // Editorial // // Contest : AtCoder - AtCoder Beginner Contest 175 // URL : https://atcoder.jp/contests/abc175/tasks/abc175_c // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) // #pragma GCC optimize("Ofast") /...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,327
285,328
u774649089
cpp
p02584
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iomanip> // fixed, setprecis...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iomanip> // fixed, setprecis...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,336
285,337
u262646906
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll x, d, k, need; cin >> x >> k >> d; need = abs(x) / d; if (need > k) { if (x < 0) printf("%lld\n", x + (k * d)); else printf("%lld\n", x - (k * d)); } else { ll baki = abs(x) % d; if (baki == 0) { ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll x, d, k, need; cin >> x >> k >> d; need = abs(x) / d; if (need > k) { if (x < 0) printf("%lld\n", abs(x + (k * d))); else printf("%lld\n", x - (k * d)); } else { ll baki = abs(x) % d; if (baki == 0)...
[ "call.add", "call.arguments.change" ]
285,338
285,339
u301459301
cpp
p02584
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespac...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespac...
[ "call.add", "call.arguments.change" ]
285,346
285,347
u684822781
cpp
p02584
#include <bits/stdc++.h> #define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) rep2(i, 0, n) #define FOR(i) for (cin >> i; i > 0; i--) #define elif else if #define pb push_back #define ll long long #define mp make_pair #define all(x) x.begin(), x.end() #define re(x) ...
#include <bits/stdc++.h> #define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) rep2(i, 0, n) #define FOR(i) for (cin >> i; i > 0; i--) #define elif else if #define pb push_back #define ll long long #define mp make_pair #define all(x) x.begin(), x.end() #define re(x) ...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,348
285,349
u060880503
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define fi first #define se second #define pb push_back #define mp make_pair #define fo(i, n) for (i = 0; i < n; i++) #define fo1(i, n) for (i = 1; i <= n; i++) #define foab(i, a, b) for (i = a; i <= b; i++) #define of(i, n) for...
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define fi first #define se second #define pb push_back #define mp make_pair #define fo(i, n) for (i = 0; i < n; i++) #define fo1(i, n) for (i = 1; i <= n; i++) #define foab(i, a, b) for (i = a; i <= b; i++) #define of(i, n) for...
[ "call.add", "call.arguments.change" ]
285,350
285,351
u612541354
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define fi first #define se second #define pb push_back #define mp make_pair #define fo(i, n) for (i = 0; i < n; i++) #define fo1(i, n) for (i = 1; i <= n; i++) #define foab(i, a, b) for (i = a; i <= b; i++) #define of(i, n) for...
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define fi first #define se second #define pb push_back #define mp make_pair #define fo(i, n) for (i = 0; i < n; i++) #define fo1(i, n) for (i = 1; i <= n; i++) #define foab(i, a, b) for (i = a; i <= b; i++) #define of(i, n) for...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
285,352
285,353
u612541354
cpp
p02584
#include <bits/stdc++.h> int main(void) { int64_t x, k, d; std::cin >> x >> k >> d; int64_t posi_ans = x; int64_t k_cnt = std::abs(x / d); if (k_cnt > k) { posi_ans -= d * k; } else { k -= k_cnt; posi_ans -= d * k_cnt; if (k & 0x01) { posi_ans -= d; } } posi_ans = std::ab...
#include <bits/stdc++.h> int main(void) { int64_t x, k, d; std::cin >> x >> k >> d; int64_t posi_ans = std::abs(x); int64_t k_cnt = std::abs(x / d); if (k_cnt > k) { posi_ans -= d * k; } else { k -= k_cnt; posi_ans -= d * k_cnt; if (k & 0x01) { posi_ans -= d; } } posi_ans...
[ "call.add", "call.arguments.change" ]
285,354
285,355
u445011609
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; ll quo = x / d; ll mod = x % d; ll ans; if (d == x) { if (k % 2 == 0) { ans = x; } else { ans = 0; } } else { if (quo <= k) { if (...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; ll quo = x / d; ll mod = x % d; ll ans; if (d == x) { if (k % 2 == 0) { ans = x; } else { ans = 0; } } else { if (quo <= k) { if (...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
285,359
285,360
u221391729
cpp
p02584
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = ...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,364
285,365
u366581326
cpp
p02584
#include <bits/stdc++.h> #define ll long long #define ALL(x) x.begin(), x.end() #define MOD (1000000000 + 7) using namespace std; #define PI 3.14159265359 #define tMOD 998244353 #define mkpr(x, y) make_pair(x, y) int main() { ll X, K, D; cin >> X >> K >> D; X = abs(X); if (X >= D * K) { cout << X - D * K ...
#include <bits/stdc++.h> #define ll long long #define ALL(x) x.begin(), x.end() #define MOD (1000000000 + 7) using namespace std; #define PI 3.14159265359 #define tMOD 998244353 #define mkpr(x, y) make_pair(x, y) int main() { ll X, K, D; cin >> X >> K >> D; X = abs(X); if (X / D >= K) { cout << X - D * K ...
[ "control_flow.branch.if.condition.change" ]
285,368
285,369
u556918886
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long #define f first #define s second #define Fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fo(a, b, c) for (int i = a; i < b...
#include <bits/stdc++.h> using namespace std; #define ll long long #define f first #define s second #define Fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fo(a, b, c) for (int i = a; i < b...
[ "call.add" ]
285,374
285,375
u696241422
cpp
p02584
#include <algorithm> #include <iostream> #include <stdio.h> #include <vector> using ll = long long; using namespace std; int main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d <= k) { ans = x - k * d; } else { ll e = x / d; k -= e; x -= e * d; if (k % 2 == 1) { ...
#include <algorithm> #include <iostream> #include <stdio.h> #include <vector> using ll = long long; using namespace std; int main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d >= k) { ans = x - k * d; } else { ll e = x / d; k -= e; x -= e * d; if (k % 2 == 1) { ...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
285,406
285,407
u731535745
cpp
p02584
// https://atcoder.jp/contests/abc175/tasks/abc175_c #include "algorithm" #include "bitset" #include "cmath" #include "functional" #include "iomanip" #include "iostream" #include "map" #include "numeric" #include "queue" #include "set" #include "string" #include "vector" #define rep(i, to) for (ll i = 0; i < (to); ++i...
// https://atcoder.jp/contests/abc175/tasks/abc175_c #include "algorithm" #include "bitset" #include "cmath" #include "functional" #include "iomanip" #include "iostream" #include "map" #include "numeric" #include "queue" #include "set" #include "string" #include "vector" #define rep(i, to) for (ll i = 0; i < (to); ++i...
[ "identifier.change", "expression.operation.binary.change" ]
285,410
285,411
u751468134
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { double X, K, D; cin >> X >> K >> D; if (0 > X) X = -X; double num, buf1, buf2; num = floor(X / D); if (num > K) { printf("%.0lf\n", X - num * K); return 0; } buf1 = abs(X - num * D); buf2 = abs(X - (num + 1) * D); if (buf2 > b...
#include <bits/stdc++.h> using namespace std; int main() { double X, K, D; cin >> X >> K >> D; if (0 > X) X = -X; double num, buf1, buf2; num = floor(X / D); if (num > K) { printf("%.0lf\n", X - K * D); return 0; } buf1 = abs(X - num * D); buf2 = abs(X - (num + 1) * D); if (buf2 > buf...
[ "expression.operation.binary.remove" ]
285,418
285,419
u089063009
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { double X, K, D; cin >> X >> K >> D; if (0 > X) X = -X; double num, buf1, buf2; num = floor(X / D); if (num > K) { printf("%.0lf\n", X - num * D); return 0; } buf1 = abs(X - num * D); buf2 = abs(X - (num + 1) * D); if (buf2 > ...
#include <bits/stdc++.h> using namespace std; int main() { double X, K, D; cin >> X >> K >> D; if (0 > X) X = -X; double num, buf1, buf2; num = floor(X / D); if (num > K) { printf("%.0lf\n", X - K * D); return 0; } buf1 = abs(X - num * D); buf2 = abs(X - (num + 1) * D); if (buf2 > buf...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
285,420
285,419
u089063009
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll X, K, D, f, left; cin >> X >> K >> D; X = abs(X); if (K <= X / D) { cout << abs(X - K * D) << endl; } else { f = floor(X / D); left = K - f; X -= D * f; cout << (K % 2 == 0 ? X : abs(X - D)) << endl; } }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll X, K, D, f, left; cin >> X >> K >> D; X = abs(X); if (K <= X / D) { cout << abs(X - K * D) << endl; } else { f = floor(X / D); left = K - f; X -= D * f; cout << (left % 2 == 0 ? X : abs(X - D)) << endl; ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
285,424
285,425
u081162298
cpp
p02584
#include <algorithm> #include <bits/stdc++.h> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #includ...
#include <algorithm> #include <bits/stdc++.h> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #includ...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
285,427
285,428
u638661457
cpp
p02584
#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 x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d <= k) { ans = x - d * k; } else { ll e = x / d; k -= e; x -= e * d; i...
#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 x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d > k) { // x までたどり着かない ans = x - d * k; } else { ll time = x / d; k -= tim...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "variable_declaration.name.change", "identifier.change", "assignment.value.change", "expression.operation.binary.change" ]
285,429
285,430
u924667289
cpp
p02584
#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 x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d <= k) { // x までたどり着かない ans = x - d * k; } else { ll time = x / d; k -= ti...
#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 x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d > k) { // x までたどり着かない ans = x - d * k; } else { ll time = x / d; k -= tim...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
285,431
285,430
u924667289
cpp
p02584
#include <bits/stdc++.h> using namespace std; template <typename T> T Abs(T num) { return num < 0 ? -num : num; } template <typename T> T Min(T x, T y) { return x < y ? x : y; } typedef long long ll; ll X, K, D, t1, t2, d1, d2, res; int main() { cin >> X >> K >> D; X = Abs(X); t1 = X / (D + D); t2 = t1 + 1; i...
#include <bits/stdc++.h> using namespace std; template <typename T> T Abs(T num) { return num < 0 ? -num : num; } template <typename T> T Min(T x, T y) { return x < y ? x : y; } typedef long long ll; ll X, K, D, t1, t2, d1, d2, res; int main() { cin >> X >> K >> D; X = Abs(X); t1 = X / (D + D); t2 = t1 + 1; i...
[ "control_flow.branch.if.condition.change" ]
285,434
285,435
u301961138
cpp
p02584
// 公式解説 #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d <= k) { ans = x - d * k; } else { ll e = x / d; k -= e; x -= e * d; if (k % 2 == 1) { x = abs(x - d); } ans = x; } cou...
// 公式解説 #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); ll ans; if (x / d > k) { ans = x - d * k; } else { ll e = x / d; k -= e; x -= e * d; if (k % 2 == 1) { x = abs(x - d); } ans = x; } cout...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
285,451
285,452
u417528611
cpp
p02584
#include <cstdio> #define abs(x) ((x) < 0 ? -(x) : (x)) #define min(a, b) ((a) < (b) ? (a) : (b)) typedef long long ll; int main() { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); if (abs(x / d) >= k) { printf("%lld", (x < 0 ? x + d * k : x - d * k)); } else { // abs(x/d)<k if (x > 0) { printf("%l...
#include <cstdio> #define abs(x) ((x) < 0 ? -(x) : (x)) #define min(a, b) ((a) < (b) ? (a) : (b)) typedef long long ll; int main() { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); if (abs(x / d) >= k) { printf("%lld\n", abs(x < 0 ? x + d * k : x - d * k)); } else { // abs(x/d)<k if (x > 0) { print...
[ "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add", "call.add" ]
285,456
285,457
u281747730
cpp
p02584
#include <bits/stdc++.h> #include <unistd.h> #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define pb push_back #define dame ...
#include <bits/stdc++.h> #include <unistd.h> #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define pb push_back #define dame ...
[ "assignment.compound.arithmetic.replace.add", "expression.operator.arithmetic.replace.remove", "expression.operation.binary.change", "call.remove" ]
285,474
285,475
u442810826
cpp
p02584
#include <bits/stdc++.h> #include <unistd.h> #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define pb push_back #define dame ...
#include <bits/stdc++.h> #include <unistd.h> #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define pb push_back #define dame ...
[ "assignment.compound.arithmetic.replace.add", "expression.operator.arithmetic.replace.remove", "expression.operation.binary.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
285,476
285,475
u442810826
cpp
p02584
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "literal.number.change" ]
285,481
285,482
u454600293
cpp
p02584
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "literal.number.change" ]
285,483
285,484
u454600293
cpp
p02584
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
285,485
285,484
u454600293
cpp
p02584
#include <bits/stdc++.h> #define rep(begin, end) for (i = begin; i < end; i++) #define repj(begin, end) for (j = begin; j < end; j++) #define init(arr, end, val) \ for (i = 0; i < end; i++) \ arr[i] = val; #defin...
#include <bits/stdc++.h> #define rep(begin, end) for (i = begin; i < end; i++) #define repj(begin, end) for (j = begin; j < end; j++) #define init(arr, end, val) \ for (i = 0; i < end; i++) \ arr[i] = val; #defin...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,486
285,487
u282360873
cpp
p02584
#include <bits/stdc++.h> #define rep(begin, end) for (i = begin; i < end; i++) #define repj(begin, end) for (j = begin; j < end; j++) #define init(arr, end, val) \ for (i = 0; i < end; i++) \ arr[i] = val; #defin...
#include <bits/stdc++.h> #define rep(begin, end) for (i = begin; i < end; i++) #define repj(begin, end) for (j = begin; j < end; j++) #define init(arr, end, val) \ for (i = 0; i < end; i++) \ arr[i] = val; #defin...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,489
285,487
u282360873
cpp
p02584
#include "bits/stdc++.h" using namespace std; #define REP(i, n) for (ll i = 0; i < n; i++) #define ll long long #define MOD 1000000007LL #define llMAX 9223372036854775807LL #define llMIN -9223372036854775808LL using vi = vector<ll>; // intの1次元の型に vi という別名をつける using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける ll x, ...
#include "bits/stdc++.h" using namespace std; #define REP(i, n) for (ll i = 0; i < n; i++) #define ll long long #define MOD 1000000007LL #define llMAX 9223372036854775807LL #define llMIN -9223372036854775808LL using vi = vector<ll>; // intの1次元の型に vi という別名をつける using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける ll x, ...
[ "call.add", "call.arguments.change" ]
285,502
285,503
u837951457
cpp
p02584
#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() { int X, K, D; cin >> X >> K >> D; X = abs(X); ll cnt = X / D; if (K <= cnt) { rep(i, K) X -= D; cout << X << endl; } else { if ((K - cnt) % ...
#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 X, K, D; cin >> X >> K >> D; X = abs(X); ll cnt = X / D; if (K <= cnt) { rep(i, K) X -= D; cout << X << endl; } else { if ((K - cnt) % 2...
[ "variable_declaration.type.change" ]
285,504
285,505
u097161601
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long long x; long long k, d; cin >> x >> k >> d; x = fabs(x); long long go = x / d; long long ans = x; if (k < go) { go = k; k = 0; } else { k -= go; } ans -= d * go; if (k % 2 == 0) { cout << fabs(ans) << endl; } else ...
#include <bits/stdc++.h> using namespace std; int main() { long long x; long long k, d; cin >> x >> k >> d; x = fabs(x); long long go = x / d; long long ans = x; if (k < go) { go = k; k = 0; } else { k -= go; } ans -= d * go; if (k % 2 == 0) { cout << abs(ans) << endl; } else { ...
[ "identifier.change", "call.function.change", "io.output.change" ]
285,516
285,517
u436528803
cpp
p02584
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; //----------------------- Print Function ----------------------// inline void print() { cout << endl; } template <typename First, typename... Rest> void print(const First &first, const Rest &...rest) { cout << first << ' '; print(rest...); } ...
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; //----------------------- Print Function ----------------------// inline void print() { cout << endl; } template <typename First, typename... Rest> void print(const First &first, const Rest &...rest) { cout << first << ' '; print(rest...); } ...
[ "expression.operation.unary.add" ]
285,520
285,521
u736788838
cpp
p02584
#include <bits/stdc++.h> #define f first #define s second #define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i) #define pb push_back #define all(s) begin(s), end(s) #define _ \ ios_base::sync_with_stdio(0); ...
#include <bits/stdc++.h> #define f first #define s second #define fore(i, a, b) for (int i = (a), ThxMK = (b); i < ThxMK; ++i) #define pb push_back #define all(s) begin(s), end(s) #define _ \ ios_base::sync_with_stdio(0); ...
[ "variable_declaration.value.change", "identifier.change" ]
285,522
285,523
u757369138
cpp
p02584
#include <cstdlib> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { long long int x, k, d; cin >> x >> k >> d; if (x > 0) { if (k < x / d) { cout << llabs(x - k * d) << endl; } else { k = k - (x / d); x = x - (x / d) * d; if (k % 2 == 0)...
#include <cstdlib> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { long long int x, k, d; cin >> x >> k >> d; if (x > 0) { if (k < x / d) { cout << llabs(x - k * d) << endl; } else { k = k - (x / d); x = x - (x / d) * d; if (k % 2 == 0)...
[ "control_flow.branch.if.condition.change", "call.add" ]
285,524
285,525
u581840755
cpp
p02584
#include <cstdlib> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { long long int x, k, d; cin >> x >> k >> d; if (x > 0) { if (k < x / d) { cout << llabs(x - k * d) << endl; } else { k = k - (x / d); x = x - (x / d) * d; if (k % 2 == 0)...
#include <cstdlib> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { long long int x, k, d; cin >> x >> k >> d; if (x > 0) { if (k < x / d) { cout << llabs(x - k * d) << endl; } else { k = k - (x / d); x = x - (x / d) * d; if (k % 2 == 0)...
[ "control_flow.branch.if.condition.change", "call.add", "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
285,526
285,525
u581840755
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve(long long X, long long K, long long D) { ll ans = 0; if (log10(abs(K)) + log10(abs(D)) > 16 or K * D > abs(X)) { if (((K - abs(X) / D) & 1) == 1) ans = X - (X / D + 1) * D; else ans = X - (X / D) * D; } else { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve(long long X, long long K, long long D) { ll ans = 0; if (log10(abs(K)) + log10(abs(D)) > 16 or K * D > abs(X)) { if (((K - abs(X) / D) & 1) == 1) ans = X - (X / D + 1) * D; else ans = X - (X / D) * D; } else { ...
[ "identifier.change", "call.function.change" ]
285,531
285,532
u583477773
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using P = pair<int, int>; int main() { ll x, k, d; cin >> x >> k >> d; ll ans; if ((ll)k < abs((ll)(x / d))) ans = abs(abs((ll)x) - abs((ll)d * k)); else { if (x > 0) { if (abs(x) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using P = pair<int, int>; int main() { ll x, k, d; cin >> x >> k >> d; ll ans; if ((ll)k < abs((ll)(x / d))) ans = abs(abs((ll)x) - abs((ll)d * k)); else { if (x >= 0) { if (abs(x)...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
285,538
285,539
u350308906
cpp
p02584
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #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 <string> ...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #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 <string> ...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,541
285,542
u275797573
cpp
p02584
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define inf ll(1e18) using namespace std; typedef long long ll; int main() { ll a, b, c; scanf("%lld%lld%lld", &a, &b, &c); a = abs(a); ll d = a / c; if (d >= b) { printf("%lld", a - b * c); ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define inf ll(1e18) using namespace std; typedef long long ll; int main() { ll a, b, c; scanf("%lld%lld%lld", &a, &b, &c); a = abs(a); ll d = a / c; if (d >= b) { printf("%lld", a - b * c); ...
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
285,547
285,548
u280100725
cpp
p02584
// #pragma GCC optimize(2) // #pragma G++ optimize(2) // #pragma comment(linker,"/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; typedef long long int64; typedef unsigned int ui; typedef unsigned long long ull; typedef float fl; typedef double dl; typedef pair<int, int> pii; #if (WIN32) || ...
// #pragma GCC optimize(2) // #pragma G++ optimize(2) // #pragma comment(linker,"/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; typedef long long int64; typedef unsigned int ui; typedef unsigned long long ull; typedef float fl; typedef double dl; typedef pair<int, int> pii; #if (WIN32) || ...
[ "expression.operation.binary.remove" ]
285,554
285,555
u584568363
cpp
p02584
// #pragma GCC optimize(2) // #pragma G++ optimize(2) // #pragma comment(linker,"/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; typedef long long int64; typedef unsigned int ui; typedef unsigned long long ull; typedef float fl; typedef double dl; typedef pair<int, int> pii; #if (WIN32) || ...
// #pragma GCC optimize(2) // #pragma G++ optimize(2) // #pragma comment(linker,"/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; typedef long long int64; typedef unsigned int ui; typedef unsigned long long ull; typedef float fl; typedef double dl; typedef pair<int, int> pii; #if (WIN32) || ...
[ "expression.operation.binary.remove", "variable_declaration.type.change" ]
285,556
285,555
u584568363
cpp
p02584
#include <bits/stdc++.h> using namespace std; //#define int long long typedef long long ll; typedef unsigned long long ul; typedef unsigned int ui; const ll mod = 1000000007; const ll INF = mod * mod; const int INF_N = 1e+9; typedef pair<int, int> P; #define stop ...
#include <bits/stdc++.h> using namespace std; //#define int long long typedef long long ll; typedef unsigned long long ul; typedef unsigned int ui; const ll mod = 1000000007; const ll INF = mod * mod; const int INF_N = 1e+9; typedef pair<int, int> P; #define stop ...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,563
285,564
u132371041
cpp
p02584
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef pair<int, int> P; const int MOD = 1000000007; const int INF = 0x3f3f3f3f; const ll INFL = 0x3f3f3f3f3f3f3f3f; int main() { ll X, K, D; cin >> X >> K >> D; if (X < 0) X = -X; if (D * ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef pair<int, int> P; const int MOD = 1000000007; const int INF = 0x3f3f3f3f; const ll INFL = 0x3f3f3f3f3f3f3f3f; int main() { ll X, K, D; cin >> X >> K >> D; if (X < 0) X = -X; if (K <=...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
285,565
285,566
u781091740
cpp
p02584
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <vector> #define ran(x) (x).begin(), (x).end() using namespace std; int main() { int64_t x, k, d; cin >> x >> k >> d; x = abs(x); if (x > k * d) { return cout << x - (k * d) << endl, 0; } if (x == d) { ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <vector> #define ran(x) (x).begin(), (x).end() using namespace std; int main() { int64_t x, k, d; cin >> x >> k >> d; x = abs(x); if (x / d > k) { return cout << x - (k * d) << endl, 0; } if (x == d) { ...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,569
285,570
u141567616
cpp
p02584
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #...
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,571
285,572
u832995587
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { int64_t X, K, D, TX; int64_t cou = 0; cin >> X >> K >> D; int64_t ZX = abs(X); TX = ZX; if (K <= TX / D) { cout << TX << endl; } else { int64_t ZXE; ZXE = ZX; while (D <= ZXE) { ZXE = ZXE - D; cou++; } if ((...
#include <bits/stdc++.h> using namespace std; int main() { int64_t X, K, D, TX; int64_t cou = 0; cin >> X >> K >> D; int64_t ZX = abs(X); TX = ZX; if (K <= TX / D) { cout << TX - K * D << endl; } else { int64_t ZXE; ZXE = ZX; while (D <= ZXE) { ZXE = ZXE - D; cou++; } ...
[ "expression.operation.binary.add" ]
285,575
285,576
u413066312
cpp
p02584
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; typedef long long int ll; ll ab(ll a) { return a < 0 ? -a : a; } int main() { ll X, K, D; scanf("%lld %lld %lld", &X, &K, &D); ll ans; if (ab(X) - K * D >= -D) { ans = ab(ab(X) - K * D); } else { ll a = ab(X) % D; ...
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; typedef long long int ll; ll ab(ll a) { return a < 0 ? -a : a; } int main() { ll X, K, D; scanf("%lld %lld %lld", &X, &K, &D); ll ans; if (ab(X) / D >= K) { ans = ab(ab(X) - K * D); } else { ll a = ab(X) % D; ll b ...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "expression.operation.unary.remove" ]
285,581
285,582
u292478904
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, val) for (int i = 0; i < val; i++) const long long INF = 1LL << 60; const ll MOD = ll(1e9) + 7; bool has_key(unordered_map<string, ll> &m, string s) { if (m.find(s) == m.end()) { return false; } else { return true; } } b...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, val) for (int i = 0; i < val; i++) const long long INF = 1LL << 60; const ll MOD = ll(1e9) + 7; bool has_key(unordered_map<string, ll> &m, string s) { if (m.find(s) == m.end()) { return false; } else { return true; } } b...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "identifier.replace.remove", "literal.replace.add" ]
285,583
285,584
u217360243
cpp
p02584
#include <bits/stdc++.h> #ifdef DEBUG #define PRINT(x) \ cout << "func " << __func__ << ": line " << __LINE__ << ": " << #x << " = " \ << (x) << endl; #define PRINTA(a, first, last) \ cout << "func...
#include <bits/stdc++.h> #ifdef DEBUG #define PRINT(x) \ cout << "func " << __func__ << ": line " << __LINE__ << ": " << #x << " = " \ << (x) << endl; #define PRINTA(a, first, last) \ cout << "func...
[ "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
285,585
285,586
u537859408
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr ll MOD = 1000000007; #define REP(i, n) for (ll i = 0; i < (n); i++) #define REP2(i, x, n) for (ll i = x; i < (n); i++) const long long INF = numeric_limits<long long>::max(); template <class T> inline bool chmin(T &a, T b) { if (a > b) { ...
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr ll MOD = 1000000007; #define REP(i, n) for (ll i = 0; i < (n); i++) #define REP2(i, x, n) for (ll i = x; i < (n); i++) const long long INF = numeric_limits<long long>::max(); template <class T> inline bool chmin(T &a, T b) { if (a > b) { ...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "identifier.replace.add", "literal.replace.remove" ]
285,591
285,592
u368138550
cpp
p02584
#include <bits/stdc++.h> using namespace std; using lli = long long; int main() { lli X, K, D; cin >> X >> K >> D; if (X < 0LL) X -= X; if ((X + D) / D >= K) { X -= D * K; cout << llabs(X) << "\n"; return 0; } lli t = X / D; X -= D * (X / D); K -= t; if (K % 2) X -= D; cout ...
#include <bits/stdc++.h> using namespace std; using lli = long long; int main() { lli X, K, D; cin >> X >> K >> D; if (X < 0LL) X = -X; if ((X + D) / D >= K) { X -= D * K; cout << llabs(X) << "\n"; return 0; } lli t = X / D; X -= D * (X / D); K -= t; if (K % 2) X -= D; cout ...
[ "assignment.value.change", "expression.operation.unary.add" ]
285,595
285,596
u356069145
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1000000007; // cout << setprecision(20) << int main() { ll x, k, d; cin >> x >> k >> d; // 0をまたげない if ((double)x / d > k) { cout << abs(x) - k * d << endl; return 0; } // 0をまたげる ll used_times = floor((double)abs(x...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1000000007; // cout << setprecision(20) << int main() { ll x, k, d; cin >> x >> k >> d; // 0をまたげない if ((double)abs(x) / d > k) { cout << abs(x) - k * d << endl; return 0; } // 0をまたげる ll used_times = floor((double)...
[ "control_flow.branch.if.condition.change", "call.add" ]
285,599
285,600
u185821641
cpp
p02584
/* ============================================================= ------------------Welcome To My Code------------------------- ---------Ankit Kumar || IIITBH || CSE || 2018-2022----------- ============================================================= */ #include <bits/stdc++.h> using namespace std; #define FASTIO ...
/* ============================================================= ------------------Welcome To My Code------------------------- ---------Ankit Kumar || IIITBH || CSE || 2018-2022----------- ============================================================= */ #include <bits/stdc++.h> using namespace std; #define FASTIO ...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
285,604
285,605
u038135171
cpp
p02584
// 何これ // ほんとにわかりません #include <bits/stdc++.h> #define mod 1000000007 #define INF LLONG_MAX #define ll long long #define ln cout << endl #define Yes cout << "Yes" << endl #define NO cout << "NO" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(...
// 何これ // ほんとにわかりません #include <bits/stdc++.h> #define mod 1000000007 #define INF LLONG_MAX #define ll long long #define ln cout << endl #define Yes cout << "Yes" << endl #define NO cout << "NO" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
285,613
285,614
u683769494
cpp
p02584
// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで #include <bits/stdc++.h> #define mod 1000000007 #define INF LLONG_MAX #define ll long long #define ln cout << endl #define Yes cout << "Yes" << endl #define NO cout << "NO" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define ...
// 何これ // ほんとにわかりません #include <bits/stdc++.h> #define mod 1000000007 #define INF LLONG_MAX #define ll long long #define ln cout << endl #define Yes cout << "Yes" << endl #define NO cout << "NO" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
285,615
285,614
u683769494
cpp
p02584
#include <cmath> #include <iostream> int main() { long long X, K, D; std::cin >> X >> K >> D; X = std::abs(X); if (K * D <= X) { std::cout << X - K * D << std::endl; } else { long long K_ = X / D; long long X_ = X - K_ * D; if ((K - K_) % 2 == 0) { std::cout << X_ << std::endl; } el...
#include <cmath> #include <iostream> int main() { long long X, K, D; std::cin >> X >> K >> D; X = std::abs(X); if (K <= X / D) { std::cout << X - K * D << std::endl; } else { long long K_ = X / D; long long X_ = X - K_ * D; if ((K - K_) % 2 == 0) { std::cout << X_ << std::endl; } el...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
285,625
285,626
u314062912
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { long x, k, d; cin >> x >> k >> d; long ans; x = abs(x); if (x == 0) { if (k % 2 == 0) ans = 0; if (k % 2 == 1) ans = d; } else if (x > 0) { // if (x - k * d >= 0) { if ((x - ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { long x, k, d; cin >> x >> k >> d; long ans; x = abs(x); if (x == 0) { if (k % 2 == 0) ans = 0; if (k % 2 == 1) ans = d; } else if (x > 0) { // if (x - k * d >= 0) { if ((x - ...
[ "assignment.value.change", "assignment.change" ]
285,627
285,628
u915582296
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long long int X; long long int K; long long int D; //入力 cin >> X >> K >> D; long long int ans; int mo; int n; long long int m; long long int p; if (abs(X) / D <= K) { mo = abs(X) % D; n = abs(X) / D; ans = mo; if ((K - n...
#include <bits/stdc++.h> using namespace std; int main() { long long int X; long long int K; long long int D; //入力 cin >> X >> K >> D; long long int ans; long long int mo; long long int n; long long int m; long long int p; if (abs(X) / D <= K) { mo = abs(X) % D; n = abs(X) / D; ans ...
[ "variable_declaration.type.widen.change" ]
285,631
285,632
u486060546
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define int long long int read() { int x; scanf("%lld", &x); return x; } const int maxn = 1e6 + 10; const int INF = 1e9; int mod = 1e9 + 7; #define ll long long main() { #ifdef LOCAL freopen("1.in", "r", stdin); #endif int x = read(), k = read(), d = read(); in...
#include <bits/stdc++.h> using namespace std; #define int long long int read() { int x; scanf("%lld", &x); return x; } const int maxn = 1e6 + 10; const int INF = 1e9; int mod = 1e9 + 7; #define ll long long main() { #ifdef LOCAL freopen("1.in", "r", stdin); #endif int x = abs(read()), k = read(), d = read(); ...
[ "call.add", "call.arguments.change" ]
285,638
285,639
u435077791
cpp
p02584
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" #define ll long ...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" #define ll long ...
[]
285,640
285,641
u856058349
cpp
p02584
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" #define ll long ...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" #define ll long ...
[ "misc.opposites", "expression.operator.arithmetic.change", "io.output.change" ]
285,642
285,641
u856058349
cpp
p02584
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define vi vector<int> #define all(x) (x).begin(), (x).end() #define INF (1 << 30) - 1 using ll = long long; using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, const T...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define vi vector<int> #define all(x) (x).begin(), (x).end() #define INF (1 << 30) - 1 using ll = long long; using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, const T...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
285,643
285,644
u667375816
cpp
p02584
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define vi vector<int> #define all(x) (x).begin(), (x).end() #define INF (1 << 30) - 1 using ll = long long; using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, const T...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define vi vector<int> #define all(x) (x).begin(), (x).end() #define INF (1 << 30) - 1 using ll = long long; using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, const T...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
285,646
285,644
u667375816
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1e6 + 100; ll ma = 1e18; void solve() { ll n, m, k; cin >> n >> m >> k; if (n < 0) n = -n; ll kk = n / k; if (kk < m) { int d = n % k; m -= kk; if (m % 2) cout << k - d << endl; else cout << d ...
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1e6 + 100; ll ma = 1e18; void solve() { ll n, m, k; cin >> n >> m >> k; if (n < 0) n = -n; ll kk = n / k; if (kk < m) { ll d = n % k; ll mm = m - kk; if (mm % 2) cout << k - d << endl; else cou...
[ "variable_declaration.type.change", "variable_declaration.add", "assignment.compound.arithmetic.replace.remove", "expression.operator.arithmetic.replace.add", "identifier.change", "control_flow.branch.if.condition.change" ]
285,647
285,648
u722928342
cpp