problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k ⌀ | fixed_code stringlengths 12 526k ⌀ | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M ⌀ | fixed_submission_id int64 2 1.54M ⌀ | user_id stringlengths 10 10 ⌀ | language stringclasses 9 values |
|---|---|---|---|---|---|---|---|
p03005 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define vt vector
#define pb push_back
#define pob pop_back
#define vi vt<int>
#define vvi vt<vi>
#define vii vt<ii>
#define vvii vt<vii>
typedef long long ll;
#define For(i, a, b) for (int i = a; i < b; i++)
#define foR(i, a, b) for (int i = a; i <= b; i++)
#define roF(i, a, b) for (int i = a - 1; i >= b; i--)
#define Rof(i, a, b) for (int i = a; i >= b; i--)
signed main() {
/*
freopen(".inp","r",stdin);
freopen(".out","w",stdout);
*/
int n, k;
cin >> n >> k;
cout << (k == 1) ? 0 : (n - k);
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#define vt vector
#define pb push_back
#define pob pop_back
#define vi vt<int>
#define vvi vt<vi>
#define vii vt<ii>
#define vvii vt<vii>
typedef long long ll;
#define For(i, a, b) for (int i = a; i < b; i++)
#define foR(i, a, b) for (int i = a; i <= b; i++)
#define roF(i, a, b) for (int i = a - 1; i >= b; i--)
#define Rof(i, a, b) for (int i = a; i >= b; i--)
signed main() {
/*
freopen(".inp","r",stdin);
freopen(".out","w",stdout);
*/
int n, k;
cin >> n >> k;
cout << ((k == 1) ? 0 : (n - k));
}
| [] | 819,080 | 819,081 | u469862174 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
signed main() {
long long n, k;
cin >> n >> k;
if (k == 0)
cout << 0;
if (k == 1)
cout << n;
else
cout << n - k;
} | #include <bits/stdc++.h>
using namespace std;
signed main() {
long long n, k;
cin >> n >> k;
if (k == 0)
cout << 0;
if (k == 1)
cout << 0;
else
cout << n - k;
} | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 819,082 | 819,083 | u998997473 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N, K;
if (K == 1) {
cout << '0' << endl;
} else {
cout << N - K << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << '0' << endl;
} else {
cout << N - K << endl;
}
}
| [] | 819,084 | 819,085 | u341447450 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N, K;
if (K = 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << '0' << endl;
} else {
cout << N - K << endl;
}
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 819,086 | 819,085 | u341447450 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
cin >> n >> k;
if (k >= 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
cin >> n >> k;
if (k <= 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 819,087 | 819,088 | u183479807 | cpp |
p03005 | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
//#include "h.h"
using namespace std;
#define MOD1097 1000000007
#define ll long long
#define pint pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define pm(first, second) pb(mp(first, second))
#define SPACE " "
#define fpf first.first
#define fps first.second
#define spf second.first
#define sps second.second
#define all(X) (X).begin(), (X).end()
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << K - N << endl;
//"Hiroakimm0415"
return 0;
} | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
//#include "h.h"
using namespace std;
#define MOD1097 1000000007
#define ll long long
#define pint pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define pm(first, second) pb(mp(first, second))
#define SPACE " "
#define fpf first.first
#define fps first.second
#define spf second.first
#define sps second.second
#define all(X) (X).begin(), (X).end()
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << N - K << endl;
//"Hiroakimm0415"
return 0;
} | [
"expression.operation.binary.remove"
] | 819,089 | 819,090 | u285598935 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int main() {
srand(time(0));
ios::sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
int n, k;
cin >> n >> k;
cout << (n == 1 ? 0 : n - k);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int main() {
srand(time(0));
ios::sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
int n, k;
cin >> n >> k;
cout << (k == 1 ? 0 : n - k);
return 0;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 819,091 | 819,092 | u232060648 | cpp |
p03005 | #include <assert.h>
#include <bits/stdc++.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// s.order_of_key(x); // gives order of x in the set
#define For(i, x, n) for (long long i = x; i < n; i++)
#define rFor(i, x, n) for (long long i = x; i >= n; i--)
#define itFor(it, st) for (auto it = st.begin(); it != st.end(); it++)
#define MOD 1000000007
#define PI 3.141592653589793
#define INF 999999999999999999
#define N 1000005
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define sp " "
#define cont continue
#define brk break
#define deb1(x) cout << #x << ": " << x << endl
#define deb2(x, y) cout << #x << ": " << x << " | " << #y << ": " << y << endl
#define deb3(x, y, z) \
cout << #x << ":" << x << " | " << #y << ": " << y << " | " << #z << ": " \
<< z << endl
#define deb4(a, b, c, d) \
cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \
<< c << " | " << #d << ": " << d << endl
#define deb5(a, b, c, d, e) \
cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \
<< c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl
#define deb6(a, b, c, d, e, f) \
cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \
<< c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " \
<< #f << ": " << f << endl
using namespace std;
void setprime(ll n = 15000002);
ll choose(ll n, ll k);
void showArray(ll a[], ll n);
ll gcd(ll a, ll b);
ld len(ld x1, ld y1, ld x2, ld y2);
ld gcd_ld(ld x, ld y);
ll power(ll x, ll n);
ll power1(ll x, ll n);
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
cout << fixed;
cout << setprecision(3);
srand(time(NULL));
ll n, k;
cin >> n >> k;
if (n == 1) {
cout << 0;
return 0;
}
ll mn = 1;
ll rem = n - k;
ll mx = rem + 1;
cout << mx - mn;
// cout<<"\nTime used =
// "<<static_cast<double>(clock())/(CLOCKS_PER_SEC)<<"s"<<endl; // - for
// checking time used for a test case
return 0;
}
// s1.substr(1,3) - return 3 characters starting from position 1 as substring of
// string sz1. eg sz1="shreynumh" sz1.substr(2,5)="reyan" num = atoi(s.c_str());
// //convert string s to integer num n.erase(i,std::string::npos); //erase i th
// position in string n , decreasing string size s.find(b)!= std::string::npos -
// finds string b in string a - true if found cout<<"Time used =
// "<<static_cast<double>(clock())/(CLOCKS_PER_SEC)<<"s"<<endl; // - for
// checking time used for a test case
void setprime(ll isprime[], ll n, ll cc = 0) {
isprime[1] = 1;
map<ll, ll> hm;
ll i;
for (i = 2; i * i <= 15000002; i++)
if (isprime[i] == 0) {
for (ll j = 2 * i; j <= 15000001; j += i)
if (isprime[j] == 0)
isprime[j] = i;
isprime[i] = i;
hm[i] = cc;
cc++;
}
for (; i < 15000002; i++)
if (isprime[i] == 0)
isprime[i] = i, hm[i] = cc, cc++;
}
ll choose(ll n, ll k) {
if (k == 0)
return 1;
return (n * choose(n - 1, k - 1)) / k;
}
void showArray(ll a[], ll n) {
For(i, 0, n) { cout << a[i] << " "; }
cout << endl;
}
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ld len(ld x1, ld y1, ld x2, ld y2) {
return sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2));
}
ld gcd_ld(ld x, ld y) {
ld eps = 0.0001;
while (fabs(x) > eps && fabs(y) > eps) {
if (x > y)
x -= floor(x / y) * y;
else
y -= floor(y / x) * x;
}
return x + y;
}
ll power(ll x, ll n) {
if (n == 0)
return 1;
else if (n % 2 == 0) // n is even
return (power((x * x) % MOD, n / 2)) % MOD;
else // n is bal
return (x * power((x * x) % MOD, (n - 1) / 2)) % MOD;
}
ll power1(ll x, ll n) {
ll num = 1;
For(i, 0, n) { num = (num * x) % MOD; }
return num;
} | #include <assert.h>
#include <bits/stdc++.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// s.order_of_key(x); // gives order of x in the set
#define For(i, x, n) for (long long i = x; i < n; i++)
#define rFor(i, x, n) for (long long i = x; i >= n; i--)
#define itFor(it, st) for (auto it = st.begin(); it != st.end(); it++)
#define MOD 1000000007
#define PI 3.141592653589793
#define INF 999999999999999999
#define N 1000005
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define sp " "
#define cont continue
#define brk break
#define deb1(x) cout << #x << ": " << x << endl
#define deb2(x, y) cout << #x << ": " << x << " | " << #y << ": " << y << endl
#define deb3(x, y, z) \
cout << #x << ":" << x << " | " << #y << ": " << y << " | " << #z << ": " \
<< z << endl
#define deb4(a, b, c, d) \
cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \
<< c << " | " << #d << ": " << d << endl
#define deb5(a, b, c, d, e) \
cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \
<< c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl
#define deb6(a, b, c, d, e, f) \
cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \
<< c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " \
<< #f << ": " << f << endl
using namespace std;
void setprime(ll n = 15000002);
ll choose(ll n, ll k);
void showArray(ll a[], ll n);
ll gcd(ll a, ll b);
ld len(ld x1, ld y1, ld x2, ld y2);
ld gcd_ld(ld x, ld y);
ll power(ll x, ll n);
ll power1(ll x, ll n);
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
cout << fixed;
cout << setprecision(3);
srand(time(NULL));
ll n, k;
cin >> n >> k;
if (k == 1) {
cout << 0;
return 0;
}
ll mn = 1;
ll rem = n - k;
ll mx = rem + 1;
cout << mx - mn;
// cout<<"\nTime used =
// "<<static_cast<double>(clock())/(CLOCKS_PER_SEC)<<"s"<<endl; // - for
// checking time used for a test case
return 0;
}
// s1.substr(1,3) - return 3 characters starting from position 1 as substring of
// string sz1. eg sz1="shreynumh" sz1.substr(2,5)="reyan" num = atoi(s.c_str());
// //convert string s to integer num n.erase(i,std::string::npos); //erase i th
// position in string n , decreasing string size s.find(b)!= std::string::npos -
// finds string b in string a - true if found cout<<"Time used =
// "<<static_cast<double>(clock())/(CLOCKS_PER_SEC)<<"s"<<endl; // - for
// checking time used for a test case
void setprime(ll isprime[], ll n, ll cc = 0) {
isprime[1] = 1;
map<ll, ll> hm;
ll i;
for (i = 2; i * i <= 15000002; i++)
if (isprime[i] == 0) {
for (ll j = 2 * i; j <= 15000001; j += i)
if (isprime[j] == 0)
isprime[j] = i;
isprime[i] = i;
hm[i] = cc;
cc++;
}
for (; i < 15000002; i++)
if (isprime[i] == 0)
isprime[i] = i, hm[i] = cc, cc++;
}
ll choose(ll n, ll k) {
if (k == 0)
return 1;
return (n * choose(n - 1, k - 1)) / k;
}
void showArray(ll a[], ll n) {
For(i, 0, n) { cout << a[i] << " "; }
cout << endl;
}
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ld len(ld x1, ld y1, ld x2, ld y2) {
return sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2));
}
ld gcd_ld(ld x, ld y) {
ld eps = 0.0001;
while (fabs(x) > eps && fabs(y) > eps) {
if (x > y)
x -= floor(x / y) * y;
else
y -= floor(y / x) * x;
}
return x + y;
}
ll power(ll x, ll n) {
if (n == 0)
return 1;
else if (n % 2 == 0) // n is even
return (power((x * x) % MOD, n / 2)) % MOD;
else // n is bal
return (x * power((x * x) % MOD, (n - 1) / 2)) % MOD;
}
ll power1(ll x, ll n) {
ll num = 1;
For(i, 0, n) { num = (num * x) % MOD; }
return num;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,093 | 819,094 | u375267383 | cpp |
p03005 | #include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (n == 1)
cout << 0 << endl;
else
cout << (n - k) + 1 - 1 << endl;
return 0;
} | #include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << (n - k) + 1 - 1 << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,095 | 819,096 | u411517988 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k == 1) ? 0 : n - k << '\n';
} | #include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k == 1 ? 0 : n - k) << '\n';
} | [] | 819,099 | 819,100 | u222744685 | cpp |
p03005 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define ALL(v) (v).begin(), (v).end()
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
int main() {
int N, K;
cin >> N >> K;
if (N == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
} | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define ALL(v) (v).begin(), (v).end()
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,101 | 819,102 | u243961437 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define fr(i, j, k) for (i = j; i < (k); i++)
#define all(x) x.begin(), x.end()
#define el '\n'
#define remax(a, b) a = max(a, b)
#define remin(a, b) a = min(a, b)
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<pii> vpi;
// --------------------------- TEMPLATE ENDS
// -------------------------------------
const pii dxy[] = {{-1, 0}, {1, 0}, {0, 1}, {0, -1}};
const int mod = 1e9 + 7;
const int inf = 2e18;
const ld eps = 1e-9;
const int NN = 1e5 + 2;
vvi adj;
void solve() {
int i = 0, j = 0, k = 0, n = 0, m = 0;
cin >> n >> k;
if (n == 1)
cout << "0\n";
else
cout << (n - k) << el;
}
int32_t main() {
#ifndef TRACE
ios::sync_with_stdio(false);
cin.tie(0);
#endif
int T = 1, tc;
// cin >> T;
for (tc = 1; tc <= T; tc++) {
solve();
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define fr(i, j, k) for (i = j; i < (k); i++)
#define all(x) x.begin(), x.end()
#define el '\n'
#define remax(a, b) a = max(a, b)
#define remin(a, b) a = min(a, b)
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<pii> vpi;
// --------------------------- TEMPLATE ENDS
// -------------------------------------
const pii dxy[] = {{-1, 0}, {1, 0}, {0, 1}, {0, -1}};
const int mod = 1e9 + 7;
const int inf = 2e18;
const ld eps = 1e-9;
const int NN = 1e5 + 2;
vvi adj;
void solve() {
int i = 0, j = 0, k = 0, n = 0, m = 0;
cin >> n >> k;
if (k == 1)
cout << "0\n";
else
cout << (n - k) << el;
}
int32_t main() {
#ifndef TRACE
ios::sync_with_stdio(false);
cin.tie(0);
#endif
int T = 1, tc;
// cin >> T;
for (tc = 1; tc <= T; tc++) {
solve();
}
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,107 | 819,108 | u166166717 | cpp |
p03005 | #include <stdio.h>
int main(void) {
int n, k;
scanf("%d%d", &n, &k);
if (n == k) {
printf("0\n");
} else {
int remain = n - k;
printf("%d\n", remain);
}
return 0;
} | #include <stdio.h>
int main(void) {
int n, k;
scanf("%d%d", &n, &k);
if (k == 1 || n == k) {
printf("0\n");
} else {
int remain = n - k;
printf("%d\n", remain);
}
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 819,113 | 819,114 | u497418592 | cpp |
p03005 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 0) {
cout << 0 << endl;
} else {
cout << n - k << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
} else {
cout << n - k << endl;
}
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,117 | 819,118 | u392569193 | cpp |
p03005 | #include <bits/stdc++.h>
#define endl '\n'
#define fi first
#define se second
#define MOD(n, k) ((((n) % (k)) + (k)) % (k))
#define forn(i, n) for (int i = 0; i < n; i++)
#define forr(i, a, b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb(x) push_back(x)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
cout << (n - k + 1) - 1 << endl;
return 0;
}
| #include <bits/stdc++.h>
#define endl '\n'
#define fi first
#define se second
#define MOD(n, k) ((((n) % (k)) + (k)) % (k))
#define forn(i, n) for (int i = 0; i < n; i++)
#define forr(i, a, b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb(x) push_back(x)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << (n - k + 1) - 1 << endl;
return 0;
}
| [
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 819,119 | 819,120 | u505510763 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
cout << (N == 1 ? 0 : N - K) << endl;
}
| #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
cout << (K == 1 ? 0 : N - K) << endl;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 819,127 | 819,128 | u374099594 | cpp |
p03005 | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
typedef long long ll;
using namespace std;
typedef pair<ll, ll> P;
int main(int argc, char const *argv[]) {
int n, k;
cin >> n >> k;
if (n == 1) {
cout << 0 << endl;
return 0;
}
int ans = 0;
ans = n - (k - 1) - 1;
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
typedef long long ll;
using namespace std;
typedef pair<ll, ll> P;
int main(int argc, char const *argv[]) {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
return 0;
}
int ans = 0;
ans = n - (k - 1) - 1;
cout << ans << endl;
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,133 | 819,134 | u102602414 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 0) {
cout << 0 << endl;
return 0;
}
cout << n - k << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
return 0;
}
cout << n - k << endl;
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,154 | 819,155 | u017167684 | cpp |
p03005 | // stringray
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ost;
typedef pair<int, int> pi;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<pi> vpi;
typedef vector<vi> vvi;
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define pb push_back
#define F first
#define S second
#define fori(i, n) for (int i = 1; i <= n; ++i)
#define forn(i, n) for (int i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define error(x) cout << #x << " " << x << endl
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
const int N = 100 * 1000;
const int mod = 1e9 + 7;
int min3(int a, int b, int c) { return min(a, min(b, c)); }
int max3(int a, int b, int c) { return max(a, max(b, c)); }
int min4(int a, int b, int c, int d) { return min(min(a, b), min(c, d)); }
int max4(int a, int b, int c, int d) { return max(max(a, b), max(c, d)); }
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
// for(int i=0;i<vec.size();++i)is>>x[i];
return is;
}
template <typename T> ostream &operator<<(ostream &os, vector<T> &vec) {
for (int i = 0; i < vec.size(); ++i) {
os << vec[i] << (i + 1 == vec.size() ? "" : " ");
}
return os;
}
ll mpow(ll a, ll b) {
ll ret = 1;
while (b > 0) {
if (b & 1)
ret = (ret * a) % mod;
(a = a * a) %= mod;
b >>= 1LL;
}
return ret;
}
//#define int int64_t
// int a[N+2];
int32_t main() {
IOS;
int n, k;
cin >> n >> k;
if (n == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| // stringray
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ost;
typedef pair<int, int> pi;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<pi> vpi;
typedef vector<vi> vvi;
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define pb push_back
#define F first
#define S second
#define fori(i, n) for (int i = 1; i <= n; ++i)
#define forn(i, n) for (int i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define error(x) cout << #x << " " << x << endl
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
const int N = 100 * 1000;
const int mod = 1e9 + 7;
int min3(int a, int b, int c) { return min(a, min(b, c)); }
int max3(int a, int b, int c) { return max(a, max(b, c)); }
int min4(int a, int b, int c, int d) { return min(min(a, b), min(c, d)); }
int max4(int a, int b, int c, int d) { return max(max(a, b), max(c, d)); }
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
// for(int i=0;i<vec.size();++i)is>>x[i];
return is;
}
template <typename T> ostream &operator<<(ostream &os, vector<T> &vec) {
for (int i = 0; i < vec.size(); ++i) {
os << vec[i] << (i + 1 == vec.size() ? "" : " ");
}
return os;
}
ll mpow(ll a, ll b) {
ll ret = 1;
while (b > 0) {
if (b & 1)
ret = (ret * a) % mod;
(a = a * a) %= mod;
b >>= 1LL;
}
return ret;
}
//#define int int64_t
// int a[N+2];
int32_t main() {
IOS;
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,160 | 819,161 | u964299793 | cpp |
p03005 | #include <iostream>
using namespace std;
int n, k;
int main() {
cin >> n >> k;
cout << (k > 0 ? n - k : 0);
} | #include <iostream>
using namespace std;
int n, k;
int main() {
cin >> n >> k;
cout << (k > 1 ? n - k : 0);
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"io.output.change"
] | 819,164 | 819,165 | u486908386 | cpp |
p03005 | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.141592653589793
using namespace std;
vector<int> a[100001];
bool cs = true;
int f(int root, int par) {
if (!cs) {
return -1;
}
if (a[root].size() == 1 && a[root].front() == par) {
return 0;
}
int total = 0, ans, contender = 0;
map<int, int> d, node;
for (int child : a[root]) {
if (child != par) {
int deg = a[child].size();
d[deg]++;
node[deg] = child;
}
}
if (d.size() > 2) {
cs = false;
return 0;
}
if (d.size() == 1) {
for (int child : a[root]) {
if (child != par) {
ans = f(child, root);
if (!cs) {
return 0;
}
if (ans) {
total++;
contender = ans;
}
}
}
}
if (d.size() == 2) {
int deg;
auto it = d.begin();
int fir = it->second;
it++;
int sec = it->second;
if (fir > 1 && sec > 1) {
cs = false;
return 0;
}
int x = 0, y = 0;
if (sec == 1) {
deg = it->first;
ans = f(node[deg], root);
contender = node[deg];
if (!cs) {
return 0;
}
if (ans) {
total++;
contender = ans;
}
x = contender;
}
if (fir == 1) {
it--;
deg = it->first;
ans = f(node[deg], root);
contender = node[deg];
if (!cs)
return 0;
if (ans) {
total++;
contender = ans;
}
y = contender;
}
if (x && y) {
cs = false;
return -1;
}
}
if (total > 1) {
cs = false;
return 0;
}
if (total == 0)
return 0;
return contender;
}
bool can(int root) {
bool vis[100001];
memset(vis, false, sizeof vis);
vis[root] = true;
vector<int> cur, nex;
cur.pb(root);
while (!cur.empty()) {
unordered_set<int> just;
for (int e : cur) {
for (int child : a[e]) {
if (!vis[child]) {
just.insert(a[child].size());
nex.pb(child);
vis[child] = true;
if (just.size() > 1) {
return false;
}
}
}
}
cur = nex;
nex.clear();
}
return true;
}
int main() {
// cout << setprecision(10);
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, k;
cin >> n >> k;
if (k == 0)
cout << 0;
else
cout << (n - (k - 1) - 1);
}
// 13
// 2 3
// 5 4
// 1 10
// 7 8
// 5 10
// 9 4
// 3 11
// 3 5
// 5 8
// 12 4
// 6 8
// 13 10
//
// 9
// 1 2
// 2 3
// 3 4
// 4 5
// 2 6
// 4 7
// 3 8
// 8 9 | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.141592653589793
using namespace std;
vector<int> a[100001];
bool cs = true;
int f(int root, int par) {
if (!cs) {
return -1;
}
if (a[root].size() == 1 && a[root].front() == par) {
return 0;
}
int total = 0, ans, contender = 0;
map<int, int> d, node;
for (int child : a[root]) {
if (child != par) {
int deg = a[child].size();
d[deg]++;
node[deg] = child;
}
}
if (d.size() > 2) {
cs = false;
return 0;
}
if (d.size() == 1) {
for (int child : a[root]) {
if (child != par) {
ans = f(child, root);
if (!cs) {
return 0;
}
if (ans) {
total++;
contender = ans;
}
}
}
}
if (d.size() == 2) {
int deg;
auto it = d.begin();
int fir = it->second;
it++;
int sec = it->second;
if (fir > 1 && sec > 1) {
cs = false;
return 0;
}
int x = 0, y = 0;
if (sec == 1) {
deg = it->first;
ans = f(node[deg], root);
contender = node[deg];
if (!cs) {
return 0;
}
if (ans) {
total++;
contender = ans;
}
x = contender;
}
if (fir == 1) {
it--;
deg = it->first;
ans = f(node[deg], root);
contender = node[deg];
if (!cs)
return 0;
if (ans) {
total++;
contender = ans;
}
y = contender;
}
if (x && y) {
cs = false;
return -1;
}
}
if (total > 1) {
cs = false;
return 0;
}
if (total == 0)
return 0;
return contender;
}
bool can(int root) {
bool vis[100001];
memset(vis, false, sizeof vis);
vis[root] = true;
vector<int> cur, nex;
cur.pb(root);
while (!cur.empty()) {
unordered_set<int> just;
for (int e : cur) {
for (int child : a[e]) {
if (!vis[child]) {
just.insert(a[child].size());
nex.pb(child);
vis[child] = true;
if (just.size() > 1) {
return false;
}
}
}
}
cur = nex;
nex.clear();
}
return true;
}
int main() {
// cout << setprecision(10);
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0;
else
cout << (n - (k - 1) - 1);
}
// 13
// 2 3
// 5 4
// 1 10
// 7 8
// 5 10
// 9 4
// 3 11
// 3 5
// 5 8
// 12 4
// 6 8
// 13 10
//
// 9
// 1 2
// 2 3
// 3 4
// 4 5
// 2 6
// 4 7
// 3 8
// 8 9 | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,170 | 819,171 | u188208110 | cpp |
p03005 | #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < N; i++)
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (N == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
}
| #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < N; i++)
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,178 | 819,179 | u466393447 | cpp |
p03005 | #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < N; i++)
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (N == 0) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
}
| #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < N; i++)
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"literal.number.change"
] | 819,180 | 819,179 | u466393447 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k + 1 << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
} | [
"expression.operation.binary.remove"
] | 819,181 | 819,182 | u822169805 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
main() {
int n, k;
cin >> n >> k;
cout << (k ? n - k : 0);
} | #include <bits/stdc++.h>
using namespace std;
main() {
int n, k;
cin >> n >> k;
cout << (k > 1 ? n - k : 0);
} | [
"expression.operation.binary.add"
] | 819,196 | 819,197 | u756659922 | cpp |
p03005 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define all(a) a.begin(), a.end()
#define sz(a) (int)a.size()
#define x first
#define y second
#define debug(...) cout << "[" << #__VA_ARGS__ << ": " << __VA_ARGS__ << "]\n"
#define rd() abs((int)rng())
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int maxn = 1e5 + 100;
const int mod = 1e9 + 7;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
int n, k;
cin >> n >> k;
if (n == 1)
cout << "0\n";
else
cout << n - k << "\n";
return 0;
} | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define all(a) a.begin(), a.end()
#define sz(a) (int)a.size()
#define x first
#define y second
#define debug(...) cout << "[" << #__VA_ARGS__ << ": " << __VA_ARGS__ << "]\n"
#define rd() abs((int)rng())
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int maxn = 1e5 + 100;
const int mod = 1e9 + 7;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
int n, k;
cin >> n >> k;
if (k == 1)
cout << "0\n";
else
cout << n - k << "\n";
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,205 | 819,206 | u710999236 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
#define REP(i, N) for (int i = 0; i < N; i++)
#define ANS(a) cout << a << endl;
#define SORT(V) sort(V.begin(), V.end())
#define RSORT(V) sort(V.rbegin(), V.rend())
#define DBG(V) \
for (auto v : V) \
cout << v << " "; \
cout << endl
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
ANS(N);
return 0;
}
ANS(N - K);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
#define REP(i, N) for (int i = 0; i < N; i++)
#define ANS(a) cout << a << endl;
#define SORT(V) sort(V.begin(), V.end())
#define RSORT(V) sort(V.rbegin(), V.rend())
#define DBG(V) \
for (auto v : V) \
cout << v << " "; \
cout << endl
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
ANS(0);
return 0;
}
ANS(N - K);
return 0;
}
| [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change"
] | 819,207 | 819,208 | u013373291 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (n == 1)
cout << 0 << "\n";
else
cout << n - k << "\n";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << "\n";
else
cout << n - k << "\n";
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,209 | 819,210 | u018543978 | cpp |
p03005 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b = (b < MOD) ? b : (b - MOD);
a += b;
a = (a < MOD) ? a : (a - MOD);
}
int main(void) {
int n, k;
cin >> n >> k;
if (!k) {
cout << 0 << endl;
return 0;
}
cout << (n - k) << endl;
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b = (b < MOD) ? b : (b - MOD);
a += b;
a = (a < MOD) ? a : (a - MOD);
}
int main(void) {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
return 0;
}
cout << (n - k) << endl;
return 0;
}
| [
"expression.operation.unary.logical.remove",
"control_flow.branch.if.condition.change"
] | 819,211 | 819,212 | u548624367 | cpp |
p03005 | #include <bits/stdc++.h>
#define All(v) v.begin(), v.end()
using namespace std;
typedef long long lint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int N, K;
cin >> N >> K;
if (K == 1)
cout << N << endl;
else
cout << N - K << endl;
return 0;
} | #include <bits/stdc++.h>
#define All(v) v.begin(), v.end()
using namespace std;
typedef long long lint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << N - K << endl;
return 0;
} | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 819,217 | 819,218 | u354638986 | cpp |
p03005 | #include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
int N, K;
cin >> N;
cin >> K;
if (K < 2) {
cout << 0 << endl;
return 0;
}
cout << N - K - 1 << endl;
return 0;
} | #include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
int N, K;
cin >> N;
cin >> K;
if (K < 2) {
cout << 0 << endl;
return 0;
}
cout << N - K << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 819,236 | 819,237 | u307752464 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k == 1) ? 0 : n - k;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << ((k == 1) ? 0 : n - k);
} | [] | 819,238 | 819,239 | u219398458 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (n == 1) ? 0 : n - k;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << ((k == 1) ? 0 : n - k);
} | [
"control_flow.loop.for.condition.change",
"io.output.change"
] | 819,240 | 819,239 | u219398458 | cpp |
p03005 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> v_ll;
typedef vector<vector<ll>> vv_ll;
typedef vector<pair<ll, ll>> vp_ll;
typedef pair<ll, ll> p_ll;
bool TEST = false;
ll MOD = 1000000007;
void show() {
if (TEST) {
cout << endl;
}
}
void show(string x) {
if (TEST) {
cout << x;
}
}
void show(string x, bool enter) {
if (TEST) {
if (enter)
cout << "<#> " << x << endl;
else
cout << x;
}
}
void show(ll x) {
if (TEST) {
cout << x;
}
}
void show(ll x, bool enter) {
if (TEST) {
if (enter)
cout << "<#> " << x << endl;
else
cout << x;
}
}
void show(p_ll p) {
if (TEST) {
cout << "{ ";
show(p.first);
cout << " ";
show(p.second);
cout << " }";
}
}
void show(v_ll v) {
if (TEST) {
cout << "<begin> ";
for (ll i = 0; i < v.size(); i++) {
show(v[i]);
cout << " ";
}
cout << "<end>" << endl;
}
}
void show(vv_ll v) {
if (TEST) {
cout << "//////////" << endl;
for (ll i = 0; i < v.size(); i++) {
show(v[i]);
cout << endl;
}
}
}
void show(vp_ll v) {
if (TEST) {
cout << "//////////" << endl;
for (ll i = 0; i < v.size(); i++) {
show(v[i]);
cout << endl;
}
}
}
ll mod(ll x) {
ll n = MOD;
ll ret = x % n;
if (ret < 0)
ret += n;
return ret;
}
void mod_self(ll &x) { x = mod(x); }
ll mod_inv(ll x) {
ll n = MOD;
ll y = x, z = n - 2, ret = 1;
y = mod(y);
while (z > 0) {
if (z % 2 == 1)
ret = mod(ret * y);
y = mod(y * y);
z /= 2;
}
return ret;
}
ll mod_pow(ll x, ll a) {
ll y = x, z = a, ret = 1;
y = mod(y);
if (z < 0)
z = -z;
while (z > 0) {
if (z % 2 == 1)
ret = mod(ret * y);
y = mod(y * y);
z /= 2;
}
if (a < 0)
ret = mod_inv(ret);
return ret;
}
v_ll mod_nck(ll n) {
v_ll nck(n + 1, 0);
nck[0] = 1;
for (ll i = 1; i <= n; i++) {
nck[i] = mod(nck[i - 1] * (n + 1 - i));
nck[i] = mod(nck[i] * mod_inv(i));
}
return nck;
}
v_ll mod_factorial(ll n) {
v_ll fct(n + 1, 0);
fct[0] = 1;
for (ll i = 1; i <= n; i++) {
fct[i] = mod(fct[i - 1] * i);
}
return fct;
}
ll N, K;
int main() {
cin >> N >> K;
if (N == 1) {
cout << 0 << endl;
return 0;
} else
cout << N - K << endl;
}
| #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> v_ll;
typedef vector<vector<ll>> vv_ll;
typedef vector<pair<ll, ll>> vp_ll;
typedef pair<ll, ll> p_ll;
bool TEST = false;
ll MOD = 1000000007;
void show() {
if (TEST) {
cout << endl;
}
}
void show(string x) {
if (TEST) {
cout << x;
}
}
void show(string x, bool enter) {
if (TEST) {
if (enter)
cout << "<#> " << x << endl;
else
cout << x;
}
}
void show(ll x) {
if (TEST) {
cout << x;
}
}
void show(ll x, bool enter) {
if (TEST) {
if (enter)
cout << "<#> " << x << endl;
else
cout << x;
}
}
void show(p_ll p) {
if (TEST) {
cout << "{ ";
show(p.first);
cout << " ";
show(p.second);
cout << " }";
}
}
void show(v_ll v) {
if (TEST) {
cout << "<begin> ";
for (ll i = 0; i < v.size(); i++) {
show(v[i]);
cout << " ";
}
cout << "<end>" << endl;
}
}
void show(vv_ll v) {
if (TEST) {
cout << "//////////" << endl;
for (ll i = 0; i < v.size(); i++) {
show(v[i]);
cout << endl;
}
}
}
void show(vp_ll v) {
if (TEST) {
cout << "//////////" << endl;
for (ll i = 0; i < v.size(); i++) {
show(v[i]);
cout << endl;
}
}
}
ll mod(ll x) {
ll n = MOD;
ll ret = x % n;
if (ret < 0)
ret += n;
return ret;
}
void mod_self(ll &x) { x = mod(x); }
ll mod_inv(ll x) {
ll n = MOD;
ll y = x, z = n - 2, ret = 1;
y = mod(y);
while (z > 0) {
if (z % 2 == 1)
ret = mod(ret * y);
y = mod(y * y);
z /= 2;
}
return ret;
}
ll mod_pow(ll x, ll a) {
ll y = x, z = a, ret = 1;
y = mod(y);
if (z < 0)
z = -z;
while (z > 0) {
if (z % 2 == 1)
ret = mod(ret * y);
y = mod(y * y);
z /= 2;
}
if (a < 0)
ret = mod_inv(ret);
return ret;
}
v_ll mod_nck(ll n) {
v_ll nck(n + 1, 0);
nck[0] = 1;
for (ll i = 1; i <= n; i++) {
nck[i] = mod(nck[i - 1] * (n + 1 - i));
nck[i] = mod(nck[i] * mod_inv(i));
}
return nck;
}
v_ll mod_factorial(ll n) {
v_ll fct(n + 1, 0);
fct[0] = 1;
for (ll i = 1; i <= n; i++) {
fct[i] = mod(fct[i - 1] * i);
}
return fct;
}
ll N, K;
int main() {
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
return 0;
} else {
cout << N - K << endl;
return 0;
}
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 819,245 | 819,246 | u881541634 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define ll long long int
#define ull unsigned long long int
#define ld long double
#define mod 1000000007
#define inf 1000000000000000007
#define eps 0.00000001
#define pi 3.141592653589793
#define pii pair<int, int>
#define pdd pair<ld, ld>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define vii vector<int>
#define vpl vector<pll>
#define vll vector<ll>
#define sti stack<int>
#define stll stack<ll>
#define mseti multiset<ll>
#define msetd multiset<ll, greater<ll>>
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define stp setprecision(20) // use fixed before stp
#define endl '\n'
int main() {
FAST ll n, k;
cin >> n >> k;
n -= k;
if (k == 0)
cout << 0;
else
cout << n;
} | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define ll long long int
#define ull unsigned long long int
#define ld long double
#define mod 1000000007
#define inf 1000000000000000007
#define eps 0.00000001
#define pi 3.141592653589793
#define pii pair<int, int>
#define pdd pair<ld, ld>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define vii vector<int>
#define vpl vector<pll>
#define vll vector<ll>
#define sti stack<int>
#define stll stack<ll>
#define mseti multiset<ll>
#define msetd multiset<ll, greater<ll>>
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define stp setprecision(20) // use fixed before stp
#define endl '\n'
int main() {
FAST ll n, k;
cin >> n >> k;
n -= k;
if (k == 1)
cout << 0;
else
cout << n;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,249 | 819,250 | u002419600 | cpp |
p03005 | #include <cstdio>
using namespace std;
int main() {
int x, y, z;
scanf("%d %d", &x, &y);
if (x / y == 1) {
printf("0");
} else {
z = x - y;
printf("%d", z);
}
return 0;
}
| #include <cstdio>
using namespace std;
int main() {
int x, y, z;
scanf("%d %d", &x, &y);
if (y == 1) {
printf("0");
} else {
z = x - y;
printf("%d", z);
}
return 0;
}
| [
"expression.operation.binary.remove"
] | 819,253 | 819,254 | u932409248 | cpp |
p03005 | #include <cstdio>
using namespace std;
int main() {
int x, y, z;
scanf("%d %d", &x, &y);
if (x / y == 1) {
printf("0\n");
} else {
z = x - y;
printf("%d\n", z);
}
return 0;
}
| #include <cstdio>
using namespace std;
int main() {
int x, y, z;
scanf("%d %d", &x, &y);
if (y == 1) {
printf("0");
} else {
z = x - y;
printf("%d", z);
}
return 0;
}
| [
"expression.operation.binary.remove",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.remove"
] | 819,255 | 819,254 | u932409248 | cpp |
p03005 | #include <cstdio>
using namespace std;
int main() {
int x, y, z;
scanf("%d%d", &x, &y);
if (x / y == 1) {
printf("0\n");
} else {
z = x - y;
printf("%d\n", z);
}
return 0;
}
| #include <cstdio>
using namespace std;
int main() {
int x, y, z;
scanf("%d %d", &x, &y);
if (y == 1) {
printf("0");
} else {
z = x - y;
printf("%d", z);
}
return 0;
}
| [
"literal.string.change",
"call.arguments.change",
"expression.operation.binary.remove",
"io.output.change",
"io.output.newline.remove"
] | 819,256 | 819,254 | u932409248 | cpp |
p03005 | #define y1 askjdkasldjlkasd
#include <bits/stdc++.h>
#undef y1
using namespace std;
#define pb push_back
#define mp make_pair
#define fi(a, b) for (int i = a; i <= b; i++)
#define fj(a, b) for (int j = a; j <= b; j++)
#define fo(a, b) for (int o = a; o <= b; o++)
#define fdi(a, b) for (int i = a; i >= b; i--)
#define fdj(a, b) for (int j = a; j >= b; j--)
#define fdo(a, b) for (int o = a; o >= b; o--)
#define sz(x) (int)x.size()
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<ll> vll;
#ifdef LOCAL
#define err(...) fprintf(stderr, __VA_ARGS__)
#else
#define err(...) while (0)
#endif
double START_TIME;
void exit() {
#ifdef LOCAL
cerr << "TIME: " << setprecision(5) << fixed
<< (clock() - START_TIME) / CLOCKS_PER_SEC << endl;
#endif
exit(0);
}
template <typename A, typename B>
ostream &operator<<(ostream &os, pair<A, B> p) {
os << "(" << p.first << ", " << p.second << ")";
return os;
}
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
fi(0, sz(v) - 1) { os << v[i] << " "; }
return os;
}
template <typename T> ostream &operator<<(ostream &os, set<T> t) {
for (auto z : t) {
os << z << " ";
}
return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, map<T1, T2> t) {
cerr << endl;
for (auto z : t) {
os << "\t" << z.first << " -> " << z.second << endl;
}
return os;
}
#ifdef LOCAL
#define dbg(x) \
{ cerr << __LINE__ << "\t" << #x << ": " << x << endl; }
#define dbg0(x, n) \
{ \
cerr << __LINE__ << "\t" << #x << ": "; \
for (int ABC = 0; ABC < n; ABC++) \
cerr << x[ABC] << ' '; \
cerr << endl; \
}
#else
#define dbg(x) \
while (0) { \
}
#define dbg0(x, n) \
while (0) { \
}
#endif
#ifdef LOCAL
#define ass(x) \
if (!(x)) { \
cerr << __LINE__ << "\tassertion failed: " << #x << endl, abort(); \
}
#else
#define ass(x) assert(x)
#endif
///////////////////////////////////////////////////
void solve() {}
int main() {
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
START_TIME = (double)clock();
#endif
int n, k;
scanf("%d %d", &n, &k);
if (n == 1) {
printf("0\n");
} else {
printf("%d\n", n - k);
}
solve();
exit();
return 0;
}
| #define y1 askjdkasldjlkasd
#include <bits/stdc++.h>
#undef y1
using namespace std;
#define pb push_back
#define mp make_pair
#define fi(a, b) for (int i = a; i <= b; i++)
#define fj(a, b) for (int j = a; j <= b; j++)
#define fo(a, b) for (int o = a; o <= b; o++)
#define fdi(a, b) for (int i = a; i >= b; i--)
#define fdj(a, b) for (int j = a; j >= b; j--)
#define fdo(a, b) for (int o = a; o >= b; o--)
#define sz(x) (int)x.size()
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<ll> vll;
#ifdef LOCAL
#define err(...) fprintf(stderr, __VA_ARGS__)
#else
#define err(...) while (0)
#endif
double START_TIME;
void exit() {
#ifdef LOCAL
cerr << "TIME: " << setprecision(5) << fixed
<< (clock() - START_TIME) / CLOCKS_PER_SEC << endl;
#endif
exit(0);
}
template <typename A, typename B>
ostream &operator<<(ostream &os, pair<A, B> p) {
os << "(" << p.first << ", " << p.second << ")";
return os;
}
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
fi(0, sz(v) - 1) { os << v[i] << " "; }
return os;
}
template <typename T> ostream &operator<<(ostream &os, set<T> t) {
for (auto z : t) {
os << z << " ";
}
return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, map<T1, T2> t) {
cerr << endl;
for (auto z : t) {
os << "\t" << z.first << " -> " << z.second << endl;
}
return os;
}
#ifdef LOCAL
#define dbg(x) \
{ cerr << __LINE__ << "\t" << #x << ": " << x << endl; }
#define dbg0(x, n) \
{ \
cerr << __LINE__ << "\t" << #x << ": "; \
for (int ABC = 0; ABC < n; ABC++) \
cerr << x[ABC] << ' '; \
cerr << endl; \
}
#else
#define dbg(x) \
while (0) { \
}
#define dbg0(x, n) \
while (0) { \
}
#endif
#ifdef LOCAL
#define ass(x) \
if (!(x)) { \
cerr << __LINE__ << "\tassertion failed: " << #x << endl, abort(); \
}
#else
#define ass(x) assert(x)
#endif
///////////////////////////////////////////////////
void solve() {}
int main() {
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
START_TIME = (double)clock();
#endif
int n, k;
scanf("%d %d", &n, &k);
if (k == 1) {
printf("0\n");
} else {
printf("%d\n", n - k);
}
solve();
exit();
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,262 | 819,263 | u197964611 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N;
cin >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K - 1 << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N;
cin >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
}
| [
"expression.operation.binary.remove"
] | 819,277 | 819,278 | u913604515 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N;
cin >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K - 1 << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
} | [
"expression.operation.binary.remove"
] | 819,277 | 819,279 | u913604515 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k)
cout << n - k;
else
cout << 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k - 1)
cout << n - k;
else
cout << 0;
}
| [
"control_flow.branch.if.condition.change"
] | 819,282 | 819,283 | u460412596 | cpp |
p03005 | //#include <bits/stdc++.h>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPS(i, n) for (int i = n; i > 0; i--)
#define INF (int)(1e9 + 10)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
int main() {
int n, m;
cin >> n >> m;
if (m == 1) {
cout << n - 1 << endl;
} else {
cout << n - m << endl;
}
return 0;
}
| //#include <bits/stdc++.h>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPS(i, n) for (int i = n; i > 0; i--)
#define INF (int)(1e9 + 10)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
int main() {
int n, m;
cin >> n >> m;
if (m == 1) {
cout << 0 << endl;
} else {
cout << n - m << endl;
}
return 0;
}
| [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change",
"expression.operation.binary.remove"
] | 819,289 | 819,290 | u358210788 | cpp |
p03005 | #include <algorithm>
#include <deque>
#include <iostream>
#include <vector>
using namespace std;
int main() {
// 整数の入力
int N, K;
cin >> N >> K;
if (N == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
return 0;
} | #include <algorithm>
#include <deque>
#include <iostream>
#include <vector>
using namespace std;
int main() {
// 整数の入力
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,293 | 819,294 | u902500155 | cpp |
p03005 | #include <stdio.h>
int n, k;
int main() {
scanf("%d%d", &n, &k);
if (n == 1)
printf("%d\n", 0);
else
printf("%d\n", n - k);
return 0;
} | #include <stdio.h>
int n, k;
int main() {
scanf("%d%d", &n, &k);
if (k == 1)
printf("%d\n", 0);
else
printf("%d\n", n - k);
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,297 | 819,298 | u073586914 | cpp |
p03005 | #include <stdio.h>
int n, k;
int main() {
scanf("%d%d", &n, &k);
if (n == 1)
puts("0");
else
printf("%d\n", n - k);
return 0;
} | #include <stdio.h>
int n, k;
int main() {
scanf("%d%d", &n, &k);
if (k == 1)
printf("%d\n", 0);
else
printf("%d\n", n - k);
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change",
"call.function.change",
"io.output.change",
"literal.string.change",
"call.arguments.change",
"io.output.newline.add",
"call.arguments.add"
] | 819,299 | 819,298 | u073586914 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
scanf("%d %d", &n, &k);
if (n >= k) {
int max = n - k + 1;
int min = 1;
cout << max - min << endl;
} else {
cout << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
scanf("%d %d", &n, &k);
if (k >= 2) {
int max = n - k + 1;
int min = 1;
cout << max - min << endl;
} else {
cout << 0 << endl;
}
} | [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 819,305 | 819,306 | u239316561 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k == 0) ? 0 : (n - k);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << ((k == 1) ? 0 : (n - k));
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"io.output.change"
] | 819,311 | 819,312 | u192159607 | cpp |
p03005 | #include "bits/stdc++.h"
using namespace std;
#define LL long long
#define PB push_back
#define MP make_pair
int main() {
int N, K;
cin >> N >> K;
if (K == 0)
cout << 0 << endl;
else
cout << N - K << endl;
}
| #include "bits/stdc++.h"
using namespace std;
#define LL long long
#define PB push_back
#define MP make_pair
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << N - K << endl;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,330 | 819,331 | u422592877 | cpp |
p03005 | #include "bits/stdc++.h"
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pll = pair<ll, ll>;
int main() {
int K, N;
cin >> N >> K;
if (N == 1)
cout << 0 << endl;
else
cout << N - K << endl;
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pll = pair<ll, ll>;
int main() {
int K, N;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << N - K << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,332 | 819,333 | u378945900 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define _for(i, j, N) for (int i = (j); i < (N); i++)
#define _rep(i, j, N) for (int i = (j); i <= (N); i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define mk make_pair
typedef long long LL;
typedef pair<int, int> Interval;
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
_for(i, 0, v.size()) os << v[i] << " ";
return os;
}
template <typename T> ostream &operator<<(ostream &os, const set<T> &v) {
for (typename set<T>::iterator it = v.begin(); it != v.end(); it++)
os << *it << " ";
return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &v) {
os << v.first << " " << v.second << endl;
return os;
}
int N, K;
int main() {
cin >> N >> K;
if (N == 1)
printf("0\n");
else
printf("%d\n", N - K);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define _for(i, j, N) for (int i = (j); i < (N); i++)
#define _rep(i, j, N) for (int i = (j); i <= (N); i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define mk make_pair
typedef long long LL;
typedef pair<int, int> Interval;
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
_for(i, 0, v.size()) os << v[i] << " ";
return os;
}
template <typename T> ostream &operator<<(ostream &os, const set<T> &v) {
for (typename set<T>::iterator it = v.begin(); it != v.end(); it++)
os << *it << " ";
return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &v) {
os << v.first << " " << v.second << endl;
return os;
}
int N, K;
int main() {
cin >> N >> K;
if (K == 1)
printf("0\n");
else
printf("%d\n", N - K);
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,338 | 819,339 | u066651036 | cpp |
p03005 | #include <algorithm>
#include <iostream>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long ll;
#define mod 1000000007
#define mad(a, b) a = (a + b) % mod;
int main() {
ll n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k + 1 << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long ll;
#define mod 1000000007
#define mad(a, b) a = (a + b) % mod;
int main() {
ll n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"expression.operation.binary.remove"
] | 819,352 | 819,353 | u924885571 | cpp |
p03005 |
#include <algorithm>
#include <stdio.h>
#include <string>
#include <vector>
int main() {
int N, K;
scanf("%d %d", &N, &K);
if (K == 1) {
printf("0");
} else {
printf("%d", N - K + 1);
}
return 0;
} |
#include <algorithm>
#include <stdio.h>
#include <string>
#include <vector>
int main() {
int N, K;
scanf("%d %d", &N, &K);
if (K == 1) {
printf("0");
} else {
printf("%d", N - K);
}
return 0;
} | [
"expression.operation.binary.remove"
] | 819,354 | 819,355 | u617987447 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << ((k - 1) ? 0 : n - k);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << ((k - 1 == 0) ? 0 : n - k);
} | [
"expression.operation.binary.add"
] | 819,356 | 819,357 | u885523920 | cpp |
p03005 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ll long long
#define dd double
#define ull unsigned long long
#define mes(x, y) memset(x, y, sizeof(x))
#define si(i) scanf("%d", &i)
#define ss(i) scanf("%s", (i))
#define sd(i) scanf("%lf", &i)
#define INF 0x3f3f3f3f
#define eps 1e-16
#define PI acos(-1)
#define FAST_IO \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
using namespace std;
const int maxn = 2e5 + 9;
const int mod = 1e9 + 7;
ll gar(ll a, ll b) { //最大公约数
return b == 0 ? a : gar(b, a % b);
}
int main() {
FAST_IO;
ll x, y;
while (cin >> x >> y) {
if (y == 1) {
cout << "0" << endl;
continue;
} else {
ll z = x - y - 1;
cout << z << endl;
}
}
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ll long long
#define dd double
#define ull unsigned long long
#define mes(x, y) memset(x, y, sizeof(x))
#define si(i) scanf("%d", &i)
#define ss(i) scanf("%s", (i))
#define sd(i) scanf("%lf", &i)
#define INF 0x3f3f3f3f
#define eps 1e-16
#define PI acos(-1)
#define FAST_IO \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
using namespace std;
const int maxn = 2e5 + 9;
const int mod = 1e9 + 7;
ll gar(ll a, ll b) { //最大公约数
return b == 0 ? a : gar(b, a % b);
}
int main() {
FAST_IO;
ll x, y;
while (cin >> x >> y) {
if (y == 1) {
cout << "0" << endl;
continue;
} else {
ll z = x - y;
cout << z << endl;
}
}
} | [
"expression.operation.binary.remove"
] | 819,360 | 819,361 | u538947292 | cpp |
p03005 | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long long
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep3(i, a, b) for (ll i = a; i >= b; i--)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pq priority_queue<int>
#define pqg priority_queue<int, vector<int>, greater<int>>
#define pb push_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define all(c) begin(c), end(c)
using namespace std;
int in() {
int x;
scanf("%d", &x);
return x;
}
ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
#define INF 1e9 + 7
#define LLINF 1e18 + 7
#define N 500000
ll MOD = 1e9 + 7;
main() {
int n = in(), k = in();
if (n == 1)
cout << 0;
else
cout << n - k;
}
| #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long long
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep3(i, a, b) for (ll i = a; i >= b; i--)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pq priority_queue<int>
#define pqg priority_queue<int, vector<int>, greater<int>>
#define pb push_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define all(c) begin(c), end(c)
using namespace std;
int in() {
int x;
scanf("%d", &x);
return x;
}
ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
#define INF 1e9 + 7
#define LLINF 1e18 + 7
#define N 500000
ll MOD = 1e9 + 7;
main() {
int n = in(), k = in();
if (k == 1)
cout << 0;
else
cout << n - k;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,364 | 819,365 | u495699318 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (b == 1) {
cout << "0" << endl;
} else
cout << b - a << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (b == 1) {
cout << "0" << endl;
} else
cout << a - b << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 819,368 | 819,369 | u007099475 | cpp |
p03005 | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0); \
cout.setf(ios::fixed); \
cout.precision(20);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vl;
#define endl "\n"
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define b begin
#define e end
#define pi pair<int, int>
#define pii pair<int, pair<int, int>>
#define pl pair<ll, ll>
#define pll pair<ll, pair<ll, ll>>
#define plc pair<ll, char>
#define vpl vector<pl>
#define vplc vector<plc>
#define mod 1e9 + 7
int main() {
fio;
ll n, k;
cin >> n >> k;
if (!k)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0); \
cout.setf(ios::fixed); \
cout.precision(20);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vl;
#define endl "\n"
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define b begin
#define e end
#define pi pair<int, int>
#define pii pair<int, pair<int, int>>
#define pl pair<ll, ll>
#define pll pair<ll, pair<ll, ll>>
#define plc pair<ll, char>
#define vpl vector<pl>
#define vplc vector<plc>
#define mod 1e9 + 7
int main() {
fio;
ll n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"expression.operation.unary.logical.remove",
"control_flow.branch.if.condition.change"
] | 819,378 | 819,379 | u385297366 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N;
int K;
cin >> N >> K;
if (K > 1) {
cout << N - K;
} else {
cout << N;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int N;
int K;
cin >> N >> K;
if (K > 1) {
cout << N - K;
} else {
cout << 0;
}
return 0;
} | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 819,385 | 819,386 | u057810841 | cpp |
p03005 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int ans = k == 0 ? 0 : n - k;
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int ans = k == 1 ? 0 : n - k;
cout << ans << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 819,387 | 819,388 | u590241855 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (N > 1) {
cout << N - K << endl;
} else {
cout << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K > 1) {
cout << N - K << endl;
} else {
cout << 0 << endl;
}
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,389 | 819,390 | u801530021 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
// cin.tie(0);
// ios::sync_with_stdio(false);
int main() {
int N, K;
int ans;
cin >> N >> K;
if (K == 1) {
ans = N;
} else {
ans = N - K;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
// cin.tie(0);
// ios::sync_with_stdio(false);
int main() {
int N, K;
int a, ans;
cin >> N >> K;
if (K == 1) {
ans = 0;
} else {
ans = N - K;
}
cout << ans << endl;
} | [
"variable_declaration.add",
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add"
] | 819,391 | 819,392 | u087520103 | cpp |
p03005 | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(i, b, n) for (Int i = b; i < Int(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
using Int = long long;
Int inf = 1000000000000000001LL;
using vi = vector<Int>;
using vvi = vector<vi>;
using pii = pair<Int, Int>;
using mapis = unordered_map<Int, string>;
using mapii = unordered_map<Int, Int>;
Int GCD(Int a, Int b) {
if (b == 0)
return a;
if (a < b)
return GCD(b, a);
unsigned r;
while ((r = a % b)) {
a = b;
b = r;
}
return b;
}
Int LCM(Int a, Int b) { return a * b / GCD(a, b); }
int main() {
Int N, K;
cin >> N >> K;
int minimum = 1;
int maximum = N - K + 1;
if (N == 1) {
cout << 0 << endl;
} else {
cout << maximum - minimum << endl;
}
return 0;
} | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(i, b, n) for (Int i = b; i < Int(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
using Int = long long;
Int inf = 1000000000000000001LL;
using vi = vector<Int>;
using vvi = vector<vi>;
using pii = pair<Int, Int>;
using mapis = unordered_map<Int, string>;
using mapii = unordered_map<Int, Int>;
Int GCD(Int a, Int b) {
if (b == 0)
return a;
if (a < b)
return GCD(b, a);
unsigned r;
while ((r = a % b)) {
a = b;
b = r;
}
return b;
}
Int LCM(Int a, Int b) { return a * b / GCD(a, b); }
int main() {
Int N, K;
cin >> N >> K;
int minimum = 1;
int maximum = N - K + 1;
if (K == 1) {
cout << 0 << endl;
} else {
cout << maximum - minimum << endl;
}
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,395 | 819,396 | u375619974 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
cout << n - k << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
} | [
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 819,401 | 819,402 | u125693891 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
cout << 1 << endl;
cout << N - K << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - K << endl;
}
return 0;
} | [
"literal.number.change",
"io.output.change",
"control_flow.branch.else.add"
] | 819,406 | 819,407 | u652609504 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 1 << endl;
}
else {
cout << n - k << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
}
else {
cout << n - k << endl;
}
}
| [
"literal.number.change",
"io.output.change"
] | 819,425 | 819,426 | u277253335 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
REP(i, v.size()) {
if (i)
os << " ";
os << v[i];
}
return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<vector<T>> &v) {
REP(i, v.size()) {
if (i)
os << endl;
os << v[i];
}
return os;
}
int main() {
ll N, K, S;
cin >> N >> K;
S = N - K;
if (K = 1)
cout << 0 << endl;
else
cout << S << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
REP(i, v.size()) {
if (i)
os << " ";
os << v[i];
}
return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<vector<T>> &v) {
REP(i, v.size()) {
if (i)
os << endl;
os << v[i];
}
return os;
}
int main() {
ll N, K, S;
cin >> N >> K;
S = N - K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << S << endl;
}
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 819,427 | 819,428 | u983540695 | cpp |
p03005 | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = int64_t;
#define int ll
#define FOR(i, a, b) for (int i = int(a); i < int(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) x.begin(), x.end()
using pi = pair<int, int>;
using vi = vector<int>;
using ld = long double;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << "(" << p.first << "," << p.second << ")";
return os;
}
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
os << "{";
REP(i, (int)v.size()) {
if (i)
os << ",";
os << v[i];
}
os << "}";
return os;
}
ll read() {
ll i;
scanf("%" SCNd64, &i);
return i;
}
void printSpace() { printf(" "); }
void printEoln() { printf("\n"); }
void print(ll x, int suc = 1) {
printf("%" PRId64, x);
if (suc == 1)
printEoln();
if (suc == 2)
printSpace();
}
string readString() {
static char buf[3341000];
scanf("%s", buf);
return string(buf);
}
char *readCharArray() {
static char buf[3341000];
static int bufUsed = 0;
char *ret = buf + bufUsed;
scanf("%s", ret);
bufUsed += strlen(ret) + 1;
return ret;
}
template <class T, class U> void chmax(T &a, U b) {
if (a < b)
a = b;
}
template <class T, class U> void chmin(T &a, U b) {
if (b < a)
a = b;
}
template <class T> T Sq(const T &t) { return t * t; }
const int mod = 1e9 + 7;
signed main() {
int n, k;
cin >> n >> k;
if (n == 1)
print(0);
else
print(n - k);
}
| #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = int64_t;
#define int ll
#define FOR(i, a, b) for (int i = int(a); i < int(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) x.begin(), x.end()
using pi = pair<int, int>;
using vi = vector<int>;
using ld = long double;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << "(" << p.first << "," << p.second << ")";
return os;
}
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
os << "{";
REP(i, (int)v.size()) {
if (i)
os << ",";
os << v[i];
}
os << "}";
return os;
}
ll read() {
ll i;
scanf("%" SCNd64, &i);
return i;
}
void printSpace() { printf(" "); }
void printEoln() { printf("\n"); }
void print(ll x, int suc = 1) {
printf("%" PRId64, x);
if (suc == 1)
printEoln();
if (suc == 2)
printSpace();
}
string readString() {
static char buf[3341000];
scanf("%s", buf);
return string(buf);
}
char *readCharArray() {
static char buf[3341000];
static int bufUsed = 0;
char *ret = buf + bufUsed;
scanf("%s", ret);
bufUsed += strlen(ret) + 1;
return ret;
}
template <class T, class U> void chmax(T &a, U b) {
if (a < b)
a = b;
}
template <class T, class U> void chmin(T &a, U b) {
if (b < a)
a = b;
}
template <class T> T Sq(const T &t) { return t * t; }
const int mod = 1e9 + 7;
signed main() {
int n, k;
cin >> n >> k;
if (k == 1)
print(0);
else
print(n - k);
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,449 | 819,450 | u700484101 | cpp |
p03005 |
/**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
/* see https://github.com/pllk/cphb/ */
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
typedef unsigned int uint;
typedef long long ll;
typedef __int128 lll;
#define fori(n) for (ll i = 0; i < (n); i++)
#define forn(i, n) for (ll i = 0; i < (n); i++)
#define forn3(i, x, n) for (ll i = (x); i < (n); i++)
int main() {
cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int n, k;
cin >> n >> k;
if (n < 2)
cout << 0 << endl;
else {
int ans = n - k;
cout << ans << endl;
}
}
|
/**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
/* see https://github.com/pllk/cphb/ */
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
typedef unsigned int uint;
typedef long long ll;
typedef __int128 lll;
#define fori(n) for (ll i = 0; i < (n); i++)
#define forn(i, n) for (ll i = 0; i < (n); i++)
#define forn3(i, x, n) for (ll i = (x); i < (n); i++)
int main() {
cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int n, k;
cin >> n >> k;
if (k < 2)
cout << 0 << endl;
else {
int ans = n - k;
cout << ans << endl;
}
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,456 | 819,457 | u014617387 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 0) {
cout << 0 << endl;
} else {
cout << n - k << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
} else {
cout << n - k << endl;
}
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,460 | 819,461 | u153794369 | cpp |
p03005 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i = m; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define LL long long
template <class T> inline void chmax(T &a, T b) {
if (a < b) {
a = b;
}
}
template <class T> inline void chmin(T &a, T b) {
if (a > b) {
a = b;
}
}
const long long LLINF = 1LL << 62;
const int INF = 1LL << 30;
using namespace std;
int main(void) {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 1 << endl;
} else {
cout << N - (K - 1) - 1 << endl;
}
return 0;
} | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i = m; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define LL long long
template <class T> inline void chmax(T &a, T b) {
if (a < b) {
a = b;
}
}
template <class T> inline void chmin(T &a, T b) {
if (a > b) {
a = b;
}
}
const long long LLINF = 1LL << 62;
const int INF = 1LL << 30;
using namespace std;
int main(void) {
int N, K;
cin >> N >> K;
if (K == 1) {
cout << 0 << endl;
} else {
cout << N - (K - 1) - 1 << endl;
}
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 819,466 | 819,467 | u139235669 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int A, B;
// int money = 0;
cin >> A >> B;
if (B <= 1)
cout << 0 << endl;
else
cout << (B - A) << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int A, B;
// int money = 0;
cin >> A >> B;
if (B <= 1)
cout << 0 << endl;
else
cout << (A - B) << endl;
return 0;
}
| [
"expression.operation.binary.remove"
] | 819,474 | 819,475 | u551795653 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 0)
cout << 0 << endl;
else
cout << N - K << endl;
} | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << N - K << endl;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,476 | 819,477 | u362444129 | cpp |
p03005 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k != 0 ? n - k : 0) << endl;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k != 1 ? n - k : 0) << endl;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"io.output.change"
] | 819,485 | 819,486 | u959815036 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, k;
cin >> n >> k;
if (n == 1) {
cout << 0 << endl;
return 0;
} else {
cout << n - k << endl;
return 0;
}
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
return 0;
} else {
cout << n - k << endl;
return 0;
}
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,487 | 819,488 | u557044746 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = n; i >= 0; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; };
int lcm(int a, int b) { return a * b / gcd(a, b); };
int main() {
int n, k;
cin >> n >> k;
if (k == 0)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = n; i >= 0; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; };
int lcm(int a, int b) { return a * b / gcd(a, b); };
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,491 | 819,492 | u681869152 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = n; i >= 0; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; };
int lcm(int a, int b) { return a * b / gcd(a, b); };
int main() {
int n, k;
cin >> n >> k;
if (k < n)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = n; i >= 0; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; };
int lcm(int a, int b) { return a * b / gcd(a, b); };
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [] | 819,493 | 819,492 | u681869152 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = n; i >= 0; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; };
int lcm(int a, int b) { return a * b / gcd(a, b); };
int main() {
int n, k;
cin >> n >> k;
if (k == 0)
cout << 0 << endl;
else
cout << n - k - 1 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = n; i >= 0; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; };
int lcm(int a, int b) { return a * b / gcd(a, b); };
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 819,494 | 819,492 | u681869152 | cpp |
p03005 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int ans;
if (K = 1) {
ans = 0;
} else {
int big = N - K + 1;
int small = 1;
ans = big - small;
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int ans;
if (K == 1) {
ans = 0;
} else {
int big = N - K + 1;
int small = 1;
ans = big - small;
}
cout << ans << endl;
return 0;
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 819,495 | 819,496 | u828664775 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k % n ? 0 : 1) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k == 1 ? 0 : n - k) << endl;
return 0;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 819,497 | 819,498 | u948459352 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1000000007;
ll INFL = 1ll << 60;
ll INF = 1 << 28;
// ====================================================================
int main() {
int n, k;
cin >> n >> k;
if (n == 1)
cout << 0 << endl;
else
cout << n - k << endl;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1000000007;
ll INFL = 1ll << 60;
ll INF = 1 << 28;
// ====================================================================
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,501 | 819,502 | u561186440 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
N = N - K;
if (K = 1)
N = 0;
cout << N;
} | #include <iostream>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
N = N - K;
if (K == 1)
N = 0;
cout << N;
} | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 819,508 | 819,509 | u534015096 | cpp |
p03005 | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
ll N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << K - N << endl;
return 0;
} | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
ll N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << N - K << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 819,510 | 819,511 | u991846372 | cpp |
p03005 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
using ll = long long;
int main() {
ll a = 0, b = 0, c = 0, d = 0, e, l, m, n, k, o = 0, p, q, x, y, z, max1 = 0,
ans, r, g;
string s, t, u;
cin >> n >> k;
if (k = 1)
cout << 0 << endl;
else
cout << n - k << endl;
}
| #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
using ll = long long;
int main() {
ll a = 0, b = 0, c = 0, d = 0, e, l, m, n, k, o = 0, p, q, x, y, z, max1 = 0,
ans, r, g;
string s, t, u;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 819,518 | 819,519 | u953532675 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int main() {
int N, K, ans;
cin >> N >> K;
ans = N - K;
if (N == 1) {
cout << 0;
} else {
cout << ans;
}
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int main() {
int N, K, ans;
cin >> N >> K;
ans = N - K;
if (K == 1) {
cout << 0;
} else {
cout << ans;
}
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,524 | 819,525 | u591779169 | cpp |
p03005 | #include <iostream>
using namespace std;
int main() {
int n, k, ans;
cin >> n >> k;
if (k = 1) {
ans = 0;
} else {
ans = n - k;
}
cout << ans << endl;
}
| #include <iostream>
using namespace std;
int main() {
int n, k, ans;
cin >> n >> k;
if (k == 1) {
ans = 0;
} else {
ans = n - k;
}
cout << ans << endl;
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 819,528 | 819,529 | u821416900 | cpp |
p03005 | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <math.h>
#include <stack>
#include <string>
#include <vector>
//#include<stdlib.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << (k != 1) ? (n - k) : (0);
return 0;
} | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <math.h>
#include <stack>
#include <string>
#include <vector>
//#include<stdlib.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
cout << ((k != 1) ? (n - k) : (0));
return 0;
} | [] | 819,537 | 819,538 | u468506413 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int ans = N - K;
if (K != 1) {
cout << ans << endl;
}
else {
cout << N << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int ans = N - K;
if (K != 1) {
cout << ans << endl;
}
else {
cout << 0 << endl;
}
}
| [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 819,539 | 819,540 | u096717230 | cpp |
p03005 | // diverta 2019 Programming Contest
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
int num = 0;
cin >> n >> k;
if (k == 1) {
cout << n << endl;
} else {
cout << n - k << endl;
}
}
| // diverta 2019 Programming Contest
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
int num = 0;
cin >> n >> k;
if (k == 1) {
cout << 0 << endl;
} else {
cout << n - k << endl;
}
}
| [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 819,543 | 819,544 | u320509353 | cpp |
p03005 | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
using namespace std;
const long long MOD = (long long)1e9 + 7;
int n, k;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> k;
if (k == 0) {
cout << "0\n";
return 0;
}
int tmp = n - k;
cout << tmp << "\n";
// system("pause");
return 0;
} | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
using namespace std;
const long long MOD = (long long)1e9 + 7;
int n, k;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> k;
if (k == 1) {
cout << "0\n";
return 0;
}
int tmp = n - k;
cout << tmp << "\n";
// system("pause");
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 819,545 | 819,546 | u398025421 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0;
}
cout << n - k;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1) {
cout << 0;
} else {
cout << n - k;
}
}
| [
"control_flow.branch.else.add"
] | 819,547 | 819,548 | u365178348 | cpp |
p03005 | #include <bits/stdc++.h>
#define fi first
#define se second
#define all(x) x.begin()
using namespace std;
signed main() {
int n, k;
cin >> n >> k;
if (n == 1)
return cout << 0, 0;
n -= k;
cout << n;
return 0;
}
| #include <bits/stdc++.h>
#define fi first
#define se second
#define all(x) x.begin()
using namespace std;
signed main() {
int n, k;
cin >> n >> k;
if (k == 1)
return cout << 0, 0;
n -= k;
cout << n;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,551 | 819,552 | u759779286 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define INF 2000000007
#define MOD 10e9 + 7
#define MAX 100005
typedef unsigned int uint;
typedef unsigned long long int ull;
typedef long long int ll;
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
puts(0);
else
cout << (N - K) << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define INF 2000000007
#define MOD 10e9 + 7
#define MAX 100005
typedef unsigned int uint;
typedef unsigned long long int ull;
typedef long long int ll;
int main() {
int N, K;
cin >> N >> K;
if (K == 1)
cout << 0 << endl;
else
cout << (N - K) << endl;
return 0;
}
| [
"io.output.change"
] | 819,562 | 819,563 | u090325904 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (n == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,564 | 819,565 | u027091475 | cpp |
p03005 | // diverta a
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
scanf("%d %d", &a, &b);
if (b == 1) {
c = 0;
} else {
c = b - a;
}
printf("%d\n", c);
return 0;
} | // diverta a
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
scanf("%d %d", &a, &b);
if (b == 1) {
c = 0;
} else {
c = a - b;
}
printf("%d\n", c);
return 0;
} | [
"expression.operation.binary.remove",
"assignment.change"
] | 819,566 | 819,567 | u489425626 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#pragma GCC optimize("O3")
#define ll long long
#define vi vector<int>
#define vii vector<pair<int, int>>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repD(i, a, b) for (int i = a; i > b; i--)
#define pb push_back
#define pii pair<int, int>
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
#define MOD 1000000007
#define PI 3.14159265359
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace __gnu_pbds;
typedef tree<pii,null_type,less
<pii>,rb_tree_tag,tree_order_statistics_node_update>ind_set;
*/
///*X.find_by_order("index")
/// X.order_of_key("key")
#define deb(x) cerr << #x << " : " << x << "\n";
#ifndef local
#define deb(x) ;
#endif
///----------------------------------------------------------------------------------
int n, k;
void solve() {
cin >> n >> k;
cout << (n != 1 ? (n - k) : 0) << "\n";
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifdef local
freopen("input.txt", "r", stdin);
/// freopen("output.txt","w",stdout);
#endif
clock_t qwertyuiop = clock();
int t = 1;
/// cin>>t;
rep(a, 0, t) {
/// cout<<"Case #"<<a+1<<": ";
solve();
}
#ifdef local
{
qwertyuiop = clock() - qwertyuiop;
double time_taken = ((double)qwertyuiop) / CLOCKS_PER_SEC;
cerr << fixed << setprecision(5) << "\n\nTime Taken : " << time_taken
<< " seconds\n";
}
#endif
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#pragma GCC optimize("O3")
#define ll long long
#define vi vector<int>
#define vii vector<pair<int, int>>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repD(i, a, b) for (int i = a; i > b; i--)
#define pb push_back
#define pii pair<int, int>
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
#define MOD 1000000007
#define PI 3.14159265359
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace __gnu_pbds;
typedef tree<pii,null_type,less
<pii>,rb_tree_tag,tree_order_statistics_node_update>ind_set;
*/
///*X.find_by_order("index")
/// X.order_of_key("key")
#define deb(x) cerr << #x << " : " << x << "\n";
#ifndef local
#define deb(x) ;
#endif
///----------------------------------------------------------------------------------
int n, k;
void solve() {
cin >> n >> k;
cout << (k != 1 ? (n - k) : 0) << "\n";
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifdef local
freopen("input.txt", "r", stdin);
/// freopen("output.txt","w",stdout);
#endif
clock_t qwertyuiop = clock();
int t = 1;
/// cin>>t;
rep(a, 0, t) {
/// cout<<"Case #"<<a+1<<": ";
solve();
}
#ifdef local
{
qwertyuiop = clock() - qwertyuiop;
double time_taken = ((double)qwertyuiop) / CLOCKS_PER_SEC;
cerr << fixed << setprecision(5) << "\n\nTime Taken : " << time_taken
<< " seconds\n";
}
#endif
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 819,568 | 819,569 | u953587543 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#pragma GCC optimize("O3")
#define ll long long
#define vi vector<int>
#define vii vector<pair<int, int>>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repD(i, a, b) for (int i = a; i > b; i--)
#define pb push_back
#define pii pair<int, int>
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
#define MOD 1000000007
#define PI 3.14159265359
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace __gnu_pbds;
typedef tree<pii,null_type,less
<pii>,rb_tree_tag,tree_order_statistics_node_update>ind_set;
*/
///*X.find_by_order("index")
/// X.order_of_key("key")
#define deb(x) cerr << #x << " : " << x << "\n";
#ifndef local
#define deb(x) ;
#endif
///----------------------------------------------------------------------------------
int n, k;
void solve() {
cin >> n >> k;
cout << (n != 1 ? (n - k) : k) << "\n";
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifdef local
freopen("input.txt", "r", stdin);
/// freopen("output.txt","w",stdout);
#endif
clock_t qwertyuiop = clock();
int t = 1;
/// cin>>t;
rep(a, 0, t) {
/// cout<<"Case #"<<a+1<<": ";
solve();
}
#ifdef local
{
qwertyuiop = clock() - qwertyuiop;
double time_taken = ((double)qwertyuiop) / CLOCKS_PER_SEC;
cerr << fixed << setprecision(5) << "\n\nTime Taken : " << time_taken
<< " seconds\n";
}
#endif
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#pragma GCC optimize("O3")
#define ll long long
#define vi vector<int>
#define vii vector<pair<int, int>>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repD(i, a, b) for (int i = a; i > b; i--)
#define pb push_back
#define pii pair<int, int>
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
#define MOD 1000000007
#define PI 3.14159265359
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace __gnu_pbds;
typedef tree<pii,null_type,less
<pii>,rb_tree_tag,tree_order_statistics_node_update>ind_set;
*/
///*X.find_by_order("index")
/// X.order_of_key("key")
#define deb(x) cerr << #x << " : " << x << "\n";
#ifndef local
#define deb(x) ;
#endif
///----------------------------------------------------------------------------------
int n, k;
void solve() {
cin >> n >> k;
cout << (k != 1 ? (n - k) : 0) << "\n";
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifdef local
freopen("input.txt", "r", stdin);
/// freopen("output.txt","w",stdout);
#endif
clock_t qwertyuiop = clock();
int t = 1;
/// cin>>t;
rep(a, 0, t) {
/// cout<<"Case #"<<a+1<<": ";
solve();
}
#ifdef local
{
qwertyuiop = clock() - qwertyuiop;
double time_taken = ((double)qwertyuiop) / CLOCKS_PER_SEC;
cerr << fixed << setprecision(5) << "\n\nTime Taken : " << time_taken
<< " seconds\n";
}
#endif
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"io.output.change",
"identifier.replace.remove",
"literal.replace.add"
] | 819,570 | 819,569 | u953587543 | cpp |
p03005 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define repr(i, n) for (int i = (n)-1; 0 <= i; --i)
#define each(e, v) for (auto &&e : (v))
#define all(v) begin(v), end(v)
#define dump(x) cerr << #x << ": " << (x) << endl
using namespace std;
using vint = vector<int>;
using ll = long long;
using vll = vector<ll>;
template <class T> void chmin(T &a, const T &b) { a = min(a, b); }
template <class T> void chmax(T &a, const T &b) { a = max(a, b); }
void yes() {
cout << "Yes" << endl;
exit(0);
}
void no() {
cout << "No" << endl;
exit(0);
}
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << k - n << endl;
return 0;
}
| #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define repr(i, n) for (int i = (n)-1; 0 <= i; --i)
#define each(e, v) for (auto &&e : (v))
#define all(v) begin(v), end(v)
#define dump(x) cerr << #x << ": " << (x) << endl
using namespace std;
using vint = vector<int>;
using ll = long long;
using vll = vector<ll>;
template <class T> void chmin(T &a, const T &b) { a = min(a, b); }
template <class T> void chmax(T &a, const T &b) { a = max(a, b); }
void yes() {
cout << "Yes" << endl;
exit(0);
}
void no() {
cout << "No" << endl;
exit(0);
}
int main() {
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0 << endl;
else
cout << n - k << endl;
return 0;
}
| [
"expression.operation.binary.remove"
] | 819,575 | 819,576 | u667543757 | cpp |
p03005 | #pragma GCC optimize("Ofast")
#pragma GCC target("avx")
#include <bits/stdc++.h>
using namespace std;
#define INIT \
std::cin.tie(0); \
std::ios::sync_with_stdio(false);
#define ALL(c) (c).begin(), (c).end()
#define CALL(c) (c).cbegin(), (c).cend()
#define RALL(c) (c).rbegin(), (c).rend()
#define CRALL(c) (c).crbegin(), (c).crend()
#define REP(i, n) for (int i = 0; i < static_cast<int>(n); i++)
#define FOR(i, s, n) for (int i = s; i < static_cast<int>(n); i++)
#define ASC(t) [](t &x, t &y) { return x < y; }
#define DESC(t) [](t &x, t &y) { return x > y; }
#define PSORT(s, p, e) partial_sort((s), next((s), (p)), (e))
#define VIEW(v, t) \
for_each((v).begin(), (v).end(), [](t &a) { cout << a << " "; }); \
cout << endl;
#define IN(a, x, b) (a <= x && x <= b)
template <class T> inline T CHMAX(T &x, const T y) {
return x = (x < y) ? y : x;
}
template <class T> inline T CHMIN(T &x, const T y) {
return x = (x > y) ? y : x;
}
#define OUT(dist) std::cout << (dist);
#define WS std::cout << " ";
#define NL std::cout << "\n"
using PII = pair<int, int>;
using PLL = pair<long long, long long>;
using LL = long long;
using ULL = unsigned long long;
template <class T> using V = vector<T>;
template <class T> using V2 = vector<vector<T>>;
template <class T, int W = 255> using A = array<T, W>;
template <class T, int W = 255, int H = 255> using A2 = array<array<T, W>, W>;
int main() {
INIT;
int n, k;
cin >> n >> k;
if (n == 1)
cout << 0;
else
cout << n - k;
}
| #pragma GCC optimize("Ofast")
#pragma GCC target("avx")
#include <bits/stdc++.h>
using namespace std;
#define INIT \
std::cin.tie(0); \
std::ios::sync_with_stdio(false);
#define ALL(c) (c).begin(), (c).end()
#define CALL(c) (c).cbegin(), (c).cend()
#define RALL(c) (c).rbegin(), (c).rend()
#define CRALL(c) (c).crbegin(), (c).crend()
#define REP(i, n) for (int i = 0; i < static_cast<int>(n); i++)
#define FOR(i, s, n) for (int i = s; i < static_cast<int>(n); i++)
#define ASC(t) [](t &x, t &y) { return x < y; }
#define DESC(t) [](t &x, t &y) { return x > y; }
#define PSORT(s, p, e) partial_sort((s), next((s), (p)), (e))
#define VIEW(v, t) \
for_each((v).begin(), (v).end(), [](t &a) { cout << a << " "; }); \
cout << endl;
#define IN(a, x, b) (a <= x && x <= b)
template <class T> inline T CHMAX(T &x, const T y) {
return x = (x < y) ? y : x;
}
template <class T> inline T CHMIN(T &x, const T y) {
return x = (x > y) ? y : x;
}
#define OUT(dist) std::cout << (dist);
#define WS std::cout << " ";
#define NL std::cout << "\n"
using PII = pair<int, int>;
using PLL = pair<long long, long long>;
using LL = long long;
using ULL = unsigned long long;
template <class T> using V = vector<T>;
template <class T> using V2 = vector<vector<T>>;
template <class T, int W = 255> using A = array<T, W>;
template <class T, int W = 255, int H = 255> using A2 = array<array<T, W>, W>;
int main() {
INIT;
int n, k;
cin >> n >> k;
if (k == 1)
cout << 0;
else
cout << n - k;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,579 | 819,580 | u685774550 | cpp |
p03005 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, p;
cin >> n >> p;
if (n > 1)
cout << n - p;
else
cout << 0 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, p;
cin >> n >> p;
if (p > 1)
cout << n - p;
else
cout << 0 << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 819,592 | 819,593 | u911150465 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.