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
p02584
#include <bits/stdc++.h> typedef long long lint; using namespace std; lint gcd(lint x, lint y) { if (x == 0) { return y; } else { return gcd(y % x, x); } } lint lcm(lint x, lint y) { return x / gcd(x, y) * y; } lint C(lint n, lint k) { if (n == k) { return 1; } else if (n < k) { return 0; ...
#include <bits/stdc++.h> typedef long long lint; using namespace std; lint gcd(lint x, lint y) { if (x == 0) { return y; } else { return gcd(y % x, x); } } lint lcm(lint x, lint y) { return x / gcd(x, y) * y; } lint C(lint n, lint k) { if (n == k) { return 1; } else if (n < k) { return 0; ...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,702
286,701
u692704469
cpp
p02584
#include <bits/stdc++.h> typedef long long lint; using namespace std; lint gcd(lint x, lint y) { if (x == 0) { return y; } else { return gcd(y % x, x); } } lint lcm(lint x, lint y) { return x / gcd(x, y) * y; } lint C(lint n, lint k) { if (n == k) { return 1; } else if (n < k) { return 0; ...
#include <bits/stdc++.h> typedef long long lint; using namespace std; lint gcd(lint x, lint y) { if (x == 0) { return y; } else { return gcd(y % x, x); } } lint lcm(lint x, lint y) { return x / gcd(x, y) * y; } lint C(lint n, lint k) { if (n == k) { return 1; } else if (n < k) { return 0; ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.add" ]
286,703
286,701
u692704469
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define _ \ ios::sync_with_stdio(false); \ cin.tie(0); #define __ \ cout << fixed; ...
#include <bits/stdc++.h> using namespace std; #define _ \ ios::sync_with_stdio(false); \ cin.tie(0); #define __ \ cout << fixed; ...
[ "call.add", "call.arguments.change" ]
286,709
286,710
u805412588
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define _ \ ios::sync_with_stdio(false); \ cin.tie(0); #define __ \ cout << fixed; ...
#include <bits/stdc++.h> using namespace std; #define _ \ ios::sync_with_stdio(false); \ cin.tie(0); #define __ \ cout << fixed; ...
[ "call.add", "call.arguments.change" ]
286,711
286,710
u805412588
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define _ \ ios::sync_with_stdio(false); \ cin.tie(0); #define __ \ cout << fixed; ...
#include <bits/stdc++.h> using namespace std; #define _ \ ios::sync_with_stdio(false); \ cin.tie(0); #define __ \ cout << fixed; ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.add", "call.arguments.change" ]
286,712
286,710
u805412588
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long X, K, D; cin >> X >> K >> D; long absx = abs(X); if (absx - K * D > 0) { cout << absx - K * D; return 0; } else { // 負値とならないギリギリまで減らす long k = absx / D; absx -= k * D; K -= k; if (K % 2 == 0) { cout << absx; ...
#include <bits/stdc++.h> using namespace std; int main() { long X, K, D; cin >> X >> K >> D; long absx = abs(X); if (absx / D > K) { cout << absx - K * D; return 0; } else { // 負値とならないギリギリまで減らす long k = absx / D; absx -= k * D; K -= k; if (K % 2 == 0) { cout << absx; ...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
286,722
286,723
u117944057
cpp
p02584
#include <iostream> using namespace std; int main() { long long x, k, d; cin >> x >> k >> d; long long a, b; if (x > 0) { if (x / d <= k) { if ((k - x / d) % 2 == 0) { cout << x % d << endl; } else { cout << d - x % d << endl; } } else { cout << x - k * d << endl...
#include <iostream> using namespace std; int main() { long long x, k, d; cin >> x >> k >> d; long long a, b; if (x > 0) { if (x / d < k) { if ((k - x / d) % 2 == 0) { cout << x % d << endl; } else { cout << d - x % d << endl; } } else { cout << x - k * d << endl;...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
286,727
286,728
u884876243
cpp
p02584
#include <iostream> using namespace std; int main() { long long x, k, d; cin >> x >> k >> d; long long a, b; if (x > 0) { if (x / d < k) { if ((k - x / d) % 2 == 0) { cout << x % d << endl; } else { cout << d - x % d << endl; } } else { cout << x - k * d << endl;...
#include <iostream> using namespace std; int main() { long long x, k, d; cin >> x >> k >> d; long long a, b; if (x > 0) { if (x / d < k) { if ((k - x / d) % 2 == 0) { cout << x % d << endl; } else { cout << d - x % d << endl; } } else { cout << x - k * d << endl;...
[ "control_flow.branch.if.condition.change" ]
286,729
286,728
u884876243
cpp
p02584
#include <bits/stdc++.h> #include <math.h> using namespace std; template <typename T> long long modpow(const T n, const T p, const T mod); template <typename T> long long modinv(const T n, const T mod); template <typename T> bool chmax(T &a, const T &b); template <typename T> bool chmin(T &a, const T &b); long long ...
#include <bits/stdc++.h> #include <math.h> using namespace std; template <typename T> long long modpow(const T n, const T p, const T mod); template <typename T> long long modinv(const T n, const T mod); template <typename T> bool chmax(T &a, const T &b); template <typename T> bool chmin(T &a, const T &b); long long ...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,733
286,734
u616998927
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 //#define N 1000005 typedef long long int ll; // const int mx=1e5+7; // int n,m; // vector<int> a(mx),b(mx); // vector<int> g[mx]; // int deg[mx]; // vector<int> adj[mx]; // vector<int> ans; //---dfs-- // bool visited[mx]; // vector<ll> val(mx,0); //...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 //#define N 1000005 typedef long long int ll; // const int mx=1e5+7; // int n,m; // vector<int> a(mx),b(mx); // vector<int> g[mx]; // int deg[mx]; // vector<int> adj[mx]; // vector<int> ans; //---dfs-- // bool visited[mx]; // vector<ll> val(mx,0); //...
[ "call.add", "call.arguments.change" ]
286,735
286,736
u771590706
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 //#define N 1000005 typedef long long int ll; // const int mx=1e5+7; // int n,m; // vector<int> a(mx),b(mx); // vector<int> g[mx]; // int deg[mx]; // vector<int> adj[mx]; // vector<int> ans; //---dfs-- // bool visited[mx]; // vector<ll> val(mx,0); //...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 //#define N 1000005 typedef long long int ll; // const int mx=1e5+7; // int n,m; // vector<int> a(mx),b(mx); // vector<int> g[mx]; // int deg[mx]; // vector<int> adj[mx]; // vector<int> ans; //---dfs-- // bool visited[mx]; // vector<ll> val(mx,0); //...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.add", "call.arguments.change" ]
286,737
286,736
u771590706
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll X, K, D; cin >> X >> K >> D; ll ans = 0; if (X / D <= K) { K -= X / D; X %= D; if (K % 2 == 0) ans = X; else ans = min(abs(X - D), abs(X + D)); } else { if (X > 0) { ans = X - K * D; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll X, K, D; cin >> X >> K >> D; ll ans = 0; if (abs(X / D) <= K) { K -= abs(X / D); X %= D; if (K % 2 == 0) ans = X; else ans = min(abs(X - D), abs(X + D)); } else { if (X > 0) { ans = X ...
[ "control_flow.branch.if.condition.change", "call.add", "call.arguments.change" ]
286,748
286,749
u568877271
cpp
p02584
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll inf = 1000000007; int main() { ll x, k, d; cin >> x >> k >> d;...
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll inf = 1000000007; int main() { ll x, k, d; cin >> x >> k >> d;...
[ "call.add", "call.arguments.change" ]
286,773
286,774
u077051605
cpp
p02584
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll inf = 1000000007; int main() { ll x, k, d; cin >> x >> k >> d;...
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll inf = 1000000007; int main() { ll x, k, d; cin >> x >> k >> d;...
[ "call.add", "call.arguments.change" ]
286,775
286,774
u077051605
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl "\n" int arr[100]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); double x, k, d; cin >> x >> k >> d; // x-nd=0 double prod = abs(x) / d; if (prod > k) { if (x < 0) cout << (ll)(x + d * k) << endl; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl "\n" int arr[100]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); double x, k, d; cin >> x >> k >> d; // x-nd=0 double prod = abs(x) / d; if (prod > k) { if (x < 0) cout << (ll)(abs(x + d * k)) << endl...
[ "call.add", "call.arguments.change" ]
286,776
286,777
u661923571
cpp
p02584
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long int #define ull unsigned long long int #define db double #define ld long double #define MOD 1000000007 #define inf (1LL << 62) #define pi acos(-1.0) #define si(a) scanf("%lld", &a) #define sd(n) scanf("%lf", &n) #define for1(i, sto...
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long int #define ull unsigned long long int #define db double #define ld long double #define MOD 1000000007 #define inf (1LL << 62) #define pi acos(-1.0) #define si(a) scanf("%lld", &a) #define sd(n) scanf("%lf", &n) #define for1(i, sto...
[ "call.add", "call.arguments.change" ]
286,784
286,785
u409500992
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { ll X, K, D; cin >> X >> K >> D; int cnt; int mod; X = abs(X); if (K <= 1000000000000000 / D && K * D <= X) { cout << X - K * D << endl; return 0; } cnt = X / D; m...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { ll X, K, D; cin >> X >> K >> D; ll cnt; ll mod; X = abs(X); if (K <= 1000000000000000 / D && K * D <= X) { cout << X - K * D << endl; return 0; } cnt = X / D; mod...
[ "variable_declaration.type.change" ]
286,796
286,797
u575988755
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve() { ll x, k, d; cin >> x >> k >> d; if (x < 0) x = -x; if (x == 0) { if (k % 2ll == 0ll) cout << 0; else cout << d; } else if (x > 0) { ll p = x / d; if (p == k) { cout << x - p * d; ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve() { ll x, k, d; cin >> x >> k >> d; if (x < 0) x = -x; if (x == 0) { if (k % 2ll == 0ll) cout << 0; else cout << d; } else if (x > 0) { ll p = x / d; if (p == k) { cout << x - p * d; ...
[ "io.output.change" ]
286,802
286,803
u795263927
cpp
p02584
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define FOR(i, a, b) for (ll i = a; i < (ll)(b); i++) #define ALL(x) (x).begin(), (x).end() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) using namespace std; using ll = long long; using vel = vector<ll>; using ves =...
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define FOR(i, a, b) for (ll i = a; i < (ll)(b); i++) #define ALL(x) (x).begin(), (x).end() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) using namespace std; using ll = long long; using vel = vector<ll>; using ves =...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
286,812
286,813
u978640776
cpp
p02584
#include <bits/stdc++.h> #define nl endl #define dbg(a) cout << #a << "=" << a << endl #define fast \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> #define nl endl #define dbg(a) cout << #a << "=" << a << endl #define fast \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
[ "identifier.change", "io.output.change" ]
286,814
286,815
u070598651
cpp
p02584
#include <bits/stdc++.h> #include <iostream> using namespace std; long long absolute(long long int num) { if (num < 0) return -1 * num; else return num; } int main() { long long int x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; long long int alpha = x / d; if (x - k * d >= 0) cout <...
#include <bits/stdc++.h> #include <iostream> using namespace std; long long absolute(long long int num) { if (num < 0) return -1 * num; else return num; } int main() { long long int x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; long long int alpha = x / d; if (alpha >= k) cout << x ...
[ "identifier.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
286,818
286,819
u572600743
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>; void Main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); if (x < d) { if (k % 2 == 0) { cout << abs(x) << endl; } else { cout << abs(x - d) << endl;...
#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>; void Main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); if (x < d) { if (k % 2 == 0) { cout << abs(x) << endl; } else { cout << abs(x - d) << endl;...
[ "control_flow.return.add" ]
286,828
286,829
u767481489
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = (ll)1e15; int main() { ll X, K, D; cin >> X >> K >> D; ll res; if (abs(X) / D > K) { if (X > 0) { res = abs(X - D * K); } else { res = abs(X + D * K); } } else { // ll num, amari; // if(X%D > ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = (ll)1e15; int main() { ll X, K, D; cin >> X >> K >> D; ll res; if (abs(X) / D > K) { if (X > 0) { res = abs(X - D * K); } else { res = abs(X + D * K); } } else { // ll num, amari; // if(X%D > ...
[ "call.add", "call.arguments.change" ]
286,830
286,831
u414306460
cpp
p02584
#include <cmath> #include <ctype.h> #include <iostream> #include <limits.h> #include <sstream> #include <stdio.h> #include <string.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long int ll; typedef vector<int> vi; //最大公約数 int gcd(int a, int b) ...
#include <cmath> #include <ctype.h> #include <iostream> #include <limits.h> #include <sstream> #include <stdio.h> #include <string.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long int ll; typedef vector<int> vi; //最大公約数 int gcd(int a, int b) ...
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "call.arguments.change" ]
286,834
286,835
u227887205
cpp
p02584
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; using ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; const int N = 2e5 + 10; const ll inf = 1e15 + 42; #define endl "\n" const ll mod = 1000000007; typedef tree<...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; using ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; const int N = 2e5 + 10; const ll inf = 1e15 + 42; #define endl "\n" const ll mod = 1000000007; typedef tree<...
[ "call.add", "call.arguments.change" ]
286,838
286,839
u595135325
cpp
p02584
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; using ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; const int N = 2e5 + 10; const ll inf = 1e15 + 42; #define endl "\n" const ll mod = 1000000007; typedef tree<...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; using ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; const int N = 2e5 + 10; const ll inf = 1e15 + 42; #define endl "\n" const ll mod = 1000000007; typedef tree<...
[ "call.add", "call.arguments.change", "identifier.change" ]
286,840
286,839
u595135325
cpp
p02584
#include <bits/stdc++.h> #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); typedef long long int ll; using names...
#include <bits/stdc++.h> #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); typedef long long int ll; using names...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,843
286,844
u957788056
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 998244353; const int M = 1e9 + 7; #define inf 0x3f3f3f3f // std::ios::sync_with_stdio(0); int main() { std::ios::sync_with_stdio(0); ll x, k, d; cin >> x >> k >> d; if (x >= 0) { if (x / d >= k) { x = x - k * d; k ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 998244353; const int M = 1e9 + 7; #define inf 0x3f3f3f3f // std::ios::sync_with_stdio(0); int main() { std::ios::sync_with_stdio(0); ll x, k, d; cin >> x >> k >> d; if (x >= 0) { if (x / d >= k) { x = x - k * d; k ...
[ "call.add", "call.arguments.change" ]
286,845
286,846
u322266296
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; typedef vector<bool> vb; typedef vector<string> vs; typedef vector<char> vc; typedef queue<ll> ql; typedef deque<ll> dql; typedef priority_queue<ll /*, vl, greater<ll>*/> pql; //降順(/*昇順*/) typedef set<...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; typedef vector<bool> vb; typedef vector<string> vs; typedef vector<char> vc; typedef queue<ll> ql; typedef deque<ll> dql; typedef priority_queue<ll /*, vl, greater<ll>*/> pql; //降順(/*昇順*/) typedef set<...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
286,849
286,850
u682191329
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define rep2(i, x, n) for (ll i = x, i##_len = (n); i < i##_len; ++i) #define all(n) begin(n), end(n) using ll = long long; using P = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vs = ve...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define rep2(i, x, n) for (ll i = x, i##_len = (n); i < i##_len; ++i) #define all(n) begin(n), end(n) using ll = long long; using P = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vs = ve...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,854
286,855
u134678977
cpp
p02584
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); ll x, k, d; cin >> x >> k >> d; ll time = abs(x) / d; ll yv = x % d; ll res = 0; if (time > k) { if (x < 0) res = x + k * d; ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); ll x, k, d; cin >> x >> k >> d; ll time = abs(x) / d; ll yv = x % d; ll res = 0; if (time > k) { if (x < 0) res = x + k * d; ...
[ "call.add", "call.arguments.change" ]
286,861
286,862
u451868485
cpp
p02584
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) using namespace std; using ll = long long; using ld = long dou...
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) using namespace std; using ll = long long; using ld = long dou...
[ "call.add", "call.arguments.change" ]
286,863
286,864
u556774846
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using P = pair<ll, ll>; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rep2(i, m, n) for (int(i) = (m); (i) < (n); (i)++) #define ALL(obj) (obj).begin(), (obj).end() #define rALL(obj) (obj).rbegin(), (obj).rend() c...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using P = pair<ll, ll>; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rep2(i, m, n) for (int(i) = (m); (i) < (n); (i)++) #define ALL(obj) (obj).begin(), (obj).end() #define rALL(obj) (obj).rbegin(), (obj).rend() c...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,865
286,866
u129667379
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long long X, K, D; cin >> X >> K >> D; long long s = abs(X) / D; if (s >= K) { if (X < 0) cout << X + D * K << endl; else cout << abs(X - D * K) << endl; return 0; } K -= s; if (X < 0) X += s * D; else X -= s * D;...
#include <bits/stdc++.h> using namespace std; int main() { long long X, K, D; cin >> X >> K >> D; long long s = abs(X) / D; if (s >= K) { if (X < 0) cout << abs(X + D * K) << endl; else cout << abs(X - D * K) << endl; return 0; } K -= s; if (X < 0) X += s * D; else X -= s...
[ "call.add", "call.arguments.change" ]
286,869
286,870
u503221936
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long long X, K, D; cin >> X >> K >> D; long long s = abs(X) / D; if (s >= K) { if (X < 0) cout << X + D * K << endl; else cout << X - D * K << endl; return 0; } K -= s; if (X < 0) X += s * D; else X -= s * D; if...
#include <bits/stdc++.h> using namespace std; int main() { long long X, K, D; cin >> X >> K >> D; long long s = abs(X) / D; if (s >= K) { if (X < 0) cout << abs(X + D * K) << endl; else cout << abs(X - D * K) << endl; return 0; } K -= s; if (X < 0) X += s * D; else X -= s...
[ "call.add", "call.arguments.change" ]
286,871
286,870
u503221936
cpp
p02584
#ifdef LOCAL //#define _GLIBCXX_DEBUG #endif //#pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<int, int> Pi; typedef vector<ll> Vec...
#ifdef LOCAL //#define _GLIBCXX_DEBUG #endif //#pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<int, int> Pi; typedef vector<ll> Vec...
[ "assignment.variable.change", "expression.operation.binary.remove" ]
286,872
286,873
u592686932
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define int long long template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } signed main() { int x, k, d; c...
#include <bits/stdc++.h> using namespace std; #define int long long template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } signed main() { int x, k, d; c...
[ "call.add", "call.arguments.change" ]
286,876
286,877
u221119670
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define LL long long LL x, k, d; int main() { cin >> x >> k >> d; int fg = x < 0 ? -1 : 1; LL c = abs(x) / d; if (k <= c) { x = fg * (abs(x) - k * d); } else { k -= c; x = fg * (abs(x) % d); if (k & 1) x = x < 0 ? x + d : x - d; } cout <...
#include <bits/stdc++.h> using namespace std; #define LL long long LL x, k, d; int main() { cin >> x >> k >> d; int fg = x < 0 ? -1 : 1; LL c = abs(x) / d; if (k <= c) { x = fg * (abs(x) - k * d); } else { k -= c; x = fg * (abs(x) % d); if (k & 1) x = x < 0 ? x + d : x - d; } cout <...
[ "call.add", "call.arguments.change" ]
286,880
286,881
u888581410
cpp
p02584
#include <bits/stdc++.h> #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<ll> VI; typedef pair<ll, ll> P; typedef tuple<ll, ll, ll> t3; typedef tuple<ll, ll, ll, ll> t4; typedef tuple<ll, ll, ll, ll, ll> t5; #define rep(a, n) for (ll ...
#include <bits/stdc++.h> #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<ll> VI; typedef pair<ll, ll> P; typedef tuple<ll, ll, ll> t3; typedef tuple<ll, ll, ll, ll> t4; typedef tuple<ll, ll, ll, ll, ll> t5; #define rep(a, n) for (ll ...
[ "call.add", "call.arguments.change" ]
286,882
286,883
u834771741
cpp
p02584
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NUL...
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NUL...
[ "call.add", "call.arguments.change" ]
286,884
286,885
u064087840
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.operation.binary.remove", "control_flow.branch.if.condition.change" ]
286,895
286,896
u265392294
cpp
p02584
#include <algorithm> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <time.h> #include <vector> using namespace std; #define rep(i, a, n) fo...
#include <algorithm> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <time.h> #include <vector> using namespace std; #define rep(i, a, n) fo...
[ "assignment.variable.change", "identifier.change", "control_flow.branch.if.condition.change" ]
286,905
286,906
u407213771
cpp
p02584
#include <bits/stdc++.h> //#include <ext/pb_ds/detail/standard_policies.hpp> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #define ll long long #define int long long #define pb push_back #define ins insert #define rs resize #define br break; #define cont continue; #define vi vector<i...
#include <bits/stdc++.h> //#include <ext/pb_ds/detail/standard_policies.hpp> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #define ll long long #define int long long #define pb push_back #define ins insert #define rs resize #define br break; #define cont continue; #define vi vector<i...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
286,907
286,908
u970664746
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long long X, K, D; cin >> X >> K >> D; long long ans = abs(X) / D; if (K < ans) { cout << abs(X - D * K) << endl; return 0; } long long pos = abs(X) - D * ans; K -= ans; if (K % 2 == 0) cout << pos << endl; else cout << abs(po...
#include <bits/stdc++.h> using namespace std; int main() { long long X, K, D; cin >> X >> K >> D; long long ans = abs(X) / D; if (K < ans) { cout << abs(X) - D * K << endl; return 0; } long long pos = abs(X) - D * ans; K -= ans; if (K % 2 == 0) cout << pos << endl; else cout << abs(po...
[ "call.arguments.change" ]
286,909
286,910
u815026012
cpp
p02584
#include <bits/stdc++.h> using namespace std; int main() { long long x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; long long step = x / d; if (k <= step) cout << x - step * d; else { k -= step; if (k % 2 == 0) cout << x - step * d; else cout << step * d + d - x; } }
#include <bits/stdc++.h> using namespace std; int main() { long long x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; long long step = x / d; if (k <= step) cout << x - d * k; else { k -= step; if (k % 2 == 0) cout << x - step * d; else cout << step * d + d - x; } }
[ "expression.operation.binary.remove" ]
286,911
286,912
u371958417
cpp
p02584
#include <bits/stdc++.h> #include <unistd.h> #if __has_include(<local.h>) #include <local.h> #endif using namespace std; typedef long long int LL; typedef long long int LLint; // Faster Program #define endl "\n" // Faster Coding #define ED return #define GET(a) ...
#include <bits/stdc++.h> #include <unistd.h> #if __has_include(<local.h>) #include <local.h> #endif using namespace std; typedef long long int LL; typedef long long int LLint; // Faster Program #define endl "\n" // Faster Coding #define ED return #define GET(a) ...
[ "call.add", "call.arguments.change" ]
286,919
286,920
u550995059
cpp
p02584
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
[ "call.add", "call.arguments.change" ]
286,923
286,924
u041282550
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; constexpr int Inf = 1000000010; constexpr ll INF = 2000000000000000000; constexpr ll MOD = 1000000007; const double PI = 3.1415926535897; typedef pair<int, int> P; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; constexpr int Inf = 1000000010; constexpr ll INF = 2000000000000000000; constexpr ll MOD = 1000000007; const double PI = 3.1415926535897; typedef pair<int, int> P; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
286,931
286,932
u322714721
cpp
p02584
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back using namespace std; typedef long long ll; const int MAXN = 1000 * 1000 + 7; const int SS = 1 << 20; const int INF = 1000 * 1000 * 1000 + 7; int t[MAXN]; int n, m, q; int main() { ios_base::sync_with_stdio(0), cin.tie(0); int T; ...
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back using namespace std; typedef long long ll; const int MAXN = 1000 * 1000 + 7; const int SS = 1 << 20; const int INF = 1000 * 1000 * 1000 + 7; int t[MAXN]; int n, m, q; int main() { ios_base::sync_with_stdio(0), cin.tie(0); int T; ...
[ "expression.operation.binary.remove", "identifier.change", "control_flow.branch.if.condition.change" ]
286,935
286,936
u700507948
cpp
p02584
#include <bits/stdc++.h> using namespace std; #pragma region macros_and_aliases #define rep(i, n) for (long long i = 0; i < (n); i++) #define rrep(i, n) for (long long i = (n)-1; i > -1; i--) #define Rep(i, m, n) for (long long i = (m); i < (n); i++) #define rRep(i, m, n) for (long long i = (n)-1; i >= (m); i--) #defin...
#include <bits/stdc++.h> using namespace std; #pragma region macros_and_aliases #define rep(i, n) for (long long i = 0; i < (n); i++) #define rrep(i, n) for (long long i = (n)-1; i > -1; i--) #define Rep(i, m, n) for (long long i = (m); i < (n); i++) #define rRep(i, m, n) for (long long i = (n)-1; i >= (m); i--) #defin...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,945
286,946
u513211419
cpp
p02584
#include <bits/stdc++.h> #define ll long long #define ld long double using namespace std; ll INF = (ll)1e20; int iINF = (int)1e20; ll mod = (ll)1e9 + 7; mt19937 gen(chrono::steady_clock::now().time_since_epoch().count()); signed main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); ll num = ((x + d - 1) / d...
#include <bits/stdc++.h> #define ll long long #define ld long double using namespace std; ll INF = (ll)1e20; int iINF = (int)1e20; ll mod = (ll)1e9 + 7; mt19937 gen(chrono::steady_clock::now().time_since_epoch().count()); signed main() { ll x, k, d; cin >> x >> k >> d; x = abs(x); ll num = ((x + d - 1) / d...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,953
286,954
u273118198
cpp
p02584
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define sint int32_t #define int long long int #define all(v) v.begin(), v.end() #define vii vector<int> #define pb push_back #define pii pair<int, int> #define F fi...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define sint int32_t #define int long long int #define all(v) v.begin(), v.end() #define vii vector<int> #define pb push_back #define pii pair<int, int> #define F fi...
[ "identifier.change", "expression.operation.binary.change" ]
286,955
286,956
u146209432
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define AB_BHI_NI_DEGI \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int l...
#include <bits/stdc++.h> using namespace std; #define AB_BHI_NI_DEGI \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int l...
[ "expression.operation.binary.remove" ]
286,959
286,960
u637142716
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; if (k <= x / d) cout << x - d * k << endl; else { k -= x / d; x %= d; if (x % 2 == 0) cout << d - x << endl; else cout << x << endl; } }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x, k, d; cin >> x >> k >> d; if (x < 0) x *= -1; if (k <= x / d) cout << x - d * k << endl; else { k -= x / d; x %= d; if (k % 2) cout << d - x << endl; else cout << x << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
286,965
286,966
u247123590
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int ulli; typedef long double ld; const lli INF = 1e9 + 100; const lli INF64 = (1LL << 61) + 100; const lli MOD = 1e9 + 7; const lli MH1 = 1599614977, MH2 = 2034417103, MH3 = 1090250123, MH4 = 2024491871; lli b...
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int ulli; typedef long double ld; const lli INF = 1e9 + 100; const lli INF64 = (1LL << 61) + 100; const lli MOD = 1e9 + 7; const lli MH1 = 1599614977, MH2 = 2034417103, MH3 = 1090250123, MH4 = 2024491871; lli b...
[ "control_flow.branch.if.condition.change", "call.add" ]
286,967
286,968
u990008163
cpp
p02584
#include <iostream> using namespace std; #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <vector> #define MOD1 1000000007 #define MOD2 998244353 #define LIMIT1 200002 #define LIMIT2 500002 typedef long long ll; typedef long double ld; typedef con...
#include <iostream> using namespace std; #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <vector> #define MOD1 1000000007 #define MOD2 998244353 #define LIMIT1 200002 #define LIMIT2 500002 typedef long long ll; typedef long double ld; typedef con...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.add", "call.arguments.change" ]
286,973
286,974
u091870478
cpp
p02584
#include "bits/stdc++.h" using namespace std; int64_t z(int64_t p) { if (p >= 0) return p; else return p * -1; } int main() { int64_t x, k, d, di, ans, a; cin >> x >> k >> d; di = x / d; if (di >= k) ans = z(x) - k * d; else { if (x > 0) { a = x - di * d; if ((k - di) % 2 == ...
#include "bits/stdc++.h" using namespace std; int64_t z(int64_t p) { if (p >= 0) return p; else return p * -1; } int main() { int64_t x, k, d, di, ans, a; cin >> x >> k >> d; di = z(x) / d; if (di >= k) ans = z(x) - k * d; else { if (x > 0) { a = x - di * d; if ((k - di) % 2 ...
[ "call.add", "call.arguments.change" ]
286,975
286,976
u141511165
cpp
p02584
/* Author: Alam Khan AUST CSE 40th Batch */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef long long ll; typedef tree<ll, null_type, less_equal<ll...
/* Author: Alam Khan AUST CSE 40th Batch */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef long long ll; typedef tree<ll, null_type, less_equal<ll...
[ "call.add", "call.arguments.change" ]
286,981
286,982
u003086718
cpp
p02584
#include <bits/stdc++.h> //#include <time.h> // #include<set> // #include<vector> // #include<algorithm> // #include<iostream> using namespace std; #include <math.h> // to increase precision // std::cout<<std::fixed; // std::cout<<std::setprecision(6)<<z; // clock_t tStart = clock(); // printf("Time taken: %.9fs\n", (...
#include <bits/stdc++.h> //#include <time.h> // #include<set> // #include<vector> // #include<algorithm> // #include<iostream> using namespace std; #include <math.h> // to increase precision // std::cout<<std::fixed; // std::cout<<std::setprecision(6)<<z; // clock_t tStart = clock(); // printf("Time taken: %.9fs\n", (...
[ "call.add", "call.arguments.change" ]
286,983
286,984
u815148971
cpp
p02584
#include <bits/stdc++.h> using namespace std; // Made with <3 by MinumCoklatPanas typedef long long ll; const int INF = 1e9; const ll INFF = 1e18; const int MAXN = 510; const int MOD = 1e9 + 7; const double PI = acos(-1.0); const double INFD = 1E9; const double EPS = 1e-9; void process(ll x, ll k, ll d) { if (k % 2...
#include <bits/stdc++.h> using namespace std; // Made with <3 by MinumCoklatPanas typedef long long ll; const int INF = 1e9; const ll INFF = 1e18; const int MAXN = 510; const int MOD = 1e9 + 7; const double PI = acos(-1.0); const double INFD = 1E9; const double EPS = 1e-9; void process(ll x, ll k, ll d) { if (k % 2...
[ "call.add", "call.arguments.change" ]
286,987
286,988
u211510540
cpp
p02584
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> //required #include <ext/pb_ds/tree_policy.hpp> //required using namespace __gnu_pbds; using namespace std; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // find_by_order...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> //required #include <ext/pb_ds/tree_policy.hpp> //required using namespace __gnu_pbds; using namespace std; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // find_by_order...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "io.output.change" ]
286,993
286,994
u431615124
cpp
p02584
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main(void) { long long x, k, d; cin >> x >> k >> d; long long s = x / d; long long p, q; if (x >= 0) { p = x - d * s; q = p - d; } else { p = x + d * s; q = p + d; } ...
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main(void) { long long x, k, d; cin >> x >> k >> d; long long s = abs(x) / d; long long p, q; if (x >= 0) { p = x - d * s; q = p - d; } else { p = x + d * s; q = p + d; ...
[ "call.add", "call.arguments.change" ]
286,995
286,996
u960732690
cpp
p02584
#include "bits/stdc++.h" using namespace std; using ll = long long; using P = pair<int, int>; #define PI acos(-1) #define Mod (int)1000000007 #define INFTY (int)INT_MAX #define Rep(i, n) for (int i = 0; i < (int)(n); i++) #define BitRep(i, n) for (int i = 0; i < (int)(1 << n); i++) #define All(vec) vec.begin(), vec.end...
#include "bits/stdc++.h" using namespace std; using ll = long long; using P = pair<int, int>; #define PI acos(-1) #define Mod (int)1000000007 #define INFTY (int)INT_MAX #define Rep(i, n) for (int i = 0; i < (int)(n); i++) #define BitRep(i, n) for (int i = 0; i < (int)(1 << n); i++) #define All(vec) vec.begin(), vec.end...
[ "call.add", "call.arguments.change" ]
286,997
286,998
u906839513
cpp
p02584
#include <bits/stdc++.h> #define lld long long int #define vec vector<lld> #define pll pair<lld, lld> #define pb push_back #define ss second #define ff first #define mp make_pair #define mod 1000000007 #define answer(x) cout << endl << "answer : " << x << endl << endl; #define op(x) cout << x << endl; #define maxn 1000...
#include <bits/stdc++.h> #define lld long long int #define vec vector<lld> #define pll pair<lld, lld> #define pb push_back #define ss second #define ff first #define mp make_pair #define mod 1000000007 #define answer(x) cout << endl << "answer : " << x << endl << endl; #define op(x) cout << x << endl; #define maxn 1000...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
286,999
287,000
u606883845
cpp
p02584
#include <bits/stdc++.h> #define boost_io \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define num(a) a - '0' #define rep(i, ...
#include <bits/stdc++.h> #define boost_io \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define num(a) a - '0' #define rep(i, ...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
287,007
287,008
u087802159
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 13; int a[maxn]; int main() { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); if (x < 0) x = -x; ll cal = x / d; if (cal >= k) { printf("%lld", x - cal * d); } else { ll res = x - cal * d; ll way = k - ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 13; int a[maxn]; int main() { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); if (x < 0) x = -x; ll cal = x / d; if (cal >= k) { printf("%lld", abs(x - k * d)); } else { ll res = x - cal * d; ll way = k...
[ "call.add", "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
287,009
287,010
u913831587
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 13; int a[maxn]; int main() { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); if (x < 0) x = -x; int cal = x / d; if (cal >= k) { printf("%lld", x - cal * d); } else { ll res = x - cal * d; int way = k ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 13; int a[maxn]; int main() { ll x, k, d; scanf("%lld%lld%lld", &x, &k, &d); if (x < 0) x = -x; ll cal = x / d; if (cal >= k) { printf("%lld", abs(x - k * d)); } else { ll res = x - cal * d; ll way = k...
[ "variable_declaration.type.change", "call.add", "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
287,011
287,010
u913831587
cpp
p02584
#pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for (int i = a; i <= n; i++) #define per(i, a, n) for (int i = n; i >= a; i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define fi first #define se second #define sz(...
#pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for (int i = a; i <= n; i++) #define per(i, a, n) for (int i = n; i >= a; i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define fi first #define se second #define sz(...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.replace.add", "literal.replace.remove" ]
287,016
287,017
u731144113
cpp
p02584
/** * Author : Deep Raval * There are no two words in the English language more harmful than "good job". * 1729 0_0 **/ #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #incl...
/** * Author : Deep Raval * There are no two words in the English language more harmful than "good job". * 1729 0_0 **/ #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #incl...
[ "call.arguments.add", "call.arguments.change" ]
287,018
287,019
u903458979
cpp
p02584
#include <algorithm> #include <bits/stdc++.h> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <iomanip> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #in...
#include <algorithm> #include <bits/stdc++.h> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <iomanip> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #in...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
287,022
287,023
u755770829
cpp
p02584
#pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <cctype> #include <cstdint> #include <cstdio> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <...
#pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <cctype> #include <cstdint> #include <cstdio> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <...
[ "call.add", "call.arguments.change" ]
287,026
287,027
u431021942
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 5; const int MOD = 1e9 + 7; int a[maxn]; ll f[maxn]; int first[maxn]; ll ans1[maxn]; int cmp(int a, int b) { return a > b; } string s; map<ll, int> mp; vector<int> v; int main() { ll x, k, d; cin >> x >> k >> d; ll x1 = abs...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 5; const int MOD = 1e9 + 7; int a[maxn]; ll f[maxn]; int first[maxn]; ll ans1[maxn]; int cmp(int a, int b) { return a > b; } string s; map<ll, int> mp; vector<int> v; int main() { ll x, k, d; cin >> x >> k >> d; ll x1 = abs...
[ "identifier.change", "expression.operation.binary.change" ]
287,028
287,029
u050301283
cpp
p02584
#include <algorithm> #include <array> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <v...
#include <algorithm> #include <array> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <v...
[ "call.add", "call.arguments.change" ]
287,030
287,031
u257304866
cpp
p02584
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int MOD = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct edge { ll to, cost; }; ll gcd(ll a, ll b) { if (b == 0) { return a; } else { ret...
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int MOD = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct edge { ll to, cost; }; ll gcd(ll a, ll b) { if (b == 0) { return a; } else { ret...
[ "call.add", "call.arguments.change" ]
287,032
287,033
u473023730
cpp
p02584
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int MOD = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct edge { ll to, cost; }; ll gcd(ll a, ll b) { if (b == 0) { return a; } else { ret...
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int MOD = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct edge { ll to, cost; }; ll gcd(ll a, ll b) { if (b == 0) { return a; } else { ret...
[ "call.add", "call.arguments.change" ]
287,034
287,033
u473023730
cpp
p02584
#include <bits/stdc++.h> #define int long long typedef long long ll; using namespace std; const ll MAX = 200000; const ll INF = 1001001001; const ll MOD = 1000000007; const double PI = 3.1415926535897932; ll X, K, D, ans = 0, tmp = 0; vector<ll> A; signed main() { cin >> X >> K >> D; tmp = X % D; if (tmp < 0) ...
#include <bits/stdc++.h> #define int long long typedef long long ll; using namespace std; const ll MAX = 200000; const ll INF = 1001001001; const ll MOD = 1000000007; const double PI = 3.1415926535897932; ll X, K, D, ans = 0, tmp = 0; vector<ll> A; signed main() { cin >> X >> K >> D; tmp = X % D; if (tmp < 0) ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
287,043
287,044
u132452589
cpp
p02584
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <math.h> #include <set> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main(void) { long long int x, k, d; cin >> x >> k >> d; if (x == 0) { if (k % 2 == 0) { ...
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <math.h> #include <set> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main(void) { long long int x, k, d; cin >> x >> k >> d; if (x == 0) { if (k % 2 == 0) { ...
[ "call.add", "call.arguments.change" ]
287,059
287,060
u336381735
cpp
p02584
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <math.h> #include <set> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main(void) { long long int x, k, d; cin >> x >> k >> d; if (x == 0) { if (k % 2 == 0) { ...
#include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <math.h> #include <set> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main(void) { long long int x, k, d; cin >> x >> k >> d; if (x == 0) { if (k % 2 == 0) { ...
[ "call.add", "call.arguments.change" ]
287,061
287,060
u336381735
cpp
p02584
#include <bits/stdc++.h> using namespace std; long long x, k, d; int main() { scanf("%lld%lld%lld", &x, &k, &d); x = abs(x); if (x > k * d) printf("%lld\n", x - k * d); else printf("%lld\n", x / d & 1 ^ k & 1 ? (x / d + 1) * d - x : x % d); return 0; }
#include <bits/stdc++.h> using namespace std; long long x, k, d; int main() { scanf("%lld%lld%lld", &x, &k, &d); x = abs(x); if (x / d >= k) printf("%lld\n", x - k * d); else printf("%lld\n", x / d & 1 ^ k & 1 ? (x / d + 1) * d - x : x % d); return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
287,062
287,063
u906318193
cpp
p02584
#include <bits/stdc++.h> #define re register #define int long long using namespace std; int n, a[100002], b, head[10002], cnt, ans, m, x, k, d; inline int read() { re int t = 0; re char v = getchar(); while (v < '0') v = getchar(); while (v >= '0') t = (t << 3) + (t << 1) + v - 48, v = getchar(); retu...
#include <bits/stdc++.h> #define re register #define int long long using namespace std; int n, a[100002], b, head[10002], cnt, ans, m, x, k, d; inline int read() { re int t = 0; re char v = getchar(); while (v < '0') v = getchar(); while (v >= '0') t = (t << 3) + (t << 1) + v - 48, v = getchar(); retu...
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
287,066
287,067
u196974365
cpp
p02584
#include <bits/stdc++.h> using namespace std; #pragma region void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __print(unsigned x) { cerr << x; } void __print(unsigned long x) { cerr << x; } void __print(unsigned long long x) { cerr << x; } void __print...
#include <bits/stdc++.h> using namespace std; #pragma region void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __print(unsigned x) { cerr << x; } void __print(unsigned long x) { cerr << x; } void __print(unsigned long long x) { cerr << x; } void __print...
[ "call.add", "call.arguments.change" ]
287,072
287,073
u667686550
cpp
p02584
#include <bits/stdc++.h> using namespace std; using ll = long long; ll md = 1000000007; typedef vector<vector<ll>> vvl; typedef vector<ll> vl; vl p, B, fac(2, 1), ifac(2, 1); ll ad(ll a, ll b, ll mod = md) { return (a % mod + b % mod + mod) % mod; } ll ml(ll a, ll b, ll mod = md) { return ((a % mod) * (b % mod)) % mo...
#include <bits/stdc++.h> using namespace std; using ll = long long; ll md = 1000000007; typedef vector<vector<ll>> vvl; typedef vector<ll> vl; vl p, B, fac(2, 1), ifac(2, 1); ll ad(ll a, ll b, ll mod = md) { return (a % mod + b % mod + mod) % mod; } ll ml(ll a, ll b, ll mod = md) { return ((a % mod) * (b % mod)) % mo...
[ "call.add", "call.arguments.change" ]
287,076
287,077
u214781572
cpp
p02584
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 1e9 + 7; template <typename T> boo...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 1e9 + 7; template <typename T> boo...
[ "expression.operation.unary.arithmetic.remove" ]
287,078
287,079
u414689295
cpp
p02584
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 1e9 + 7; template <typename T> boo...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 1e9 + 7; template <typename T> boo...
[ "expression.operation.unary.arithmetic.remove", "expression.operation.unary.add", "control_flow.branch.if.condition.change" ]
287,080
287,079
u414689295
cpp
p02584
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 1e9 + 7; template <typename T> boo...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 1e9 + 7; template <typename T> boo...
[ "expression.operation.unary.arithmetic.remove", "call.add", "call.arguments.change", "expression.operation.unary.add", "control_flow.branch.if.condition.change" ]
287,081
287,079
u414689295
cpp
p02584
#include <bits/stdc++.h> using namespace std; typedef long long ll; // int/long: -2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31) // long/long long: -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 // (-2^63 <= long < 2^63) #define INF (1 << 30) // 1,073,741,824 //= 536,870,912 *2 #define M...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // int/long: -2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31) // long/long long: -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 // (-2^63 <= long < 2^63) #define INF (1 << 30) // 1,073,741,824 //= 536,870,912 *2 #define M...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
287,086
287,087
u216849520
cpp
p02584
#include <bits/stdc++.h> #define ll long long int using namespace std; void code() { ll x, k, d; cin >> x >> k >> d; if (x > 0) { ll diff = x; ll mov = diff / d; if (k <= mov) { cout << x - k * d << endl; return; } else { ll lft = k - mov; if (lft % 2 == 0) { cout...
#include <bits/stdc++.h> #define ll long long int using namespace std; void code() { ll x, k, d; cin >> x >> k >> d; if (x >= 0) { ll diff = x; ll mov = diff / d; if (k <= mov) { cout << x - k * d << endl; return; } else { ll lft = k - mov; if (lft % 2 == 0) { cou...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.add", "call.arguments.change" ]
287,104
287,103
u154606208
cpp
p02584
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, a, n) for (int i = a; i < n; i++) #define been(ix) (ix).begin(), (ix).end() using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<long long> vl; const ll INFL = 1e18; const int INF = 1001001001; typedef pa...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, a, n) for (int i = a; i < n; i++) #define been(ix) (ix).begin(), (ix).end() using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<long long> vl; const ll INFL = 1e18; const int INF = 1001001001; typedef pa...
[ "call.add", "call.arguments.change" ]
287,105
287,106
u495881622
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, nu...
#include <bits/stdc++.h> using namespace std; #define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, nu...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
287,111
287,112
u224481909
cpp
p02584
#include <bits/stdc++.h> using namespace std; #define ll long long int #define db double #define fl float #define endl '\n' #define mod (ll)(1000000007) #define mod1 (ll)998242353 #define mod2 (ll)998244353 #define PI 3.1415926535897932384626433832795 #define pii pair<int, int> #define pll pair<ll, ll> #define fi fi...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define db double #define fl float #define endl '\n' #define mod (ll)(1000000007) #define mod1 (ll)998242353 #define mod2 (ll)998244353 #define PI 3.1415926535897932384626433832795 #define pii pair<int, int> #define pll pair<ll, ll> #define fi fi...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
287,115
287,116
u961023410
cpp
p02584
#include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define eb emplace_back #define mp make_pair #define mset(x, y) memset((x), (y), sizeof(x)) #define sz(x) ((int)(x).size()) #define rep(i, a, b) for (i = a; i < b; i++) #define per(i, a, b) for (i = a; i >= b; i--) #define all(x) (x).begin...
#include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define eb emplace_back #define mp make_pair #define mset(x, y) memset((x), (y), sizeof(x)) #define sz(x) ((int)(x).size()) #define rep(i, a, b) for (i = a; i < b; i++) #define per(i, a, b) for (i = a; i >= b; i--) #define all(x) (x).begin...
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
287,119
287,120
u243810398
cpp
p02584
#include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include ...
#include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <string> #include ...
[ "call.add", "control_flow.branch.if.condition.change" ]
287,121
287,122
u275934251
cpp
p02584
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <stdio.h> using namespace std; #include <vector> #define rep(i, n) for (ll i = 0; i < (n); i++) #define INF 1e9 #define llINF 1e18 #define base10_4 10000 // 1e4 #define base10_5 100000 // 1e5 #define base10_6 1000000 // 1e6 ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <stdio.h> using namespace std; #include <vector> #define rep(i, n) for (ll i = 0; i < (n); i++) #define INF 1e9 #define llINF 1e18 #define base10_4 10000 // 1e4 #define base10_5 100000 // 1e5 #define base10_6 1000000 // 1e6 ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
287,127
287,128
u766512448
cpp
p02584
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse4") #include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stac...
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse4") #include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stac...
[ "identifier.change", "control_flow.loop.for.condition.change", "io.output.change" ]
287,129
287,130
u841694668
cpp
p02584
#include <algorithm> #include <cmath> #include <ctime> #include <deque> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> using namespace std; #define int long long int #define rep(i, n) for (int ...
#include <algorithm> #include <cmath> #include <ctime> #include <deque> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> using namespace std; #define int long long int #define rep(i, n) for (int ...
[ "identifier.change", "expression.operation.binary.change" ]
287,131
287,132
u697090185
cpp
p02584
#include <bits/stdc++.h> using namespace std; void fastio() { cin.tie(nullptr); cin.sync_with_stdio(false); } using LL = long long; using LD = long double; const LL MOD = 1e9 + 7; const LL INF = LLONG_MAX; const LL N = 1e6 + 1; int main() { fastio(); LL x, k, d; cin >> x >> k >> d; if (d < 0) d =...
#include <bits/stdc++.h> using namespace std; void fastio() { cin.tie(nullptr); cin.sync_with_stdio(false); } using LL = long long; using LD = long double; const LL MOD = 1e9 + 7; const LL INF = LLONG_MAX; const LL N = 1e6 + 1; int main() { fastio(); LL x, k, d; cin >> x >> k >> d; if (x < 0) x =...
[ "identifier.change", "control_flow.branch.if.condition.change", "assignment.variable.change", "assignment.value.change" ]
287,139
287,140
u823920817
cpp
p02584
// Problem : // C - Walking Takahashi // // // 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) /* “Whether you think you can, or you t...
// Problem : // C - Walking Takahashi // // // 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) /* “Whether you think you can, or you t...
[ "call.add", "call.arguments.change" ]
287,141
287,142
u831139780
cpp
p02584
#include "bits/stdc++.h" using namespace std; #define int 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, s, n) for (int i = s; i < (int)n; ++i) #define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i) #define ALL(a) a.begin(), a.en...
#include "bits/stdc++.h" using namespace std; #define int 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, s, n) for (int i = s; i < (int)n; ++i) #define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i) #define ALL(a) a.begin(), a.en...
[ "assignment.variable.change", "identifier.change", "call.arguments.change" ]
287,143
287,144
u693027786
cpp
p02584
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; using ii = pai...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; using ii = pai...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "identifier.change" ]
287,147
287,148
u383395260
cpp
p02584
#ifdef _MSC_VER #include <__msvc_all_public_headers.hpp> #undef min #undef max #else #define NDEBUG #include <bits/stdc++.h> #endif using namespace std; using large = long long; int main() { large x, k, d; cin >> x >> k >> d; x = abs(x); auto n = x / d; x %= d; if (n >= k) { x += (n - k) * d; } e...
#ifdef _MSC_VER #include <__msvc_all_public_headers.hpp> #undef min #undef max #else #define NDEBUG #include <bits/stdc++.h> #endif using namespace std; using large = long long; int main() { large x, k, d; cin >> x >> k >> d; x = abs(x); auto n = x / d; x %= d; if (n >= k) { x += (n - k) * d; } e...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
287,153
287,154
u723394740
cpp