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 |
|---|---|---|---|---|---|---|---|
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(a / b, c) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 912,828 | 912,829 | u578969098 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(a / b, c) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change",
"expression.operation.binary.remove"
] | 912,830 | 912,829 | u578969098 | cpp |
p03105 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a > c)
cout << b / a << endl;
else
cout << c << endl;
} | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c)
cout << b / a << endl;
else
cout << c << endl;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 912,833 | 912,834 | u206390098 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a >= b * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b >= a * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 912,839 | 912,840 | u492660436 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a > b * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b >= a * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 912,841 | 912,840 | u492660436 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a * c < b)
cout << b / a << endl;
else
cout << c << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a * c > b)
cout << b / a << endl;
else
cout << c << endl;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 912,853 | 912,854 | u136086822 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, a / b);
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a);
}
| [
"expression.operation.binary.remove"
] | 912,859 | 912,860 | u371051907 | cpp |
p03105 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b >= a * c) {
cout << a * c << endl;
} else {
cout << b / a << endl;
}
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b >= a * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
} | [
"expression.operation.binary.remove"
] | 912,865 | 912,866 | u303621502 | cpp |
p03105 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, a / c) << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a) << endl;
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 912,873 | 912,874 | u123745130 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, r, p;
cin >> a >> b >> c;
r = b / a;
if (r > c) {
cout << 4 << endl;
} else {
cout << r << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, r, p;
cin >> a >> b >> c;
r = b / a;
if (r > c) {
cout << c << endl;
} else {
cout << r << endl;
}
return 0;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 912,880 | 912,881 | u466947057 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, r, p;
cin >> a >> b >> c;
r = b / a;
if (r >= c) {
cout << 4 << endl;
} else {
cout << r << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, r, p;
cin >> a >> b >> c;
r = b / a;
if (r > c) {
cout << c << endl;
} else {
cout << r << endl;
}
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 912,882 | 912,881 | u466947057 | cpp |
p03105 |
#include <bits/stdc++.h>
using namespace std;
void Main() {
int a, b, c;
cin >> a >> b >> c;
int ret = c;
if (b / a > c) {
ret = b / a;
}
cout << ret;
}
int main(void) {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
std::cout << std::fixed << std::setprecision(10);
#ifdef DEBUG_BUILD
while (true) {
Main();
cout << std::endl;
}
#endif
Main();
cout << endl;
return 0;
} |
#include <bits/stdc++.h>
using namespace std;
void Main() {
int a, b, c;
cin >> a >> b >> c;
int ret = c;
if (b / a < c) {
ret = b / a;
}
cout << ret;
}
int main(void) {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
std::cout << std::fixed << std::setprecision(10);
#ifdef DEBUG_BUILD
while (true) {
Main();
cout << std::endl;
}
#endif
Main();
cout << endl;
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 912,890 | 912,891 | u588369531 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
cout << max(c, b / a);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a);
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 912,894 | 912,895 | u548977290 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min((A / B), C) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min((B / A), C) << endl;
} | [
"expression.operation.binary.remove"
] | 912,896 | 912,897 | u548977290 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(c, b / a) << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a) << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 912,902 | 912,903 | u559578080 | cpp |
p03105 | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using vll = vector<long long>;
using sll = set<long long>;
template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
template <typename T> map<T, T> getPrimeFactor(T n) {
map<T, T> res;
for (T i = 2; i * i <= n; ++i) {
while (n % i == 0) {
res[i]++;
n /= i;
}
}
if (n != 1)
res[n] = 1;
return res;
}
template <typename T> bool IsPrimeNumber(T num) {
if (num <= 2)
return true;
else if (num % 2 == 0)
return false;
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2) {
if (num % i == 0) {
return false;
}
}
return true;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
#define in(x) cin >> x
#define out(x) cout << x
#define outn(x) cout << x << '\n'
#define outs(x) cout << x << ' '
#define rep(i, s, e) for (ll i = s; i < e; i++)
#define repeq(i, s, e) for (ll i = s; i <= e; i++)
int main() {
ll A, B, C, ans;
in(A);
in(B);
in(C);
ans = min(A / B, C);
outn(ans);
return 0;
}
| #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using vll = vector<long long>;
using sll = set<long long>;
template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
template <typename T> map<T, T> getPrimeFactor(T n) {
map<T, T> res;
for (T i = 2; i * i <= n; ++i) {
while (n % i == 0) {
res[i]++;
n /= i;
}
}
if (n != 1)
res[n] = 1;
return res;
}
template <typename T> bool IsPrimeNumber(T num) {
if (num <= 2)
return true;
else if (num % 2 == 0)
return false;
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2) {
if (num % i == 0) {
return false;
}
}
return true;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
#define in(x) cin >> x
#define out(x) cout << x
#define outn(x) cout << x << '\n'
#define outs(x) cout << x << ' '
#define rep(i, s, e) for (ll i = s; i < e; i++)
#define repeq(i, s, e) for (ll i = s; i <= e; i++)
int main() {
ll A, B, C, ans;
in(A);
in(B);
in(C);
ans = min(B / A, C);
outn(ans);
return 0;
}
| [
"expression.operation.binary.remove",
"assignment.change"
] | 912,910 | 912,911 | u757628628 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<vector<ll>> VV;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define PER(i, a, b) for (ll i = (a); i >= (b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
const ll INF = 1e16 + 18;
const ll MAX = 100005;
const ll MOD = 1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;
#define ALL(v) v.begin(), v.end()
#define pb(x) push_back(x)
#define mp(a, b) make_pair(a, b)
#define Each(a, b) for (auto &a : b)
#define REPM(i, mp) for (auto i = mp.begin(); i != mp.end(); ++i)
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbgmap(mp) \
cerr << #mp << ":" << endl; \
for (auto i = mp.begin(); i != mp.end(); ++i) { \
cerr << i->first << ":" << i->second << endl; \
}
#define dbgarr(n, m, arr) \
rep(i, n) { \
rep(j, m) { cerr << arr[i][j] << " "; } \
cerr << endl; \
}
#define dbgdp(n, arr) \
rep(i, n) { cerr << arr[i] << " "; } \
cerr << endl;
#define sum(v) accumulate(ALL(v), 0)
#define fi first
#define se second
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &p) {
return s << "(" << p.first << ", " << p.second << ")";
}
// vector
template <typename T> ostream &operator<<(ostream &s, const vector<T> &v) {
int len = v.size();
for (int i = 0; i < len; ++i) {
s << v[i];
if (i < len - 1)
s << " ";
}
return s;
}
// 2 dimentional vector
template <typename T>
ostream &operator<<(ostream &s, const vector<vector<T>> &vv) {
int len = vv.size();
for (int i = 0; i < len; ++i) {
s << vv[i] << endl;
}
return s;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << std::setprecision(10);
ll a, b, c;
cin >> a >> b >> c;
ll ans = max(c, b / a);
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<vector<ll>> VV;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define PER(i, a, b) for (ll i = (a); i >= (b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
const ll INF = 1e16 + 18;
const ll MAX = 100005;
const ll MOD = 1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;
#define ALL(v) v.begin(), v.end()
#define pb(x) push_back(x)
#define mp(a, b) make_pair(a, b)
#define Each(a, b) for (auto &a : b)
#define REPM(i, mp) for (auto i = mp.begin(); i != mp.end(); ++i)
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbgmap(mp) \
cerr << #mp << ":" << endl; \
for (auto i = mp.begin(); i != mp.end(); ++i) { \
cerr << i->first << ":" << i->second << endl; \
}
#define dbgarr(n, m, arr) \
rep(i, n) { \
rep(j, m) { cerr << arr[i][j] << " "; } \
cerr << endl; \
}
#define dbgdp(n, arr) \
rep(i, n) { cerr << arr[i] << " "; } \
cerr << endl;
#define sum(v) accumulate(ALL(v), 0)
#define fi first
#define se second
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &p) {
return s << "(" << p.first << ", " << p.second << ")";
}
// vector
template <typename T> ostream &operator<<(ostream &s, const vector<T> &v) {
int len = v.size();
for (int i = 0; i < len; ++i) {
s << v[i];
if (i < len - 1)
s << " ";
}
return s;
}
// 2 dimentional vector
template <typename T>
ostream &operator<<(ostream &s, const vector<vector<T>> &vv) {
int len = vv.size();
for (int i = 0; i < len; ++i) {
s << vv[i] << endl;
}
return s;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << std::setprecision(10);
ll a, b, c;
cin >> a >> b >> c;
ll ans = min(c, b / a);
cout << ans << endl;
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change"
] | 912,914 | 912,915 | u592686932 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int c = A * C;
if (c >= B) {
cout << C << endl;
} else {
cout << B / A << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int c = A * C;
if (c <= B) {
cout << C << endl;
} else {
cout << B / A << endl;
}
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 912,918 | 912,919 | u537507471 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int c = A * C;
if (c >= C) {
cout << C << endl;
} else {
cout << B / A << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int c = A * C;
if (c <= B) {
cout << C << endl;
} else {
cout << B / A << endl;
}
} | [] | 912,920 | 912,919 | u537507471 | cpp |
p03105 | // https://atcoder.jp/contests/abc120/tasks/abc120_a
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(a / b, c) << endl;
return 0;
} | // https://atcoder.jp/contests/abc120/tasks/abc120_a
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 912,923 | 912,924 | u021483982 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c / a);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c);
} | [
"expression.operation.binary.remove"
] | 912,930 | 912,931 | u206772137 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(C, A / B) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(C, B / A) << endl;
}
| [
"expression.operation.binary.remove"
] | 912,939 | 912,940 | u285358283 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int d = b / c;
if (d > c) {
cout << c << endl;
} else {
cout << d << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int d = b / a;
if (d < c) {
cout << d << endl;
} else {
cout << c << endl;
}
return 0;
}
| [
"identifier.change",
"expression.operation.binary.change",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"io.output.change"
] | 912,952 | 912,953 | u026375009 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(b / a, c);
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c);
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 912,954 | 912,955 | u260907804 | cpp |
p03105 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all_map(itr, mp) for (auto itr = mp.begin(); itr != mp.end(); itr++)
#define ALL(a) (a).begin(), (a).end()
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(a / b, c) << endl;
} | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all_map(itr, mp) for (auto itr = mp.begin(); itr != mp.end(); itr++)
#define ALL(a) (a).begin(), (a).end()
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
} | [
"expression.operation.binary.remove"
] | 912,960 | 912,961 | u969116807 | cpp |
p03105 | #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define rrep(i, n) for (ll i##_len = (n), i = i##_len - 1; i >= 0; --i)
#define repi(i, a, b) for (ll i = ll(a); i < ll(b); ++i)
#define printd(val) std::cout << #val " = " << val << "\n";
#define printv(val) \
std::for_each(val.begin(), val.end(), [](auto x) { cout << x << "\n"; });
#define ALL(f, x, ...) \
([&](decltype((x)) xxxx) { \
return (f)(begin(xxxx), end(xxxx), ##__VA_ARGS__); \
})(x)
#define lim 1000000007ll
#include <bits/stdc++.h>
using ll = long long;
using pii = std::pair<ll, ll>;
using namespace std;
template <class T> T chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> T chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> T gcd(T a, T b) {
if (a < b) {
a ^= b;
b ^= a;
a ^= b;
}
return b ? gcd(b, a % b) : a;
}
template <class T> T lcm(T a, T b) { return a * b / gcd(a, b); }
inline bool operator<(const pii &lhs, const pii &rhs) {
return (lhs.second < rhs.second);
}
vector<char> string_to_vector_char(const string &input) {
vector<char> out(input.length());
rep(i, input.length()) { out[i] = input[i]; }
return out;
}
vector<int> string_to_vector_int(const string &input) {
vector<int> out(input.length());
rep(i, input.length()) { out[i] = (int)(input[i] - '0'); }
return out;
}
map<int, int> count_same_elements(const vector<int> &v) {
map<int, int> cmap;
for_each(v.begin(), v.end(), [&cmap](int x) { cmap[x]++; });
return cmap;
}
map<char, int> count_same_elements(const vector<char> &v) {
map<char, int> cmap;
for_each(v.begin(), v.end(), [&cmap](int x) { cmap[x]++; });
return cmap;
}
template <class A, class B>
vector<B> mapf(const vector<A> &v, const function<B(A)> &func) {
vector<B> v_(v.size());
rep(i, v.size()) { v_[i] = func(v[i]); }
return v_;
}
template <class A, class B>
vector<B> adjacent_map(const vector<A> &v, const function<B(A, A)> &func) {
vector<B> v_(v.size() - 1);
rep(i, v.size() - 1) { v_[i] = func(v[i + 1], v[i]); }
return v_;
}
template <class A, class B>
vector<B> tryple_map(const vector<A> &v, const function<B(A, A, A)> &func) {
vector<B> v_(v.size() - 2);
rep(i, v.size() - 2) { v_[i] = func(v[i + 2], v[i + 1], v[i]); }
return v_;
}
template <class A, class B>
vector<B> mapf(const vector<A> &v, const B &(*func)(A)) {
vector<B> v_(v.size());
rep(i, v.size()) { v_[i] = func(v[i]); }
return v_;
}
template <class A, class B>
vector<B> adjacent_map(const vector<A> &v, B (*func)(A, A)) {
vector<B> v_(v.size() - 1);
rep(i, v.size() - 1) { v_[i] = func(v[i + 1], v[i]); }
return v_;
}
template <class A, class B>
vector<B> tryple_map(const vector<A> &v, B (*func)(A, A, A)) {
vector<B> v_(v.size() - 2);
rep(i, v.size() - 2) { v_[i] = func(v[i + 2], v[i + 1], v[i]); }
return v_;
}
template <class T, class U>
void msg_with_compare(T A, T B, U A_greater_B, U A_eq_B, U A_less_B) {
if (A == B) {
cout << A_eq_B << "\n";
} else if (A > B) {
cout << A_greater_B << "\n";
} else {
cout << A_less_B << "\n";
}
}
template <class B, class T>
void msg_with_boolean(B A, T true_msg, T false_msg) {
cout << (A ? true_msg : false_msg);
}
template <class B, class T>
void msg_with_boolean(B A1, B A2, T both_true_msg, T true_false_msg,
T false_true_msg, T both_false_msg) {
if (A1) {
if (A2) {
cout << both_true_msg;
} else {
cout << true_false_msg;
}
} else {
if (A2) {
cout << false_true_msg;
} else {
cout << both_false_msg;
}
}
}
int twosame(int a, int b) { return a == b; }
int tryple_same(int a, int b, int c) { return a == b and b == c; }
int integer_sumnation(int a, int b) { return a + b; }
ll n, k, a, b, c, d, x;
vector<ll> v;
string s, s2;
void input() { cin >> a >> b >> c; }
void src() { cout << max(b / a, c); }
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
// ifstream in( argv[1] ); cin.rdbuf(in.rdbuf());
input();
src();
return 0;
} | #define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define rrep(i, n) for (ll i##_len = (n), i = i##_len - 1; i >= 0; --i)
#define repi(i, a, b) for (ll i = ll(a); i < ll(b); ++i)
#define printd(val) std::cout << #val " = " << val << "\n";
#define printv(val) \
std::for_each(val.begin(), val.end(), [](auto x) { cout << x << "\n"; });
#define ALL(f, x, ...) \
([&](decltype((x)) xxxx) { \
return (f)(begin(xxxx), end(xxxx), ##__VA_ARGS__); \
})(x)
#define lim 1000000007ll
#include <bits/stdc++.h>
using ll = long long;
using pii = std::pair<ll, ll>;
using namespace std;
template <class T> T chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> T chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> T gcd(T a, T b) {
if (a < b) {
a ^= b;
b ^= a;
a ^= b;
}
return b ? gcd(b, a % b) : a;
}
template <class T> T lcm(T a, T b) { return a * b / gcd(a, b); }
inline bool operator<(const pii &lhs, const pii &rhs) {
return (lhs.second < rhs.second);
}
vector<char> string_to_vector_char(const string &input) {
vector<char> out(input.length());
rep(i, input.length()) { out[i] = input[i]; }
return out;
}
vector<int> string_to_vector_int(const string &input) {
vector<int> out(input.length());
rep(i, input.length()) { out[i] = (int)(input[i] - '0'); }
return out;
}
map<int, int> count_same_elements(const vector<int> &v) {
map<int, int> cmap;
for_each(v.begin(), v.end(), [&cmap](int x) { cmap[x]++; });
return cmap;
}
map<char, int> count_same_elements(const vector<char> &v) {
map<char, int> cmap;
for_each(v.begin(), v.end(), [&cmap](int x) { cmap[x]++; });
return cmap;
}
template <class A, class B>
vector<B> mapf(const vector<A> &v, const function<B(A)> &func) {
vector<B> v_(v.size());
rep(i, v.size()) { v_[i] = func(v[i]); }
return v_;
}
template <class A, class B>
vector<B> adjacent_map(const vector<A> &v, const function<B(A, A)> &func) {
vector<B> v_(v.size() - 1);
rep(i, v.size() - 1) { v_[i] = func(v[i + 1], v[i]); }
return v_;
}
template <class A, class B>
vector<B> tryple_map(const vector<A> &v, const function<B(A, A, A)> &func) {
vector<B> v_(v.size() - 2);
rep(i, v.size() - 2) { v_[i] = func(v[i + 2], v[i + 1], v[i]); }
return v_;
}
template <class A, class B>
vector<B> mapf(const vector<A> &v, const B &(*func)(A)) {
vector<B> v_(v.size());
rep(i, v.size()) { v_[i] = func(v[i]); }
return v_;
}
template <class A, class B>
vector<B> adjacent_map(const vector<A> &v, B (*func)(A, A)) {
vector<B> v_(v.size() - 1);
rep(i, v.size() - 1) { v_[i] = func(v[i + 1], v[i]); }
return v_;
}
template <class A, class B>
vector<B> tryple_map(const vector<A> &v, B (*func)(A, A, A)) {
vector<B> v_(v.size() - 2);
rep(i, v.size() - 2) { v_[i] = func(v[i + 2], v[i + 1], v[i]); }
return v_;
}
template <class T, class U>
void msg_with_compare(T A, T B, U A_greater_B, U A_eq_B, U A_less_B) {
if (A == B) {
cout << A_eq_B << "\n";
} else if (A > B) {
cout << A_greater_B << "\n";
} else {
cout << A_less_B << "\n";
}
}
template <class B, class T>
void msg_with_boolean(B A, T true_msg, T false_msg) {
cout << (A ? true_msg : false_msg);
}
template <class B, class T>
void msg_with_boolean(B A1, B A2, T both_true_msg, T true_false_msg,
T false_true_msg, T both_false_msg) {
if (A1) {
if (A2) {
cout << both_true_msg;
} else {
cout << true_false_msg;
}
} else {
if (A2) {
cout << false_true_msg;
} else {
cout << both_false_msg;
}
}
}
int twosame(int a, int b) { return a == b; }
int tryple_same(int a, int b, int c) { return a == b and b == c; }
int integer_sumnation(int a, int b) { return a + b; }
ll n, k, a, b, c, d, x;
vector<ll> v;
string s, s2;
void input() { cin >> a >> b >> c; }
void src() { cout << min(b / a, c); }
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
// ifstream in( argv[1] ); cin.rdbuf(in.rdbuf());
input();
src();
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 912,968 | 912,969 | u954176652 | cpp |
p03105 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
cout << min(a / b, c) << endl;
return 0;
} | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 912,977 | 912,978 | u552122040 | cpp |
p03105 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
cout << max(a / b, c) << endl;
return 0;
} | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
int main() {
ll a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change",
"expression.operation.binary.remove"
] | 912,979 | 912,978 | u552122040 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A * C <= B) {
cout << C;
} else if (A * C >= B) {
cout << C / A;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A * C <= B) {
cout << C;
} else if (A * C >= B) {
cout << B / A;
}
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 912,992 | 912,993 | u318329027 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int res = b / a;
int ans = max({res, c});
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int res = b / a;
int ans = min({res, c});
cout << ans << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change"
] | 912,998 | 912,999 | u631558039 | cpp |
p03105 | #include <stdio.h>
int main(void) {
int a; //一回分の値段
int b; //所持金
int c; //必要な回数
int sum; //回答
scanf("%d %d %d", &a, &b, &c);
if (b / a <= c)
printf("%d", c);
else
printf("%d", b / a);
return 0;
} | #include <stdio.h>
int main(void) {
int a; //一回分の値段
int b; //所持金
int c; //必要な回数
int sum; //回答
scanf("%d %d %d", &a, &b, &c);
if (b / a >= c)
printf("%d", c);
else
printf("%d", b / a);
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 913,002 | 913,003 | u120775901 | cpp |
p03105 | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define ALL(a) (a).begin(), (a).end()
#define FOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define LLONG_MAXs 9223372036854775800 / 2
#define ALL(a) (a).begin(), (a).end()
#include <cmath>
#include <iostream>
using namespace std;
bool isPrimeNum(ll x) { // 素数である場合 true を返す
if (x <= 1) { // 1以下である場合は素数でないことがすぐにわかる
return false;
}
// sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
int n = (int)sqrt((double)x);
for (int i = 2; i <= n; i++) {
if (x % i == 0) { // 割り切る整数がある場合、即判定終了
return false;
}
}
return true; // 割り切る整数がない場合、素数である
}
ll myPow(ll x, ll n, ll m) {
if (n == 0)
return 1;
if (n % 2 == 0)
return myPow(x * x % m, n / 2, m);
else
return x * myPow(x, n - 1, m) % m;
}
constexpr ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
constexpr ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll abs(ll a, ll b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr double dabs(double a, double b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr ll min(ll a, ll b) {
if (a >= b)
return b;
if (a < b)
return a;
}
constexpr ll max(ll a, ll b) {
if (a >= b)
return a;
if (a < b)
return b;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int dx8[8] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy8[8] = {0, 1, 0, -1, 1, 1, -1, -1};
class UnionFind {
public:
//親の番号を格納する。親だった場合は-(その集合のサイズ)
vector<int> Parent;
//作るときはParentの値を全て-1にする
//こうすると全てバラバラになる
UnionFind(int N) { Parent = vector<int>(N, -1); }
// Aがどのグループに属しているか調べる
int root(int A) {
if (Parent[A] < 0)
return A;
return Parent[A] = root(Parent[A]);
}
//自分のいるグループの頂点数を調べる
int size(int A) {
return -Parent[root(A)]; //親をとってきたい]
}
bool issame(int x, int y) { return root(x) == root(y); }
// AとBをくっ付ける
bool connect(int A, int B) {
// AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
A = root(A);
B = root(B);
if (A == B) {
//すでにくっついてるからくっ付けない
return false;
}
//大きい方(A)に小さいほう(B)をくっ付けたい
//大小が逆だったらひっくり返しちゃう。
if (size(A) < size(B))
swap(A, B);
// Aのサイズを更新する
Parent[A] += Parent[B];
// Bの親をAに変更する
Parent[B] = A;
return true;
}
};
long long fac[510000], finv[510000], inv[510000];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
string replaceAll(string &replacedStr, string from, string to) {
unsigned int pos = replacedStr.find(from);
int toLen = to.length();
if (from.empty()) {
return replacedStr;
}
while ((pos = replacedStr.find(from, pos)) != std::string::npos) {
replacedStr.replace(pos, from.length(), to);
pos += toLen;
}
return replacedStr;
}
void yn(bool flag) {
if (flag) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return;
}
void YN(bool flag) {
if (flag) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return;
}
std::vector<ll> enum_div(ll n) // nの約数を列挙
{
std::vector<ll> ret;
for (ll i = 1; i * i <= n; ++i) {
if (n % i == 0) {
ret.push_back(i);
if (i != 1 && i * i != n) {
ret.push_back(n / i);
}
}
}
ret.push_back(n);
return ret;
}
void Ssort(int no, char *month[]) {
int i, j;
char *temp;
for (i = 0; i < no; i++) {
for (j = i + 1; j < no; j++) {
if (strcmp((month[i]), (month[j])) > 0) {
temp = *(month + i);
*(month + i) = *(month + j);
*(month + j) = temp;
}
}
}
}
// グラフセット
struct Edge {
ll to; // 辺の行き先
ll weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Graph = vector<vector<int>>;
int main() {
ll A, B, C, D;
ll X[3];
string S;
cin >> A >> B >> C;
// cin >> S;
cout << max(C, B / A) << endl;
} | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define ALL(a) (a).begin(), (a).end()
#define FOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define LLONG_MAXs 9223372036854775800 / 2
#define ALL(a) (a).begin(), (a).end()
#include <cmath>
#include <iostream>
using namespace std;
bool isPrimeNum(ll x) { // 素数である場合 true を返す
if (x <= 1) { // 1以下である場合は素数でないことがすぐにわかる
return false;
}
// sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
int n = (int)sqrt((double)x);
for (int i = 2; i <= n; i++) {
if (x % i == 0) { // 割り切る整数がある場合、即判定終了
return false;
}
}
return true; // 割り切る整数がない場合、素数である
}
ll myPow(ll x, ll n, ll m) {
if (n == 0)
return 1;
if (n % 2 == 0)
return myPow(x * x % m, n / 2, m);
else
return x * myPow(x, n - 1, m) % m;
}
constexpr ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
constexpr ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll abs(ll a, ll b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr double dabs(double a, double b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr ll min(ll a, ll b) {
if (a >= b)
return b;
if (a < b)
return a;
}
constexpr ll max(ll a, ll b) {
if (a >= b)
return a;
if (a < b)
return b;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int dx8[8] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy8[8] = {0, 1, 0, -1, 1, 1, -1, -1};
class UnionFind {
public:
//親の番号を格納する。親だった場合は-(その集合のサイズ)
vector<int> Parent;
//作るときはParentの値を全て-1にする
//こうすると全てバラバラになる
UnionFind(int N) { Parent = vector<int>(N, -1); }
// Aがどのグループに属しているか調べる
int root(int A) {
if (Parent[A] < 0)
return A;
return Parent[A] = root(Parent[A]);
}
//自分のいるグループの頂点数を調べる
int size(int A) {
return -Parent[root(A)]; //親をとってきたい]
}
bool issame(int x, int y) { return root(x) == root(y); }
// AとBをくっ付ける
bool connect(int A, int B) {
// AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
A = root(A);
B = root(B);
if (A == B) {
//すでにくっついてるからくっ付けない
return false;
}
//大きい方(A)に小さいほう(B)をくっ付けたい
//大小が逆だったらひっくり返しちゃう。
if (size(A) < size(B))
swap(A, B);
// Aのサイズを更新する
Parent[A] += Parent[B];
// Bの親をAに変更する
Parent[B] = A;
return true;
}
};
long long fac[510000], finv[510000], inv[510000];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
string replaceAll(string &replacedStr, string from, string to) {
unsigned int pos = replacedStr.find(from);
int toLen = to.length();
if (from.empty()) {
return replacedStr;
}
while ((pos = replacedStr.find(from, pos)) != std::string::npos) {
replacedStr.replace(pos, from.length(), to);
pos += toLen;
}
return replacedStr;
}
void yn(bool flag) {
if (flag) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return;
}
void YN(bool flag) {
if (flag) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return;
}
std::vector<ll> enum_div(ll n) // nの約数を列挙
{
std::vector<ll> ret;
for (ll i = 1; i * i <= n; ++i) {
if (n % i == 0) {
ret.push_back(i);
if (i != 1 && i * i != n) {
ret.push_back(n / i);
}
}
}
ret.push_back(n);
return ret;
}
void Ssort(int no, char *month[]) {
int i, j;
char *temp;
for (i = 0; i < no; i++) {
for (j = i + 1; j < no; j++) {
if (strcmp((month[i]), (month[j])) > 0) {
temp = *(month + i);
*(month + i) = *(month + j);
*(month + j) = temp;
}
}
}
}
// グラフセット
struct Edge {
ll to; // 辺の行き先
ll weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Graph = vector<vector<int>>;
int main() {
ll A, B, C, D;
ll X[3];
string S;
cin >> A >> B >> C;
// cin >> S;
cout << min(C, B / A) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,004 | 913,005 | u043443359 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int answer = (b / a, c);
cout << answer << endl;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int answer = min(b / a, c);
cout << answer << endl;
} | [
"call.add"
] | 913,016 | 913,017 | u353748264 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int answer = (b / a, c);
cout << answer << endl;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int answer = min(b / a, c);
cout << answer << endl;
}
| [
"call.add"
] | 913,016 | 913,021 | u353748264 | cpp |
p03105 | #include <iostream>
#include <string>
using namespace std;
#define rep(i, n) for (int(i) = 1; (i) <= (n); (i)++)
int main() {
int a, b, c;
cin >> a >> b >> c;
int x = b / a;
if (x < c)
cout << c << endl;
else
cout << x << endl;
}
| #include <iostream>
#include <string>
using namespace std;
#define rep(i, n) for (int(i) = 1; (i) <= (n); (i)++)
int main() {
int a, b, c;
cin >> a >> b >> c;
int x = b / a;
if (x < c)
cout << x << endl;
else
cout << c << endl;
}
| [
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 913,027 | 913,028 | u902803949 | cpp |
p03105 | #include <bits/stdc++.h>
#define INF 2e9
using namespace std;
typedef long long llong;
typedef long double ldouble;
int main() {
cout << fixed << setprecision(10);
int A, B, C;
cin >> A >> B >> C;
cout << max(B / A, C) << endl;
} | #include <bits/stdc++.h>
#define INF 2e9
using namespace std;
typedef long long llong;
typedef long double ldouble;
int main() {
cout << fixed << setprecision(10);
int A, B, C;
cin >> A >> B >> C;
cout << min(B / A, C) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,029 | 913,030 | u108484707 | cpp |
p03105 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
//#include <boost/multiprecision/cpp_int.hpp>
#include <complex>
#include <cstdio>
using namespace std;
// std::ios::sync_with_stdio(false);
// std::cin.tie(0);
const long long MOD = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ll> pdl;
typedef pair<ld, ld> pdd;
typedef vector<ll> VLL;
typedef vector<VLL> VVLL;
// typedef boost::multiprecision::cpp_int bigint;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
ll A, B, C;
cin >> A >> B >> C;
cout << max(C, B / A) << "\n";
return 0;
} | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
//#include <boost/multiprecision/cpp_int.hpp>
#include <complex>
#include <cstdio>
using namespace std;
// std::ios::sync_with_stdio(false);
// std::cin.tie(0);
const long long MOD = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ll> pdl;
typedef pair<ld, ld> pdd;
typedef vector<ll> VLL;
typedef vector<VLL> VVLL;
// typedef boost::multiprecision::cpp_int bigint;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
ll A, B, C;
cin >> A >> B >> C;
cout << min(C, B / A) << "\n";
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,033 | 913,034 | u457790148 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll mod = 1000000007;
/* ちゃんと考えて実装して問題なくACできた時嬉しいよ!! */
int main(void) {
int a, b, c;
cin >> a >> b >> c;
int ans = min(c, b / a);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll mod = 1000000007;
/* ちゃんと考えて実装して問題なくACできた時嬉しいよ!! */
int main(void) {
int a, b, c;
cin >> a >> b >> c;
int ans = min(c, b / a);
cout << ans;
return 0;
} | [] | 913,041 | 913,042 | u900688325 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll mod = 1000000007;
/* ちゃんと考えて実装して問題なくACできた時嬉しいよ!! */
int main(void) {
int a, b, c;
cin >> a >> b >> c;
int ans = max(c, b / a);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll mod = 1000000007;
/* ちゃんと考えて実装して問題なくACできた時嬉しいよ!! */
int main(void) {
int a, b, c;
cin >> a >> b >> c;
int ans = min(c, b / a);
cout << ans;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change"
] | 913,043 | 913,042 | u900688325 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(b / a, c) << endl;
} | #include <bits/stdc++.h>
using namespace std;
main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,048 | 913,049 | u703537155 | cpp |
p03105 | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
using llint = long long;
using vint = vector<int>;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a * c < b)
cout << c << endl;
else
cout << a << endl;
} | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
using llint = long long;
using vint = vector<int>;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a * c < b)
cout << c << endl;
else
cout << b / a << endl;
} | [
"expression.operation.binary.add"
] | 913,050 | 913,051 | u932319885 | cpp |
p03105 | /* 実行時間1s制限の場合
10^6 1,000,000 : 余裕をもって間に合う
10^7 10,000,000 : おそらく間に合う
10^8 100,000,000 : 非常にシンプルな処理でないと厳しい
*/
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll; // long longはデータモデル(LLP64, LP64, ...)によらず64bit.
ll gcd(ll a, ll b) {
return b ? gcd(b, a % b) : a;
} // Greatest Common Divisor ユークリッドの互除法(aが長辺)
vector<pair<ll, int>> factorize(ll n) { // a,bの公約数 = GCD(a, b)の約数
vector<pair<ll, int>> res;
for (ll i = 2; i * i <= n; i++) { // √nまで探せばよい
if (n % i)
continue;
res.emplace_back(i, 0); // 割り切れたら
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1); // この時点で1でなかったら、残りは素数.
return res;
}
ll lcm(ll a, ll b) {
return a / gcd(a, b) * b;
} // Least Commont Multiple オーバーフローしないように先に割る
ll ceil(ll a, ll b) { return (a + b - 1) / b; }
const ll INF = LONG_MAX;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
int main(int argc, char *argv[]) {
#ifdef LOCAL
// 以降 cin の入力元が 'xxx.txt' になる
// std::ifstream in(argv[1]);
// std::cin.rdbuf(in.rdbuf());
std::ifstream in("a.txt");
std::cin.rdbuf(in.rdbuf());
#endif
int a, b, c;
cin >> a >> b >> c;
if (b / a < c) {
cout << b % a;
} else {
cout << c;
}
return 0;
}
/*
- 1e9 : 10^9
- container一般
- 合計
accumulate(a.begin(), a.end(), 0LL) 0LLはオーバーフロー用
- vector
vector<int> A(N, 0); // 0で初期化(省略可)
- loop
for (int i = 0; i < A.size(); i++) {}
for (int elem : A) {}
- sort
std::sort(v.begin(), v.end()); // 昇順
std::sort(v.begin(), v.end(), std::greater<int>()); //降順
- vector<vector<int>> cnt(h, vector<int>(w))
- sort(struct)
struct st_t {
string name;
int p;
bool operator<(const st_t& another) const {
if (name == another.name)
{
return p > another.p;
}
return name < another.name;
}
};
vector<st_t> st(n);
sort(st.begin(), st.end());
- pair
- pairのソートの定義 : firstが優先的に比較。同じだったらsecond。
- pair<pair<string,int>,int> p[110];
std::sort(p,p+a);
こうすると、first.first -> first.second -> secondの順にソートされる
- sort
- sort(a.begin(), cb.end(), greater<pair<int, int>>());
- map
- for (auto x : map) {} // x.first:key x.second:value.
- priority_queue<int> q;
- q.top()に最大値が入っている
- string
- loop
for (char& c : s) {}
*/
| /* 実行時間1s制限の場合
10^6 1,000,000 : 余裕をもって間に合う
10^7 10,000,000 : おそらく間に合う
10^8 100,000,000 : 非常にシンプルな処理でないと厳しい
*/
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll; // long longはデータモデル(LLP64, LP64, ...)によらず64bit.
ll gcd(ll a, ll b) {
return b ? gcd(b, a % b) : a;
} // Greatest Common Divisor ユークリッドの互除法(aが長辺)
vector<pair<ll, int>> factorize(ll n) { // a,bの公約数 = GCD(a, b)の約数
vector<pair<ll, int>> res;
for (ll i = 2; i * i <= n; i++) { // √nまで探せばよい
if (n % i)
continue;
res.emplace_back(i, 0); // 割り切れたら
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1); // この時点で1でなかったら、残りは素数.
return res;
}
ll lcm(ll a, ll b) {
return a / gcd(a, b) * b;
} // Least Commont Multiple オーバーフローしないように先に割る
ll ceil(ll a, ll b) { return (a + b - 1) / b; }
const ll INF = LONG_MAX;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
int main(int argc, char *argv[]) {
#ifdef LOCAL
// 以降 cin の入力元が 'xxx.txt' になる
// std::ifstream in(argv[1]);
// std::cin.rdbuf(in.rdbuf());
std::ifstream in("a.txt");
std::cin.rdbuf(in.rdbuf());
#endif
int a, b, c;
cin >> a >> b >> c;
if (b / a < c) {
cout << b / a;
} else {
cout << c;
}
return 0;
}
/*
- 1e9 : 10^9
- container一般
- 合計
accumulate(a.begin(), a.end(), 0LL) 0LLはオーバーフロー用
- vector
vector<int> A(N, 0); // 0で初期化(省略可)
- loop
for (int i = 0; i < A.size(); i++) {}
for (int elem : A) {}
- sort
std::sort(v.begin(), v.end()); // 昇順
std::sort(v.begin(), v.end(), std::greater<int>()); //降順
- vector<vector<int>> cnt(h, vector<int>(w))
- sort(struct)
struct st_t {
string name;
int p;
bool operator<(const st_t& another) const {
if (name == another.name)
{
return p > another.p;
}
return name < another.name;
}
};
vector<st_t> st(n);
sort(st.begin(), st.end());
- pair
- pairのソートの定義 : firstが優先的に比較。同じだったらsecond。
- pair<pair<string,int>,int> p[110];
std::sort(p,p+a);
こうすると、first.first -> first.second -> secondの順にソートされる
- sort
- sort(a.begin(), cb.end(), greater<pair<int, int>>());
- map
- for (auto x : map) {} // x.first:key x.second:value.
- priority_queue<int> q;
- q.top()に最大値が入っている
- string
- loop
for (char& c : s) {}
*/
| [
"expression.operator.arithmetic.change",
"io.output.change"
] | 913,052 | 913,053 | u234248338 | cpp |
p03105 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>
typedef long long ll;
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
//素因数分解
vector<pair<ll, int>> factorize(ll n) {
vector<pair<ll, int>> res;
for (ll i = 2; i * i <= n; i++) {
if (n % i)
continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1);
return res;
}
int main() {
int A, B, C;
cin >> A >> B >> C;
if ((C * A) <= B)
cout << C << endl;
else
cout << B / C << endl;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>
typedef long long ll;
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
//素因数分解
vector<pair<ll, int>> factorize(ll n) {
vector<pair<ll, int>> res;
for (ll i = 2; i * i <= n; i++) {
if (n % i)
continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1);
return res;
}
int main() {
int A, B, C;
cin >> A >> B >> C;
if ((C * A) <= B)
cout << C << endl;
else
cout << B / A << endl;
}
| [
"identifier.change",
"io.output.change"
] | 913,056 | 913,057 | u355371431 | cpp |
p03105 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>
typedef long long ll;
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
//素因数分解
vector<pair<ll, int>> factorize(ll n) {
vector<pair<ll, int>> res;
for (ll i = 2; i * i <= n; i++) {
if (n % i)
continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1);
return res;
}
int main() {
int A, B, C;
cin >> A >> B >> C;
if ((C * A) < B)
cout << C << endl;
else
cout << B / C << endl;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>
typedef long long ll;
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
//素因数分解
vector<pair<ll, int>> factorize(ll n) {
vector<pair<ll, int>> res;
for (ll i = 2; i * i <= n; i++) {
if (n % i)
continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1);
return res;
}
int main() {
int A, B, C;
cin >> A >> B >> C;
if ((C * A) <= B)
cout << C << endl;
else
cout << B / A << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"io.output.change"
] | 913,058 | 913,057 | u355371431 | cpp |
p03105 | #include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
ll mod = 1000000007;
using namespace std;
priority_queue<ll int> A; //きゅー
int main(void) {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if (B / A >= C) {
printf("%d", C);
return 0;
}
printf("%d", B / C);
return 0;
}
| #include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
ll mod = 1000000007;
using namespace std;
priority_queue<ll int> A; //きゅー
int main(void) {
int A, B, C;
scanf("%d%d%d", &A, &B, &C);
if (B / A >= C) {
printf("%d", C);
return 0;
}
printf("%d", B / A);
return 0;
}
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 913,063 | 913,064 | u956941456 | cpp |
p03105 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for (int i = x; i < n; i++)
#define INF 2e9
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c;
cin >> a >> b >> c;
cout << (b >= a * c ? a * c : b / a) << '\n';
return (0);
}
| #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for (int i = x; i < n; i++)
#define INF 2e9
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c;
cin >> a >> b >> c;
cout << (b >= a * c ? c : b / a) << '\n';
return (0);
}
| [
"expression.operation.binary.remove"
] | 913,069 | 913,070 | u132033278 | cpp |
p03105 | #include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int a;
int b;
int c;
int ans;
cin >> a >> b >> c;
ans = b / a;
if (ans >= c) {
ans = c;
}
cout << c << endl;
return 0;
}
| #include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int a;
int b;
int c;
int ans;
cin >> a >> b >> c;
ans = b / a;
if (ans >= c) {
ans = c;
}
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 913,071 | 913,072 | u190553247 | cpp |
p03105 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d;
cin >> a, b, c;
if (a * c <= b) {
d = c;
} else {
d = b / a;
}
cout << d << endl;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c;
if (a * c <= b) {
d = c;
} else {
d = b / a;
}
cout << d << endl;
return 0;
}
| [] | 913,083 | 913,084 | u738164318 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define sz(x) int(x.size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define INF 2e9
#define LINF 1e18
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
typedef long long ll;
typedef pair<int, int> P;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(c, b / a) << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define sz(x) int(x.size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define INF 2e9
#define LINF 1e18
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
typedef long long ll;
typedef pair<int, int> P;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,091 | 913,092 | u338791285 | cpp |
p03105 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b % a, c) << endl;
return 0;
} | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"expression.operator.arithmetic.change",
"io.output.change"
] | 913,099 | 913,100 | u283907492 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max((b / a), c) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min((b / a), c) << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,115 | 913,116 | u225581241 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
// start
int a, b, c;
cin >> a >> b >> c;
cout << (b >= a * c ? a * c : b / a) << endl;
// end
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
// start
int a, b, c;
cin >> a >> b >> c;
cout << (b >= a * c ? c : b / a) << endl;
// end
return 0;
}
| [
"expression.operation.binary.remove"
] | 913,126 | 913,127 | u376234649 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define v2i vector<vector<int>>
#define v2l vector<vector<ll>>
#define ppi pair<int, int>
#define vpi vector<ppi>
#define ppl pair<ll, ll>
#define all(x) x.begin(), x.end()
#define ii int, int
#define ff first
#define ss second
#define forn(i, a, b) for (int i = a; i < b; i++)
#define forr(i, a, b) for (int i = a; i >= b; i--)
#define forv(i, m) for (auto i : m)
#define imx INT_MAX
#define imn INT_MIN
#define inf LONG_MAX
#define minf LONG_MIN
#define endl "\n"
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define sze size()
#define rvs reverse
#define itr iterator
#define pre cout << fixed << setprecision(10);
#define umap unordered_map
#define uset unordered_set
/*
#define MODM(a,b,md) ((a%md)*(b%md))%md
#define MODA(a,b,md) ((a%md)+(b%md))%md
#define ull unsigned long long int
#define si short int
*/
/*
bool compare(int a,int b) {return a > b;}
bool compare1(ppi a,ppi b) {return a.ff > b.ff;}
bool compare2(ppi a,ppi b) {return a.ss < b.ss;}
ll Npower(ll a,ll b) {ll product = 1; while(b){if(b&1){product = product*a;}a =
a*a;b = b>>1;} return product;} ll power(ll a,ll b,ll md) {ll product = 1;
while(b){if(b&1){product = MODM(product,a,md);}a = MODM(a,a,md);b = b>>1;}
return product%md;} ll GCD(ll a,ll b) {return b==0 ? a:GCD(b,a%b);} ll LCM(ll
a,ll b) {return (a/GCD(a,b))*b; }
*/
int main() {
fast
int a,
b, c;
cin >> a >> b >> c;
if (c * a >= b) {
cout << c;
} else {
cout << b / a;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define v2i vector<vector<int>>
#define v2l vector<vector<ll>>
#define ppi pair<int, int>
#define vpi vector<ppi>
#define ppl pair<ll, ll>
#define all(x) x.begin(), x.end()
#define ii int, int
#define ff first
#define ss second
#define forn(i, a, b) for (int i = a; i < b; i++)
#define forr(i, a, b) for (int i = a; i >= b; i--)
#define forv(i, m) for (auto i : m)
#define imx INT_MAX
#define imn INT_MIN
#define inf LONG_MAX
#define minf LONG_MIN
#define endl "\n"
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define sze size()
#define rvs reverse
#define itr iterator
#define pre cout << fixed << setprecision(10);
#define umap unordered_map
#define uset unordered_set
/*
#define MODM(a,b,md) ((a%md)*(b%md))%md
#define MODA(a,b,md) ((a%md)+(b%md))%md
#define ull unsigned long long int
#define si short int
*/
/*
bool compare(int a,int b) {return a > b;}
bool compare1(ppi a,ppi b) {return a.ff > b.ff;}
bool compare2(ppi a,ppi b) {return a.ss < b.ss;}
ll Npower(ll a,ll b) {ll product = 1; while(b){if(b&1){product = product*a;}a =
a*a;b = b>>1;} return product;} ll power(ll a,ll b,ll md) {ll product = 1;
while(b){if(b&1){product = MODM(product,a,md);}a = MODM(a,a,md);b = b>>1;}
return product%md;} ll GCD(ll a,ll b) {return b==0 ? a:GCD(b,a%b);} ll LCM(ll
a,ll b) {return (a/GCD(a,b))*b; }
*/
int main() {
fast
int a,
b, c;
cin >> a >> b >> c;
if (c * a <= b) {
cout << c;
} else {
cout << b / a;
}
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 913,130 | 913,131 | u460819600 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int answer = A * C;
if (answer > B) {
cout << B / A << endl;
} else if (answer < B) {
cout << C << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int answer = A * C;
if (answer > B) {
cout << B / A << endl;
} else if (answer < B || answer == B) {
cout << C << endl;
}
} | [
"control_flow.branch.if.condition.change"
] | 913,136 | 913,137 | u388787692 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int answer = A * C;
if (answer > B) {
cout << B / A << endl;
} else if (answer < B) {
cout << C << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int answer = A * C;
if (answer > B) {
cout << B / A << endl;
} else if (answer < B || answer == B) {
cout << C << endl;
}
} | [
"control_flow.branch.if.condition.change"
] | 913,138 | 913,137 | u388787692 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
template <class S, class T> using P = pair<S, T>;
template <class... T> using TP = tuple<T...>;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using str = string;
using vll = V<ll>;
using vvll = V<vll>;
using vvvll = V<vvll>;
using pl = P<ll, ll>;
using tl = TP<ll, ll, ll>;
using vpl = V<pl>;
using vvpl = V<vpl>;
using vtl = V<tl>;
using vvtl = V<vtl>;
using vs = V<str>;
using vvs = V<vs>;
using vd = V<dbl>;
using vvd = V<vd>;
using qll = queue<ll>;
using qpl = queue<pl>;
using stll = stack<ll>;
using stpl = stack<pl>;
using mapll = map<ll, ll>;
using setll = set<ll>;
using pqll = priority_queue<ll>;
//#define int ll
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define pob pop_back()
#define pf push_front
#define pof pop_front()
#define sz size()
#define bgn begin()
#define en end()
#define asn assign
#define emp empty()
#define fr front()
#define bk back()
#define clr clear()
#define ins insert
#define ers erase
#define res resize
#define tp top()
#define p_q priority_queue
#define inv inverse()
#define FOR(i, a, b) for (ll i = (a); i <= (ll)(b); i++)
#define rFOR(i, a, b) for (ll i = (b); i >= (ll)(a); i--)
#define REP(i, a) FOR((i), 0, (ll)(a)-1)
#define REP0(i, a) FOR((i), 0, (ll)(a))
#define REP1(i, a) FOR((i), 1, (ll)(a))
#define rREP(i, a) rFOR((i), 0, (ll)(a)-1)
#define rREP0(i, a) rFOR((i), 0, (ll)(a))
#define rREP1(i, a) rFOR((i), 1, (ll)(a))
#define ROR(v, i) for (auto &(i) : (v))
#define IOTA(a, n) iota((a).bgn, (a).en, (n))
#define SORT(a) sort((a).bgn, (a).en)
#define rSORT(a) sort((a).rbegin(), (a).rend())
#define UNIQUE(a) (a).erase(unique((a).bgn, (a).en), (a).en)
#define PREVP(a) prev_permutation((a).bgn, (a).en)
#define NEXTP(a) next_permutation((a).bgn, (a).en)
#define BINS(a, b) binary_search((a).bgn, (a).en, (b))
#define LOWB(a, b) (lower_bound((a).bgn, (a).en, (b)) - (a).bgn)
#define UPB(a, b) (upper_bound((a).bgn, (a).en, (b)) - (a).bgn)
#define CNT(a, b) count((a).bgn, (a).en, b)
#define SUM(a) accumulate((a).bgn, (a).en, 0)
#define REV(a) reverse((a).bgn, (a).en)
#define REGS(a, b) regex_search((a), regex(b))
#define REGM(a, b) regex_match((a), regex(b))
#define yn(a) cout << ((a) ? "yes" : "no") << "\n";
#define Yn(a) cout << ((a) ? "Yes" : "No") << "\n";
#define YN(a) cout << ((a) ? "YES" : "NO") << "\n";
#define imp(a) cout << ((a) ? "possible" : "impossible") << "\n";
#define Imp(a) cout << ((a) ? "Possible" : "Impossible") << "\n";
#define IMP(a) cout << ((a) ? "POSSIBLE" : "IMPOSSIBLE") << "\n";
#define fs(a) cout << ((a) ? "second" : "first") << "\n";
#define Fs(a) cout << ((a) ? "Second" : "First") << "\n";
#define FS(a) cout << ((a) ? "SECOND" : "FIRST") << "\n";
//#define say(a) cout <<(a);
//#define sal(a) cout <<(a)<<"\n";
#define sak cout << "\n";
#define sas cout << " ";
#define sat cout << "\t";
#define dbg(a) cerr << (#a) << ": " << (a) << "\n";
#define dbgs(...) \
dal(#__VA_ARGS__); \
dal(__VA_ARGS__);
#define c2l(a) ((ll)(a - 48))
#define a2l(a) ((ll)(a - 97))
#define A2l(a) ((ll)(a - 65))
#define l2c(a) ((char)(a + 48))
#define l2a(a) ((char)(a + 97))
#define l2A(a) ((char)(a + 65))
#define DigN2(a) ((llabs(a) == 0) ? (1) : ((ll)(log2(double(llabs(a)))) + 1))
#define DigN10(a) ((llabs(a) == 0) ? (1) : ((ll)(log10(double(llabs(a)))) + 1))
#define Dig2(a, b) (((a) >> (b)) & 1)
#define Dig10(a, b) (ll)(((a) / ((ll)(pow(10.0, (double)(b))))) % 10)
#define Pow2(a) ((ll)(1) << (a))
#define Pow10(a) ((ll)(pow(10.0, double(a))))
#define LSB(a) ((a) & (-(a)))
/*#define llin(a) ll (a);cin >>(a);
#define llin2(a,b) ll (a),(b);cin >>(a)>>(b);
#define llin3(a,b,c) ll (a),(b),(c);cin >>(a)>>(b)>>(c);
#define stin(a) string (a);cin >>(a);*/
#define vin(v) \
ROR((v), (i)) { cin >> (i); };
#define vllin(N, v) \
vll(v)((N)); \
vin(v);
#define vllin2(N, a, b) \
vll(a)(N), (b)(N); \
REP(i, N) { cin >> (a)[i] >> (b)[i]; };
#define vsin(N, v) \
vs(v)((N)); \
vin(v);
#define rdn(a, b) ((a) / (b))
#define rou(a, b) \
((((double(a) / double(b)) - ((a) / (b))) < 0.5) ? ((a) / (b)) \
: (((a) / (b)) + 1))
#define rup(a, b) ((((a) % (b)) == 0) ? ((a) / (b)) : (((a) / (b)) + 1))
#define powll(a, b) (ll)(pow((double)(a), (double)(b)))
#define Triangle(x1, y1, x2, y2, x3, y3) \
(((x1) - (x2)) * ((y1) - (y3)) - ((x1) - (x3)) * ((y1) - (y2)))
#define tg(t, i) get<i>(t)
#define Id(x) get<0>(x)
#define Act(x) get<1>(x)
#define InvAct(x) get<2>(x)
#define mg(id, act) mt(id, act, lam(l))
//#define MonoidSet(T) TP<T, function<T(T, T)>>
#define GroupSet(T) TP<T, function<T(T, T)>, function<T(T, T)>>
#define CompareSet(T) TP<T, function<bool(T, T)>>
#define lam(lr) ([](auto l, auto r) { return (lr); })
#define elam(lr) ([=](auto l, auto r) { return (lr); })
#define clam(lr) ([&](auto l, auto r) { return (lr); })
#define lamr(lr) ([](auto l, auto r) { lr })
#define elamr(lr) ([=](auto l, auto r) { lr })
#define clamr(lr) ([&](auto l, auto r) { lr })
#define min(...) Operation(MIN, __VA_ARGS__)
#define max(...) Operation(MAX, __VA_ARGS__)
#define gcd(...) Operation(GCD, __VA_ARGS__)
#define lcm(...) Operation(LCM, __VA_ARGS__)
#define vmin(...) VOperation(MIN, __VA_ARGS__)
#define vmax(...) VOperation(MAX, __VA_ARGS__)
#define vgcd(...) VOperation(GCD, __VA_ARGS__)
#define vlcm(...) VOperation(LCM, __VA_ARGS__)
#define vsum(...) VOperation(ADD, __VA_ARGS__)
#define vpro(...) VOperation(MUL, __VA_ARGS__)
#define emin(a, ...) ((a) = min((a), __VA_ARGS__))
#define emax(a, ...) ((a) = max((a), __VA_ARGS__))
#define egcd(a, ...) ((a) = gcd((a), __VA_ARGS__))
#define elcm(a, ...) ((a) = lcm((a), __VA_ARGS__))
#define ope Operation
#define vope VOperation
#define svll SumV<ll>
#define svvll SumV2<ll>
#define li(...) \
ll __VA_ARGS__; \
Input(__VA_ARGS__);
#define si(...) \
str __VA_ARGS__; \
Input(__VA_ARGS__);
//#define vli(size, ...) vll __VA_ARGS__;vInitInput(size,__VA_ARGS__);
#define vlr(size, ...) \
vll __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vlc(size, ...) \
vll __VA_ARGS__; \
vInitInputC(size, __VA_ARGS__);
#define vli(size, ...) \
vll __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vsr(size, ...) \
vs __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vsc(size, ...) \
vs __VA_ARGS__; \
vInitInputC(size, __VA_ARGS__);
#define vsi(size, ...) \
vs __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vli2(rowSize, columnSize, ...) \
vvll __VA_ARGS__; \
vInitInput2(rowSize, columnSize, __VA_ARGS__);
#define vplr(size, ...) \
vpl __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vplc(size, ...) \
vpl __VA_ARGS__; \
vInitInputC(size, __VA_ARGS__);
#define vpli(size, ...) \
vpl __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
// const ll MOD = 924844033;
// const ll MOD = 9007199254740881;
const ll INF = 1LL << 60; // 1.15e18
const double PI = acos(-1.0);
const vll DX = {0, -1, 0, 1, 0, -1, 1, 1, -1};
const vll DY = {0, 0, -1, 0, 1, -1, -1, 1, 1};
const str alp = "abcdefghijklmnopqrstuvwxyz";
const str ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
template <class T> auto GetVectorValueType(T v) { return v; }
template <class T> auto GetVectorValueType(V<T> v) {
return GetVectorValueType(T());
}
template <class S, class T> istream &operator>>(istream &in, P<S, T> &p) {
return in >> p.fi >> p.se;
}
template <class T> istream &operator>>(istream &in, V<T> &v) {
REP(i, v.sz) in >> v[i];
return in;
}
void Input() {}
template <class Var, class... Args> void Input(Var &var, Args &...args) {
cin >> var;
Input(args...);
}
void vInit(ll size) {}
template <class T, class... Args> void vInit(ll size, V<T> &v, Args &...args) {
v.res(size);
vInit(size, args...);
}
void vInput(ll size) {}
template <class T, class... Args> void vInput(ll size, V<T> &v, Args &...args) {
REP(i, size) cin >> v[i];
vInput(size, args...);
}
void vInputR(ll size) {}
template <class T, class... Args>
void vInputR(ll size, V<T> &v, Args &...args) {
REP(i, size) cin >> v[i];
vInputR(size, args...);
}
void vInputNumC(ll num) {}
template <class T, class... Args>
void vInputNumC(ll num, V<T> &v, Args &...args) {
cin >> v[num];
vInputNumC(num, args...);
}
void vInputC(ll size) {}
template <class... Args> void vInputC(ll size, Args &...args) {
REP(i, size) vInputNumC(i, args...);
}
void vInitInputR(ll size) {}
template <class... Args> void vInitInputR(ll size, Args &...args) {
vInit(size, args...);
vInputR(size, args...);
}
void vInitInputC(ll size) {}
template <class... Args> void vInitInputC(ll size, Args &...args) {
vInit(size, args...);
vInputC(size, args...);
}
void vInit2(ll rowSize, ll columnSize) {}
template <class T, class... Args>
void vInit2(ll rowSize, ll columnSize, VV<T> &v, Args &...args) {
v.asn(rowSize, V<T>(columnSize));
vInit2(rowSize, columnSize, args...);
}
void vInput2(ll rowSize, ll columnSize) {}
template <class T, class... Args>
void vInput2(ll rowSize, ll columnSize, VV<T> &v, Args &...args) {
REP(r, rowSize) {
REP(c, columnSize) { cin >> v[r][c]; }
}
vInput2(rowSize, columnSize, args...);
}
void vInitInput2(ll rowSize, ll columnSize) {}
template <class... Args>
void vInitInput2(ll rowSize, ll columnSize, Args &...args) {
vInit2(rowSize, columnSize, args...);
vInput2(rowSize, columnSize, args...);
}
template <class S, class T>
ostream &operator<<(ostream &out, const P<S, T> &p) {
return out << "[" << p.fi << ", " << p.se << "]";
}
template <class T> ostream &operator<<(ostream &out, V<T> &v) {
if (v.emp)
return out << "{}";
else {
auto itr = v.bgn;
out << "{" << *itr;
itr++;
while (itr != v.en) {
out << ", " << *itr;
itr++;
}
out << "}";
return out;
}
}
template <class S, class T>
ostream &operator<<(ostream &out, const map<S, T> &m) {
if (m.emp)
return out << "<[]>";
else {
auto itr = m.bgn;
out << "< [" << (itr->fi) << ": " << (itr->se);
itr++;
while (itr != m.en) {
out << "], [" << (itr->fi) << ": " << (itr->se);
itr++;
}
out << "] >";
return out;
}
}
template <class T> ostream &operator<<(ostream &out, const set<T> &s) {
if (s.emp)
return out << "<>";
else {
auto itr = s.bgn;
out << "<" << *itr;
itr++;
while (itr != s.en) {
out << ", " << *itr;
itr++;
}
out << ">";
return out;
}
}
void say() {}
template <class T> void say(T t) { cout << t; }
template <class Head, class... Body> void say(Head head, Body... body) {
cout << head << " ";
say(body...);
}
void sal() { cout << "\n"; }
template <class... Args> void sal(Args... args) {
say(args...);
cout << "\n";
}
void day() {}
template <class T> void day(T t) { cerr << t; }
template <class Head, class... Body> void day(Head head, Body... body) {
cerr << head << " ";
day(body...);
}
void dal() { cerr << "\n"; }
template <class... Args> void dal(Args... args) {
day(args...);
cerr << "\n";
}
void salv() {}
template <class T> void salv(V<T> v) {
if (v.emp)
sal();
else {
auto itr = v.bgn;
say(*itr);
itr++;
while (itr != v.en) {
sas;
say(*itr);
itr++;
}
sak;
}
}
template <class T> void salv(VV<T> v) {
if (v.emp)
sal();
else {
ROR(v, i) salv(i);
}
}
template <class T, class... Args> void salv(T v, Args... args) {
salv(v);
salv(args...);
}
template <class L, class R> auto Gcd(L l, R r) -> decltype(l + r) {
if (l < r)
swap(l, r);
return r ? Gcd(r, l % r) : l;
}
template <class L, class R> auto Lcm(L l, R r) {
if (!l || !r)
return 0;
return l / Gcd(l, r) * r;
}
/*
auto LES = mp(INF, lam(return l < r;));
auto GRT = mp(-INF, lam(return l > r;));
auto EQ = mp(0, lam(return l == r;));
auto ADD = mp(0, lam(return l + r;));
auto SUB = mp(0, lam(return l - r;));
auto MUL = mp(1, lam(return l * r;));
auto DIV = mp(1, lam(return l / r;));
auto MDL = mp(1, lam(return l % r;));
auto XOR = mp(0, lam(return l ^ r;));
auto OR = mp(0, lam(return l | r;));
auto AND = mp(((ll)(1) << 63) - 1, lam(return l & r;));
auto MIN = mp(INF, lam(return (l < r) ? l : r;));
auto MAX = mp(-INF, lam(return (l > r) ? l : r;));
auto GCD = mp(0, lam(return Gcd(l, r);));
auto LCM = mp(1, lam(return Lcm(l, r);));
*/
auto LES = mp(INF, lam(l < r));
auto GRT = mp(-INF, lam(l > r));
auto EQ = mp(0, lam(l == r));
auto ADD = mt(0, lam(l + r), lam(l - r));
auto MUL = mt(1, lam(l *r), lam(l / r));
auto XOR = mt(0, lam(l ^ r), lam(l ^ r));
auto OR = mg(0, lam(l | r));
auto AND = mg(((ll)(1) << 63) - 1, lam(l &r));
auto MIN = mg(0, lam((l < r) ? l : r));
auto MAX = mg(0, lam((l > r) ? l : r));
auto GCD = mg(0, lam(Gcd(l, r)));
auto LCM = mg(0, lam(Lcm(l, r)));
template <class OperationType> auto Operation(OperationType A) { return Id(A); }
template <class OperationType, class T> auto Operation(OperationType A, T x) {
return x;
}
template <class OperationType, class T, class... Args>
auto Operation(OperationType A, T x, Args... args) {
auto tmp = Operation(A, args...);
return Act(A)(x, tmp);
}
template <class OperationType> auto VOperation(OperationType A) {
return Id(A);
}
template <class OperationType, class T> auto VOperation(OperationType A, T x) {
return x;
}
template <class OperationType, class T>
auto VOperation(OperationType A, V<T> v) {
if (v.emp) {
decltype(GetVectorValueType(T())) tmp = Id(A);
return tmp;
}
auto tmp = VOperation(A, v[0]);
FOR(i, 1, v.sz - 1) tmp = Act(A)(tmp, VOperation(A, v[i]));
return tmp;
}
template <class OperationType, class T, class... Args>
auto VOperation(OperationType A, T x, Args... args) {
auto xResult = VOperation(A, x);
auto tmp = VOperation(A, args...);
return Act(A)(xResult, tmp);
}
ll Bset(ll a, ll b, ll c) {
if (c)
a |= b;
else
a &= ~b;
return a;
}
struct UFT {
public:
ll tsize;
ll mode;
vll par;
vll rank;
UFT(ll tsizeget, ll modeget = 0) {
tsize = tsizeget;
mode = modeget;
par.asn(tsize, -1);
if (!mode)
rank.res(tsize, 0);
}
ll root(ll x) { return par[x] < 0 ? x : par[x] = root(par[x]); }
bool isRoot(ll x) { return x == root(x); }
bool same(ll x, ll y) { return root(x) == root(y); }
void merge(ll x, ll y) {
x = root(x);
y = root(y);
if (x == y)
return;
if (mode) {
par[x] += par[y];
par[y] = x;
} else {
if (rank[x] < rank[y]) {
par[y] += par[x];
par[x] = y;
} else {
par[x] += par[y];
par[y] = x;
if (rank[x] == rank[y])
rank[x]++;
}
}
}
ll size(ll x) { return -par[root(x)]; }
};
template <class T> struct pUFT {
public:
ll tsize;
ll now;
vll par;
vll rank;
vll mtime;
vvll sizepi;
VV<T> sizepv;
V<T> elm;
GroupSet(T) Add;
pUFT(ll tsize, GroupSet(T) Add = ADD) : tsize(tsize), Add(Add) { init(); }
void init() {
now = 0;
par.asn(tsize, -1);
rank.asn(tsize, 0);
mtime.asn(tsize, INF);
sizepi.asn(tsize, {0});
sizepv.asn(tsize, {});
}
void set(ll x, T s) {
elm[x] = s;
sizepv[x] = {s};
}
ll root(ll x, ll t) { return (mtime[x] > t) ? x : root(par[x], t); }
bool same(ll x, ll y, ll t) { return root(x, t) == root(y, t); }
ll merge(ll x, ll y) {
now++;
x = root(x, now);
y = root(y, now);
if (x != y) {
if (rank[x] < rank[y]) {
elm[y] = Act(Add)(elm[x], elm[y]);
sizepi[y].pb(now);
sizepv[y].pb(elm[y]);
par[x] = y;
mtime[x] = now;
} else {
elm[x] = Act(Add)(elm[x], elm[y]);
sizepi[x].pb(now);
sizepv[x].pb(elm[x]);
par[y] = x;
mtime[y] = now;
if (rank[x] == rank[y])
rank[x]++;
}
}
return now;
}
T size(ll x, ll t) {
x = root(x, t);
return sizepv[x][UPB(sizepi[x], t) - 1];
}
};
struct wUFT {
public:
ll tsize;
ll mode;
vll par;
vll rank;
vll dweight;
wUFT(ll tsizeget, ll modeget = 0) {
tsize = tsizeget;
mode = modeget;
par.asn(tsize, -1);
if (!mode)
rank.res(tsize, 0);
dweight.asn(tsize, 0);
}
ll root(ll x) {
if (par[x] < 0)
return x;
else {
ll r = root(par[x]);
dweight[x] += dweight[par[x]];
return par[x] = r;
}
}
ll weight(ll x) {
root(x);
return dweight[x];
}
ll diff(ll x, ll y) { return weight(y) - weight(x); }
bool isRoot(ll x) { return x == root(x); }
bool same(ll x, ll y) { return root(x) == root(y); }
void merge(ll x, ll y, ll w) {
w += weight(x);
w -= weight(y);
x = root(x);
y = root(y);
if (x == y)
return;
if (mode) {
par[x] += par[y];
par[y] = x;
} else {
if (rank[x] < rank[y]) {
par[y] += par[x];
par[x] = y;
dweight[x] = -w;
} else {
par[x] += par[y];
par[y] = x;
if (rank[x] == rank[y])
rank[x]++;
dweight[y] = w;
}
}
}
ll size(ll x) { return -par[root(x)]; }
};
template <class T> struct sUFT {
public:
ll tsize;
ll mode;
vll par;
vll rank;
GroupSet(T) Add;
V<T> elm;
sUFT(ll tsize, GroupSet(T) Add = ADD, ll mode = 0)
: tsize(tsize), Add(Add), mode(mode) {
init();
}
void init() {
par.asn(tsize, -1);
if (!mode)
rank.res(tsize, 0);
elm.asn(tsize, Id(Add));
}
ll root(ll x) { return par[x] < 0 ? x : par[x] = root(par[x]); }
bool isRoot(ll x) { return x == root(x); }
bool same(ll x, ll y) { return root(x) == root(y); }
void merge(ll x, ll y) {
x = root(x);
y = root(y);
if (x == y)
return;
if (mode) {
elm[x] = Act(Add)(elm[x], elm[y]);
par[y] = x;
} else {
if (rank[x] < rank[y]) {
elm[y] = Act(Add)(elm[x], elm[y]);
par[x] = y;
} else {
elm[x] = Act(Add)(elm[x], elm[y]);
par[y] = x;
if (rank[x] == rank[y])
rank[x]++;
}
}
}
T size(ll x) { return elm[root(x)]; }
T &operator[](ll x) { return elm[x]; }
};
template <typename valtype> class SegT {
public:
ll size;
vector<valtype> v;
valtype initv;
function<valtype(valtype x, valtype y)> calc;
SegT() {}
SegT(const SegT &segt) {}
SegT(ll sizeget, ll modeget = 0) {
sizeset(sizeget);
modeset(modeget);
init();
}
SegT(vector<valtype> cpyvec, ll modeget = 0) {
sizeset(cpyvec.sz);
modeset(modeget);
init();
copy(cpyvec);
}
SegT(ll sizeget, valtype initvget,
function<valtype(valtype x, valtype y)> calcget) {
sizeset(sizeget);
initv = initvget;
calc = calcget;
init();
}
SegT(vector<valtype> cpyvec, valtype initvget,
function<valtype(valtype x, valtype y)> calcget) {
sizeset(cpyvec.sz);
initv = initvget;
calc = calcget;
init();
copy(cpyvec);
}
void sizeset(ll rsize) {
size = DigN2(rsize);
if (rsize == Pow2(size - 1))
size--;
return;
}
void modeset(ll mode) {
switch (mode) {
case 0:
initv = 0;
calc = [](valtype x, valtype y) { return x + y; };
break;
case 1:
initv = INF;
calc = [](valtype x, valtype y) { return min(x, y); };
break;
case 2:
initv = -INF;
calc = [](valtype x, valtype y) { return max(x, y); };
break;
}
return;
}
void init() { v.asn(Pow2(size + 1) - 1, initv); }
void copy(vector<valtype> cpyvec) {
REP(i, min(cpyvec.sz, Pow2(size))) set(i, cpyvec[i]);
}
ll i2v(ll i) const {
if (i < 0 || i >= Pow2(size))
return -1;
return Pow2(size) + i - 1;
}
ll top(ll i) const {
if (i == 0)
return -1;
return (i - 1) / 2;
}
pl bot(ll i) const {
if (i + 1 >= Pow2(size))
return mp(-1, -1);
return mp(2 * i + 1, 2 * i + 2);
}
void set(ll i, valtype x) {
i = i2v(i);
v[i] = x;
while (i > 0) {
i = top(i);
v[i] = calc(v[bot(i).fi], v[bot(i).se]);
}
return;
}
void add(ll i, valtype x) {
set(i, v[i2v(i)] + x);
return;
}
valtype operator[](const ll &i) const { return v[i2v(i)]; }
// valtype que(ll a = 0, ll b = Pow2(size) - 1) {
valtype que(ll a, ll b) {
if (a == b)
return v[i2v(a)];
if (a > b)
return initv; // swap(a, b);
valtype ans = initv;
ll ai = i2v(a);
ll bi = i2v(b);
FOR(i, 1, size + 1) {
if (a > b)
break;
if (a % Pow2(i)) {
ans = calc(ans, v[ai]);
a += Pow2(i - 1);
ai = top(ai) + 1;
} else {
ai = top(ai);
}
if (a > b)
break;
if ((b + 1) % Pow2(i)) {
ans = calc(ans, v[bi]);
b -= Pow2(i - 1);
bi = top(bi) - 1;
} else {
bi = top(bi);
}
if (a > b)
break;
}
return ans;
}
valtype que(ll b) { return que(0, b); }
valtype que() { return que(0, Pow2(size) - 1); }
};
/*template <class Type> class DP {
public:
vector<Type> v;
Type initv;
vll size, block;
DP() {}
DP(const DP &dp) {}
template<class... Args> DP(Args... args) {
block.asn(1, 1);
Initialize(args...);
}
void Initialize(Type initv_) {
initv = initv_;
v.asn(block.bk, initv);
}
template<class... Args> void Initialize(ll val, Args... args) {
size.pb(val);
block.pb(block.bk*val);
Initialize(args...);
}
};*/
pl Bezout(ll a, ll b) {
if (b != 0) {
pl xy;
xy = Bezout(b, a % b);
return mp(xy.se, xy.fi - ((a / b) * xy.se));
} else {
return mp(1, 0);
}
}
pl Bez(ll a, ll b, ll c) {
pl xy;
ll x, y, z, gc;
xy = Bezout(a, b);
gc = gcd(a, b);
if (c % gc != 0)
return mp(-1, -1);
x = xy.fi * (c / gc);
y = xy.se * (c / gc);
if (x < 0)
z = rup(-x, (b / gc));
if (x >= 0)
z = -x / (b / gc);
x += z * (b / gc);
y -= z * (a / gc);
return mp(x, y);
}
ll DigS10(ll n) {
ll ans = 0;
while (1) {
ans += n % 10;
n /= 10;
if (!n)
break;
}
return ans;
}
ll isP(ll n) {
if (n <= 1)
return 0;
FOR(i, 2, (ll)sqrt(n) + 1) {
if (n % i == 0)
return 0;
}
return 1;
}
ll Tot(ll n) {
if (n <= 0)
return 0;
ll ans = n, x = 2;
while (x * x <= n) {
if (n % x == 0) {
ans -= ans / x;
while (n % x == 0)
n /= x;
}
x++;
}
if (n > 1)
ans -= ans / n;
return ans;
}
template <class T> struct Graph {
public:
ll vSize;
ll eMode;
ll mapMode;
GroupSet(T) Add;
CompareSet(T) Less;
CompareSet(T) Equal;
VV<P<T, ll>> adj;
map<pl, T> len;
Graph(ll vSize, ll eMode = 0, ll mapMode = 0, GroupSet(T) Add = ADD,
CompareSet(T) Less = LES, CompareSet(T) Equal = EQ)
: vSize(vSize), eMode(eMode), mapMode(mapMode), Add(Add), Less(Less),
Equal(Equal) {}
void Init() { adj.asn(vSize, V<P<T, ll>>()); }
void AddE(ll x, ll y, T cost) {
iAddE(x, y, cost);
if (!eMode)
iAddE(y, x, cost);
}
void iAddE(ll x, ll y, T cost) {
adj[x].pb(mp(cost, y));
if (mapMode)
len[mp(x, y)] = cost;
}
P<bool, T> getE(ll x, ll y) {
if (!len.count(mp(x, y)))
return mp(false, Id(Less));
return mp(true, len[mp(x, y)]);
}
V<T> Dijk(ll x) {
V<T> ans(vSize, Id(Less));
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans[now.se] = segt[now.se].fi;
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, mp(Act(Add)(ans[now.se], i.fi), i.se));
continue;
}
if (Act(Less)(Act(Add)(ans[now.se], i.fi), segt[i.se].fi)) {
segt.set(i.se, mp(Act(Add)(ans[now.se], i.fi), i.se));
continue;
}
}
}
return ans;
}
V<P<T, vll>> rDijk(ll x) {
V<P<T, vll>> ans(vSize, mp(Id(Less), vll()));
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans[now.se].fi = segt[now.se].fi;
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, mp(Act(Add)(ans[now.se].fi, i.fi), i.se));
ans[i.se].se = {now.se};
continue;
}
if (Act(Less)(Act(Add)(ans[now.se].fi, i.fi), segt[i.se].fi)) {
segt.set(i.se, mp(Act(Add)(ans[now.se].fi, i.fi), i.se));
ans[i.se].se = {now.se};
continue;
}
if (Act(Equal)(Act(Add)(ans[now.se].fi, i.fi), segt[i.se].fi)) {
ans[i.se].se.pb(now.se);
continue;
}
}
}
return ans;
}
T Prim(ll x = 0) {
T ans = Id(Add);
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans = Act(Add)(ans, segt[now.se].fi);
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, i);
continue;
}
if (Act(Less)(i.fi, segt[i.se].fi)) {
segt.set(i.se, i);
continue;
}
}
}
return ans;
}
P<T, V<P<T, vll>>> rPrim(ll x = 0) {
P<T, V<P<T, vll>>> ans =
mp(Id(Add), V<P<T, vll>>(vSize, mp(Id(Less), vll())));
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans.se[now.se].fi = segt[now.se].fi;
ans.fi = Act(Add)(ans.fi, ans.se[now.se].fi);
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, i);
ans.se[i.se].se = {now.se};
continue;
}
if (Act(Less)(i.fi, segt[i.se].fi)) {
segt.set(i.se, i);
ans.se[i.se].se = {now.se};
continue;
}
if (Act(Equal)(i.fi, segt[i.se].fi)) {
ans.se[i.se].se.pb(now.se);
continue;
}
}
}
return ans;
}
};
template <class T> struct Sum {
public:
V<T> v, s;
ll size;
GroupSet(T) Add;
Sum(V<T> v, GroupSet(T) Add = ADD) : v(v), size(v.sz), Add(Add) {
Init();
Calc();
}
void Init() { s.asn(size + 1, Id(Add)); }
void Calc() { REP(i, size) s[i + 1] = Act(Add)(s[i], v[i]); }
T operator()(ll x) {
if (x < -1)
x = -1;
if (x > size - 1)
x = size - 1;
return s[x + 1];
}
T operator()(ll l, ll r) {
if (l < 0)
l = 0;
if (r >= size)
r = size - 1;
if (l > r)
return Id(Add);
return InvAct(Add)(s[r + 1], s[l]);
}
};
using sumll = Sum<ll>;
template <class T> struct Sum2 {
public:
VV<T> v, s;
ll RowSize, ColumnSize;
GroupSet(T) Add;
Sum2(VV<T> v, GroupSet(T) Add = ADD)
: v(v), RowSize(v.sz), ColumnSize(v.sz ? v[0].sz : 0), Add(Add) {
Init();
Calc();
}
void Init() { s.asn(RowSize + 1, V<T>(ColumnSize + 1, Id(Add))); }
void Calc() {
REP1(r, RowSize) {
REP1(c, ColumnSize) {
// s[r][c] = InvAct(Add)(Act(Add)(Act(Add)(v[r -
//1][c - 1], operator()(r - 1, c - 2)), operator()(r - 2, c - 1)),
//operator()(r - 2, c - 2));
s[r][c] = Act(Add)(s[r][c - 1], v[r - 1][c - 1]);
}
}
REP1(r, RowSize) {
REP1(c, ColumnSize) { s[r][c] = Act(Add)(s[r - 1][c], s[r][c]); }
}
}
T operator()(ll r, ll c) {
if (r < -1)
r = -1;
if (c < -1)
c = -1;
if (r > RowSize - 1)
r = RowSize - 1;
if (c > ColumnSize - 1)
c = ColumnSize - 1;
return s[r + 1][c + 1];
}
T operator()(ll r1, ll c1, ll r2, ll c2) {
if (r1 < 0)
r1 = 0;
if (c1 < 0)
c1 = 0;
if (r2 >= RowSize)
r2 = RowSize - 1;
if (c2 >= ColumnSize)
c2 = ColumnSize - 1;
if (r1 > r2)
return Id(Add);
if (c1 > c2)
return Id(Add);
return InvAct(Add)(Act(Add)(s[r2 + 1][c2 + 1], s[r1][c1]),
Act(Add)(s[r2 + 1][c1], s[r1][c2 + 1]));
}
};
using sumll2 = Sum2<ll>;
template <class T> struct Point2 {
public:
VV<T> v;
ll h, w;
Point2() : h(0), w(0) {}
Point2(ll h, ll w) : h(h), w(w) { asn(h, w); }
Point2(ll h, ll w, T val) : h(h), w(w) { asn(h, w, val); }
Point2(VV<T> cv) : h(cv.sz), w(cv.sz ? cv[0].sz : 0) {
asn(h, w);
copy(cv);
}
void assign(ll h, ll w) { v.asn(h, V<T>(w)); }
void assign(ll h, ll w, ll val) { v.asn(h, V<T>(w, val)); }
void copy(VV<T> cv) { REP(_h, h) REP(_w, w) v[_h][_w] = cv[_h][_w]; }
T &operator()(ll h, ll w) { return v[h][w]; }
T &operator()(pl p) { return v[p.fi][p.se]; }
T &operator[](pl p) { return v[p.fi][p.se]; }
};
template <class T> using P2 = Point2<T>;
template <ll Mod> struct Modll {
public:
ll v;
Modll() : v(0) {}
Modll(ll _v) { set(_v % Mod + Mod); }
Modll &set(ll _v) {
v = (_v < Mod) ? _v : (_v - Mod);
return *this;
}
Modll pow(ll n) const {
Modll x = *this, ans = 1;
while (n) {
if (n & 1)
ans *= x;
x *= x;
n >>= 1;
}
return ans;
}
Modll inverse() const { return (*this).pow(Mod - 2); }
Modll operator+(const Modll &m) const { return Modll().set(v + m.v); }
Modll operator-(const Modll &m) const { return Modll().set(Mod + v - m.v); }
Modll operator*(const Modll &m) const {
return Modll().set((ull(v) * m.v) % Mod);
}
Modll operator/(const Modll &m) const { return *this * m.inv; }
Modll &operator+=(const Modll &m) { return *this = *this + m; }
Modll &operator-=(const Modll &m) { return *this = *this - m; }
Modll &operator*=(const Modll &m) { return *this = *this * m; }
Modll &operator/=(const Modll &m) { return *this = *this / m; }
Modll operator-() const { return Modll(0) - *this; }
explicit operator bool() const { return v != 0; }
friend istream &operator>>(istream &in, Modll &m) { return in >> m.v; }
friend ostream &operator<<(ostream &out, const Modll &m) {
return out << m.v;
}
};
using mll = Modll<MOD>;
using vmll = V<mll>;
using vvmll = V<vmll>;
using vvvmll = V<vvmll>;
vmll MFactMemo(2, 1);
vmll MIFactMemo(2, 1);
mll mFact(ll n) {
if (MFactMemo.sz <= n) {
ll oldsize = MFactMemo.sz;
MFactMemo.res(n + 1, 1);
FOR(i, oldsize, n) MFactMemo[i] = MFactMemo[i - 1] * i;
}
return MFactMemo[n];
}
mll miFact(ll n) {
if (MIFactMemo.sz <= n) {
ll oldsize = MIFactMemo.sz;
MIFactMemo.res(n + 1, 1);
MIFactMemo.bk = mFact(n).inv;
rFOR(i, oldsize + 1, n) MIFactMemo[i - 1] = MIFactMemo[i] * i;
}
return MIFactMemo[n];
}
mll mComb(ll n, ll k) {
if (n < 0 || k < 0 || n < k)
return 0;
return mFact(n) * miFact(k) * miFact(n - k);
}
ll LIS(vll v, ll m = 0) {
if (v.sz > 0) {
ll ans = 0;
vll dp(v.sz, INF);
FOR(i, 0, v.sz - 1) { dp[m ? UPB(dp, v[i]) : LOWB(dp, v[i])] = v[i]; }
FOR(i, 0, v.sz - 1) {
if (dp[i] == INF)
break;
ans++;
}
return ans;
} else {
return 0;
}
}
ll Bsrch(function<bool(ll x)> f, ll mi, ll ma) {
ll ng = mi - 1, ok = ma, mid;
while (ok - ng > 1) {
mid = (ng + ok) / 2;
(f(mid) ? ok : ng) = mid;
}
return ok;
}
template <class T, class M = decltype(MUL), class S = decltype(ADD)>
VV<T> MultiMatrix(VV<T> A, VV<T> B, M Mul = MUL, S Add = ADD) {
VV<T> ans;
ll ii = A.sz;
if (!ii)
return ans;
ll jj = A[0].sz;
if (!jj)
return ans;
ll jj2 = B.sz;
if (!jj2)
return ans;
if (jj != jj2)
return ans;
ll kk = B[0].sz;
if (!kk)
return ans;
ans.asn(ii, V<T>(kk, 0));
REP(i, ii) {
REP(k, kk) {
REP(j, jj) {
ans[i][k] = Act(Add)(ans[i][k], Act(Mul)(A[i][j], B[j][k]));
}
}
}
return ans;
}
vvll CombMemo(1000, vll(1000, -1));
ll Comb(ll n, ll k) {
if ((n < 0) || (k < 0))
return 0;
if (CombMemo[n][k] == -1) {
if (n < k)
CombMemo[n][k] = 0;
else {
if (n == 0)
CombMemo[n][k] = 1;
else if (k == 0)
CombMemo[n][k] = 1;
else if (n == k)
CombMemo[n][k] = 1;
else
CombMemo[n][k] = Comb(n - 1, k - 1) + Comb(n - 1, k);
}
}
return CombMemo[n][k];
}
template <class T> map<T, ll> Dict(V<T> v) {
map<T, ll> m;
if (!v.sz)
return m;
SORT(v);
UNIQUE(v);
REP(i, v.sz) { m[v[i]] = i; }
return m;
}
template <class T> vll Cmprs(V<T> v) {
auto m = Dict(v);
vll ans(v.sz);
REP(i, v.sz) { ans[i] = m[v[i]]; }
return ans;
}
template <class T> vll PCmprs(V<T> v) {
if (v.sz == 0)
return V<T>();
vll tmp(v.sz);
vll ans(v.sz);
IOTA(tmp, 0);
IOTA(ans, 0);
sort(tmp.bgn, tmp.en, clam(v[l] < v[r]));
sort(ans.bgn, ans.en, clam(tmp[l] < tmp[r]));
return ans;
}
ll BblCnt(vll rv) {
vll v = PCmprs(rv);
SegT<ll> b(v.sz, 0);
ll ans = 0;
REP(i, v.sz) {
ans += (i - b.que(0, v[i]));
b.add(v[i], 1);
}
return ans;
}
pl NGrid(pl p, ll i, ll H, ll W) {
p = mp(p.fi + DX[i], p.se + DY[i]);
if (p.fi < 0 || p.fi >= H || p.se < 0 || p.se >= W)
return mp(INF, INF);
return p;
}
vvll llGrid(vs v) {
vvll r(v.sz, vll(v.sz ? v[0].sz : 0, 0));
REP(h, v.sz) REP(w, v.sz ? v[0].sz : 0) r[h][w] = (v[h][w] == '#');
return r;
}
template <class T> auto ven(T val) { return val; }
template <> auto ven<int>(int val) { return (ll)val; }
template <class T, class... Args> auto ven(T val, Args... args) {
auto tmp = ven(args...);
return V<decltype(tmp)>(val, tmp);
}
template <class T> void zind(T &v) { v--; }
template <class T> void zind(V<T> &v) { ROR(v, i) zind(i); }
template <class T, class... Args> void zind(T &v, Args &...args) {
zind(v);
zind(args...);
}
void Solve();
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << setprecision(20) << fixed;
Solve();
}
void Solve() {
li(a, b, c);
sal(min(c / a, b));
} | #include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
template <class S, class T> using P = pair<S, T>;
template <class... T> using TP = tuple<T...>;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using str = string;
using vll = V<ll>;
using vvll = V<vll>;
using vvvll = V<vvll>;
using pl = P<ll, ll>;
using tl = TP<ll, ll, ll>;
using vpl = V<pl>;
using vvpl = V<vpl>;
using vtl = V<tl>;
using vvtl = V<vtl>;
using vs = V<str>;
using vvs = V<vs>;
using vd = V<dbl>;
using vvd = V<vd>;
using qll = queue<ll>;
using qpl = queue<pl>;
using stll = stack<ll>;
using stpl = stack<pl>;
using mapll = map<ll, ll>;
using setll = set<ll>;
using pqll = priority_queue<ll>;
//#define int ll
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define pob pop_back()
#define pf push_front
#define pof pop_front()
#define sz size()
#define bgn begin()
#define en end()
#define asn assign
#define emp empty()
#define fr front()
#define bk back()
#define clr clear()
#define ins insert
#define ers erase
#define res resize
#define tp top()
#define p_q priority_queue
#define inv inverse()
#define FOR(i, a, b) for (ll i = (a); i <= (ll)(b); i++)
#define rFOR(i, a, b) for (ll i = (b); i >= (ll)(a); i--)
#define REP(i, a) FOR((i), 0, (ll)(a)-1)
#define REP0(i, a) FOR((i), 0, (ll)(a))
#define REP1(i, a) FOR((i), 1, (ll)(a))
#define rREP(i, a) rFOR((i), 0, (ll)(a)-1)
#define rREP0(i, a) rFOR((i), 0, (ll)(a))
#define rREP1(i, a) rFOR((i), 1, (ll)(a))
#define ROR(v, i) for (auto &(i) : (v))
#define IOTA(a, n) iota((a).bgn, (a).en, (n))
#define SORT(a) sort((a).bgn, (a).en)
#define rSORT(a) sort((a).rbegin(), (a).rend())
#define UNIQUE(a) (a).erase(unique((a).bgn, (a).en), (a).en)
#define PREVP(a) prev_permutation((a).bgn, (a).en)
#define NEXTP(a) next_permutation((a).bgn, (a).en)
#define BINS(a, b) binary_search((a).bgn, (a).en, (b))
#define LOWB(a, b) (lower_bound((a).bgn, (a).en, (b)) - (a).bgn)
#define UPB(a, b) (upper_bound((a).bgn, (a).en, (b)) - (a).bgn)
#define CNT(a, b) count((a).bgn, (a).en, b)
#define SUM(a) accumulate((a).bgn, (a).en, 0)
#define REV(a) reverse((a).bgn, (a).en)
#define REGS(a, b) regex_search((a), regex(b))
#define REGM(a, b) regex_match((a), regex(b))
#define yn(a) cout << ((a) ? "yes" : "no") << "\n";
#define Yn(a) cout << ((a) ? "Yes" : "No") << "\n";
#define YN(a) cout << ((a) ? "YES" : "NO") << "\n";
#define imp(a) cout << ((a) ? "possible" : "impossible") << "\n";
#define Imp(a) cout << ((a) ? "Possible" : "Impossible") << "\n";
#define IMP(a) cout << ((a) ? "POSSIBLE" : "IMPOSSIBLE") << "\n";
#define fs(a) cout << ((a) ? "second" : "first") << "\n";
#define Fs(a) cout << ((a) ? "Second" : "First") << "\n";
#define FS(a) cout << ((a) ? "SECOND" : "FIRST") << "\n";
//#define say(a) cout <<(a);
//#define sal(a) cout <<(a)<<"\n";
#define sak cout << "\n";
#define sas cout << " ";
#define sat cout << "\t";
#define dbg(a) cerr << (#a) << ": " << (a) << "\n";
#define dbgs(...) \
dal(#__VA_ARGS__); \
dal(__VA_ARGS__);
#define c2l(a) ((ll)(a - 48))
#define a2l(a) ((ll)(a - 97))
#define A2l(a) ((ll)(a - 65))
#define l2c(a) ((char)(a + 48))
#define l2a(a) ((char)(a + 97))
#define l2A(a) ((char)(a + 65))
#define DigN2(a) ((llabs(a) == 0) ? (1) : ((ll)(log2(double(llabs(a)))) + 1))
#define DigN10(a) ((llabs(a) == 0) ? (1) : ((ll)(log10(double(llabs(a)))) + 1))
#define Dig2(a, b) (((a) >> (b)) & 1)
#define Dig10(a, b) (ll)(((a) / ((ll)(pow(10.0, (double)(b))))) % 10)
#define Pow2(a) ((ll)(1) << (a))
#define Pow10(a) ((ll)(pow(10.0, double(a))))
#define LSB(a) ((a) & (-(a)))
/*#define llin(a) ll (a);cin >>(a);
#define llin2(a,b) ll (a),(b);cin >>(a)>>(b);
#define llin3(a,b,c) ll (a),(b),(c);cin >>(a)>>(b)>>(c);
#define stin(a) string (a);cin >>(a);*/
#define vin(v) \
ROR((v), (i)) { cin >> (i); };
#define vllin(N, v) \
vll(v)((N)); \
vin(v);
#define vllin2(N, a, b) \
vll(a)(N), (b)(N); \
REP(i, N) { cin >> (a)[i] >> (b)[i]; };
#define vsin(N, v) \
vs(v)((N)); \
vin(v);
#define rdn(a, b) ((a) / (b))
#define rou(a, b) \
((((double(a) / double(b)) - ((a) / (b))) < 0.5) ? ((a) / (b)) \
: (((a) / (b)) + 1))
#define rup(a, b) ((((a) % (b)) == 0) ? ((a) / (b)) : (((a) / (b)) + 1))
#define powll(a, b) (ll)(pow((double)(a), (double)(b)))
#define Triangle(x1, y1, x2, y2, x3, y3) \
(((x1) - (x2)) * ((y1) - (y3)) - ((x1) - (x3)) * ((y1) - (y2)))
#define tg(t, i) get<i>(t)
#define Id(x) get<0>(x)
#define Act(x) get<1>(x)
#define InvAct(x) get<2>(x)
#define mg(id, act) mt(id, act, lam(l))
//#define MonoidSet(T) TP<T, function<T(T, T)>>
#define GroupSet(T) TP<T, function<T(T, T)>, function<T(T, T)>>
#define CompareSet(T) TP<T, function<bool(T, T)>>
#define lam(lr) ([](auto l, auto r) { return (lr); })
#define elam(lr) ([=](auto l, auto r) { return (lr); })
#define clam(lr) ([&](auto l, auto r) { return (lr); })
#define lamr(lr) ([](auto l, auto r) { lr })
#define elamr(lr) ([=](auto l, auto r) { lr })
#define clamr(lr) ([&](auto l, auto r) { lr })
#define min(...) Operation(MIN, __VA_ARGS__)
#define max(...) Operation(MAX, __VA_ARGS__)
#define gcd(...) Operation(GCD, __VA_ARGS__)
#define lcm(...) Operation(LCM, __VA_ARGS__)
#define vmin(...) VOperation(MIN, __VA_ARGS__)
#define vmax(...) VOperation(MAX, __VA_ARGS__)
#define vgcd(...) VOperation(GCD, __VA_ARGS__)
#define vlcm(...) VOperation(LCM, __VA_ARGS__)
#define vsum(...) VOperation(ADD, __VA_ARGS__)
#define vpro(...) VOperation(MUL, __VA_ARGS__)
#define emin(a, ...) ((a) = min((a), __VA_ARGS__))
#define emax(a, ...) ((a) = max((a), __VA_ARGS__))
#define egcd(a, ...) ((a) = gcd((a), __VA_ARGS__))
#define elcm(a, ...) ((a) = lcm((a), __VA_ARGS__))
#define ope Operation
#define vope VOperation
#define svll SumV<ll>
#define svvll SumV2<ll>
#define li(...) \
ll __VA_ARGS__; \
Input(__VA_ARGS__);
#define si(...) \
str __VA_ARGS__; \
Input(__VA_ARGS__);
//#define vli(size, ...) vll __VA_ARGS__;vInitInput(size,__VA_ARGS__);
#define vlr(size, ...) \
vll __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vlc(size, ...) \
vll __VA_ARGS__; \
vInitInputC(size, __VA_ARGS__);
#define vli(size, ...) \
vll __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vsr(size, ...) \
vs __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vsc(size, ...) \
vs __VA_ARGS__; \
vInitInputC(size, __VA_ARGS__);
#define vsi(size, ...) \
vs __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vli2(rowSize, columnSize, ...) \
vvll __VA_ARGS__; \
vInitInput2(rowSize, columnSize, __VA_ARGS__);
#define vplr(size, ...) \
vpl __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
#define vplc(size, ...) \
vpl __VA_ARGS__; \
vInitInputC(size, __VA_ARGS__);
#define vpli(size, ...) \
vpl __VA_ARGS__; \
vInitInputR(size, __VA_ARGS__);
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
// const ll MOD = 924844033;
// const ll MOD = 9007199254740881;
const ll INF = 1LL << 60; // 1.15e18
const double PI = acos(-1.0);
const vll DX = {0, -1, 0, 1, 0, -1, 1, 1, -1};
const vll DY = {0, 0, -1, 0, 1, -1, -1, 1, 1};
const str alp = "abcdefghijklmnopqrstuvwxyz";
const str ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
template <class T> auto GetVectorValueType(T v) { return v; }
template <class T> auto GetVectorValueType(V<T> v) {
return GetVectorValueType(T());
}
template <class S, class T> istream &operator>>(istream &in, P<S, T> &p) {
return in >> p.fi >> p.se;
}
template <class T> istream &operator>>(istream &in, V<T> &v) {
REP(i, v.sz) in >> v[i];
return in;
}
void Input() {}
template <class Var, class... Args> void Input(Var &var, Args &...args) {
cin >> var;
Input(args...);
}
void vInit(ll size) {}
template <class T, class... Args> void vInit(ll size, V<T> &v, Args &...args) {
v.res(size);
vInit(size, args...);
}
void vInput(ll size) {}
template <class T, class... Args> void vInput(ll size, V<T> &v, Args &...args) {
REP(i, size) cin >> v[i];
vInput(size, args...);
}
void vInputR(ll size) {}
template <class T, class... Args>
void vInputR(ll size, V<T> &v, Args &...args) {
REP(i, size) cin >> v[i];
vInputR(size, args...);
}
void vInputNumC(ll num) {}
template <class T, class... Args>
void vInputNumC(ll num, V<T> &v, Args &...args) {
cin >> v[num];
vInputNumC(num, args...);
}
void vInputC(ll size) {}
template <class... Args> void vInputC(ll size, Args &...args) {
REP(i, size) vInputNumC(i, args...);
}
void vInitInputR(ll size) {}
template <class... Args> void vInitInputR(ll size, Args &...args) {
vInit(size, args...);
vInputR(size, args...);
}
void vInitInputC(ll size) {}
template <class... Args> void vInitInputC(ll size, Args &...args) {
vInit(size, args...);
vInputC(size, args...);
}
void vInit2(ll rowSize, ll columnSize) {}
template <class T, class... Args>
void vInit2(ll rowSize, ll columnSize, VV<T> &v, Args &...args) {
v.asn(rowSize, V<T>(columnSize));
vInit2(rowSize, columnSize, args...);
}
void vInput2(ll rowSize, ll columnSize) {}
template <class T, class... Args>
void vInput2(ll rowSize, ll columnSize, VV<T> &v, Args &...args) {
REP(r, rowSize) {
REP(c, columnSize) { cin >> v[r][c]; }
}
vInput2(rowSize, columnSize, args...);
}
void vInitInput2(ll rowSize, ll columnSize) {}
template <class... Args>
void vInitInput2(ll rowSize, ll columnSize, Args &...args) {
vInit2(rowSize, columnSize, args...);
vInput2(rowSize, columnSize, args...);
}
template <class S, class T>
ostream &operator<<(ostream &out, const P<S, T> &p) {
return out << "[" << p.fi << ", " << p.se << "]";
}
template <class T> ostream &operator<<(ostream &out, V<T> &v) {
if (v.emp)
return out << "{}";
else {
auto itr = v.bgn;
out << "{" << *itr;
itr++;
while (itr != v.en) {
out << ", " << *itr;
itr++;
}
out << "}";
return out;
}
}
template <class S, class T>
ostream &operator<<(ostream &out, const map<S, T> &m) {
if (m.emp)
return out << "<[]>";
else {
auto itr = m.bgn;
out << "< [" << (itr->fi) << ": " << (itr->se);
itr++;
while (itr != m.en) {
out << "], [" << (itr->fi) << ": " << (itr->se);
itr++;
}
out << "] >";
return out;
}
}
template <class T> ostream &operator<<(ostream &out, const set<T> &s) {
if (s.emp)
return out << "<>";
else {
auto itr = s.bgn;
out << "<" << *itr;
itr++;
while (itr != s.en) {
out << ", " << *itr;
itr++;
}
out << ">";
return out;
}
}
void say() {}
template <class T> void say(T t) { cout << t; }
template <class Head, class... Body> void say(Head head, Body... body) {
cout << head << " ";
say(body...);
}
void sal() { cout << "\n"; }
template <class... Args> void sal(Args... args) {
say(args...);
cout << "\n";
}
void day() {}
template <class T> void day(T t) { cerr << t; }
template <class Head, class... Body> void day(Head head, Body... body) {
cerr << head << " ";
day(body...);
}
void dal() { cerr << "\n"; }
template <class... Args> void dal(Args... args) {
day(args...);
cerr << "\n";
}
void salv() {}
template <class T> void salv(V<T> v) {
if (v.emp)
sal();
else {
auto itr = v.bgn;
say(*itr);
itr++;
while (itr != v.en) {
sas;
say(*itr);
itr++;
}
sak;
}
}
template <class T> void salv(VV<T> v) {
if (v.emp)
sal();
else {
ROR(v, i) salv(i);
}
}
template <class T, class... Args> void salv(T v, Args... args) {
salv(v);
salv(args...);
}
template <class L, class R> auto Gcd(L l, R r) -> decltype(l + r) {
if (l < r)
swap(l, r);
return r ? Gcd(r, l % r) : l;
}
template <class L, class R> auto Lcm(L l, R r) {
if (!l || !r)
return 0;
return l / Gcd(l, r) * r;
}
/*
auto LES = mp(INF, lam(return l < r;));
auto GRT = mp(-INF, lam(return l > r;));
auto EQ = mp(0, lam(return l == r;));
auto ADD = mp(0, lam(return l + r;));
auto SUB = mp(0, lam(return l - r;));
auto MUL = mp(1, lam(return l * r;));
auto DIV = mp(1, lam(return l / r;));
auto MDL = mp(1, lam(return l % r;));
auto XOR = mp(0, lam(return l ^ r;));
auto OR = mp(0, lam(return l | r;));
auto AND = mp(((ll)(1) << 63) - 1, lam(return l & r;));
auto MIN = mp(INF, lam(return (l < r) ? l : r;));
auto MAX = mp(-INF, lam(return (l > r) ? l : r;));
auto GCD = mp(0, lam(return Gcd(l, r);));
auto LCM = mp(1, lam(return Lcm(l, r);));
*/
auto LES = mp(INF, lam(l < r));
auto GRT = mp(-INF, lam(l > r));
auto EQ = mp(0, lam(l == r));
auto ADD = mt(0, lam(l + r), lam(l - r));
auto MUL = mt(1, lam(l *r), lam(l / r));
auto XOR = mt(0, lam(l ^ r), lam(l ^ r));
auto OR = mg(0, lam(l | r));
auto AND = mg(((ll)(1) << 63) - 1, lam(l &r));
auto MIN = mg(0, lam((l < r) ? l : r));
auto MAX = mg(0, lam((l > r) ? l : r));
auto GCD = mg(0, lam(Gcd(l, r)));
auto LCM = mg(0, lam(Lcm(l, r)));
template <class OperationType> auto Operation(OperationType A) { return Id(A); }
template <class OperationType, class T> auto Operation(OperationType A, T x) {
return x;
}
template <class OperationType, class T, class... Args>
auto Operation(OperationType A, T x, Args... args) {
auto tmp = Operation(A, args...);
return Act(A)(x, tmp);
}
template <class OperationType> auto VOperation(OperationType A) {
return Id(A);
}
template <class OperationType, class T> auto VOperation(OperationType A, T x) {
return x;
}
template <class OperationType, class T>
auto VOperation(OperationType A, V<T> v) {
if (v.emp) {
decltype(GetVectorValueType(T())) tmp = Id(A);
return tmp;
}
auto tmp = VOperation(A, v[0]);
FOR(i, 1, v.sz - 1) tmp = Act(A)(tmp, VOperation(A, v[i]));
return tmp;
}
template <class OperationType, class T, class... Args>
auto VOperation(OperationType A, T x, Args... args) {
auto xResult = VOperation(A, x);
auto tmp = VOperation(A, args...);
return Act(A)(xResult, tmp);
}
ll Bset(ll a, ll b, ll c) {
if (c)
a |= b;
else
a &= ~b;
return a;
}
struct UFT {
public:
ll tsize;
ll mode;
vll par;
vll rank;
UFT(ll tsizeget, ll modeget = 0) {
tsize = tsizeget;
mode = modeget;
par.asn(tsize, -1);
if (!mode)
rank.res(tsize, 0);
}
ll root(ll x) { return par[x] < 0 ? x : par[x] = root(par[x]); }
bool isRoot(ll x) { return x == root(x); }
bool same(ll x, ll y) { return root(x) == root(y); }
void merge(ll x, ll y) {
x = root(x);
y = root(y);
if (x == y)
return;
if (mode) {
par[x] += par[y];
par[y] = x;
} else {
if (rank[x] < rank[y]) {
par[y] += par[x];
par[x] = y;
} else {
par[x] += par[y];
par[y] = x;
if (rank[x] == rank[y])
rank[x]++;
}
}
}
ll size(ll x) { return -par[root(x)]; }
};
template <class T> struct pUFT {
public:
ll tsize;
ll now;
vll par;
vll rank;
vll mtime;
vvll sizepi;
VV<T> sizepv;
V<T> elm;
GroupSet(T) Add;
pUFT(ll tsize, GroupSet(T) Add = ADD) : tsize(tsize), Add(Add) { init(); }
void init() {
now = 0;
par.asn(tsize, -1);
rank.asn(tsize, 0);
mtime.asn(tsize, INF);
sizepi.asn(tsize, {0});
sizepv.asn(tsize, {});
}
void set(ll x, T s) {
elm[x] = s;
sizepv[x] = {s};
}
ll root(ll x, ll t) { return (mtime[x] > t) ? x : root(par[x], t); }
bool same(ll x, ll y, ll t) { return root(x, t) == root(y, t); }
ll merge(ll x, ll y) {
now++;
x = root(x, now);
y = root(y, now);
if (x != y) {
if (rank[x] < rank[y]) {
elm[y] = Act(Add)(elm[x], elm[y]);
sizepi[y].pb(now);
sizepv[y].pb(elm[y]);
par[x] = y;
mtime[x] = now;
} else {
elm[x] = Act(Add)(elm[x], elm[y]);
sizepi[x].pb(now);
sizepv[x].pb(elm[x]);
par[y] = x;
mtime[y] = now;
if (rank[x] == rank[y])
rank[x]++;
}
}
return now;
}
T size(ll x, ll t) {
x = root(x, t);
return sizepv[x][UPB(sizepi[x], t) - 1];
}
};
struct wUFT {
public:
ll tsize;
ll mode;
vll par;
vll rank;
vll dweight;
wUFT(ll tsizeget, ll modeget = 0) {
tsize = tsizeget;
mode = modeget;
par.asn(tsize, -1);
if (!mode)
rank.res(tsize, 0);
dweight.asn(tsize, 0);
}
ll root(ll x) {
if (par[x] < 0)
return x;
else {
ll r = root(par[x]);
dweight[x] += dweight[par[x]];
return par[x] = r;
}
}
ll weight(ll x) {
root(x);
return dweight[x];
}
ll diff(ll x, ll y) { return weight(y) - weight(x); }
bool isRoot(ll x) { return x == root(x); }
bool same(ll x, ll y) { return root(x) == root(y); }
void merge(ll x, ll y, ll w) {
w += weight(x);
w -= weight(y);
x = root(x);
y = root(y);
if (x == y)
return;
if (mode) {
par[x] += par[y];
par[y] = x;
} else {
if (rank[x] < rank[y]) {
par[y] += par[x];
par[x] = y;
dweight[x] = -w;
} else {
par[x] += par[y];
par[y] = x;
if (rank[x] == rank[y])
rank[x]++;
dweight[y] = w;
}
}
}
ll size(ll x) { return -par[root(x)]; }
};
template <class T> struct sUFT {
public:
ll tsize;
ll mode;
vll par;
vll rank;
GroupSet(T) Add;
V<T> elm;
sUFT(ll tsize, GroupSet(T) Add = ADD, ll mode = 0)
: tsize(tsize), Add(Add), mode(mode) {
init();
}
void init() {
par.asn(tsize, -1);
if (!mode)
rank.res(tsize, 0);
elm.asn(tsize, Id(Add));
}
ll root(ll x) { return par[x] < 0 ? x : par[x] = root(par[x]); }
bool isRoot(ll x) { return x == root(x); }
bool same(ll x, ll y) { return root(x) == root(y); }
void merge(ll x, ll y) {
x = root(x);
y = root(y);
if (x == y)
return;
if (mode) {
elm[x] = Act(Add)(elm[x], elm[y]);
par[y] = x;
} else {
if (rank[x] < rank[y]) {
elm[y] = Act(Add)(elm[x], elm[y]);
par[x] = y;
} else {
elm[x] = Act(Add)(elm[x], elm[y]);
par[y] = x;
if (rank[x] == rank[y])
rank[x]++;
}
}
}
T size(ll x) { return elm[root(x)]; }
T &operator[](ll x) { return elm[x]; }
};
template <typename valtype> class SegT {
public:
ll size;
vector<valtype> v;
valtype initv;
function<valtype(valtype x, valtype y)> calc;
SegT() {}
SegT(const SegT &segt) {}
SegT(ll sizeget, ll modeget = 0) {
sizeset(sizeget);
modeset(modeget);
init();
}
SegT(vector<valtype> cpyvec, ll modeget = 0) {
sizeset(cpyvec.sz);
modeset(modeget);
init();
copy(cpyvec);
}
SegT(ll sizeget, valtype initvget,
function<valtype(valtype x, valtype y)> calcget) {
sizeset(sizeget);
initv = initvget;
calc = calcget;
init();
}
SegT(vector<valtype> cpyvec, valtype initvget,
function<valtype(valtype x, valtype y)> calcget) {
sizeset(cpyvec.sz);
initv = initvget;
calc = calcget;
init();
copy(cpyvec);
}
void sizeset(ll rsize) {
size = DigN2(rsize);
if (rsize == Pow2(size - 1))
size--;
return;
}
void modeset(ll mode) {
switch (mode) {
case 0:
initv = 0;
calc = [](valtype x, valtype y) { return x + y; };
break;
case 1:
initv = INF;
calc = [](valtype x, valtype y) { return min(x, y); };
break;
case 2:
initv = -INF;
calc = [](valtype x, valtype y) { return max(x, y); };
break;
}
return;
}
void init() { v.asn(Pow2(size + 1) - 1, initv); }
void copy(vector<valtype> cpyvec) {
REP(i, min(cpyvec.sz, Pow2(size))) set(i, cpyvec[i]);
}
ll i2v(ll i) const {
if (i < 0 || i >= Pow2(size))
return -1;
return Pow2(size) + i - 1;
}
ll top(ll i) const {
if (i == 0)
return -1;
return (i - 1) / 2;
}
pl bot(ll i) const {
if (i + 1 >= Pow2(size))
return mp(-1, -1);
return mp(2 * i + 1, 2 * i + 2);
}
void set(ll i, valtype x) {
i = i2v(i);
v[i] = x;
while (i > 0) {
i = top(i);
v[i] = calc(v[bot(i).fi], v[bot(i).se]);
}
return;
}
void add(ll i, valtype x) {
set(i, v[i2v(i)] + x);
return;
}
valtype operator[](const ll &i) const { return v[i2v(i)]; }
// valtype que(ll a = 0, ll b = Pow2(size) - 1) {
valtype que(ll a, ll b) {
if (a == b)
return v[i2v(a)];
if (a > b)
return initv; // swap(a, b);
valtype ans = initv;
ll ai = i2v(a);
ll bi = i2v(b);
FOR(i, 1, size + 1) {
if (a > b)
break;
if (a % Pow2(i)) {
ans = calc(ans, v[ai]);
a += Pow2(i - 1);
ai = top(ai) + 1;
} else {
ai = top(ai);
}
if (a > b)
break;
if ((b + 1) % Pow2(i)) {
ans = calc(ans, v[bi]);
b -= Pow2(i - 1);
bi = top(bi) - 1;
} else {
bi = top(bi);
}
if (a > b)
break;
}
return ans;
}
valtype que(ll b) { return que(0, b); }
valtype que() { return que(0, Pow2(size) - 1); }
};
/*template <class Type> class DP {
public:
vector<Type> v;
Type initv;
vll size, block;
DP() {}
DP(const DP &dp) {}
template<class... Args> DP(Args... args) {
block.asn(1, 1);
Initialize(args...);
}
void Initialize(Type initv_) {
initv = initv_;
v.asn(block.bk, initv);
}
template<class... Args> void Initialize(ll val, Args... args) {
size.pb(val);
block.pb(block.bk*val);
Initialize(args...);
}
};*/
pl Bezout(ll a, ll b) {
if (b != 0) {
pl xy;
xy = Bezout(b, a % b);
return mp(xy.se, xy.fi - ((a / b) * xy.se));
} else {
return mp(1, 0);
}
}
pl Bez(ll a, ll b, ll c) {
pl xy;
ll x, y, z, gc;
xy = Bezout(a, b);
gc = gcd(a, b);
if (c % gc != 0)
return mp(-1, -1);
x = xy.fi * (c / gc);
y = xy.se * (c / gc);
if (x < 0)
z = rup(-x, (b / gc));
if (x >= 0)
z = -x / (b / gc);
x += z * (b / gc);
y -= z * (a / gc);
return mp(x, y);
}
ll DigS10(ll n) {
ll ans = 0;
while (1) {
ans += n % 10;
n /= 10;
if (!n)
break;
}
return ans;
}
ll isP(ll n) {
if (n <= 1)
return 0;
FOR(i, 2, (ll)sqrt(n) + 1) {
if (n % i == 0)
return 0;
}
return 1;
}
ll Tot(ll n) {
if (n <= 0)
return 0;
ll ans = n, x = 2;
while (x * x <= n) {
if (n % x == 0) {
ans -= ans / x;
while (n % x == 0)
n /= x;
}
x++;
}
if (n > 1)
ans -= ans / n;
return ans;
}
template <class T> struct Graph {
public:
ll vSize;
ll eMode;
ll mapMode;
GroupSet(T) Add;
CompareSet(T) Less;
CompareSet(T) Equal;
VV<P<T, ll>> adj;
map<pl, T> len;
Graph(ll vSize, ll eMode = 0, ll mapMode = 0, GroupSet(T) Add = ADD,
CompareSet(T) Less = LES, CompareSet(T) Equal = EQ)
: vSize(vSize), eMode(eMode), mapMode(mapMode), Add(Add), Less(Less),
Equal(Equal) {}
void Init() { adj.asn(vSize, V<P<T, ll>>()); }
void AddE(ll x, ll y, T cost) {
iAddE(x, y, cost);
if (!eMode)
iAddE(y, x, cost);
}
void iAddE(ll x, ll y, T cost) {
adj[x].pb(mp(cost, y));
if (mapMode)
len[mp(x, y)] = cost;
}
P<bool, T> getE(ll x, ll y) {
if (!len.count(mp(x, y)))
return mp(false, Id(Less));
return mp(true, len[mp(x, y)]);
}
V<T> Dijk(ll x) {
V<T> ans(vSize, Id(Less));
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans[now.se] = segt[now.se].fi;
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, mp(Act(Add)(ans[now.se], i.fi), i.se));
continue;
}
if (Act(Less)(Act(Add)(ans[now.se], i.fi), segt[i.se].fi)) {
segt.set(i.se, mp(Act(Add)(ans[now.se], i.fi), i.se));
continue;
}
}
}
return ans;
}
V<P<T, vll>> rDijk(ll x) {
V<P<T, vll>> ans(vSize, mp(Id(Less), vll()));
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans[now.se].fi = segt[now.se].fi;
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, mp(Act(Add)(ans[now.se].fi, i.fi), i.se));
ans[i.se].se = {now.se};
continue;
}
if (Act(Less)(Act(Add)(ans[now.se].fi, i.fi), segt[i.se].fi)) {
segt.set(i.se, mp(Act(Add)(ans[now.se].fi, i.fi), i.se));
ans[i.se].se = {now.se};
continue;
}
if (Act(Equal)(Act(Add)(ans[now.se].fi, i.fi), segt[i.se].fi)) {
ans[i.se].se.pb(now.se);
continue;
}
}
}
return ans;
}
T Prim(ll x = 0) {
T ans = Id(Add);
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans = Act(Add)(ans, segt[now.se].fi);
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, i);
continue;
}
if (Act(Less)(i.fi, segt[i.se].fi)) {
segt.set(i.se, i);
continue;
}
}
}
return ans;
}
P<T, V<P<T, vll>>> rPrim(ll x = 0) {
P<T, V<P<T, vll>>> ans =
mp(Id(Add), V<P<T, vll>>(vSize, mp(Id(Less), vll())));
if (x < 0 || x >= vSize)
return ans;
SegT<P<T, ll>> segt(vSize, mp(Id(Less), -1),
clamr(if (l.se < 0) return r; if (r.se < 0) return l;
return Act(Less)(l.fi, r.fi) ? l : r;));
segt.set(x, mp(Id(Add), x));
P<T, ll> now;
while ((now = segt.que(0, vSize - 1)).se >= 0) {
ans.se[now.se].fi = segt[now.se].fi;
ans.fi = Act(Add)(ans.fi, ans.se[now.se].fi);
segt.set(now.se, mp(Id(Less), -2));
ROR(adj[now.se], i) {
if (segt[i.se].se == -2)
continue;
if (segt[i.se].se == -1) {
segt.set(i.se, i);
ans.se[i.se].se = {now.se};
continue;
}
if (Act(Less)(i.fi, segt[i.se].fi)) {
segt.set(i.se, i);
ans.se[i.se].se = {now.se};
continue;
}
if (Act(Equal)(i.fi, segt[i.se].fi)) {
ans.se[i.se].se.pb(now.se);
continue;
}
}
}
return ans;
}
};
template <class T> struct Sum {
public:
V<T> v, s;
ll size;
GroupSet(T) Add;
Sum(V<T> v, GroupSet(T) Add = ADD) : v(v), size(v.sz), Add(Add) {
Init();
Calc();
}
void Init() { s.asn(size + 1, Id(Add)); }
void Calc() { REP(i, size) s[i + 1] = Act(Add)(s[i], v[i]); }
T operator()(ll x) {
if (x < -1)
x = -1;
if (x > size - 1)
x = size - 1;
return s[x + 1];
}
T operator()(ll l, ll r) {
if (l < 0)
l = 0;
if (r >= size)
r = size - 1;
if (l > r)
return Id(Add);
return InvAct(Add)(s[r + 1], s[l]);
}
};
using sumll = Sum<ll>;
template <class T> struct Sum2 {
public:
VV<T> v, s;
ll RowSize, ColumnSize;
GroupSet(T) Add;
Sum2(VV<T> v, GroupSet(T) Add = ADD)
: v(v), RowSize(v.sz), ColumnSize(v.sz ? v[0].sz : 0), Add(Add) {
Init();
Calc();
}
void Init() { s.asn(RowSize + 1, V<T>(ColumnSize + 1, Id(Add))); }
void Calc() {
REP1(r, RowSize) {
REP1(c, ColumnSize) {
// s[r][c] = InvAct(Add)(Act(Add)(Act(Add)(v[r -
//1][c - 1], operator()(r - 1, c - 2)), operator()(r - 2, c - 1)),
//operator()(r - 2, c - 2));
s[r][c] = Act(Add)(s[r][c - 1], v[r - 1][c - 1]);
}
}
REP1(r, RowSize) {
REP1(c, ColumnSize) { s[r][c] = Act(Add)(s[r - 1][c], s[r][c]); }
}
}
T operator()(ll r, ll c) {
if (r < -1)
r = -1;
if (c < -1)
c = -1;
if (r > RowSize - 1)
r = RowSize - 1;
if (c > ColumnSize - 1)
c = ColumnSize - 1;
return s[r + 1][c + 1];
}
T operator()(ll r1, ll c1, ll r2, ll c2) {
if (r1 < 0)
r1 = 0;
if (c1 < 0)
c1 = 0;
if (r2 >= RowSize)
r2 = RowSize - 1;
if (c2 >= ColumnSize)
c2 = ColumnSize - 1;
if (r1 > r2)
return Id(Add);
if (c1 > c2)
return Id(Add);
return InvAct(Add)(Act(Add)(s[r2 + 1][c2 + 1], s[r1][c1]),
Act(Add)(s[r2 + 1][c1], s[r1][c2 + 1]));
}
};
using sumll2 = Sum2<ll>;
template <class T> struct Point2 {
public:
VV<T> v;
ll h, w;
Point2() : h(0), w(0) {}
Point2(ll h, ll w) : h(h), w(w) { asn(h, w); }
Point2(ll h, ll w, T val) : h(h), w(w) { asn(h, w, val); }
Point2(VV<T> cv) : h(cv.sz), w(cv.sz ? cv[0].sz : 0) {
asn(h, w);
copy(cv);
}
void assign(ll h, ll w) { v.asn(h, V<T>(w)); }
void assign(ll h, ll w, ll val) { v.asn(h, V<T>(w, val)); }
void copy(VV<T> cv) { REP(_h, h) REP(_w, w) v[_h][_w] = cv[_h][_w]; }
T &operator()(ll h, ll w) { return v[h][w]; }
T &operator()(pl p) { return v[p.fi][p.se]; }
T &operator[](pl p) { return v[p.fi][p.se]; }
};
template <class T> using P2 = Point2<T>;
template <ll Mod> struct Modll {
public:
ll v;
Modll() : v(0) {}
Modll(ll _v) { set(_v % Mod + Mod); }
Modll &set(ll _v) {
v = (_v < Mod) ? _v : (_v - Mod);
return *this;
}
Modll pow(ll n) const {
Modll x = *this, ans = 1;
while (n) {
if (n & 1)
ans *= x;
x *= x;
n >>= 1;
}
return ans;
}
Modll inverse() const { return (*this).pow(Mod - 2); }
Modll operator+(const Modll &m) const { return Modll().set(v + m.v); }
Modll operator-(const Modll &m) const { return Modll().set(Mod + v - m.v); }
Modll operator*(const Modll &m) const {
return Modll().set((ull(v) * m.v) % Mod);
}
Modll operator/(const Modll &m) const { return *this * m.inv; }
Modll &operator+=(const Modll &m) { return *this = *this + m; }
Modll &operator-=(const Modll &m) { return *this = *this - m; }
Modll &operator*=(const Modll &m) { return *this = *this * m; }
Modll &operator/=(const Modll &m) { return *this = *this / m; }
Modll operator-() const { return Modll(0) - *this; }
explicit operator bool() const { return v != 0; }
friend istream &operator>>(istream &in, Modll &m) { return in >> m.v; }
friend ostream &operator<<(ostream &out, const Modll &m) {
return out << m.v;
}
};
using mll = Modll<MOD>;
using vmll = V<mll>;
using vvmll = V<vmll>;
using vvvmll = V<vvmll>;
vmll MFactMemo(2, 1);
vmll MIFactMemo(2, 1);
mll mFact(ll n) {
if (MFactMemo.sz <= n) {
ll oldsize = MFactMemo.sz;
MFactMemo.res(n + 1, 1);
FOR(i, oldsize, n) MFactMemo[i] = MFactMemo[i - 1] * i;
}
return MFactMemo[n];
}
mll miFact(ll n) {
if (MIFactMemo.sz <= n) {
ll oldsize = MIFactMemo.sz;
MIFactMemo.res(n + 1, 1);
MIFactMemo.bk = mFact(n).inv;
rFOR(i, oldsize + 1, n) MIFactMemo[i - 1] = MIFactMemo[i] * i;
}
return MIFactMemo[n];
}
mll mComb(ll n, ll k) {
if (n < 0 || k < 0 || n < k)
return 0;
return mFact(n) * miFact(k) * miFact(n - k);
}
ll LIS(vll v, ll m = 0) {
if (v.sz > 0) {
ll ans = 0;
vll dp(v.sz, INF);
FOR(i, 0, v.sz - 1) { dp[m ? UPB(dp, v[i]) : LOWB(dp, v[i])] = v[i]; }
FOR(i, 0, v.sz - 1) {
if (dp[i] == INF)
break;
ans++;
}
return ans;
} else {
return 0;
}
}
ll Bsrch(function<bool(ll x)> f, ll mi, ll ma) {
ll ng = mi - 1, ok = ma, mid;
while (ok - ng > 1) {
mid = (ng + ok) / 2;
(f(mid) ? ok : ng) = mid;
}
return ok;
}
template <class T, class M = decltype(MUL), class S = decltype(ADD)>
VV<T> MultiMatrix(VV<T> A, VV<T> B, M Mul = MUL, S Add = ADD) {
VV<T> ans;
ll ii = A.sz;
if (!ii)
return ans;
ll jj = A[0].sz;
if (!jj)
return ans;
ll jj2 = B.sz;
if (!jj2)
return ans;
if (jj != jj2)
return ans;
ll kk = B[0].sz;
if (!kk)
return ans;
ans.asn(ii, V<T>(kk, 0));
REP(i, ii) {
REP(k, kk) {
REP(j, jj) {
ans[i][k] = Act(Add)(ans[i][k], Act(Mul)(A[i][j], B[j][k]));
}
}
}
return ans;
}
vvll CombMemo(1000, vll(1000, -1));
ll Comb(ll n, ll k) {
if ((n < 0) || (k < 0))
return 0;
if (CombMemo[n][k] == -1) {
if (n < k)
CombMemo[n][k] = 0;
else {
if (n == 0)
CombMemo[n][k] = 1;
else if (k == 0)
CombMemo[n][k] = 1;
else if (n == k)
CombMemo[n][k] = 1;
else
CombMemo[n][k] = Comb(n - 1, k - 1) + Comb(n - 1, k);
}
}
return CombMemo[n][k];
}
template <class T> map<T, ll> Dict(V<T> v) {
map<T, ll> m;
if (!v.sz)
return m;
SORT(v);
UNIQUE(v);
REP(i, v.sz) { m[v[i]] = i; }
return m;
}
template <class T> vll Cmprs(V<T> v) {
auto m = Dict(v);
vll ans(v.sz);
REP(i, v.sz) { ans[i] = m[v[i]]; }
return ans;
}
template <class T> vll PCmprs(V<T> v) {
if (v.sz == 0)
return V<T>();
vll tmp(v.sz);
vll ans(v.sz);
IOTA(tmp, 0);
IOTA(ans, 0);
sort(tmp.bgn, tmp.en, clam(v[l] < v[r]));
sort(ans.bgn, ans.en, clam(tmp[l] < tmp[r]));
return ans;
}
ll BblCnt(vll rv) {
vll v = PCmprs(rv);
SegT<ll> b(v.sz, 0);
ll ans = 0;
REP(i, v.sz) {
ans += (i - b.que(0, v[i]));
b.add(v[i], 1);
}
return ans;
}
pl NGrid(pl p, ll i, ll H, ll W) {
p = mp(p.fi + DX[i], p.se + DY[i]);
if (p.fi < 0 || p.fi >= H || p.se < 0 || p.se >= W)
return mp(INF, INF);
return p;
}
vvll llGrid(vs v) {
vvll r(v.sz, vll(v.sz ? v[0].sz : 0, 0));
REP(h, v.sz) REP(w, v.sz ? v[0].sz : 0) r[h][w] = (v[h][w] == '#');
return r;
}
template <class T> auto ven(T val) { return val; }
template <> auto ven<int>(int val) { return (ll)val; }
template <class T, class... Args> auto ven(T val, Args... args) {
auto tmp = ven(args...);
return V<decltype(tmp)>(val, tmp);
}
template <class T> void zind(T &v) { v--; }
template <class T> void zind(V<T> &v) { ROR(v, i) zind(i); }
template <class T, class... Args> void zind(T &v, Args &...args) {
zind(v);
zind(args...);
}
void Solve();
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << setprecision(20) << fixed;
Solve();
}
void Solve() {
li(a, b, c);
sal(min(b / a, c));
} | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 913,145 | 913,146 | u211681714 | cpp |
p03105 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(b / a, c) << endl;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,147 | 913,148 | u741134767 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a, b, c;
std::cin >> a >> b >> c;
if (b / a > c) {
std::cout << c << std::endl;
} else {
std::cout << a / b << std::endl;
}
// ここにプログラムを追記
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a, b, c;
std::cin >> a >> b >> c;
if (b / a > c) {
std::cout << c << std::endl;
} else {
std::cout << b / a << std::endl;
}
// ここにプログラムを追記
} | [
"expression.operation.binary.remove"
] | 913,149 | 913,150 | u801884816 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
struct Fast {
Fast() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
}
} fast;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c) {
cout << a / b << endl;
} else {
cout << c << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
struct Fast {
Fast() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
}
} fast;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c) {
cout << b / a << endl;
} else {
cout << c << endl;
}
} | [
"expression.operation.binary.remove"
] | 913,182 | 913,183 | u687204015 | cpp |
p03105 | #include <iostream>
#include <string>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (B / A <= C) {
cout << B / A * C;
} else if (B / A > C) {
cout << C;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (B / A < C) {
cout << B / A;
} else if (B / A >= C) {
cout << C;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 913,192 | 913,193 | u077051605 | cpp |
p03105 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c;
d = b / a;
if (d >= 4)
cout << 4 << endl;
else
cout << d << endl;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c;
d = b / a;
if (d >= c)
cout << c << endl;
else
cout << d << endl;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"io.output.change"
] | 913,194 | 913,195 | u661461084 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(b / a, c);
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c);
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,200 | 913,201 | u340494803 | cpp |
p03105 | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define fin(ans) cout << (ans) << endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int, int>>
#define vvi vector<vector<int>>
#define vvc vector<vector<char>>
#define vvs vector<vector<string>>
#define P 1000000007
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long LLINF = 1LL << 60;
// set<int>::iterator it;
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
//////////////////////////////////////////////////////
int a, b, c, t;
cin >> a >> b >> c;
t == b / a;
if (t <= c) {
cout << t << endl;
} else {
cout << c << endl;
}
//////////////////////////////////////////////////////
return 0;
} | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define fin(ans) cout << (ans) << endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int, int>>
#define vvi vector<vector<int>>
#define vvc vector<vector<char>>
#define vvs vector<vector<string>>
#define P 1000000007
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long LLINF = 1LL << 60;
// set<int>::iterator it;
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
//////////////////////////////////////////////////////
int a, b, c, t;
cin >> a >> b >> c;
t = b / a;
if (t <= c) {
cout << t << endl;
} else {
cout << c << endl;
}
//////////////////////////////////////////////////////
return 0;
} | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 913,202 | 913,203 | u961198482 | cpp |
p03105 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int D, E;
D = B / A;
if (D <= C) {
cout << C << endl;
} else if (C < D) {
cout << C << endl;
}
system("pause");
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int D;
D = B / A;
if (D <= C) {
cout << D << endl;
} else if (C < D) {
cout << C << endl;
}
system("pause");
return 0;
} | [
"variable_declaration.remove",
"identifier.change",
"io.output.change"
] | 913,211 | 913,212 | u705644950 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (B / A > C) {
cout << C << endl;
} else if (B / A < C) {
cout << B / A << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (B / A >= C) {
cout << C << endl;
} else if (B / A < C) {
cout << B / A << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 913,213 | 913,214 | u190066528 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A * C >= B) {
cout << C << endl;
} else {
cout << B / A << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A * C <= B) {
cout << C << endl;
} else {
cout << B / A << endl;
}
return 0;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 913,215 | 913,216 | u904123392 | cpp |
p03105 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#ifdef ONLINE_JUDGE
#define LLD "%I64d"
#else
#define LLD "%lld"
#endif
#define fu(a, b, c) for (int a = b; a <= (int)c; ++a)
#define fd(a, b, c) for (int a = b; a >= (int)c; --a)
#define cu(a, b, c) for (int a = b; a < (int)c; ++a)
#define cd(a, b, c) for (int a = (b)-1; a >= (int)c; --a)
#define gcd(a, b) __gcd(a, b)
#define pii pair<int, int>
#define pll pair<long long, long long>
#define all(a) a.begin(), a.end()
#define F first
#define S second
#define pb push_back
#define pf push_front
#define MOD 1000000007
#define MAXN 52
#define MAXH 20
#define MAXM 52
#define INF 100000000
#define ll long long
#define ull unsigned long long
#define RNG rng mt19937(time(NULL))
#define udist(a, b) uniform_int_distribution<uint32_t> distribution(a, b)
#define max3(a, b, c) max(a, max(b, c))
#define min3(a, b, c) min(a, min(b, c))
#define gmax(a, b) a = max(a, b)
#define gmin(a, b) a = min(a, b)
#define whatis(x) cerr << #x << " is " << x << endl;
#define fast_io() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define PI 3.1415926535897932384626433
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(c, a / b) << endl;
}
| #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#ifdef ONLINE_JUDGE
#define LLD "%I64d"
#else
#define LLD "%lld"
#endif
#define fu(a, b, c) for (int a = b; a <= (int)c; ++a)
#define fd(a, b, c) for (int a = b; a >= (int)c; --a)
#define cu(a, b, c) for (int a = b; a < (int)c; ++a)
#define cd(a, b, c) for (int a = (b)-1; a >= (int)c; --a)
#define gcd(a, b) __gcd(a, b)
#define pii pair<int, int>
#define pll pair<long long, long long>
#define all(a) a.begin(), a.end()
#define F first
#define S second
#define pb push_back
#define pf push_front
#define MOD 1000000007
#define MAXN 52
#define MAXH 20
#define MAXM 52
#define INF 100000000
#define ll long long
#define ull unsigned long long
#define RNG rng mt19937(time(NULL))
#define udist(a, b) uniform_int_distribution<uint32_t> distribution(a, b)
#define max3(a, b, c) max(a, max(b, c))
#define min3(a, b, c) min(a, min(b, c))
#define gmax(a, b) a = max(a, b)
#define gmin(a, b) a = min(a, b)
#define whatis(x) cerr << #x << " is " << x << endl;
#define fast_io() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define PI 3.1415926535897932384626433
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a) << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change",
"expression.operation.binary.remove"
] | 913,232 | 913,233 | u730731139 | cpp |
p03105 | #include <algorithm>
#include <cstring>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
bool temp;
long long arr[(int)1e3 + 1];
void swap(long long &x, long long &y) {
int temp;
temp = x;
x = y;
y = temp;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// long long x,y,min,min2;
// min = 1000000000000;
// min2 = 1000000000000;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// if(y < min){
// min = y;
// }else if(y < min2){
// min2 = y;
// }
// }
// cout << min2 << endl;
// long long ar[1000000000];
// for(int i = 0; i < 1005; i++){
// ar[i] = 0;
// }
// long long x;
// cin >> x;
// for(int i = 0;i < x; i++){
// long long y; cin >> y;
// ar[y]++;
// }
// int modus = 0;
// int max = 0;
// for(int i = 1; i <= 10000000000; i++){
// if(max <= ar[i]){
// max = ar[i];
// modus = i;
// }
// }
// cout << modus << endl;
// long long x,y,z;
// long long min = 10000000;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// ar[i] = y;
// }
// for(int i = x-1; i>=0 ; i--){
// if(ar[i] < min){
// min = ar[i];
// z = z + ar[i];
// }else if (ar[i] > min){
// min = ar[i];
// z = z + min;
//
// }
//
// }
// cout << z << endl;
// long long x,y,z;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x-1;i++){
// cin >> y;
// }
// for(int i = 1; i <= x-1;i++){
// ar[i] = i;
// if(ar[i] != ar[y]){
// z = ar[i];
// }
// }
// cout << z << endl;
// int calc(int x){
// int d = 0;
// while(x > 0){
// d += x % 10;
// x /= 10;
// }
// return d;
//}
//
// int main() {
// int a,b,c,d;
// while(cin >> a){
// if(a == 0){
// return 0;
// }
// while(a >= 10){
// a = calc(a);
// }
// cout << a << endl;
// }
//}
// long long a,b,c,d,e,f,g,min;
// bool temp;
// temp = true;
// min = 1000000000;
// while(cin >> a >> b >> c >> d){
//
// for(int i = 1; i <= c; i++){
// cin >> e;
// for(int j = 1; j <= d; j++){
// cin >> f;
// if(a <= f && b >= a * e){
// if(min > a * e){
// min = a * e;
// temp = true;
// }
// }
// else{
// temp = false;
// }
// }
// }
// if(temp == true){
// cout << min << endl;
// }
// else{
// cout << "stay home" << endl;
// }
// }
//
// int h,d,cnt;
// double f,tmp,x,u;
// bool haha;
// tmp = 0;
// haha = false;
// cnt = 0;
// while(cin >> h >> u >> d >> f){
// if(h == 0){
// return 0;
// }
//
// x = f/100 * u;
// for(int i = 1;i <= 100000; i++){
// if(i == 1){
// tmp += u;
// cnt++;
// }else if(i > 1){
// u -= x;
// if(u >= 0)tmp += u;
// cnt++;
// }
//
// if(tmp > h){
// haha = true;
// break;
// }
//
// tmp -= d;
//
// if(tmp < 0){
// break;
// }
//
// }
//
// if(haha == true){
// cout << "success on day " << cnt << endl;
// }else{
// cout << "failure on day " << cnt << endl;
// }
//
// haha = false;
// cnt = 0;
// tmp = 0;
// }
// int x,y,z,a;
// a = 0;
// bool temp;
// temp = true;
// string w;
// while(cin >> w){
// a++;
// cout << "Case " << a << ":" << endl;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y >> z;
// if(z > y){
// for(int j = y; j < z; j++){
// if(w[j] != w[j + 1]){
// temp = false;
// break;
// }
// }
// }else{
// for(int k = z; k < y; k++){
// if(w[k] != w[k + 1]){
// temp = false;
// break;
// }
// }
// }
// if(temp == true){
// cout << "Yes" << endl;
// }else{
// cout << "No" << endl;
// }
// temp = true;
// }
// }
// int price[256];
//
// int main(){
// int n,k,x;
// double cnt, m;
// cnt = 0;
// string z;
// char a;
// cin >> n;
// for(int o = 1; o <= n; o++){
// cin >> k;
// for(int j = 1; j <= k;j++){
// cin >> a >> m;
// price[a] = m;
// }
// cin >> x; cin.ignore();
//
// for(int i = 1; i <= x ;i++){
// getline(cin,z);
//
// for(int j = 0; j < z.length(); j++){
// cnt += price[z[j]];
// }
// }
// cnt = cnt / 100;
//
// cout << fixed << setprecision(2) << cnt << "$" << endl;
// cnt = 0;
// for(int a = 0;a < 256; a++){
// price[a] = 0;
// }
// }
//
//
// int x,r,s;
// // Big O Notation
//
// // Kompleksitas = O(N^3)
//
// // O(x * MAXS * r) cari jawaban
// cin >> x;
// for(int i = 1;i <= x;i++){
// int min = 1e9;
// cin >> r;
// for(int k = 1; k <= r;k++){
// cin >> s;
// ar[k] = s;
// }
//
// for(int j =1; j <= 30000; j++){
// // Ini kan berarti rumah vito sekarang di j
// // Harus cari tau dari j ke rumah 1, 2, 3, ... ,r
// // jaraknya masing-masing berapa terus ditotal
//
// int sumDist = 0; // Buat nyimpen total jarak ke semua rumah
//
// for(int k = 1; k <= r; ++k){ // Cek ke semua tetangga2nya
// sumDist += abs(j - ar[k]);
// // Tambahin jarak dari rumah sekarang ke tetangga ke-k
// }
//
// if(min > sumDist){
// min = sumDist;
// }
// }
//
// cout << min << endl;
// }
// string x;
// cin >> x;
// for(int i = 0; i <= x.length() - 1; ++i){
// x[i] = tolower(x[i]);
// if(x[i] == 'a' || x[i] == 'o' ||x[i] == 'y'||x[i] == 'e'||x[i] ==
// 'u'||x[i] == 'i'){
// continue;
// }else{
// cout << "." << x[i];
// }
// }
// cout << endl;
//}
// int a,cnt;
// cnt = 0;
// for(int i = 0;i < 4; i++){
// cin >> a;
// ar[i] = a;
// }
// for(int i = 0; i < 4; i++){
// if(ar[i] == ar[i+1]|| ar[i] == ar[i+2] || ar[i] == ar[i+3]){
// cnt++;
// }
// }
// cout << cnt << endl;
//
// long long x,y,temp,cnt;
// bool idk;
// idk = true;
// cin >> x;
// cin >> y;
// temp = y;
// for(int i = 2; i <= x; i++){
// cin >> y;
// if(temp == y){
// idk = false;
// break;
// }else if(temp > y){
// temp = y;
// cnt = i;
// }
// }
// if(idk == true){
// cout << cnt << endl;
// }else{
// cout << "Still Rodzilla" << endl;
// }
// int x,y;
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = 1;
// }
// }
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// cin >> x;
// arr[i][j] += x;
// arr[i+1][j] += x;
// arr[i-1][j] += x;
// arr[i][j+1] += x;
// arr[i][j-1] += x;
// }
// }
// for(int i = 1; i <= 3;i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = arr[i][j] % 2;
// cout << arr[i][j];
// }
// cout << endl;
// }
// floodfill
// const int N = 100;
// char grid[N + 5][N + 5];
// bool vis[N + 5][N + 5];
// int dx[4] = {0, 1, 0, -1};
// int dy[4] = {1, 0, -1, 0};
// int n, m;
//
// bool inRange(int x, int y){
// return x >= 0 && y >= 0 && x < n && y < m;
//}
//
// void floodfill(int x, int y){
// if(vis[x][y])return; // udah pernah dibanjirin
// vis[x][y] = true;
//
// for(int i = 0; i < 4; ++i){
// int nx = x + dx[i];
// int ny = y + dy[i];
// if(inRange(nx, ny) && grid[nx][ny] == '.')
// floodfill(nx, ny);
// }
//
//}
//
// int main() {
// ios::sync_with_stdio(false);
// cin.tie(0); cout.tie(0);
// cin >> n >> m;
//
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// cin >> grid[i][j];
// }
// }
//
// int ans = 0;
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// if(grid[i][j] == '#')continue;
// if(vis[i][j])continue;
//
// floodfill(i, j);
//
// ans++;
// }
// }
//
// cout << ans << endl;
//
//}
// int x,y;
// cin >> x;
// for(int i = 0; i < x; i++){
// cin >> y;
// arr[i] = y;
// }
// for(int i = 0; i < x - 1; i++){
// for(int j = 0; i < x-j-1; j++){
// if(arr[j] > arr[j+1]){
// swap(arr[j],arr[j+1]);
// temp = true;
// }
// }
// if(temp == false){
// break;
// }
// }
// for(int i = 0; i < x; i++){
// cout << arr[i] << endl;
// }
// }
int a, b, c, cnt;
cin >> a >> b >> c;
if (b / a > c) {
cout << c << endl;
} else {
cout << c << endl;
}
}
| #include <algorithm>
#include <cstring>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
bool temp;
long long arr[(int)1e3 + 1];
void swap(long long &x, long long &y) {
int temp;
temp = x;
x = y;
y = temp;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// long long x,y,min,min2;
// min = 1000000000000;
// min2 = 1000000000000;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// if(y < min){
// min = y;
// }else if(y < min2){
// min2 = y;
// }
// }
// cout << min2 << endl;
// long long ar[1000000000];
// for(int i = 0; i < 1005; i++){
// ar[i] = 0;
// }
// long long x;
// cin >> x;
// for(int i = 0;i < x; i++){
// long long y; cin >> y;
// ar[y]++;
// }
// int modus = 0;
// int max = 0;
// for(int i = 1; i <= 10000000000; i++){
// if(max <= ar[i]){
// max = ar[i];
// modus = i;
// }
// }
// cout << modus << endl;
// long long x,y,z;
// long long min = 10000000;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// ar[i] = y;
// }
// for(int i = x-1; i>=0 ; i--){
// if(ar[i] < min){
// min = ar[i];
// z = z + ar[i];
// }else if (ar[i] > min){
// min = ar[i];
// z = z + min;
//
// }
//
// }
// cout << z << endl;
// long long x,y,z;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x-1;i++){
// cin >> y;
// }
// for(int i = 1; i <= x-1;i++){
// ar[i] = i;
// if(ar[i] != ar[y]){
// z = ar[i];
// }
// }
// cout << z << endl;
// int calc(int x){
// int d = 0;
// while(x > 0){
// d += x % 10;
// x /= 10;
// }
// return d;
//}
//
// int main() {
// int a,b,c,d;
// while(cin >> a){
// if(a == 0){
// return 0;
// }
// while(a >= 10){
// a = calc(a);
// }
// cout << a << endl;
// }
//}
// long long a,b,c,d,e,f,g,min;
// bool temp;
// temp = true;
// min = 1000000000;
// while(cin >> a >> b >> c >> d){
//
// for(int i = 1; i <= c; i++){
// cin >> e;
// for(int j = 1; j <= d; j++){
// cin >> f;
// if(a <= f && b >= a * e){
// if(min > a * e){
// min = a * e;
// temp = true;
// }
// }
// else{
// temp = false;
// }
// }
// }
// if(temp == true){
// cout << min << endl;
// }
// else{
// cout << "stay home" << endl;
// }
// }
//
// int h,d,cnt;
// double f,tmp,x,u;
// bool haha;
// tmp = 0;
// haha = false;
// cnt = 0;
// while(cin >> h >> u >> d >> f){
// if(h == 0){
// return 0;
// }
//
// x = f/100 * u;
// for(int i = 1;i <= 100000; i++){
// if(i == 1){
// tmp += u;
// cnt++;
// }else if(i > 1){
// u -= x;
// if(u >= 0)tmp += u;
// cnt++;
// }
//
// if(tmp > h){
// haha = true;
// break;
// }
//
// tmp -= d;
//
// if(tmp < 0){
// break;
// }
//
// }
//
// if(haha == true){
// cout << "success on day " << cnt << endl;
// }else{
// cout << "failure on day " << cnt << endl;
// }
//
// haha = false;
// cnt = 0;
// tmp = 0;
// }
// int x,y,z,a;
// a = 0;
// bool temp;
// temp = true;
// string w;
// while(cin >> w){
// a++;
// cout << "Case " << a << ":" << endl;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y >> z;
// if(z > y){
// for(int j = y; j < z; j++){
// if(w[j] != w[j + 1]){
// temp = false;
// break;
// }
// }
// }else{
// for(int k = z; k < y; k++){
// if(w[k] != w[k + 1]){
// temp = false;
// break;
// }
// }
// }
// if(temp == true){
// cout << "Yes" << endl;
// }else{
// cout << "No" << endl;
// }
// temp = true;
// }
// }
// int price[256];
//
// int main(){
// int n,k,x;
// double cnt, m;
// cnt = 0;
// string z;
// char a;
// cin >> n;
// for(int o = 1; o <= n; o++){
// cin >> k;
// for(int j = 1; j <= k;j++){
// cin >> a >> m;
// price[a] = m;
// }
// cin >> x; cin.ignore();
//
// for(int i = 1; i <= x ;i++){
// getline(cin,z);
//
// for(int j = 0; j < z.length(); j++){
// cnt += price[z[j]];
// }
// }
// cnt = cnt / 100;
//
// cout << fixed << setprecision(2) << cnt << "$" << endl;
// cnt = 0;
// for(int a = 0;a < 256; a++){
// price[a] = 0;
// }
// }
//
//
// int x,r,s;
// // Big O Notation
//
// // Kompleksitas = O(N^3)
//
// // O(x * MAXS * r) cari jawaban
// cin >> x;
// for(int i = 1;i <= x;i++){
// int min = 1e9;
// cin >> r;
// for(int k = 1; k <= r;k++){
// cin >> s;
// ar[k] = s;
// }
//
// for(int j =1; j <= 30000; j++){
// // Ini kan berarti rumah vito sekarang di j
// // Harus cari tau dari j ke rumah 1, 2, 3, ... ,r
// // jaraknya masing-masing berapa terus ditotal
//
// int sumDist = 0; // Buat nyimpen total jarak ke semua rumah
//
// for(int k = 1; k <= r; ++k){ // Cek ke semua tetangga2nya
// sumDist += abs(j - ar[k]);
// // Tambahin jarak dari rumah sekarang ke tetangga ke-k
// }
//
// if(min > sumDist){
// min = sumDist;
// }
// }
//
// cout << min << endl;
// }
// string x;
// cin >> x;
// for(int i = 0; i <= x.length() - 1; ++i){
// x[i] = tolower(x[i]);
// if(x[i] == 'a' || x[i] == 'o' ||x[i] == 'y'||x[i] == 'e'||x[i] ==
// 'u'||x[i] == 'i'){
// continue;
// }else{
// cout << "." << x[i];
// }
// }
// cout << endl;
//}
// int a,cnt;
// cnt = 0;
// for(int i = 0;i < 4; i++){
// cin >> a;
// ar[i] = a;
// }
// for(int i = 0; i < 4; i++){
// if(ar[i] == ar[i+1]|| ar[i] == ar[i+2] || ar[i] == ar[i+3]){
// cnt++;
// }
// }
// cout << cnt << endl;
//
// long long x,y,temp,cnt;
// bool idk;
// idk = true;
// cin >> x;
// cin >> y;
// temp = y;
// for(int i = 2; i <= x; i++){
// cin >> y;
// if(temp == y){
// idk = false;
// break;
// }else if(temp > y){
// temp = y;
// cnt = i;
// }
// }
// if(idk == true){
// cout << cnt << endl;
// }else{
// cout << "Still Rodzilla" << endl;
// }
// int x,y;
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = 1;
// }
// }
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// cin >> x;
// arr[i][j] += x;
// arr[i+1][j] += x;
// arr[i-1][j] += x;
// arr[i][j+1] += x;
// arr[i][j-1] += x;
// }
// }
// for(int i = 1; i <= 3;i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = arr[i][j] % 2;
// cout << arr[i][j];
// }
// cout << endl;
// }
// floodfill
// const int N = 100;
// char grid[N + 5][N + 5];
// bool vis[N + 5][N + 5];
// int dx[4] = {0, 1, 0, -1};
// int dy[4] = {1, 0, -1, 0};
// int n, m;
//
// bool inRange(int x, int y){
// return x >= 0 && y >= 0 && x < n && y < m;
//}
//
// void floodfill(int x, int y){
// if(vis[x][y])return; // udah pernah dibanjirin
// vis[x][y] = true;
//
// for(int i = 0; i < 4; ++i){
// int nx = x + dx[i];
// int ny = y + dy[i];
// if(inRange(nx, ny) && grid[nx][ny] == '.')
// floodfill(nx, ny);
// }
//
//}
//
// int main() {
// ios::sync_with_stdio(false);
// cin.tie(0); cout.tie(0);
// cin >> n >> m;
//
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// cin >> grid[i][j];
// }
// }
//
// int ans = 0;
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// if(grid[i][j] == '#')continue;
// if(vis[i][j])continue;
//
// floodfill(i, j);
//
// ans++;
// }
// }
//
// cout << ans << endl;
//
//}
// int x,y;
// cin >> x;
// for(int i = 0; i < x; i++){
// cin >> y;
// arr[i] = y;
// }
// for(int i = 0; i < x - 1; i++){
// for(int j = 0; i < x-j-1; j++){
// if(arr[j] > arr[j+1]){
// swap(arr[j],arr[j+1]);
// temp = true;
// }
// }
// if(temp == false){
// break;
// }
// }
// for(int i = 0; i < x; i++){
// cout << arr[i] << endl;
// }
// }
int a, b, c, cnt;
cin >> a >> b >> c;
if (b / a > c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
}
| [
"identifier.change",
"io.output.change"
] | 913,236 | 913,237 | u809799005 | cpp |
p03105 | #include <algorithm>
#include <cstring>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
bool temp;
long long arr[(int)1e3 + 1];
void swap(long long &x, long long &y) {
int temp;
temp = x;
x = y;
y = temp;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// long long x,y,min,min2;
// min = 1000000000000;
// min2 = 1000000000000;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// if(y < min){
// min = y;
// }else if(y < min2){
// min2 = y;
// }
// }
// cout << min2 << endl;
// long long ar[1000000000];
// for(int i = 0; i < 1005; i++){
// ar[i] = 0;
// }
// long long x;
// cin >> x;
// for(int i = 0;i < x; i++){
// long long y; cin >> y;
// ar[y]++;
// }
// int modus = 0;
// int max = 0;
// for(int i = 1; i <= 10000000000; i++){
// if(max <= ar[i]){
// max = ar[i];
// modus = i;
// }
// }
// cout << modus << endl;
// long long x,y,z;
// long long min = 10000000;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// ar[i] = y;
// }
// for(int i = x-1; i>=0 ; i--){
// if(ar[i] < min){
// min = ar[i];
// z = z + ar[i];
// }else if (ar[i] > min){
// min = ar[i];
// z = z + min;
//
// }
//
// }
// cout << z << endl;
// long long x,y,z;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x-1;i++){
// cin >> y;
// }
// for(int i = 1; i <= x-1;i++){
// ar[i] = i;
// if(ar[i] != ar[y]){
// z = ar[i];
// }
// }
// cout << z << endl;
// int calc(int x){
// int d = 0;
// while(x > 0){
// d += x % 10;
// x /= 10;
// }
// return d;
//}
//
// int main() {
// int a,b,c,d;
// while(cin >> a){
// if(a == 0){
// return 0;
// }
// while(a >= 10){
// a = calc(a);
// }
// cout << a << endl;
// }
//}
// long long a,b,c,d,e,f,g,min;
// bool temp;
// temp = true;
// min = 1000000000;
// while(cin >> a >> b >> c >> d){
//
// for(int i = 1; i <= c; i++){
// cin >> e;
// for(int j = 1; j <= d; j++){
// cin >> f;
// if(a <= f && b >= a * e){
// if(min > a * e){
// min = a * e;
// temp = true;
// }
// }
// else{
// temp = false;
// }
// }
// }
// if(temp == true){
// cout << min << endl;
// }
// else{
// cout << "stay home" << endl;
// }
// }
//
// int h,d,cnt;
// double f,tmp,x,u;
// bool haha;
// tmp = 0;
// haha = false;
// cnt = 0;
// while(cin >> h >> u >> d >> f){
// if(h == 0){
// return 0;
// }
//
// x = f/100 * u;
// for(int i = 1;i <= 100000; i++){
// if(i == 1){
// tmp += u;
// cnt++;
// }else if(i > 1){
// u -= x;
// if(u >= 0)tmp += u;
// cnt++;
// }
//
// if(tmp > h){
// haha = true;
// break;
// }
//
// tmp -= d;
//
// if(tmp < 0){
// break;
// }
//
// }
//
// if(haha == true){
// cout << "success on day " << cnt << endl;
// }else{
// cout << "failure on day " << cnt << endl;
// }
//
// haha = false;
// cnt = 0;
// tmp = 0;
// }
// int x,y,z,a;
// a = 0;
// bool temp;
// temp = true;
// string w;
// while(cin >> w){
// a++;
// cout << "Case " << a << ":" << endl;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y >> z;
// if(z > y){
// for(int j = y; j < z; j++){
// if(w[j] != w[j + 1]){
// temp = false;
// break;
// }
// }
// }else{
// for(int k = z; k < y; k++){
// if(w[k] != w[k + 1]){
// temp = false;
// break;
// }
// }
// }
// if(temp == true){
// cout << "Yes" << endl;
// }else{
// cout << "No" << endl;
// }
// temp = true;
// }
// }
// int price[256];
//
// int main(){
// int n,k,x;
// double cnt, m;
// cnt = 0;
// string z;
// char a;
// cin >> n;
// for(int o = 1; o <= n; o++){
// cin >> k;
// for(int j = 1; j <= k;j++){
// cin >> a >> m;
// price[a] = m;
// }
// cin >> x; cin.ignore();
//
// for(int i = 1; i <= x ;i++){
// getline(cin,z);
//
// for(int j = 0; j < z.length(); j++){
// cnt += price[z[j]];
// }
// }
// cnt = cnt / 100;
//
// cout << fixed << setprecision(2) << cnt << "$" << endl;
// cnt = 0;
// for(int a = 0;a < 256; a++){
// price[a] = 0;
// }
// }
//
//
// int x,r,s;
// // Big O Notation
//
// // Kompleksitas = O(N^3)
//
// // O(x * MAXS * r) cari jawaban
// cin >> x;
// for(int i = 1;i <= x;i++){
// int min = 1e9;
// cin >> r;
// for(int k = 1; k <= r;k++){
// cin >> s;
// ar[k] = s;
// }
//
// for(int j =1; j <= 30000; j++){
// // Ini kan berarti rumah vito sekarang di j
// // Harus cari tau dari j ke rumah 1, 2, 3, ... ,r
// // jaraknya masing-masing berapa terus ditotal
//
// int sumDist = 0; // Buat nyimpen total jarak ke semua rumah
//
// for(int k = 1; k <= r; ++k){ // Cek ke semua tetangga2nya
// sumDist += abs(j - ar[k]);
// // Tambahin jarak dari rumah sekarang ke tetangga ke-k
// }
//
// if(min > sumDist){
// min = sumDist;
// }
// }
//
// cout << min << endl;
// }
// string x;
// cin >> x;
// for(int i = 0; i <= x.length() - 1; ++i){
// x[i] = tolower(x[i]);
// if(x[i] == 'a' || x[i] == 'o' ||x[i] == 'y'||x[i] == 'e'||x[i] ==
// 'u'||x[i] == 'i'){
// continue;
// }else{
// cout << "." << x[i];
// }
// }
// cout << endl;
//}
// int a,cnt;
// cnt = 0;
// for(int i = 0;i < 4; i++){
// cin >> a;
// ar[i] = a;
// }
// for(int i = 0; i < 4; i++){
// if(ar[i] == ar[i+1]|| ar[i] == ar[i+2] || ar[i] == ar[i+3]){
// cnt++;
// }
// }
// cout << cnt << endl;
//
// long long x,y,temp,cnt;
// bool idk;
// idk = true;
// cin >> x;
// cin >> y;
// temp = y;
// for(int i = 2; i <= x; i++){
// cin >> y;
// if(temp == y){
// idk = false;
// break;
// }else if(temp > y){
// temp = y;
// cnt = i;
// }
// }
// if(idk == true){
// cout << cnt << endl;
// }else{
// cout << "Still Rodzilla" << endl;
// }
// int x,y;
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = 1;
// }
// }
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// cin >> x;
// arr[i][j] += x;
// arr[i+1][j] += x;
// arr[i-1][j] += x;
// arr[i][j+1] += x;
// arr[i][j-1] += x;
// }
// }
// for(int i = 1; i <= 3;i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = arr[i][j] % 2;
// cout << arr[i][j];
// }
// cout << endl;
// }
// floodfill
// const int N = 100;
// char grid[N + 5][N + 5];
// bool vis[N + 5][N + 5];
// int dx[4] = {0, 1, 0, -1};
// int dy[4] = {1, 0, -1, 0};
// int n, m;
//
// bool inRange(int x, int y){
// return x >= 0 && y >= 0 && x < n && y < m;
//}
//
// void floodfill(int x, int y){
// if(vis[x][y])return; // udah pernah dibanjirin
// vis[x][y] = true;
//
// for(int i = 0; i < 4; ++i){
// int nx = x + dx[i];
// int ny = y + dy[i];
// if(inRange(nx, ny) && grid[nx][ny] == '.')
// floodfill(nx, ny);
// }
//
//}
//
// int main() {
// ios::sync_with_stdio(false);
// cin.tie(0); cout.tie(0);
// cin >> n >> m;
//
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// cin >> grid[i][j];
// }
// }
//
// int ans = 0;
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// if(grid[i][j] == '#')continue;
// if(vis[i][j])continue;
//
// floodfill(i, j);
//
// ans++;
// }
// }
//
// cout << ans << endl;
//
//}
// int x,y;
// cin >> x;
// for(int i = 0; i < x; i++){
// cin >> y;
// arr[i] = y;
// }
// for(int i = 0; i < x - 1; i++){
// for(int j = 0; i < x-j-1; j++){
// if(arr[j] > arr[j+1]){
// swap(arr[j],arr[j+1]);
// temp = true;
// }
// }
// if(temp == false){
// break;
// }
// }
// for(int i = 0; i < x; i++){
// cout << arr[i] << endl;
// }
// }
int a, b, c, cnt;
cin >> a >> b >> c;
if (b / a > c) {
cout << b / a << endl;
} else {
cout << c << endl;
}
}
| #include <algorithm>
#include <cstring>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
bool temp;
long long arr[(int)1e3 + 1];
void swap(long long &x, long long &y) {
int temp;
temp = x;
x = y;
y = temp;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// long long x,y,min,min2;
// min = 1000000000000;
// min2 = 1000000000000;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// if(y < min){
// min = y;
// }else if(y < min2){
// min2 = y;
// }
// }
// cout << min2 << endl;
// long long ar[1000000000];
// for(int i = 0; i < 1005; i++){
// ar[i] = 0;
// }
// long long x;
// cin >> x;
// for(int i = 0;i < x; i++){
// long long y; cin >> y;
// ar[y]++;
// }
// int modus = 0;
// int max = 0;
// for(int i = 1; i <= 10000000000; i++){
// if(max <= ar[i]){
// max = ar[i];
// modus = i;
// }
// }
// cout << modus << endl;
// long long x,y,z;
// long long min = 10000000;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y;
// ar[i] = y;
// }
// for(int i = x-1; i>=0 ; i--){
// if(ar[i] < min){
// min = ar[i];
// z = z + ar[i];
// }else if (ar[i] > min){
// min = ar[i];
// z = z + min;
//
// }
//
// }
// cout << z << endl;
// long long x,y,z;
// z = 0;
// cin >> x;
// for(int i = 1; i <= x-1;i++){
// cin >> y;
// }
// for(int i = 1; i <= x-1;i++){
// ar[i] = i;
// if(ar[i] != ar[y]){
// z = ar[i];
// }
// }
// cout << z << endl;
// int calc(int x){
// int d = 0;
// while(x > 0){
// d += x % 10;
// x /= 10;
// }
// return d;
//}
//
// int main() {
// int a,b,c,d;
// while(cin >> a){
// if(a == 0){
// return 0;
// }
// while(a >= 10){
// a = calc(a);
// }
// cout << a << endl;
// }
//}
// long long a,b,c,d,e,f,g,min;
// bool temp;
// temp = true;
// min = 1000000000;
// while(cin >> a >> b >> c >> d){
//
// for(int i = 1; i <= c; i++){
// cin >> e;
// for(int j = 1; j <= d; j++){
// cin >> f;
// if(a <= f && b >= a * e){
// if(min > a * e){
// min = a * e;
// temp = true;
// }
// }
// else{
// temp = false;
// }
// }
// }
// if(temp == true){
// cout << min << endl;
// }
// else{
// cout << "stay home" << endl;
// }
// }
//
// int h,d,cnt;
// double f,tmp,x,u;
// bool haha;
// tmp = 0;
// haha = false;
// cnt = 0;
// while(cin >> h >> u >> d >> f){
// if(h == 0){
// return 0;
// }
//
// x = f/100 * u;
// for(int i = 1;i <= 100000; i++){
// if(i == 1){
// tmp += u;
// cnt++;
// }else if(i > 1){
// u -= x;
// if(u >= 0)tmp += u;
// cnt++;
// }
//
// if(tmp > h){
// haha = true;
// break;
// }
//
// tmp -= d;
//
// if(tmp < 0){
// break;
// }
//
// }
//
// if(haha == true){
// cout << "success on day " << cnt << endl;
// }else{
// cout << "failure on day " << cnt << endl;
// }
//
// haha = false;
// cnt = 0;
// tmp = 0;
// }
// int x,y,z,a;
// a = 0;
// bool temp;
// temp = true;
// string w;
// while(cin >> w){
// a++;
// cout << "Case " << a << ":" << endl;
// cin >> x;
// for(int i = 1; i <= x; i++){
// cin >> y >> z;
// if(z > y){
// for(int j = y; j < z; j++){
// if(w[j] != w[j + 1]){
// temp = false;
// break;
// }
// }
// }else{
// for(int k = z; k < y; k++){
// if(w[k] != w[k + 1]){
// temp = false;
// break;
// }
// }
// }
// if(temp == true){
// cout << "Yes" << endl;
// }else{
// cout << "No" << endl;
// }
// temp = true;
// }
// }
// int price[256];
//
// int main(){
// int n,k,x;
// double cnt, m;
// cnt = 0;
// string z;
// char a;
// cin >> n;
// for(int o = 1; o <= n; o++){
// cin >> k;
// for(int j = 1; j <= k;j++){
// cin >> a >> m;
// price[a] = m;
// }
// cin >> x; cin.ignore();
//
// for(int i = 1; i <= x ;i++){
// getline(cin,z);
//
// for(int j = 0; j < z.length(); j++){
// cnt += price[z[j]];
// }
// }
// cnt = cnt / 100;
//
// cout << fixed << setprecision(2) << cnt << "$" << endl;
// cnt = 0;
// for(int a = 0;a < 256; a++){
// price[a] = 0;
// }
// }
//
//
// int x,r,s;
// // Big O Notation
//
// // Kompleksitas = O(N^3)
//
// // O(x * MAXS * r) cari jawaban
// cin >> x;
// for(int i = 1;i <= x;i++){
// int min = 1e9;
// cin >> r;
// for(int k = 1; k <= r;k++){
// cin >> s;
// ar[k] = s;
// }
//
// for(int j =1; j <= 30000; j++){
// // Ini kan berarti rumah vito sekarang di j
// // Harus cari tau dari j ke rumah 1, 2, 3, ... ,r
// // jaraknya masing-masing berapa terus ditotal
//
// int sumDist = 0; // Buat nyimpen total jarak ke semua rumah
//
// for(int k = 1; k <= r; ++k){ // Cek ke semua tetangga2nya
// sumDist += abs(j - ar[k]);
// // Tambahin jarak dari rumah sekarang ke tetangga ke-k
// }
//
// if(min > sumDist){
// min = sumDist;
// }
// }
//
// cout << min << endl;
// }
// string x;
// cin >> x;
// for(int i = 0; i <= x.length() - 1; ++i){
// x[i] = tolower(x[i]);
// if(x[i] == 'a' || x[i] == 'o' ||x[i] == 'y'||x[i] == 'e'||x[i] ==
// 'u'||x[i] == 'i'){
// continue;
// }else{
// cout << "." << x[i];
// }
// }
// cout << endl;
//}
// int a,cnt;
// cnt = 0;
// for(int i = 0;i < 4; i++){
// cin >> a;
// ar[i] = a;
// }
// for(int i = 0; i < 4; i++){
// if(ar[i] == ar[i+1]|| ar[i] == ar[i+2] || ar[i] == ar[i+3]){
// cnt++;
// }
// }
// cout << cnt << endl;
//
// long long x,y,temp,cnt;
// bool idk;
// idk = true;
// cin >> x;
// cin >> y;
// temp = y;
// for(int i = 2; i <= x; i++){
// cin >> y;
// if(temp == y){
// idk = false;
// break;
// }else if(temp > y){
// temp = y;
// cnt = i;
// }
// }
// if(idk == true){
// cout << cnt << endl;
// }else{
// cout << "Still Rodzilla" << endl;
// }
// int x,y;
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = 1;
// }
// }
// for(int i = 1; i <= 3; i++){
// for(int j = 1; j <= 3; j++){
// cin >> x;
// arr[i][j] += x;
// arr[i+1][j] += x;
// arr[i-1][j] += x;
// arr[i][j+1] += x;
// arr[i][j-1] += x;
// }
// }
// for(int i = 1; i <= 3;i++){
// for(int j = 1; j <= 3; j++){
// arr[i][j] = arr[i][j] % 2;
// cout << arr[i][j];
// }
// cout << endl;
// }
// floodfill
// const int N = 100;
// char grid[N + 5][N + 5];
// bool vis[N + 5][N + 5];
// int dx[4] = {0, 1, 0, -1};
// int dy[4] = {1, 0, -1, 0};
// int n, m;
//
// bool inRange(int x, int y){
// return x >= 0 && y >= 0 && x < n && y < m;
//}
//
// void floodfill(int x, int y){
// if(vis[x][y])return; // udah pernah dibanjirin
// vis[x][y] = true;
//
// for(int i = 0; i < 4; ++i){
// int nx = x + dx[i];
// int ny = y + dy[i];
// if(inRange(nx, ny) && grid[nx][ny] == '.')
// floodfill(nx, ny);
// }
//
//}
//
// int main() {
// ios::sync_with_stdio(false);
// cin.tie(0); cout.tie(0);
// cin >> n >> m;
//
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// cin >> grid[i][j];
// }
// }
//
// int ans = 0;
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j){
// if(grid[i][j] == '#')continue;
// if(vis[i][j])continue;
//
// floodfill(i, j);
//
// ans++;
// }
// }
//
// cout << ans << endl;
//
//}
// int x,y;
// cin >> x;
// for(int i = 0; i < x; i++){
// cin >> y;
// arr[i] = y;
// }
// for(int i = 0; i < x - 1; i++){
// for(int j = 0; i < x-j-1; j++){
// if(arr[j] > arr[j+1]){
// swap(arr[j],arr[j+1]);
// temp = true;
// }
// }
// if(temp == false){
// break;
// }
// }
// for(int i = 0; i < x; i++){
// cout << arr[i] << endl;
// }
// }
int a, b, c, cnt;
cin >> a >> b >> c;
if (b / a > c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
}
| [
"control_flow.branch.else.add"
] | 913,238 | 913,237 | u809799005 | cpp |
p03105 | #include <bits/stdc++.h>
#include <random>
#include <unistd.h>
using namespace std;
typedef long long int LL;
typedef long long int LLint;
typedef pair<int, int> intpair;
typedef pair<bool, bool> boolpair;
typedef pair<string, string> strpair;
typedef pair<LL, LL> LLpair;
typedef pair<double, double> doublepair;
typedef pair<float, float> floatpair;
typedef vector<int> intvector;
typedef vector<bool> boolvector;
typedef vector<string> strvector;
typedef vector<LL> LLvector;
typedef vector<double> doublevector;
typedef vector<float> floatvector;
#define wait(sec) usleep((sec)*1000000)
#define ED return 0;
#define TEST cout << "OK" << endl;
#define UP(a, b) ((a + (b - 1)) / b)
#define SORT(vec) sort(vec.begin(), vec.end());
#define DOUBLECHANGE(count) cout << setprecision(count);
#define REV(vec) reverse(vec.begin(), vec.end());
#define ipow(x, y) LL(pow(x, y))
#define INF 999999999
const long long mod = 1000000007;
int main() {
// random_device rnd;
// mt19937 mt(rnd());
cin.tie(0);
ios::sync_with_stdio(false);
int A, B, C;
cin >> A >> B >> C;
cout << max(C, B / A) << endl;
}
| #include <bits/stdc++.h>
#include <random>
#include <unistd.h>
using namespace std;
typedef long long int LL;
typedef long long int LLint;
typedef pair<int, int> intpair;
typedef pair<bool, bool> boolpair;
typedef pair<string, string> strpair;
typedef pair<LL, LL> LLpair;
typedef pair<double, double> doublepair;
typedef pair<float, float> floatpair;
typedef vector<int> intvector;
typedef vector<bool> boolvector;
typedef vector<string> strvector;
typedef vector<LL> LLvector;
typedef vector<double> doublevector;
typedef vector<float> floatvector;
#define wait(sec) usleep((sec)*1000000)
#define ED return 0;
#define TEST cout << "OK" << endl;
#define UP(a, b) ((a + (b - 1)) / b)
#define SORT(vec) sort(vec.begin(), vec.end());
#define DOUBLECHANGE(count) cout << setprecision(count);
#define REV(vec) reverse(vec.begin(), vec.end());
#define ipow(x, y) LL(pow(x, y))
#define INF 999999999
const long long mod = 1000000007;
int main() {
// random_device rnd;
// mt19937 mt(rnd());
cin.tie(0);
ios::sync_with_stdio(false);
int A, B, C;
cin >> A >> B >> C;
cout << min(C, B / A) << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,239 | 913,240 | u550995059 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int a, b, c;
cin >> a >> b >> c;
b = min(a * c, (b - b % a) / a);
cout << b / a << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int a, b, c;
cin >> a >> b >> c;
b = min(a * c, b - b % a);
cout << b / a << endl;
return 0;
} | [
"call.arguments.change"
] | 913,243 | 913,244 | u073082475 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a > b * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b > a * c) {
cout << c << endl;
} else {
cout << b / a << endl;
}
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 913,247 | 913,248 | u469451657 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int A, B, C;
cin >> A >> B >> C;
cout << max(C, B / A) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int A, B, C;
cin >> A >> B >> C;
cout << min(C, B / A) << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,249 | 913,250 | u238312012 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int ans;
B *C > A ? ans = C : ans = B / A;
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int ans;
B >= A *C ? ans = C : ans = B / A;
cout << ans << endl;
} | [
"expression.operation.binary.remove"
] | 913,255 | 913,256 | u726060136 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << max(B / A, C) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(B / A, C) << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,264 | 913,265 | u132364782 | cpp |
p03105 | #include <bits/stdc++.h>
#include <chrono>
#define watch(x) cout << (#x) << " is " << (x) << endl
#define eps 1e-9
#define f first
#define s second
typedef long long ll;
using namespace std;
const int N = 1e5;
int a[N + 5];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a, b, c;
cin >> a >> b >> c;
cout << min(c * a, b / a);
return 0;
}
| #include <bits/stdc++.h>
#include <chrono>
#define watch(x) cout << (#x) << " is " << (x) << endl
#define eps 1e-9
#define f first
#define s second
typedef long long ll;
using namespace std;
const int N = 1e5;
int a[N + 5];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a, b, c;
cin >> a >> b >> c;
cout << min(c, b / a);
return 0;
}
| [
"expression.operation.binary.remove"
] | 913,293 | 913,294 | u409343817 | cpp |
p03105 | /*{{{*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
// pll pp; -> (pp.first,pp.second)
// vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return
// a[0]<b[0];});
#define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define RREP(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--)
#define FOR(i, a, b) for (ll(i) = (a); (i) < (b); (i)++)
#define FORR(i, a, b) for (ll(i) = (b)-1; (i) >= (a); (i)--)
#define DEBUG(x) cout << #x << ": " << x << endl
#define CHMAX(a, b) a = max((a), (b))
#define CHMIN(a, b) a = min((a), (b))
/*}}}*/
int main() {
ll A, B, C, ans;
cin >> A >> B >> C;
ans = min(C, B % A);
cout << ans << endl;
return 0;
} | /*{{{*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
// pll pp; -> (pp.first,pp.second)
// vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return
// a[0]<b[0];});
#define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define RREP(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--)
#define FOR(i, a, b) for (ll(i) = (a); (i) < (b); (i)++)
#define FORR(i, a, b) for (ll(i) = (b)-1; (i) >= (a); (i)--)
#define DEBUG(x) cout << #x << ": " << x << endl
#define CHMAX(a, b) a = max((a), (b))
#define CHMIN(a, b) a = min((a), (b))
/*}}}*/
int main() {
ll A, B, C, ans;
cin >> A >> B >> C;
ans = min(C, B / A);
cout << ans << endl;
return 0;
} | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 913,315 | 913,316 | u401373764 | cpp |
p03105 | #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for (int i = (m); i < (int)(n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define INF 2000000000
#ifdef LOCAL
#define dprintf(...) fprintf(stdout, __VA_ARGS__)
#else
#define dprintf(...) 0
#endif
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned int uint;
// const double PI = 3.1415926535897932384626433832795;
int main() {
int a, b, c;
cin >> a >> b >> c;
int ans = b / a >= 3 ? 3 : b / a;
cout << ans << '\n';
return 0;
}
| #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for (int i = (m); i < (int)(n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define INF 2000000000
#ifdef LOCAL
#define dprintf(...) fprintf(stdout, __VA_ARGS__)
#else
#define dprintf(...) 0
#endif
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned int uint;
// const double PI = 3.1415926535897932384626433832795;
int main() {
int a, b, c;
cin >> a >> b >> c;
int ans = b / a >= c ? c : b / a;
cout << ans << '\n';
return 0;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 913,331 | 913,332 | u370867568 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b * a >= c)
cout << c << endl;
else
cout << b * a << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a >= c)
cout << c << endl;
else
cout << b / a << endl;
return 0;
} | [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change",
"io.output.change"
] | 913,333 | 913,334 | u820341516 | cpp |
p03105 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(int(a / b), c) << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"call.remove",
"io.output.change",
"call.arguments.change"
] | 913,335 | 913,336 | u476534289 | cpp |
p03105 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << max(a / b, c) << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change",
"expression.operation.binary.remove"
] | 913,337 | 913,336 | u476534289 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
// input
int a, b, c;
cin >> a >> b >> c;
int res = a * c;
int ans;
if (res <= b) { //お金を十分持っている場合
ans = c;
} else {
ans = a / b;
}
cout << ans << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
// input
int a, b, c;
cin >> a >> b >> c;
int res = a * c;
int ans;
if (res <= b) { //お金を十分持っている場合
ans = c;
} else {
ans = b / a;
}
cout << ans << endl;
return 0;
}
| [
"expression.operation.binary.remove",
"assignment.change"
] | 913,338 | 913,339 | u653001393 | cpp |
p03105 | #pragma GCC optimize "-O3"
#pragma GCC target("avx")
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; ++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int, int>
#define vp vector<pair<int, int>>
#define mp make_pair
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a, 0, sizeof(a))
#define inf (1ll << 60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v), greater<int>())
signed gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
signed lcm(int a, int b) { return a * b / gcd(a, b); }
using namespace std;
const int mod = 1e9 + 7;
void run();
void init() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(12);
}
signed main() {
init();
run();
return 0;
}
void run() {
int a, b, c;
cin >> a >> b >> c;
cout << min(a / b, c) << endl;
}
| #pragma GCC optimize "-O3"
#pragma GCC target("avx")
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; ++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int, int>
#define vp vector<pair<int, int>>
#define mp make_pair
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a, 0, sizeof(a))
#define inf (1ll << 60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v), greater<int>())
signed gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
signed lcm(int a, int b) { return a * b / gcd(a, b); }
using namespace std;
const int mod = 1e9 + 7;
void run();
void init() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(12);
}
signed main() {
init();
run();
return 0;
}
void run() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b / a, c) << endl;
}
| [
"expression.operation.binary.remove"
] | 913,340 | 913,341 | u775507068 | cpp |
p03105 | #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll; // 64bit型
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n'
#define PRINT(V) \
{ \
for (int i = 0; i < V.size(); i++) { \
cout << V[i] << " "; \
} \
cout << endl; \
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
// input->compute->output//
int A, B, C;
cin >> A >> B >> C;
cout << max(B / A, C) << endl;
return 0;
}
| #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll; // 64bit型
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n'
#define PRINT(V) \
{ \
for (int i = 0; i < V.size(); i++) { \
cout << V[i] << " "; \
} \
cout << endl; \
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
// input->compute->output//
int A, B, C;
cin >> A >> B >> C;
cout << min(B / A, C) << endl;
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,342 | 913,343 | u966508131 | cpp |
p03105 | #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a * c > b)
cout << a / b << endl;
else
cout << c << endl;
return 0;
} | #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a * c > b)
cout << b / a << endl;
else
cout << c << endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 913,346 | 913,347 | u098844816 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
const int MOD = (int)1e9 + 7;
int main() {
int a, b, c;
cin >> a >> b >> c;
int buf;
buf = min(c, a / b);
cout << buf << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
const int MOD = (int)1e9 + 7;
int main() {
int a, b, c;
cin >> a >> b >> c;
int buf;
buf = min(c, b / a);
cout << buf << endl;
}
| [
"expression.operation.binary.remove",
"assignment.change"
] | 913,354 | 913,355 | u494379309 | cpp |
p03105 | #include <iostream>
#include <string>
using namespace std;
int main() {
int A, B, C;
int answer = 0;
cin >> A >> B >> C;
answer = B / A;
if (B > C) {
answer = C;
}
cout << answer << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int A, B, C;
int answer = 0;
cin >> A >> B >> C;
answer = B / A;
if (answer > C) {
answer = C;
}
cout << answer << endl;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 913,372 | 913,373 | u306716491 | cpp |
p03105 | #include <iostream>
#include <string>
using namespace std;
int main() {
int A, B, C;
int answer;
cin >> A >> B >> C;
answer = B / A;
if (B > C) {
answer = C;
}
cout << answer << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int A, B, C;
int answer = 0;
cin >> A >> B >> C;
answer = B / A;
if (answer > C) {
answer = C;
}
cout << answer << endl;
} | [
"variable_declaration.value.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 913,374 | 913,373 | u306716491 | cpp |
p03105 | #include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int ans = (B / A, C);
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int ans = min(B / A, C);
cout << ans << endl;
return 0;
} | [
"call.add"
] | 913,377 | 913,378 | u090074105 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(A / B, C) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(B / A, C) << endl;
} | [
"expression.operation.binary.remove"
] | 913,390 | 913,391 | u826764011 | cpp |
p03105 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a > c)
cout << b / a << endl;
else
cout << c << endl;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if ((b / a) <= c)
cout << b / a << endl;
else
cout << c << endl;
}
| [
"control_flow.branch.if.condition.change"
] | 913,392 | 913,393 | u959815036 | cpp |
p03105 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(void) {
int A, B, C;
cin >> A >> B >> C;
int ans;
ans = (int)A / B;
if (ans > C) {
cout << C << endl;
} else {
cout << ans << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(void) {
int A, B, C;
cin >> A >> B >> C;
int ans;
ans = (int)B / A;
if (ans > C) {
cout << C << endl;
} else {
cout << ans << endl;
}
return 0;
} | [
"expression.operation.binary.remove",
"assignment.change"
] | 913,406 | 913,407 | u149583407 | cpp |
p03105 | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c) {
cout << a / b << endl;
} else {
cout << c << endl;
}
return 0;
} | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c) {
cout << b / a << endl;
} else {
cout << c << endl;
}
return 0;
} | [
"expression.operation.binary.remove"
] | 913,408 | 913,409 | u127768253 | cpp |
p03105 | #include <bits/stdc++.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
printf("%d\n", b / a > c ? b / a : c);
} | #include <bits/stdc++.h>
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
printf("%d\n", b / a < c ? b / a : c);
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 913,412 | 913,413 | u355780225 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (B / A < C) {
cout << B / A << endl;
} else {
cout << B / A << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (B / A < C) {
cout << B / A << endl;
} else {
cout << C << endl;
}
} | [
"identifier.change",
"io.output.change",
"expression.operation.binary.remove"
] | 913,416 | 913,417 | u425834921 | cpp |
p03105 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c)
cout << a / b << endl;
else
cout << c << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c)
cout << b / a << endl;
else
cout << c << endl;
return 0;
}
| [
"expression.operation.binary.remove"
] | 913,420 | 913,421 | u454349421 | cpp |
p03105 | #include <iostream>
using namespace std;
int main(void) {
int a, b, c;
cin >> a >> b >> c;
if (c >= b / a)
cout << c << endl;
else
cout << b / a << endl;
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int a, b, c;
cin >> a >> b >> c;
if (c <= b / a)
cout << c << endl;
else
cout << b / a << endl;
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 913,433 | 913,434 | u407416173 | cpp |
p03105 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(C, A / B) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
cout << min(C, B / A) << endl;
} | [
"expression.operation.binary.remove"
] | 913,439 | 913,440 | u261514692 | cpp |
p03105 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int lis_max = B / A;
cout << max(C, lis_max) << endl;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int lis_max = B / A;
cout << min(C, lis_max) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 913,445 | 913,446 | u353789691 | cpp |
p03105 | #include <iostream>
int a, b, c;
int main() {
std::cin >> a >> b >> c;
int x = static_cast<int>(b / c);
if (x >= c) {
std::cout << c << std::endl;
return 0;
} else {
std::cout << x << std::endl;
}
} | #include <iostream>
int a, b, c;
int main() {
std::cin >> a >> b >> c;
int x = static_cast<int>(b / a);
if (x >= c) {
std::cout << c << std::endl;
return 0;
} else {
std::cout << x << std::endl;
}
}
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 913,453 | 913,454 | u537538698 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.