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
p03131
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); ll k, a, b; cin >> k >> a >> b; //ビスケットを一枚増やす // A枚を1円に換金 // 1円をB枚に交換 if (a + 1 >= b) { cout << k + 1 << endl; return...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); ll k, a, b; cin >> k >> a >> b; //ビスケットを一枚増やす // A枚を1円に換金 // 1円をB枚に交換 if (a + 1 >= b) { cout << k + 1 << endl; return...
[ "expression.operation.binary.remove", "assignment.change" ]
932,998
932,999
u862412671
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; long int out; cin >> k >> a >> b; if (b - a < 2) { out = k + 1; } else if (k - 1 < a) { out = k + 1; } else if ((k - a + 1) % 2 == 0) { out = a + ((k - a + 1) / 2) * (b - a); } else { out = a + 1 + ((k - a + 1) / 2) *...
#include <bits/stdc++.h> using namespace std; int main() { long int k, a, b; long int out; cin >> k >> a >> b; if (b - a < 2) { out = k + 1; } else if (k - 1 < a) { out = k + 1; } else if ((k - a + 1) % 2 == 0) { out = a + ((k - a + 1) / 2) * (b - a); } else { out = a + 1 + ((k - a + 1) /...
[ "variable_declaration.type.widen.change" ]
933,003
933,004
u431602218
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define INF ((1 << 30) - 1) // int32_t #define MOD 1000000007 #define MOD2 #define all(a) (a).begin(), (a).end() #define mkp make_pair #define pb push_back typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int main() { bool flag = false; ...
#include <bits/stdc++.h> using namespace std; #define INF ((1 << 30) - 1) // int32_t #define MOD 1000000007 #define MOD2 #define all(a) (a).begin(), (a).end() #define mkp make_pair #define pb push_back typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int main() { bool flag = false; ...
[ "variable_declaration.type.change", "literal.number.type.widen.change" ]
933,013
933,014
u355424600
cpp
p03131
#include <iostream> #define ll unsigned long long using namespace std; int main() { ll k, a, b; cin >> k >> a >> b; ll ret = 0; if (b - a <= 2) { ret = k + 1; } else { ll surplusOperation = k - (a - 1); if (surplusOperation < 0) { ret = k + 1; } else { if (surplusOperation % 2 ==...
#include <iostream> #define ll long long using namespace std; int main() { ll k, a, b; cin >> k >> a >> b; ll ret = 0; if (b - a <= 2) { ret = k + 1; } else { ll surplusOperation = k - (a - 1); if (surplusOperation < 0) { ret = k + 1; } else { if (surplusOperation % 2 == 1) { ...
[]
933,018
933,019
u611571299
cpp
p03131
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (b - a > 2) { if (a - 1 > k - 2) { cout << k << endl; } else { cout << (k - a + 1) / 2 * (b - a) + a - 1 + (k - a + 1) % 2 + 1...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (b - a > 2) { if (a - 1 > k - 2) { cout << k + 1 << endl; } else { cout << (k - a + 1) / 2 * (b - a) + a - 1 + (k - a + 1) % 2...
[ "expression.operation.binary.add" ]
933,050
933,051
u401900157
cpp
p03131
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <vector> #define int long long #define endre \ getchar(); ...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <vector> #define int long long #define endre \ getchar(); ...
[ "call.arguments.change" ]
933,055
933,056
u147049801
cpp
p03131
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; if (b <= a + 1) cout << k + 1 << endl; else { int cnt = a; k -= (a - 1); cnt = cnt + (b - a) * (k / 2); k %= 2; cnt += k; cout << cnt << endl; } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; if (b <= a + 1) cout << k + 1 << endl; else { ll cnt = a; k -= (a - 1); cnt = cnt + (b - a) * (k / 2); k %= 2; cnt += k; cout << cnt << endl; } }
[ "variable_declaration.type.change" ]
933,061
933,062
u710135612
cpp
p03131
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(), (x).end() const int mod = 1000000007, MAX = 100003; int main() { ll K, A, B; cin >> K >> A >> B; if (A + 1 < B) { K++; if (K >= A + 2) { K -= (A + 2); ll now = B; now += (B - A) * (K / 2); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(), (x).end() const int mod = 1000000007, MAX = 100003; int main() { ll K, A, B; cin >> K >> A >> B; if (A + 1 < B) { K++; if (K >= A + 2) { K -= (A + 2); ll now = B; now += (B - A) * (K / 2); ...
[ "expression.operation.binary.remove" ]
933,063
933,064
u133391510
cpp
p03131
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPP(i, n) for (int i = 1; i <= n; i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF = (long long)1E17; #define i_7 (long long)(1E9 + 7) long mod(long a) { long long c = a % i_7; if (c >= 0) return c; return ...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPP(i, n) for (int i = 1; i <= n; i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF = (long long)1E17; #define i_7 (long long)(1E9 + 7) long mod(long a) { long long c = a % i_7; if (c >= 0) return c; return ...
[ "control_flow.branch.if.condition.change" ]
933,065
933,066
u222293734
cpp
p03131
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; int main() { ll A, B, K; cin >> A >> B >> K; if ((B - A) <= 2) { cout << K + 1 << endl; return 0; } else { if (K <= (A - 1)) { cout << K + 1 << endl; return 0; } else { ll U...
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; int main() { ll A, B, K; cin >> K >> A >> B; if ((B - A) <= 2) { cout << K + 1 << endl; return 0; } else { if (K <= (A - 1)) { cout << K + 1 << endl; return 0; } else { ll U...
[ "expression.operation.binary.remove" ]
933,070
933,071
u904123392
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define lint long long #define ll long long #define pq priority_queue #define mp make_pair #define vl vector<long long> long long INF = 1e10; #define pii pair<long long, long long> #define all(x) (x).begin(), (x).end() #define mod 1000000007 /******************************d...
#include <bits/stdc++.h> using namespace std; #define lint long long #define ll long long #define pq priority_queue #define mp make_pair #define vl vector<long long> long long INF = 1e10; #define pii pair<long long, long long> #define all(x) (x).begin(), (x).end() #define mod 1000000007 /******************************d...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
933,076
933,077
u426397594
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int ans = 0; if (b - a < 2 || n + 1 - 2 < a) ans = n + 1; else { int m = n - (a - 1); ans = a + (b - a) * (m / 2) + m % 2; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, a, b; cin >> n >> a >> b; int ans = 0; if (b - a <= 2 || n + 1 - 2 < a) ans = n + 1; else { int m = n - (a - 1); ans = a + (b - a) * (m / 2) + m % 2; } cout << ans << endl; }
[ "variable_declaration.type.widen.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
933,080
933,081
u731175398
cpp
p03131
#include "bits/stdc++.h" using namespace std; #define REP(i, n) for (ll i = 0; i < n; i++) #define REP1(i, n) for (ll i = 1; i < n; i++) #define REPR(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < n; i++) #define VSORT(v) sort(v.begin(), v.end()) #define VRSORT(v) sort(v.rbegin(), v.ren...
#include "bits/stdc++.h" using namespace std; #define REP(i, n) for (ll i = 0; i < n; i++) #define REP1(i, n) for (ll i = 1; i < n; i++) #define REPR(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < n; i++) #define VSORT(v) sort(v.begin(), v.end()) #define VRSORT(v) sort(v.rbegin(), v.ren...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
933,082
933,083
u837951457
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define Z class #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() ...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define Z class #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() ...
[ "expression.operation.binary.remove", "literal.number.change" ]
933,090
933,091
u287015418
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define Z class #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() ...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define Z class #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() ...
[ "assignment.change" ]
933,092
933,091
u287015418
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define Z class #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() ...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define Z class #define ll long long #define ln cout << '\n' #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() ...
[ "literal.number.change", "call.arguments.change" ]
933,093
933,091
u287015418
cpp
p03131
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> #define MOD 1000000007 typedef long long ll; using namespace std; int main() { ll k, a, b; cin >> k >> a >> b; ll ans = k + 1; if (k <= a || b <= a) { cout << an...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> #define MOD 1000000007 typedef long long ll; using namespace std; int main() { ll k, a, b; cin >> k >> a >> b; ll ans = k + 1; if (k <= a || b <= a) { cout << an...
[]
933,094
933,095
u646339490
cpp
p03131
#include <algorithm> #include <cmath> #include <iomanip> // << fixed << precision(10) #include <iostream> #include <map> #include <set> #include <string> #include <vector> using namespace std; #define FOR(i, s, t) for (int i = s; i < t; i++) #define REP(i, n) FOR(i, 0, n) #define PRINT(s) cout << s << "\n" #define SOR...
#include <algorithm> #include <cmath> #include <iomanip> // << fixed << precision(10) #include <iostream> #include <map> #include <set> #include <string> #include <vector> using namespace std; #define FOR(i, s, t) for (int i = s; i < t; i++) #define REP(i, n) FOR(i, 0, n) #define PRINT(s) cout << s << "\n" #define SOR...
[ "variable_declaration.type.narrow.change", "control_flow.return.add", "control_flow.return.0.add" ]
933,096
933,097
u291278680
cpp
p03131
#include <algorithm> #include <fstream> #include <iostream> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; long long ans = 1; if (A + 2 < B) { ans += min(K, A - 1); if (K ...
#include <algorithm> #include <fstream> #include <iostream> #include <map> #include <queue> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; long long ans = 1; if (A + 2 < B) { ans += min(K, A - 1); if (K ...
[ "control_flow.branch.if.condition.change" ]
933,098
933,099
u658993896
cpp
p03131
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) #define int long long using namespace std; typedef pair<int, int> P; #define fi first #define se second int c[5]; signed main() { int k, a, b, p = 0, ans = 0; cin >> k >> a >> b; if (b - a > 1) { if (a >= k) cout << k << endl; el...
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) #define int long long using namespace std; typedef pair<int, int> P; #define fi first #define se second int c[5]; signed main() { int k, a, b, p = 0, ans = 0; cin >> k >> a >> b; if (b - a > 1) { if (a >= k) cout << k + 1 << endl; ...
[ "expression.operation.binary.add" ]
933,102
933,103
u777468981
cpp
p03131
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORD(i, a, b) for (int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v = (i) #define FORE(i, c) for (VAR(i, (c).begin()); i != (c).end(); ++i) #define all(v) (v).begin(), (v).end() #define PII pair<int, int> #define mp make_...
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORD(i, a, b) for (int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v = (i) #define FORE(i, c) for (VAR(i, (c).begin()); i != (c).end(); ++i) #define all(v) (v).begin(), (v).end() #define PII pair<int, int> #define mp make_...
[ "control_flow.branch.if.condition.change", "assignment.change" ]
933,106
933,107
u684583379
cpp
p03131
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define rep(i, n) for (int i = 0; i < (n); i++) #define repp(i, s, e) for (int i = (s); i < (e); i++) #define all(x) x.begin(), x.end() #define endl "\n" void use_cio() { ios_base::sync_with_stdio(0); cin.tie(0); } ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define rep(i, n) for (int i = 0; i < (n); i++) #define repp(i, s, e) for (int i = (s); i < (e); i++) #define all(x) x.begin(), x.end() #define endl "\n" void use_cio() { ios_base::sync_with_stdio(0); cin.tie(0); } ...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
933,110
933,111
u847501264
cpp
p03131
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; template <class T> using V = vector<T>; template <class T> usi...
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; template <class T> using V = vector<T>; template <class T> usi...
[ "expression.operation.binary.add" ]
933,112
933,113
u127844950
cpp
p03131
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; using ll = long long int; int main() { ll k, a, b; cin >> k >> a >> b; ll result = 1; if (b - a > 2) { ll x = (k - (a - 1)) / 2; result += x * (b - a); result += k - (...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; using ll = long long int; int main() { ll k, a, b; cin >> k >> a >> b; ll result = 1; if (b - a > 2) { ll x = (k - (a - 1)) / 2; result += x * (b - a); result += k - (...
[ "assignment.value.change" ]
933,122
933,123
u432897824
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define ll unsigned long long #define pb push_back #define mp make_pair void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) cerr << "...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
933,128
933,129
u335839000
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) cerr << "...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) cerr << "...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
933,130
933,129
u335839000
cpp
p03131
#include <bits/stdc++.h> using namespace std; long long k, a, b; int main() { cin >> k >> a >> b; k -= a; if (a > b) return cout << b, 0; long long cnt = (k + 1) / 2; if (k % 2) cout << max(cnt * b - (cnt - 1) * a, k + a + 1); else cout << max(cnt * b - (cnt - 1) * a, k + a) + 1; return 0; ...
#include <bits/stdc++.h> using namespace std; long long k, a, b; int main() { cin >> k >> a >> b; k -= a; if (a > b) return cout << k + a + 1, 0; long long cnt = (k + 1) / 2; if (k % 2) cout << max(cnt * b - (cnt - 1) * a, k + a + 1); else cout << max(cnt * b - (cnt - 1) * a, k + a) + 1; re...
[ "identifier.change", "function.return_value.change", "expression.operation.binary.change" ]
933,132
933,133
u218863644
cpp
p03131
#include <bits/stdc++.h> using namespace std; /* #include <boost/multiprecision/cpp_int.hpp> using namespace boost::multiprecision; using cint = cpp_int; */ // Define using ll = long long; using ull = unsigned long long; using ld = long double; const ll dx[4] = {1, 0, -1, 0}; const ll dy[4] = {0, 1, 0, -1}; const ll ...
#include <bits/stdc++.h> using namespace std; /* #include <boost/multiprecision/cpp_int.hpp> using namespace boost::multiprecision; using cint = cpp_int; */ // Define using ll = long long; using ull = unsigned long long; using ld = long double; const ll dx[4] = {1, 0, -1, 0}; const ll dy[4] = {0, 1, 0, -1}; const ll ...
[ "expression.operation.binary.remove" ]
933,134
933,135
u398942100
cpp
p03131
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; K -= A - 1; long long S = A; if (2 < B) { if (K % 2) S++; S += K / 2 * (B - A); } else { S += K; } ...
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; K -= A - 1; long long S = A; if (2 < B - A) { if (K % 2 != 0) S++; S += K / 2 * (B - A); } else { S +=...
[ "control_flow.branch.if.condition.change" ]
933,140
933,141
u957204897
cpp
p03131
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; K -= A - 1; long long S = A; if (A < B) { if (K % 2) S++; S += K / 2 * (B - A); } else { S += K; } ...
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; K -= A - 1; long long S = A; if (2 < B - A) { if (K % 2 != 0) S++; S += K / 2 * (B - A); } else { S +=...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change" ]
933,142
933,141
u957204897
cpp
p03131
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <st...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <st...
[ "variable_declaration.add", "identifier.change", "io.output.change" ]
933,149
933,150
u310790595
cpp
p03131
#include <algorithm> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <set> using namespace std; int main() { uint64_t k, a, b; cin >> k >> a >> b; if (b - a > 2) { if (k <= (a - 1)) { cout << 1 + k << endl; } else { k = k - (a - 1); ...
#include <algorithm> #include <cstdint> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <set> using namespace std; int main() { int64_t k, a, b; cin >> k >> a >> b; if ((b - a) > 2) { if (k <= (a - 1)) { cout << 1 + k << endl; } else { k = k - (a - 1);...
[ "variable_declaration.type.primitive.change", "control_flow.branch.if.condition.change" ]
933,153
933,154
u279976468
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 1000000007 typedef pair<ll, ll> P; int main() { ll k, a, b; cin >> k >> a >> b; if (a + 1 >= b) { cout << k + 1; return 0; } if (k + 1 <= a) { cout << k + 1; return 0; } ll c = 0; k -= a - 1; c += b; k -= ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 1000000007 typedef pair<ll, ll> P; int main() { ll k, a, b; cin >> k >> a >> b; if (a + 1 >= b) { cout << k + 1; return 0; } if (k <= a) { cout << k + 1; return 0; } ll c = 0; k -= a - 1; c += b; k -= 2; ...
[ "expression.operation.binary.remove" ]
933,163
933,164
u987476436
cpp
p03131
#include <bits/stdc++.h> #define STIZE(x) fprintf(stderr, "STIZE%d\n", x); #define PRINT(x) fprintf(stderr, "%s = %d\n", #x, x); #define NL(x) printf("%c", " \n"[(x)]); #define lld long long #define pii pair<int, int> #define pb push_back #define fi first #define se second #define mid (l + r) / 2 #define endl '\n' #def...
#include <bits/stdc++.h> #define STIZE(x) fprintf(stderr, "STIZE%d\n", x); #define PRINT(x) fprintf(stderr, "%s = %d\n", #x, x); #define NL(x) printf("%c", " \n"[(x)]); #define lld long long #define pii pair<int, int> #define pb push_back #define fi first #define se second #define mid (l + r) / 2 #define endl '\n' #def...
[ "assignment.change" ]
933,173
933,174
u405004435
cpp
p03131
#include <bits/stdc++.h> using i64 = long long; using std::cin; using std::cout; using std::endl; int main() { i64 k, a, b; scanf("%lld%lld%lld", &k, &a, &b); if (b <= a + 1) printf("%lld\n", k + 1); else { if (k < a - 1) { printf("%lld\n", k + 1); return 0; } else { i64 ans = 0;...
#include <bits/stdc++.h> using i64 = long long; using std::cin; using std::cout; using std::endl; int main() { i64 k, a, b; scanf("%lld%lld%lld", &k, &a, &b); if (b <= a + 1) printf("%lld\n", k + 1); else { if (k < a + 1) { printf("%lld\n", k + 1); return 0; } else { i64 ans = 0;...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
933,183
933,184
u424655672
cpp
p03131
#include <bits/stdc++.h> using i64 = long long; using std::cin; using std::cout; using std::endl; int main() { i64 k, a, b; scanf("%lld%lld%lld", &k, &a, &b); if (b <= a + 1) printf("%lld\n", k + 1); else { if (k < a - 1) { printf("%lld\n", k); return 0; } else { i64 ans = 0; ...
#include <bits/stdc++.h> using i64 = long long; using std::cin; using std::cout; using std::endl; int main() { i64 k, a, b; scanf("%lld%lld%lld", &k, &a, &b); if (b <= a + 1) printf("%lld\n", k + 1); else { if (k < a + 1) { printf("%lld\n", k + 1); return 0; } else { i64 ans = 0;...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "literal.number.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
933,185
933,184
u424655672
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define ll long long #define fr(i, a, b) for (ll i = (a), _b = (b); i <= _b; i++) #define frr(i, a, b) for (ll i = (a), _b = (b); i >= _b; i--) #define rep(i, n) for (ll i = 0, _n = (n); i < _n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define fill(ar, val)...
#include <bits/stdc++.h> using namespace std; #define ll long long #define fr(i, a, b) for (ll i = (a), _b = (b); i <= _b; i++) #define frr(i, a, b) for (ll i = (a), _b = (b); i >= _b; i--) #define rep(i, n) for (ll i = 0, _n = (n); i < _n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define fill(ar, val)...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
933,192
933,193
u774986209
cpp
p03131
#define _CRT_SECURE_NO_WARNINGS #define forn(i, a, n) for (ll i = a; i < n; i++) #include <algorithm> #include <cassert> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #in...
#define _CRT_SECURE_NO_WARNINGS #define forn(i, a, n) for (ll i = a; i < n; i++) #include <algorithm> #include <cassert> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #in...
[ "control_flow.branch.if.condition.change" ]
933,194
933,195
u560651538
cpp
p03131
#include <bits/stdc++.h> #define Set(a, b) memset(a, b, sizeof(a)) using namespace std; const int N = 1e5 + 10; const int mod = 1e9 + 7; template <typename T> inline void init(T &x) { x = 0; char ch = getchar(); bool t = 0; for (; ch > '9' || ch < '0'; ch = getchar()) if (ch == '-') t = 1; for (; ch...
#include <bits/stdc++.h> #define Set(a, b) memset(a, b, sizeof(a)) using namespace std; const int N = 1e5 + 10; const int mod = 1e9 + 7; template <typename T> inline void init(T &x) { x = 0; char ch = getchar(); bool t = 0; for (; ch > '9' || ch < '0'; ch = getchar()) if (ch == '-') t = 1; for (; ch...
[ "expression.operation.binary.add" ]
933,196
933,197
u142717651
cpp
p03131
#include <algorithm> #include <cmath> #include <iostream> #include <queue> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; int main() { long long int a, b, k; cin >> k >> a >> b; if (a + 2 >= b) { cout << 1 + k; return 0; } k -= a - 1; if (k <= 2) ...
#include <algorithm> #include <cmath> #include <iostream> #include <queue> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; int main() { long long int a, b, k; cin >> k >> a >> b; if (a + 2 >= b) { cout << 1 + k; return 0; } k -= a - 1; if (k < 2) {...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
933,212
933,211
u495704746
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); long long k, a, b; cin >> k >> a >> b; if (b <= a + 2) { cout << k + 1 << '\n'; } else { cout << max(0LL, (k - a + 1) / 2) * (b - a) + ((k - a + 1) % 2) + a - 1 << '\n'; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); long long k, a, b; cin >> k >> a >> b; if (b <= a + 2) { cout << k + 1 << '\n'; } else { cout << max(0LL, (k - a + 1) / 2) * (b - a) + ((k - a + 1) % 2) + a << '\n'; } return 0; }
[ "expression.operation.binary.remove" ]
933,215
933,216
u153798346
cpp
p03131
#include "bits/stdc++.h" using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; long long ans = 1; if (A + 1 >= B) { cout << K + 1 << endl; } else { if (K < A + 1) cout << K + 1 << endl; else { K -= A + 1; ans = B; if (K % 2 == 0) { ans += (B - A...
#include "bits/stdc++.h" using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; long long ans = 1; if (A + 1 >= B) { cout << K + 1 << endl; } else { if (K < A + 1) cout << K + 1 << endl; else { K -= A + 1; ans = B; if (K % 2 == 0) { ans += (B - A...
[]
933,217
933,218
u365956698
cpp
p03131
#include <cinttypes> #include <iostream> int main() { int k, a, b; scanf("%d%d%d", &k, &a, &b); k++; int64_t res; if (b - a > 2) { if (k <= a) res = k; else res = a + (k - a) * (int64_t)(b - a) / 2 + (k - a) % 2; } else res = k; std::cout << res << std::endl; return 0; }
#include <cinttypes> #include <iostream> int main() { int k, a, b; scanf("%d%d%d", &k, &a, &b); k++; int64_t res; if (b - a > 2) { if (k <= a) res = k; else res = a + (k - a) / 2 * (int64_t)(b - a) + (k - a) % 2; } else res = k; std::cout << res << std::endl; return 0; }
[ "assignment.change", "expression.operation.binary.remove" ]
933,219
933,220
u040490988
cpp
p03131
//#include <bits/stdc++.h> //#include <stdio.h> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #...
//#include <bits/stdc++.h> //#include <stdio.h> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <fstream> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #...
[ "assignment.value.change" ]
933,229
933,230
u057611820
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; long long ans = 0; if (B + 2 <= A || K <= A + 1) { ans = K + 1; } else { K -= (A - 1); ans += A; ans += (K / 2) * (B - A); ans += K % 2; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; long long ans = 0; if (B <= A + 2 || K <= A) { ans = K + 1; } else { K -= (A - 1); ans += A; ans += (K / 2) * (B - A); ans += K % 2; } cout << ans << endl; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
933,245
933,246
u636387751
cpp
p03131
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); long long k, a, b; cin >> k >> a >> b; if (k <= a or a + 2 > b) { c...
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); long long k, a, b; cin >> k >> a >> b; if (k <= a or a + 2 > b) { c...
[ "expression.operation.binary.add" ]
933,253
933,254
u834415466
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { int K, A, B; cin >> K >> A >> B; if (A + 2 >= B) { cout << K + 1; } else { if (K <= A) { cout << K + 1; } else { int m = K + 1 - A; if (m % 2 == 0) { cout << A + (B - A) * (m / 2); } else { cout << ...
#include <bits/stdc++.h> using namespace std; int main() { long long K, A, B; cin >> K >> A >> B; if (A + 2 >= B) { cout << K + 1; } else { if (K <= A) { cout << K + 1; } else { long long m = K + 1 - A; if (m % 2 == 0) { cout << A + (B - A) * (m / 2); } else { ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
933,255
933,256
u823444917
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 1 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans += k...
#include <iostream> using namespace std; int main() { long k, a, b; cin >> k >> a >> b; long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans +=...
[ "variable_declaration.type.primitive.change", "literal.number.change", "control_flow.branch.if.condition.change" ]
933,257
933,258
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans += k...
#include <iostream> using namespace std; int main() { long k, a, b; cin >> k >> a >> b; long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans +=...
[ "variable_declaration.type.primitive.change" ]
933,259
933,258
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans += b; while (k > 1) { k -= 2; ans += b - a; } ans += ...
#include <iostream> using namespace std; int main() { long k, a, b; cin >> k >> a >> b; long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans +=...
[ "variable_declaration.type.primitive.change", "assignment.value.change" ]
933,260
933,258
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans += b; while (k > 1) { k -= 2; ans += b; } ans += k; ...
#include <iostream> using namespace std; int main() { long k, a, b; cin >> k >> a >> b; long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans +=...
[ "variable_declaration.type.primitive.change", "assignment.value.change", "assignment.change" ]
933,261
933,258
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 1 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans += k...
#include <iostream> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; long long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "literal.number.change", "control_flow.branch.if.condition.change" ]
933,257
933,262
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ans += k...
#include <iostream> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; long long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
933,259
933,262
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans += b; while (k > 1) { k -= 2; ans += b - a; } ans += ...
#include <iostream> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; long long ans = 1; if (a + 3 > b) { ans += k; } else { if (k - 2 < a - 1) { ans += k; } else { k -= a + 1; ans = b; while (k > 1) { k -= 2; ans += b - a; } ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "assignment.value.change" ]
933,260
933,262
u403323882
cpp
p03131
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; if (b - a > 1) { if (k - a + 1 >= 2) { cout << (k - a + 1) / 2 * (b - a) + (k - a + 1) % 2 + a << endl; } else { cout << 1 + k << endl; } } else { cout << 1 + k << endl; } }
#include <iostream> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (b - a > 1) { if (k - a + 1 >= 2) { cout << (k - a + 1) / 2 * (b - a) + (k - a + 1) % 2 + a << endl; } else { cout << 1 + k << endl; } } else { cout << 1 + k << endl; } }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
933,265
933,266
u827974318
cpp
p03131
#include <iostream> using namespace std; int A, B, K; int main() { cin >> K >> A >> B; if (B - A <= 2 || K <= A - 1) cout << K + 1; else if ((K - A + 1) % 2 == 1) cout << (K - A + 1) / 2 * (B - A) + A + 1; else cout << (K - A + 1) / 2 * (B - A) + A; return 0; }
#include <iostream> using namespace std; typedef long long ll; ll A, B, K; int main() { cin >> K >> A >> B; if (B - A <= 2 || K <= A - 1) cout << K + 1; else if ((K - A + 1) % 2 == 1) cout << (K - A + 1) / 2 * (B - A) + A + 1; else cout << (K - A + 1) / 2 * (B - A) + A; return 0; }
[]
933,269
933,270
u110996038
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { long K, A, B; long ans = 0; long anskari = 0; cin >> K >> A >> B; if (B < A + 2) { ans = 1 + K; } else { if (K - A + 1 % 2 == 0) { anskari = (((K - (A - 1)) / 2) * (B - A)) + A - 1; } else { anskari = ((((K - (A - 1)) / 2)) *...
#include <bits/stdc++.h> using namespace std; int main() { long K, A, B; long ans = 0; long anskari = 0; cin >> K >> A >> B; if (B < A + 2) { ans = 1 + K; } else { if ((K - A + 1) % 2 == 0) { anskari = (((K - (A - 1)) / 2) * (B - A)) + A; } else { anskari = ((((K - (A - 1)) / 2)) * (...
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
933,281
933,282
u833295869
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { int K, A, B; int ans = 0; int anskari = 0; cin >> K >> A >> B; if (B < A + 2) { ans = 1 + K; } else { if (K - A + 1 % 2 == 0) { anskari = (((K - (A - 1)) / 2) * (B - A)) + A; } else { anskari = ((((K - (A - 1)) / 2)) * (B - A...
#include <bits/stdc++.h> using namespace std; int main() { long K, A, B; long ans = 0; long anskari = 0; cin >> K >> A >> B; if (B < A + 2) { ans = 1 + K; } else { if ((K - A + 1) % 2 == 0) { anskari = (((K - (A - 1)) / 2) * (B - A)) + A; } else { anskari = ((((K - (A - 1)) / 2)) * (...
[ "variable_declaration.type.primitive.change", "control_flow.branch.if.condition.change" ]
933,283
933,282
u833295869
cpp
p03131
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n, k) for (int i = n; i < k; i++) #define P(p) cout << (p) << endl; #define sP(p) cout << setprecision(15) << fixed << p << endl; #define vi vector<int> #define printv(v) \ ...
#include "bits/stdc++.h" #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n, k) for (int i = n; i < k; i++) #define P(p) cout << (p) << endl; #define sP(p) cout << setprecision(15) << fixed << p << endl; #define vi vector<int> #define printv(v) \ ...
[ "control_flow.branch.if.condition.change" ]
933,284
933,285
u687470137
cpp
p03131
#include <bits/stdc++.h> typedef long long ll; using namespace std; #define pb push_back ll k, a, b; int main() { cin >> k >> a >> b; if (b <= a + 2) { cout << k + 1 << endl; } else { if (k < a + 1) { cout << k + 1 << endl; return 0; } if (k == a + 1) { cout << b << endl; ...
#include <bits/stdc++.h> typedef long long ll; using namespace std; #define pb push_back ll k, a, b; int main() { cin >> k >> a >> b; if (b <= a + 2) { cout << k + 1 << endl; } else { if (k < a + 1) { cout << k + 1 << endl; return 0; } if (k == a + 1) { cout << b << endl; ...
[ "expression.operation.binary.remove" ]
933,288
933,289
u116436282
cpp
p03131
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const int MOD = (int)1e9 + 7; const ll INF = (ll)1e18 + 7; #define int long long signed main() { cin.tie(0)...
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const int MOD = (int)1e9 + 7; const ll INF = (ll)1e18 + 7; #define int long long signed main() { cin.tie(0)...
[ "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
933,290
933,291
u461044076
cpp
p03131
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; void solve() { long long int K, A, B; cin >> K >> A >> B; if (A + 2 >= B) { cout << K + 1 << endl; return; } long long int has = 1; if (K - has >= A + 2) { K -= A - has; has = A; } else { ...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; void solve() { long long int K, A, B; cin >> K >> A >> B; if (A + 2 >= B) { cout << K + 1 << endl; return; } long long int has = 1; if (K - has >= A) { K -= A - has; has = A; } else { ha...
[ "expression.operation.binary.remove" ]
933,292
933,293
u057619905
cpp
p03131
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <u...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <u...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
933,296
933,297
u576524226
cpp
p03131
#include <iostream> using namespace std; int main(void) { long long K, A, B; cin >> K >> A >> B; if ((B - A) <= 2) { cout << 1 + K << endl; return 0; } if (K == 1) { cout << 1 + K << endl; return 0; } if ((A - 1 + 1) > K) { cout << 1 + K << endl; return 0; } long long ans = 0;...
#include <iostream> using namespace std; int main(void) { long long K, A, B; cin >> K >> A >> B; if ((B - A) <= 2) { cout << 1 + K << endl; return 0; } if (K == 1) { cout << 1 + K << endl; return 0; } if ((A - 1) > (K - 2)) { cout << 1 + K << endl; return 0; } long long ans = ...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
933,298
933,299
u016119075
cpp
p03131
#include <algorithm> #include <cctype> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #define INF 10000000000 #define MOD 100000000...
#include <algorithm> #include <cctype> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #define INF 10000000000 #define MOD 100000000...
[ "assignment.value.change", "assignment.change" ]
933,304
933,305
u907049739
cpp
p03131
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <vector> #define ll long long using namespace std; int main() { ll k, a, b; cin >> k >> a >> b; ll biscuits; if (b - a <= 2) { biscuits = k + 1; } else { biscuits = 2 + (b - a) * (k - a + 1) / 2 + (k + 1) % 2; } co...
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <vector> #define ll long long using namespace std; int main() { ll k, a, b; cin >> k >> a >> b; ll biscuits; if (b - a < 2) { biscuits = k + 1; } else { biscuits = a + (b - a) * ((k - a + 1) / 2) + (k - a + 1) % 2; }...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change", "assignment.change" ]
933,323
933,324
u170650966
cpp
p03131
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define INF 10...
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define INF 10...
[ "variable_declaration.type.change" ]
933,331
933,332
u377777817
cpp
p03131
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> const int MOD = 1e9 + 7; const int iINF = 1000000000; const long long int llINF = 1000000000000000000; u...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> const int MOD = 1e9 + 7; const int iINF = 1000000000; const long long int llINF = 1000000000000000000; u...
[]
933,333
933,334
u050865477
cpp
p03131
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <list> #include <map> #include <numeric> #include <q...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <list> #include <map> #include <numeric> #include <q...
[ "function.parameters.parameter.add", "call.arguments.change" ]
933,335
933,336
u736004166
cpp
p03131
#include <iostream> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (a >= b || k <= a) { cout << k << endl; return 0; } long long x = k - (a + 1); long long ans = b; long long cnt = x / 2; ans += (b - a) * cnt; if (x % 2 == 1) { ans++; } if (ans < k)...
#include <iostream> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (a >= b || k <= a) { cout << k + 1 << endl; return 0; } long long x = k - (a + 1); long long ans = b; long long cnt = x / 2; ans += (b - a) * cnt; if (x % 2 == 1) { ans++; } if (ans ...
[ "control_flow.branch.if.condition.change", "assignment.change" ]
933,341
933,342
u874996917
cpp
p03131
#include <iostream> typedef unsigned long int int64; using namespace std; int main() { int64 K, A, B; cin >> K >> A >> B; if (K - A - 1 < 0) { cout << K + 1 << endl; return 0; } if (B - A < 3) { cout << K + 1 << endl; return 0; } int64 ans = 1; ans += A - 1; if ((K - A + 1) % 2 ==...
#include <iostream> typedef long long int int64; using namespace std; int main() { int64 K, A, B; cin >> K >> A >> B; if (K - A - 1 < 0) { cout << K + 1 << endl; return 0; } if (B - A < 3) { cout << K + 1 << endl; return 0; } int64 ans = 1; ans += A - 1; if ((K - A + 1) % 2 == 0) ...
[ "variable_declaration.type.primitive.change" ]
933,343
933,344
u947883560
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (a >= k + 1 || b - a <= 2) { cout << k + 1 << endl; return 0; } k -= a - 1; int ans = (b - a) * (k / 2) + (k % 2) + a; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (a >= k || b - a <= 2) { cout << k + 1 << endl; return 0; } k -= a - 1; long long ans = (b - a) * (k / 2) + (k % 2) + a; cout << ans << endl; }
[ "expression.operation.binary.remove", "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
933,345
933,346
u647474992
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (a >= k || b - a <= 2) { cout << k + 1 << endl; return 0; } k -= a - 1; int ans = (b - a) * (k / 2) + (k % 2) + a; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; if (a >= k || b - a <= 2) { cout << k + 1 << endl; return 0; } k -= a - 1; long long ans = (b - a) * (k / 2) + (k % 2) + a; cout << ans << endl; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
933,347
933,346
u647474992
cpp
p03131
#include <algorithm> #include <iostream> using namespace std; int main() { long long int K, A, B; cin >> K >> A >> B; long long int ans = 0, tmp = 0; if (K < A || B - A <= 2) ans = K + 1; else { if (K - (A - 1) % 2 == 0) { tmp = A + (B - A) * ((K - (A - 1)) / 2); } else { // tmp = ...
#include <algorithm> #include <iostream> using namespace std; int main() { long long int K, A, B; cin >> K >> A >> B; long long int ans = K + 1, tmp = 0; if (K < A || B - A <= 2) ans = K + 1; else { if ((K - (A - 1)) % 2 == 0) { tmp = A + (B - A) * ((K - (A - 1)) / 2); } else { // ...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
933,352
933,353
u067481442
cpp
p03131
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef string S; typedef pair<int, int> P; typedef vector<int...
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef string S; typedef pair<int, int> P; typedef vector<int...
[ "misc.opposites", "expression.operator.arithmetic.change", "io.output.change" ]
933,356
933,357
u050138914
cpp
p03131
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef string S; typedef pair<int, int> P; typedef vector<int...
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef string S; typedef pair<int, int> P; typedef vector<int...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.loop.for.condition.change", "io.output.change", "identifier.change", "expression.operation.binary.remove" ]
933,358
933,357
u050138914
cpp
p03131
#include <bits/stdc++.h> using namespace std; using ll = long long; ll k, a, b; int main() { cin >> k >> a >> b; if (k < a || b - a <= 2) cout << k + 1 << endl; cout << (a + (k + 1 - a) / 2 * (b - a) + (k + 1 - a) % 2) << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; ll k, a, b; int main() { cin >> k >> a >> b; if (k < a || b - a <= 2) cout << k + 1 << endl; else cout << (a + (k + 1 - a) / 2 * (b - a) + (k + 1 - a) % 2) << endl; }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
933,359
933,360
u089329978
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { long long int k, a, b; cin >> k >> a >> b; if (b - a <= 2 || k < a + 1) { cout << 1 + k << endl; return 0; } cout << a + (b - a) * (k - a + 1) / 2 + (k - a + 1) % 2 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long int k, a, b; cin >> k >> a >> b; if (b - a <= 2 || k < a + 1) { cout << 1 + k << endl; return 0; } cout << a + (b - a) * ((k - a + 1) / 2) + (k - a + 1) % 2 << endl; }
[]
933,361
933,362
u387258288
cpp
p03131
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define F first #define S second #define PB push_back #define REP(i, a, b) for (int i = a; i <= b; i++) #define REPI(i, a, b) for (int i = a; i >= b; i--) using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef vector<int> vi; typ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define F first #define S second #define PB push_back #define REP(i, a, b) for (int i = a; i <= b; i++) #define REPI(i, a, b) for (int i = a; i >= b; i--) using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef vector<int> vi; typ...
[ "control_flow.branch.if.condition.change" ]
933,379
933,378
u216673135
cpp
p03131
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <stdio.h> #include <string> #include <vector> using namespace std; // typedefリスト typedef vector<int> vint; typedef vector<string> vstr; int main(void) { long long int K, A, B, ans, times; times = 0; ans = 0; cin >> K >> A >> B; ...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <stdio.h> #include <string> #include <vector> using namespace std; // typedefリスト typedef vector<int> vint; typedef vector<string> vstr; int main(void) { long long int K, A, B, ans, times; times = 0; ans = 0; cin >> K >> A >> B; ...
[ "control_flow.branch.if.condition.change" ]
933,383
933,384
u846679133
cpp
p03131
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i <= b; i++) typedef long long ll; typedef double db; const int maxn = 45000 + 5; const int mod = 1e9 + 7; int main() { ll k, a, b; cin >> k >> a >> b; ll cnt = 1, sum = 0; if (a + 1 >= b || k < a) { cnt += k; } else { ...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i <= b; i++) typedef long long ll; typedef double db; const int maxn = 45000 + 5; const int mod = 1e9 + 7; int main() { ll k, a, b; cin >> k >> a >> b; ll cnt = 1, sum = 0; if (a + 1 >= b || k <= a) { cnt += k; } else { ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
933,436
933,437
u493249745
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { int K, A, B; cin >> K >> A >> B; int answer; if (A + 2 >= B) { answer = K + 1; } else if (A + 2 < B && (K - A + 1) % 2 == 0) { answer = A + (B - A) * (K - A + 1) / 2; } else { answer = A + (B - A) * ((K - A + 1) / 2) + 1; } cout ...
#include <bits/stdc++.h> using namespace std; int main() { long K, A, B; cin >> K >> A >> B; long answer; if (A + 2 >= B) { answer = K + 1; } else if (A + 2 < B && (K - A + 1) % 2 == 0) { answer = A + (B - A) * (K - A + 1) / 2; } else { answer = A + (B - A) * ((K - A + 1) / 2) + 1; } cou...
[ "variable_declaration.type.primitive.change" ]
933,440
933,441
u374141734
cpp
p03131
#include <bits/stdc++.h> using namespace std; using ll = long long; const int INF = 1e9; const int MOD = 1e9 + 7; int main() { ll k, a, b; cin >> k >> a >> b; if (a + 1 >= b || k == 1) { cout << k + 1 << endl; } else { ll sum = 0; k -= a + 1; sum += b; sum += k / 2 * (b - a); k -= k /...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int INF = 1e9; const int MOD = 1e9 + 7; int main() { ll k, a, b; cin >> k >> a >> b; if (a + 1 >= b || k == 1 || k == a) { cout << k + 1 << endl; } else { ll sum = 0; k -= a + 1; sum += b; sum += k / 2 * (b - a); ...
[ "control_flow.branch.if.condition.change" ]
933,454
933,455
u054652697
cpp
p03131
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; ll ans = 0; if (a >= b) { ans = 1 + k; } else if (a - 1 <= k) { k -= (a - 1); ll n = (k / 2); ans = n * b - (n - 1) * a; if (k % 2) ans++; } cout << ans; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; ll ans = 0; if (a + 1 >= b) { ans = 1 + k; } else if (a - 1 <= k) { k -= (a - 1); ll n = (k / 2); ans = n * b - (n - 1) * a; if (k % 2) ans++; } cout << ans; }
[ "control_flow.branch.if.condition.change" ]
933,456
933,457
u244818078
cpp
p03131
#include <algorithm> #include <cctype> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (double i = 0; i < n; i++) typedef int long long ll; using namespace std; int const ...
#include <algorithm> #include <cctype> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (double i = 0; i < n; i++) typedef int long long ll; using namespace std; int const ...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
933,468
933,469
u031448582
cpp
p03131
#include <bits/stdc++.h> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; long long ans = 0; if (b - a > 2) { if (k >= a + 1) { if ((k - a + 1) % 2 == 0) { ans = a + (b - a) * ((k - a + 1)) / 2; } else { ans = a + (b - a) * ((k - a + 1)) / 2 + 1; } ...
#include <bits/stdc++.h> using namespace std; int main() { long long k, a, b; cin >> k >> a >> b; long long ans = 0; if (b - a > 2) { if (k >= a + 1) { if ((k - a + 1) % 2 == 0) { ans = a + (b - a) * ((k - a + 1) / 2); } else { ans = a + (b - a) * ((k - a + 1) / 2) + 1; } ...
[]
933,470
933,471
u807998890
cpp
p03131
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; ++i) int main() { long long int k, a, b; long long int ans = 0; cin >> k >> a >> b; if (b - 1 <= a) { cout << k + 1 << endl; return 0; } else { k -= a + 1; ...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; ++i) int main() { long long int k, a, b; long long int ans = 0; cin >> k >> a >> b; if (b - 1 <= a || k < a + 1) { cout << k + 1 << endl; return 0; } else { k ...
[ "control_flow.branch.if.condition.change" ]
933,472
933,473
u458187055
cpp
p03131
#include <iostream> using namespace std; int main() { int K, A, B; long int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * ((K -...
#include <iostream> using namespace std; int main() { long int K, A, B; long int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * ...
[ "variable_declaration.type.widen.change" ]
933,480
933,481
u041282550
cpp
p03131
#include <iostream> using namespace std; int main() { int K, A, B; long int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * (K - ...
#include <iostream> using namespace std; int main() { long int K, A, B; long int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * ...
[ "variable_declaration.type.widen.change" ]
933,482
933,481
u041282550
cpp
p03131
#include <iostream> using namespace std; int main() { int K, A, B; int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * ((K - A + ...
#include <iostream> using namespace std; int main() { long int K, A, B; long int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * ...
[ "variable_declaration.type.widen.change" ]
933,483
933,481
u041282550
cpp
p03131
#include <iostream> using namespace std; int main() { int K, A, B; int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * (K - A + 1...
#include <iostream> using namespace std; int main() { long int K, A, B; long int ans = 0; cin >> K >> A >> B; if (B - A >= 2 && K - A + 1 < 0) ans = K + 1; else if (B - A >= 2 && K - A + 1 >= 0) { if ((K - A + 1) % 2 == 0) ans = A + (B - A) * (K - A + 1) / 2; else ans = A + (B - A) * ...
[ "variable_declaration.type.widen.change" ]
933,484
933,481
u041282550
cpp
p03131
#include <bits/stdc++.h> using namespace std; int a[7], b[7]; int degree[7]; int main() { long long k, a, b; scanf("%lld%lld%lld", &k, &a, &b); long long ans = 0; if (a >= b - 1) { ans = k + 1; } else { long long x = k - (a - 1); if (x > 0) { ans += b; k -= a + 1; } else ans ...
#include <bits/stdc++.h> using namespace std; int a[7], b[7]; int degree[7]; int main() { long long k, a, b; scanf("%lld%lld%lld", &k, &a, &b); long long ans = 0; if (a >= b - 1) { ans = k + 1; } else { long long x = k - a; if (x > 0) { ans += b; k -= a + 1; } else ans = k + ...
[]
933,485
933,486
u963610246
cpp
p03131
#include <bits/stdc++.h> using namespace std; long long int k, a, b; long long int ans = 0; int main() { cin >> k >> a >> b; if (b - a <= 2 || k < a + 1) { cout << k + 1 << endl; return 0; } else { ans = (k - a + 1) / 2; ans *= (b - a) + a; } if ((k - a + 1) % 2 == 1) { ans++; } prin...
#include <bits/stdc++.h> using namespace std; long long int k, a, b; long long int ans = 0; int main() { cin >> k >> a >> b; if (b - a <= 2 || k < a + 1) { cout << k + 1 << endl; return 0; } else { ans = (k - a + 1) / 2; ans *= (b - a); ans += a; } if ((k - a + 1) % 2 == 1) { ans++; ...
[ "expression.operation.binary.change", "assignment.change" ]
933,491
933,492
u693953100
cpp
p03131
#include <bits/stdc++.h> using namespace std; long long int k, a, b; long long int ans = 0; int main() { cin >> k >> a >> b; if (b - a <= 2 || k < a + 2) { cout << k + 1 << endl; return 0; } else { ans = (k - a + 1) / 2; ans *= (b - a) + a; } if ((k - a + 1) % 2 == 1) { ans++; } prin...
#include <bits/stdc++.h> using namespace std; long long int k, a, b; long long int ans = 0; int main() { cin >> k >> a >> b; if (b - a <= 2 || k < a + 1) { cout << k + 1 << endl; return 0; } else { ans = (k - a + 1) / 2; ans *= (b - a); ans += a; } if ((k - a + 1) % 2 == 1) { ans++; ...
[ "literal.number.change", "control_flow.branch.if.condition.change", "expression.operation.binary.change", "assignment.change" ]
933,493
933,492
u693953100
cpp
p03131
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; ll count = 1; ll memo = k; if (k >= a - 1) { if (b - a >= 2) { if ((k - (a - 1))...
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; ll count = 1; ll memo = k; if (k >= a - 1) { if (b - a >= 2) { if ((k - (a - 1))...
[]
933,498
933,499
u536625271
cpp
p03131
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; ll count = 1; ll memo = k; if (k >= a - 1) { if (b - a >= 2) { if (k - (a - 1) %...
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; int main() { ll k, a, b; cin >> k >> a >> b; ll count = 1; ll memo = k; if (k >= a - 1) { if (b - a >= 2) { if ((k - (a - 1))...
[ "control_flow.branch.if.condition.change" ]
933,500
933,499
u536625271
cpp
p03131
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) map<int, int> mp; map<int, int> mm; #define ll long l...
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) map<int, int> mp; map<int, int> mm; #define ll long l...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
933,503
933,504
u154672915
cpp
p03131
#include "bits/stdc++.h" using namespace std; #define fi first #define se second #define pb push_back #define int long long #define all(x) (x).begin(), (x).end() using LL = long long; using LD = long double; using pii = pair<int, int>; using vii = vector<pii>; const int INF = 1e18; const int MOD = 1e9 + 7; const int...
#include "bits/stdc++.h" using namespace std; #define fi first #define se second #define pb push_back #define int long long #define all(x) (x).begin(), (x).end() using LL = long long; using LD = long double; using pii = pair<int, int>; using vii = vector<pii>; const int INF = 1e18; const int MOD = 1e9 + 7; const int...
[]
933,508
933,509
u192295874
cpp
p03131
#include <iostream> using namespace std; typedef long long ll; int main() { ll K, A, B; cin >> K >> A >> B; if (K <= A) { cout << K << endl; return 0; } K++; ll ans = A; if (B - A > 2) ans += (B - A) * ((K - A) / 2); else ans += 2 * ((K - A) / 2); ans += (K - A) % 2; cout << ans << ...
#include <iostream> using namespace std; typedef long long ll; int main() { ll K, A, B; cin >> K >> A >> B; if (K + 1 <= A) { cout << K + 1 << endl; return 0; } K++; ll ans = A; if (B - A > 2) ans += (B - A) * ((K - A) / 2); else ans += 2 * ((K - A) / 2); ans += (K - A) % 2; cout <<...
[ "control_flow.branch.if.condition.change" ]
933,510
933,511
u134519179
cpp
p03131
#include <iostream> using namespace std; int main() { long long int a, b, c; cin >> a >> b >> c; long long int f = a - b + 1; long long ans = 0; if (c - b > 2) { ans = (c - b) * (f / 2) + (f % 2); } else { ans = 1 + a; } cout << ans << endl; }
#include <iostream> using namespace std; int main() { long long int a, b, c; cin >> a >> b >> c; long long int f = a - b + 1; long long ans = 0; if (c - b > 2) { ans = (c - b) * (f / 2) + (f % 2) + b; } else { ans = 1 + a; } cout << ans << endl; }
[ "assignment.change" ]
933,516
933,517
u179970156
cpp