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 |
|---|---|---|---|---|---|---|---|
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(0, A + B - 100) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(0, A + B - N) << endl;
} | [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 939,989 | 939,990 | u164730704 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << max(0, a + b - n) << '\n';
} | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << '\n';
} | [
"io.output.change"
] | 939,993 | 939,994 | u979163294 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << max(a, b) << max(0, a + b - n) << '\n';
} | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << '\n';
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 939,995 | 939,994 | u979163294 | cpp |
p03139 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll MOD = 1000000007;
const ll INF = 10000000000000000;
vector<int> x4 = {0, 1, 0, -1}, x8 = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> y4 = {1, 0, -1, 0}, y8 = {1, 1, 0, -1, -1, -1, 0, 1};
template <class T> struct edge {
int from, to;
T cost;
};
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline T powerM(T a, T b) {
if (b == 0)
return 1;
T tmp = powerM(a, b / 2);
if (b % 2 == 0)
return tmp * tmp % MOD;
else
return tmp * tmp % MOD * a % MOD;
}
template <class T> inline T power(T a, T b, T m) {
if (b == 0)
return 1;
T tmp = power(a, b / 2, m);
if (b % 2 == 0)
return tmp * tmp % m;
else
return tmp * tmp % m * a % m;
}
template <class T> inline T gcd(T a, T b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
template <class T> inline T lcm(T a, T b) { return a / gcd(a, b) * b; }
// ax+by=gcd(a,b)を解く
template <class T> inline T extgcd(T a, T b, T &x, T &y) {
if (b == 0) {
x = 1;
y = 0;
return a;
}
T d = extgcd(b, a % b, y, x);
y -= a / b * x;
return d;
}
/*
int N;
Graph G;
int main() {
cin >>N;
rep(i, N-1){
int a,b; cin >>a >>b; a--; b--;
G[a].push_back(b); G[b].push_back(a);
}
}
*/
int main() {
int n, a, b;
cin >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll MOD = 1000000007;
const ll INF = 10000000000000000;
vector<int> x4 = {0, 1, 0, -1}, x8 = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> y4 = {1, 0, -1, 0}, y8 = {1, 1, 0, -1, -1, -1, 0, 1};
template <class T> struct edge {
int from, to;
T cost;
};
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline T powerM(T a, T b) {
if (b == 0)
return 1;
T tmp = powerM(a, b / 2);
if (b % 2 == 0)
return tmp * tmp % MOD;
else
return tmp * tmp % MOD * a % MOD;
}
template <class T> inline T power(T a, T b, T m) {
if (b == 0)
return 1;
T tmp = power(a, b / 2, m);
if (b % 2 == 0)
return tmp * tmp % m;
else
return tmp * tmp % m * a % m;
}
template <class T> inline T gcd(T a, T b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
template <class T> inline T lcm(T a, T b) { return a / gcd(a, b) * b; }
// ax+by=gcd(a,b)を解く
template <class T> inline T extgcd(T a, T b, T &x, T &y) {
if (b == 0) {
x = 1;
y = 0;
return a;
}
T d = extgcd(b, a % b, y, x);
y -= a / b * x;
return d;
}
/*
int N;
Graph G;
int main() {
cin >>N;
rep(i, N-1){
int a,b; cin >>a >>b; a--; b--;
G[a].push_back(b); G[b].push_back(a);
}
}
*/
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
} | [
"expression.operation.binary.add"
] | 939,996 | 939,997 | u195132800 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
namespace FAST_IO {
template <typename T> void read(T &a) {
a = 0;
int f = 1;
char c = getchar();
while (!isdigit(c)) {
if (c == '-') {
f = -1;
}
c = getchar();
}
while (isdigit(c)) {
a = a * 10 + c - '0';
c = getchar();
}
a = a * f;
}
template <typename T> void write(T a) {
if (a < 0) {
a = -a;
putchar('-');
}
if (a > 9) {
write(a / 10);
}
putchar(a % 10 + '0');
}
template <typename T> void writeln(T a) {
write(a);
puts("");
}
} // namespace FAST_IO
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << a + b - n;
} | #include <bits/stdc++.h>
using namespace std;
namespace FAST_IO {
template <typename T> void read(T &a) {
a = 0;
int f = 1;
char c = getchar();
while (!isdigit(c)) {
if (c == '-') {
f = -1;
}
c = getchar();
}
while (isdigit(c)) {
a = a * 10 + c - '0';
c = getchar();
}
a = a * f;
}
template <typename T> void write(T a) {
if (a < 0) {
a = -a;
putchar('-');
}
if (a > 9) {
write(a / 10);
}
putchar(a % 10 + '0');
}
template <typename T> void writeln(T a) {
write(a);
puts("");
}
} // namespace FAST_IO
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(a + b - n, 0);
}
| [
"call.add",
"call.arguments.add"
] | 940,000 | 940,001 | u207310767 | cpp |
p03139 | #include "bits/stdc++.h"
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << max(A + B - N, 0) << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(A + B - N, 0) << endl;
return 0;
} | [
"io.output.change"
] | 940,002 | 940,003 | u906839513 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
int main() {
int n, a, b, i;
cin >> n >> a >> b;
cout << max(a, b) << " " << max(0, a + b - n);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
int main() {
int n, a, b, i;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n);
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,004 | 940,005 | u555091608 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A >= B) {
cout << A;
} else {
cout << B;
}
cout << " ";
if (N >= A + B) {
cout << 0;
} else {
cout << A + B - N;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A >= B) {
cout << B;
} else {
cout << A;
}
cout << " ";
if (N >= A + B) {
cout << 0;
} else {
cout << A + B - N;
}
} | [
"identifier.change",
"io.output.change"
] | 940,006 | 940,007 | u492707675 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << abs(a - b);
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n);
}
| [
"identifier.change",
"call.function.change",
"io.output.change",
"call.arguments.add",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 940,008 | 940,009 | u420805165 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, n - a - b);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n);
}
| [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,010 | 940,009 | u420805165 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A > B) {
cout << A;
} else {
cout << B;
}
cout << " ";
if (A + B - N > 0) {
cout << A + B - N << endl;
} else {
cout << 0 << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A > B) {
cout << B;
} else {
cout << A;
}
cout << " ";
if (A + B - N > 0) {
cout << A + B - N << endl;
} else {
cout << 0 << endl;
}
}
| [
"identifier.change",
"io.output.change"
] | 940,013 | 940,014 | u457196771 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << max(0, a + b - n);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n);
}
| [
"io.output.change"
] | 940,015 | 940,016 | u222643545 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define endl "\n"
template <typename T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename T> ostream &operator<<(ostream &s, const complex<T> &d) {
return s << "(" << d.real() << ", " << d.imag() << ")";
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &d) {
return s << "(" << d.first << ", " << d.second << ")";
}
template <typename T> ostream &operator<<(ostream &s, const vector<T> &d) {
int len = d.size();
rep(i, len) {
s << d[i];
if (i < len - 1)
s << " ";
}
return s;
}
template <typename T>
ostream &operator<<(ostream &s, const vector<vector<T>> &d) {
int len = d.size();
rep(i, len) { s << d[i] << endl; }
return s;
}
template <typename T> ostream &operator<<(ostream &s, const set<T> &v) {
s << "{ ";
for (auto itr = v.begin(); itr != v.end(); ++itr) {
if (itr != v.begin()) {
s << ", ";
}
s << (*itr);
}
s << " }";
return s;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const map<T1, T2> &m) {
s << "{" << endl;
for (auto itr = m.begin(); itr != m.end(); ++itr) {
s << " " << (*itr).first << " : " << (*itr).second << endl;
}
s << "}" << endl;
return s;
}
const ll mod = 1e9 + 7;
const ll inf = 1e17;
const int INF = 1e9;
const double PI = acos(-1);
const double EPS = 1e-10;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << max(a, b) << ' ';
if (a + b <= n)
cout << 0 << endl;
else
cout << -n + a + b << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define endl "\n"
template <typename T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename T> ostream &operator<<(ostream &s, const complex<T> &d) {
return s << "(" << d.real() << ", " << d.imag() << ")";
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &d) {
return s << "(" << d.first << ", " << d.second << ")";
}
template <typename T> ostream &operator<<(ostream &s, const vector<T> &d) {
int len = d.size();
rep(i, len) {
s << d[i];
if (i < len - 1)
s << " ";
}
return s;
}
template <typename T>
ostream &operator<<(ostream &s, const vector<vector<T>> &d) {
int len = d.size();
rep(i, len) { s << d[i] << endl; }
return s;
}
template <typename T> ostream &operator<<(ostream &s, const set<T> &v) {
s << "{ ";
for (auto itr = v.begin(); itr != v.end(); ++itr) {
if (itr != v.begin()) {
s << ", ";
}
s << (*itr);
}
s << " }";
return s;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const map<T1, T2> &m) {
s << "{" << endl;
for (auto itr = m.begin(); itr != m.end(); ++itr) {
s << " " << (*itr).first << " : " << (*itr).second << endl;
}
s << "}" << endl;
return s;
}
const ll mod = 1e9 + 7;
const ll inf = 1e17;
const int INF = 1e9;
const double PI = acos(-1);
const double EPS = 1e-10;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << ' ';
if (a + b <= n)
cout << 0 << endl;
else
cout << -n + a + b << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,017 | 940,018 | u340010271 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, x, y;
cin >> n >> a >> b;
if (a < b) {
x = a;
} else {
x = b;
}
if (a + b - n < 0) {
y = 0;
} else {
y = a + b - n;
}
cout << x << y << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, x, y;
cin >> n >> a >> b;
if (a < b) {
x = a;
} else {
x = b;
}
if (a + b - n < 0) {
y = 0;
} else {
y = a + b - n;
}
cout << x << " " << y << endl;
} | [
"io.output.change"
] | 940,019 | 940,020 | u584169254 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << max(min(A, B) - N + max(A, B), 0);
}
| #include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(min(A, B) - N + max(A, B), 0);
}
| [
"io.output.change"
] | 940,025 | 940,026 | u028572059 | cpp |
p03139 | /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <stdio.h>
#include <string>
#include <unordered_map>
#include <vector>
#pragma GCC optimize("Ofast")
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
#define rep2(i, n) for (int i = 2; i < (n); ++i)
#define repr(i, n) for (int i = n; i >= 0; --i)
#define reprm(i, n) for (int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.50lf\n", a) //少数出力
#define printdbd(a) printf("%.16lf\n", a) //少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str()) // string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2) //等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg) / 360.0) * 2.0 * PI)
#define rad_to_deg(rad) (((rad) / 2.0 / PI) * 360.0)
#define Please return
#define AC 0
using ll = long long;
constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const double PI = acos(-1);
using namespace std;
void scans(string &str) {
char c;
str = "";
scanf("%c", &c);
if (c == '\n')
scanf("%c", &c); //最初の改行対策
while (c != '\n' && c != -1) {
str += c;
scanf("%c", &c);
}
}
void scanc(char &str) {
char c;
scanf("%c", &c);
if (c == -1)
return;
while (c == '\n') {
scanf("%c", &c);
}
str = c;
}
double acot(double x) { return PI / 2 - atan(x); }
/*-----------------------------------------ここからコード-----------------------------------------*/
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
printf("%d %d\n", min(b, c), b + c >= a ? abs(b - c) : 0);
Please AC;
}
| /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <stdio.h>
#include <string>
#include <unordered_map>
#include <vector>
#pragma GCC optimize("Ofast")
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
#define rep2(i, n) for (int i = 2; i < (n); ++i)
#define repr(i, n) for (int i = n; i >= 0; --i)
#define reprm(i, n) for (int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.50lf\n", a) //少数出力
#define printdbd(a) printf("%.16lf\n", a) //少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str()) // string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2) //等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg) / 360.0) * 2.0 * PI)
#define rad_to_deg(rad) (((rad) / 2.0 / PI) * 360.0)
#define Please return
#define AC 0
using ll = long long;
constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const double PI = acos(-1);
using namespace std;
void scans(string &str) {
char c;
str = "";
scanf("%c", &c);
if (c == '\n')
scanf("%c", &c); //最初の改行対策
while (c != '\n' && c != -1) {
str += c;
scanf("%c", &c);
}
}
void scanc(char &str) {
char c;
scanf("%c", &c);
if (c == -1)
return;
while (c == '\n') {
scanf("%c", &c);
}
str = c;
}
double acot(double x) { return PI / 2 - atan(x); }
/*-----------------------------------------ここからコード-----------------------------------------*/
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
printf("%d %d\n", min(b, c), b + c > a ? c + b - a : 0);
Please AC;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"identifier.change"
] | 940,029 | 940,030 | u917972976 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
int n, x, y;
cin >> n >> x >> y;
cout << min(x, y) << max(0, x + y - n) << endl;
}
signed main() {
// while(1)
solve();
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
int n, x, y;
cin >> n >> x >> y;
cout << min(x, y) << " " << max(0, x + y - n) << endl;
}
signed main() {
// while(1)
solve();
} | [
"io.output.change"
] | 940,031 | 940,032 | u134181243 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (int i = 0; i < (int)N; i++)
const ll MOD = pow(10, 9) + 7;
const ll LLINF = pow(2, 61) - 1;
const int INF = pow(2, 30) - 1;
int main() {
int N, A, B;
cin >> N >> A >> B;
int rmax = max(A, B);
int rmin = max(0, A + B - N);
cout << rmax << " " << rmin << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (int i = 0; i < (int)N; i++)
const ll MOD = pow(10, 9) + 7;
const ll LLINF = pow(2, 61) - 1;
const int INF = pow(2, 30) - 1;
int main() {
int N, A, B;
cin >> N >> A >> B;
int rmax = min(A, B);
int rmin = max(0, A + B - N);
cout << rmax << " " << rmin << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change"
] | 940,041 | 940,042 | u680707192 | cpp |
p03139 | #include <bits/stdc++.h>
#include <time.h>
using namespace std;
typedef long long int LL;
typedef long long int LLint;
// Faster Program
#define endl "\n"
// Faster Coding
#define ED return
#define GET(a) \
int a; \
cin >> a
#define DGET(a) \
double a; \
cin >> a
#define SGET(a) \
string a; \
cin >> a
#define CGET(a) \
char a; \
cin >> a
#define PRINT(a) cout << a << "\n"
#define ANS(a, b) \
int a; \
cin >> a; \
cout << b << "\n"
#define FOR(n) for (int i = 0; i < n; i++)
#define SORT(vec) sort(vec.begin(), vec.end())
#define REV(vec) reverse(vec.begin(), vec.end())
// As Function
#define UP(a, b) ((a + (b - 1)) / b)
#define ipow(x, y) LL(pow(x, y))
// Debug
#define TEST cout << "OK" << endl
const double PI = M_PI;
const long long INF = int(10e9 - 1);
const long long MOD = int(10e9 + 7);
// Settings
const bool DO_BENCHMARK = false;
const int DOUBLE_ACCURACY = 15;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(DOUBLE_ACCURACY);
void solve();
if (DO_BENCHMARK) {
clock_t start = clock();
solve();
clock_t end = clock();
const double time =
static_cast<double>(end - start) / CLOCKS_PER_SEC * 1000.0;
cout << "\n" << time << "[ms]\n";
} else
solve();
}
void solve() {
GET(N);
GET(A);
GET(B);
cout << min(A, B) << " " << max(N - A - B, 0) << endl;
}
| #include <bits/stdc++.h>
#include <time.h>
using namespace std;
typedef long long int LL;
typedef long long int LLint;
// Faster Program
#define endl "\n"
// Faster Coding
#define ED return
#define GET(a) \
int a; \
cin >> a
#define DGET(a) \
double a; \
cin >> a
#define SGET(a) \
string a; \
cin >> a
#define CGET(a) \
char a; \
cin >> a
#define PRINT(a) cout << a << "\n"
#define ANS(a, b) \
int a; \
cin >> a; \
cout << b << "\n"
#define FOR(n) for (int i = 0; i < n; i++)
#define SORT(vec) sort(vec.begin(), vec.end())
#define REV(vec) reverse(vec.begin(), vec.end())
// As Function
#define UP(a, b) ((a + (b - 1)) / b)
#define ipow(x, y) LL(pow(x, y))
// Debug
#define TEST cout << "OK" << endl
const double PI = M_PI;
const long long INF = int(10e9 - 1);
const long long MOD = int(10e9 + 7);
// Settings
const bool DO_BENCHMARK = false;
const int DOUBLE_ACCURACY = 15;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(DOUBLE_ACCURACY);
void solve();
if (DO_BENCHMARK) {
clock_t start = clock();
solve();
clock_t end = clock();
const double time =
static_cast<double>(end - start) / CLOCKS_PER_SEC * 1000.0;
cout << "\n" << time << "[ms]\n";
} else
solve();
}
void solve() {
GET(N);
GET(A);
GET(B);
cout << min(A, B) << " " << max(A + B - N, 0) << endl;
}
| [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,043 | 940,044 | u550995059 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> a >> b;
cout << min(a, b) << " " << max(0, a + b - 2) << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 940,045 | 940,046 | u734519000 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> a >> b;
cout << min(a, b) << " " << max(0, a + b - 2) << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 940,045 | 940,047 | u734519000 | cpp |
p03139 | // atcodder.xcode
// main.cpp
// Created by conan1024hao on 2019/11/09.
// Copyright © 2019 conan1024hao. All rights reserved.
// 専用ライブラリ
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <list>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
#define INF 10e16
#define MOD 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define fi first
#define se second
#define mmax(x, y) (x > y ? x : y)
#define mmin(x, y) (x < y ? x : y)
#define chmax(x, y) x = mmax(x, y)
#define chmin(x, y) x = mmin(x, y)
#define all(x) (x).begin(), (x).end()
#define PI acos(-1.0)
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int cmp(P a, P b) {
if (a.fi != b.fi)
return a.fi > b.fi;
else
return a.se < b.se;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
//-------------------------------
int n, a, b;
cin >> n >> a >> b;
int maxm = mmin(a, b);
int minm = max(0, abs(a + b - n));
cout << maxm << " " << minm << endl;
//-------------------------------
return 0;
}
//---------------------------------------------------------------------------
| // atcodder.xcode
// main.cpp
// Created by conan1024hao on 2019/11/09.
// Copyright © 2019 conan1024hao. All rights reserved.
// 専用ライブラリ
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <list>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
#define INF 10e16
#define MOD 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define fi first
#define se second
#define mmax(x, y) (x > y ? x : y)
#define mmin(x, y) (x < y ? x : y)
#define chmax(x, y) x = mmax(x, y)
#define chmin(x, y) x = mmin(x, y)
#define all(x) (x).begin(), (x).end()
#define PI acos(-1.0)
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int cmp(P a, P b) {
if (a.fi != b.fi)
return a.fi > b.fi;
else
return a.se < b.se;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
//-------------------------------
int n, a, b;
cin >> n >> a >> b;
int maxm = mmin(a, b);
int minm = max(0, (a + b - n));
cout << maxm << " " << minm << endl;
//-------------------------------
return 0;
}
//---------------------------------------------------------------------------
| [
"call.arguments.change"
] | 940,052 | 940,053 | u220212997 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef long double ld;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const int mx = 200010;
const ll mod = 1e9 + 7;
int n, a, b;
int main() {
cin >> n >> a >> b;
cout << min(a, b) << " " << a + b - n << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef long double ld;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const int mx = 200010;
const ll mod = 1e9 + 7;
int n, a, b;
int main() {
cin >> n >> a >> b;
cout << min(a, b) << " " << max(a + b - n, 0) << endl;
return 0;
} | [
"call.add",
"call.arguments.add"
] | 940,054 | 940,055 | u980909653 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(n - a - b, 0) << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(a + b - n, 0) << endl;
return 0;
} | [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,058 | 940,059 | u110383054 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << max(a, b);
cout << ' ';
cout << max(0, a + b - n);
cout << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b);
cout << ' ';
cout << max(0, a + b - n);
cout << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,062 | 940,063 | u091552241 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << std::min(A, B) << std::max(A + B - N, 0) << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << std::min(A, B) << " " << std::max(A + B - N, 0) << endl;
return 0;
} | [
"io.output.change"
] | 940,068 | 940,069 | u894339989 | cpp |
p03139 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << max(0, a + b - n) << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
return 0;
} | [
"io.output.change"
] | 940,072 | 940,073 | u110653681 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rreps(i, e, n) for (int i = (n)-1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end())
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << min(0, n - a - b) << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rreps(i, e, n) for (int i = (n)-1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end())
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change",
"expression.operation.binary.remove",
"expression.operator.arithmetic.change"
] | 940,076 | 940,077 | u225581241 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int int_len(int n) {
int s = 0;
while (n != 0)
s++, n /= 10;
return s;
}
int int_sum(int n) {
int m = 0, s = 0, a = n;
while (a != 0)
s++, a /= 10;
for (int i = s - 1; i >= 0; i--)
m += n / ((int)pow(10, i)) - (n / ((int)pow(10, i + 1))) * 10;
return m;
}
int vec_sum(vector<int> v) {
int n = 0;
for (int i = 0; i < v.size(); i++)
n += v[i];
return n;
}
int main() {
int n, a, b;
cin >> n >> a >> b;
if (n >= a + b) {
cout << min(a, b) << ' ' << 0 << endl;
} else {
cout << min(a, b) << ' ' << abs(a - b) << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int int_len(int n) {
int s = 0;
while (n != 0)
s++, n /= 10;
return s;
}
int int_sum(int n) {
int m = 0, s = 0, a = n;
while (a != 0)
s++, a /= 10;
for (int i = s - 1; i >= 0; i--)
m += n / ((int)pow(10, i)) - (n / ((int)pow(10, i + 1))) * 10;
return m;
}
int vec_sum(vector<int> v) {
int n = 0;
for (int i = 0; i < v.size(); i++)
n += v[i];
return n;
}
int main() {
int n, a, b;
cin >> n >> a >> b;
if (n >= a + b) {
cout << min(a, b) << ' ' << 0 << endl;
} else {
cout << min(a, b) << ' ' << a + b - n << endl;
}
}
| [
"call.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,080 | 940,081 | u264265458 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << max(A + B - N, 0);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << ' ' << max(A + B - N, 0);
} | [
"io.output.change"
] | 940,082 | 940,083 | u424374375 | cpp |
p03139 | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, b) for (int(i) = a; (i) < (int)b; i++)
#define RREP(i, n) for (int(i) = ((int)(n)-1); (i) >= 0; i--)
#define RFOR(i, a, b) for (int(i) = ((int)(b)-1); (i) >= (int)a; i--)
#define ALL(v) (v).begin(), (v).end()
#define MOD 1000000007
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x) (int)x.size()
#define SP(x) setprecision((int)x)
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
int n, a, b;
cin >> n >> a >> b;
int d = min(a, b);
int e = a + b - n;
cout << d << " " << e << endl;
return 0;
}
| #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, b) for (int(i) = a; (i) < (int)b; i++)
#define RREP(i, n) for (int(i) = ((int)(n)-1); (i) >= 0; i--)
#define RFOR(i, a, b) for (int(i) = ((int)(b)-1); (i) >= (int)a; i--)
#define ALL(v) (v).begin(), (v).end()
#define MOD 1000000007
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x) (int)x.size()
#define SP(x) setprecision((int)x)
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
int n, a, b;
cin >> n >> a >> b;
int d = min(a, b);
int e = max(0, a + b - n);
cout << d << " " << e << endl;
return 0;
}
| [
"call.add",
"call.arguments.change"
] | 940,086 | 940,087 | u852449189 | cpp |
p03139 | #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 n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << (a + b <= 10 ? 0 : a + b - 10) << 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 n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << (a + b <= n ? 0 : a + b - n) << endl;
// end
return 0;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 940,092 | 940,093 | u376234649 | cpp |
p03139 | #include <bits/stdc++.h>
#define whlie while
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define rep(i, N) for (int i = 0; i < (N); i++)
#define repr(i, N) for (auto i = (N)-1; i >= 0; i -= 1)
#define each(x, v) for (auto &x : v)
#define all(v) (v).begin(), (v).end()
#define sz(v) ((int)(v).size())
#define vrep(v, it) for (auto it = v.begin(); it != v.end(); it++)
#define vrepr(v, it) for (auto it = v.rbegin(); it != v.rend(); it++)
#define ini(...) \
int __VA_ARGS__; \
in(__VA_ARGS__)
#define inl(...) \
ll __VA_ARGS__; \
in(__VA_ARGS__)
#define ins(...) \
string __VA_ARGS__; \
in(__VA_ARGS__)
#define rand mtrand
#ifdef NyaanDebug
#include "NyaanDebug.h"
#define trc(...) \
do { \
cout << #__VA_ARGS__ << " = "; \
dbg_out(__VA_ARGS__); \
} while (0)
#define trca(v, ...) \
do { \
cout << #v << " = "; \
array_out(v, ##__VA_ARGS__); \
cout << endl; \
} while (0)
#else
#define trc(...)
#define trca(...)
#endif
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
constexpr int inf = 1001001001;
constexpr ll infLL = 0x1FFFFFFFFFFFFFFFLL;
struct IoSetupNya {
IoSetupNya() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
cerr << fixed << setprecision(15);
}
} iosetupnya;
template <typename T, typename U> inline bool amin(T &x, U y) {
return (y < x) ? (x = y, true) : false;
}
template <typename T, typename U> inline bool amax(T &x, U y) {
return (x < y) ? (x = y, true) : false;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << p.first << " " << p.second;
return os;
}
template <typename T, typename U>
istream &operator>>(istream &is, pair<T, U> &p) {
is >> p.first >> p.second;
return is;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
int s = (int)v.size();
rep(i, s) os << (i ? " " : "") << v[i];
return os;
}
template <typename T> istream &operator>>(istream &is, vector<T> &v) {
for (auto &x : v)
is >> x;
return is;
}
void in() {}
template <typename T, class... U> void in(T &t, U &...u) {
cin >> t;
in(u...);
}
void out() { cout << "\n"; }
template <typename T, class... U> void out(const T &t, const U &...u) {
cout << t;
if (sizeof...(u))
cout << " ";
out(u...);
}
template <typename T> void die(T x) {
out(x);
exit(0);
}
random_device seed_gen;
mt19937_64 mtrand(seed_gen());
#define MOD 1000000007
//////////////////////////////////////////
int main() {
ini(n, a, b);
out(max(a, b), max(0, a + b - n));
} | #include <bits/stdc++.h>
#define whlie while
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define rep(i, N) for (int i = 0; i < (N); i++)
#define repr(i, N) for (auto i = (N)-1; i >= 0; i -= 1)
#define each(x, v) for (auto &x : v)
#define all(v) (v).begin(), (v).end()
#define sz(v) ((int)(v).size())
#define vrep(v, it) for (auto it = v.begin(); it != v.end(); it++)
#define vrepr(v, it) for (auto it = v.rbegin(); it != v.rend(); it++)
#define ini(...) \
int __VA_ARGS__; \
in(__VA_ARGS__)
#define inl(...) \
ll __VA_ARGS__; \
in(__VA_ARGS__)
#define ins(...) \
string __VA_ARGS__; \
in(__VA_ARGS__)
#define rand mtrand
#ifdef NyaanDebug
#include "NyaanDebug.h"
#define trc(...) \
do { \
cout << #__VA_ARGS__ << " = "; \
dbg_out(__VA_ARGS__); \
} while (0)
#define trca(v, ...) \
do { \
cout << #v << " = "; \
array_out(v, ##__VA_ARGS__); \
cout << endl; \
} while (0)
#else
#define trc(...)
#define trca(...)
#endif
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
constexpr int inf = 1001001001;
constexpr ll infLL = 0x1FFFFFFFFFFFFFFFLL;
struct IoSetupNya {
IoSetupNya() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
cerr << fixed << setprecision(15);
}
} iosetupnya;
template <typename T, typename U> inline bool amin(T &x, U y) {
return (y < x) ? (x = y, true) : false;
}
template <typename T, typename U> inline bool amax(T &x, U y) {
return (x < y) ? (x = y, true) : false;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << p.first << " " << p.second;
return os;
}
template <typename T, typename U>
istream &operator>>(istream &is, pair<T, U> &p) {
is >> p.first >> p.second;
return is;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
int s = (int)v.size();
rep(i, s) os << (i ? " " : "") << v[i];
return os;
}
template <typename T> istream &operator>>(istream &is, vector<T> &v) {
for (auto &x : v)
is >> x;
return is;
}
void in() {}
template <typename T, class... U> void in(T &t, U &...u) {
cin >> t;
in(u...);
}
void out() { cout << "\n"; }
template <typename T, class... U> void out(const T &t, const U &...u) {
cout << t;
if (sizeof...(u))
cout << " ";
out(u...);
}
template <typename T> void die(T x) {
out(x);
exit(0);
}
random_device seed_gen;
mt19937_64 mtrand(seed_gen());
#define MOD 1000000007
//////////////////////////////////////////
int main() {
ini(n, a, b);
out(min(a, b), max(0, a + b - n));
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"call.arguments.change"
] | 940,102 | 940,103 | u168578024 | cpp |
p03139 | #include <algorithm>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(N - A - B, 0);
}
| #include <algorithm>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(A + B - N, 0);
}
| [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,108 | 940,109 | u444349080 | cpp |
p03139 | #include <algorithm>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << min(N - A - B, 0);
}
| #include <algorithm>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(A + B - N, 0);
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change",
"expression.operation.binary.remove",
"expression.operator.arithmetic.change"
] | 940,110 | 940,109 | u444349080 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, n - a - b) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
}
| [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,111 | 940,112 | u093744128 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << ' ' << max(0, a + b - 100) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << ' ' << max(0, a + b - n) << endl;
} | [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 940,113 | 940,114 | u244626757 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << (a + b < n ? 0 : a + b - n);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << (a + b < n ? 0 : a + b - n);
} | [
"io.output.change"
] | 940,117 | 940,118 | u950901760 | cpp |
p03139 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << (a + b >= n ? n - a + b : 0) << endl;
} | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << (a + b > n ? a + b - n : 0) << endl;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"io.output.change",
"expression.operation.binary.remove"
] | 940,121 | 940,122 | u392569193 | cpp |
p03139 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << max(A + B - N, 0) << endl;
return 0;
} | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << ' ' << max(A + B - N, 0) << endl;
return 0;
} | [
"io.output.change"
] | 940,129 | 940,130 | u520129469 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << max(0, 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, c) << " " << max(0, b + c - a) << endl;
return 0;
}
| [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 940,134 | 940,135 | u251828455 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int n, a, b;
int main() {
cin >> n >> a >> b;
cout << max(a, b) << " " << max(0, a + b - n);
} | #include <bits/stdc++.h>
using namespace std;
int n, a, b;
int main() {
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n);
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,152 | 940,153 | u425670723 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x) ((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y)-1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y)-1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) \
for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define nepit(x) \
for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)
#define All(x) (x).begin(), (x).end()
#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))
#define Unique(v) v.resize(unique(All(v)) - v.begin())
#define peq(p0, p1) (p0.first == p1.first && p0.second == p1.second)
#define End '\n'
#define Out(x) cout << (x) << End
#define OutP(p, sep, end) cout << p.first << sep << p.second << end
template <typename T> inline bool Max(T &x, const T &y) {
return x < y ? x = y, 1 : 0;
}
template <typename T> inline bool Min(T &x, const T &y) {
return x > y ? x = y, 1 : 0;
}
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define lb std::lower_bound
#define ub std::upper_bound
#define lbi(v, x) lb(All(v), (x)) - v.begin()
#define ubi(v, x) ub(All(v), (x)) - v.begin()
static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
#define LOCAL 1
int main() {
#if LOCAL
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
freopen("debug.txt", "w", stderr);
#endif
cin.tie(0);
ios::sync_with_stdio(false);
// std::cout.precision(18);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, min(a, b) - (n - max(a, b))) << End;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x) ((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y)-1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y)-1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) \
for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define nepit(x) \
for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)
#define All(x) (x).begin(), (x).end()
#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))
#define Unique(v) v.resize(unique(All(v)) - v.begin())
#define peq(p0, p1) (p0.first == p1.first && p0.second == p1.second)
#define End '\n'
#define Out(x) cout << (x) << End
#define OutP(p, sep, end) cout << p.first << sep << p.second << end
template <typename T> inline bool Max(T &x, const T &y) {
return x < y ? x = y, 1 : 0;
}
template <typename T> inline bool Min(T &x, const T &y) {
return x > y ? x = y, 1 : 0;
}
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define lb std::lower_bound
#define ub std::upper_bound
#define lbi(v, x) lb(All(v), (x)) - v.begin()
#define ubi(v, x) ub(All(v), (x)) - v.begin()
static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
#define LOCAL 0
int main() {
#if LOCAL
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
freopen("debug.txt", "w", stderr);
#endif
cin.tie(0);
ios::sync_with_stdio(false);
// std::cout.precision(18);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, min(a, b) - (n - max(a, b))) << End;
return 0;
}
| [
"preprocessor.define.value.change",
"literal.integer.change"
] | 940,156 | 940,157 | u518883877 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x) ((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y)-1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y)-1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) \
for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define nepit(x) \
for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)
#define All(x) (x).begin(), (x).end()
#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))
#define Unique(v) v.resize(unique(All(v)) - v.begin())
#define peq(p0, p1) (p0.first == p1.first && p0.second == p1.second)
#define End '\n'
#define Out(x) cout << (x) << End
#define OutP(p, sep, end) cout << p.first << sep << p.second << end
template <typename T> inline bool Max(T &x, const T &y) {
return x < y ? x = y, 1 : 0;
}
template <typename T> inline bool Min(T &x, const T &y) {
return x > y ? x = y, 1 : 0;
}
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define lb std::lower_bound
#define ub std::upper_bound
#define lbi(v, x) lb(All(v), (x)) - v.begin()
#define ubi(v, x) ub(All(v), (x)) - v.begin()
static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
#define LOCAL 0
int main() {
#if LOCAL
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
freopen("debug.txt", "w", stderr);
#endif
cin.tie(0);
ios::sync_with_stdio(false);
// std::cout.precision(18);
int n, a, b;
cin >> n >> a >> b;
cout << max(a, b) << " " << max(0, min(a, b) - (n - max(a, b))) << End;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x) ((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y)-1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y)-1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) \
for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define nepit(x) \
for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)
#define All(x) (x).begin(), (x).end()
#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))
#define Unique(v) v.resize(unique(All(v)) - v.begin())
#define peq(p0, p1) (p0.first == p1.first && p0.second == p1.second)
#define End '\n'
#define Out(x) cout << (x) << End
#define OutP(p, sep, end) cout << p.first << sep << p.second << end
template <typename T> inline bool Max(T &x, const T &y) {
return x < y ? x = y, 1 : 0;
}
template <typename T> inline bool Min(T &x, const T &y) {
return x > y ? x = y, 1 : 0;
}
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define lb std::lower_bound
#define ub std::upper_bound
#define lbi(v, x) lb(All(v), (x)) - v.begin()
#define ubi(v, x) ub(All(v), (x)) - v.begin()
static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
#define LOCAL 0
int main() {
#if LOCAL
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
freopen("debug.txt", "w", stderr);
#endif
cin.tie(0);
ios::sync_with_stdio(false);
// std::cout.precision(18);
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, min(a, b) - (n - max(a, b))) << End;
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,158 | 940,157 | u518883877 | cpp |
p03139 | #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
int n, a, b, M, m;
cin >> n;
cin >> a;
cin >> b;
M = min(a, b);
m = a + b - n;
if (n < 0)
m = 0;
cout << M << " " << m << "\n";
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
int n, a, b, M, m;
cin >> n;
cin >> a;
cin >> b;
M = min(a, b);
m = a + b - n;
if (m < 0)
m = 0;
cout << M << " " << m << "\n";
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 940,165 | 940,166 | u636489589 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cout << fixed << setprecision(15);
// freopen("input.txt", "r", stdin);
int n, x, y;
cin >> n >> x >> y;
cout << min(x, y) << max(0, x + y - n);
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cout << fixed << setprecision(15);
// freopen("input.txt", "r", stdin);
int n, x, y;
cin >> n >> x >> y;
cout << min(x, y) << ' ' << max(0, x + y - n);
}
| [
"io.output.change"
] | 940,169 | 940,170 | u537871123 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int n, a, b;
int max, min;
cin >> n >> a >> b;
if (a < b)
max = a;
else
max = b;
min = n - a - n;
if (min > 0) {
min = 0;
} else {
min = -min;
}
cout << max << " " << min << endl;
} | #include <iostream>
using namespace std;
int main() {
int n, a, b;
int max, min;
cin >> n >> a >> b;
if (a < b)
max = a;
else
max = b;
min = n - a - b;
if (min > 0) {
min = 0;
} else {
min = -min;
}
cout << max << " " << min << endl;
} | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 940,171 | 940,172 | u524568016 | cpp |
p03139 | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)), x.end())
#define snuke srand((unsigned)clock() + (unsigned)time(NULL));
#define show(x) cout << #x << " = " << x << endl;
#define PQ(T) priority_queue<T, v(T), greater<T>>
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() {
int x;
scanf("%d", &x);
return x;
}
template <typename T> inline istream &operator>>(istream &i, v(T) & v) {
rep(j, sz(v)) i >> v[j];
return i;
}
template <typename T> string join(const v(T) & v) {
stringstream s;
rep(i, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <typename T> inline ostream &operator<<(ostream &o, const v(T) & v) {
if (sz(v))
o << join(v);
return o;
}
template <typename T1, typename T2>
inline istream &operator>>(istream &i, pair<T1, T2> &v) {
return i >> v.fi >> v.se;
}
template <typename T1, typename T2>
inline ostream &operator<<(ostream &o, const pair<T1, T2> &v) {
return o << v.fi << "," << v.se;
}
template <typename T> inline ll suma(const v(T) & a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame \
{ \
puts("-1"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
const int MX = 200005;
// 整数スキャン(複数)
/*
int x;
scanf("%d",&x);
int y;
scanf("%d",&y);
int z;
scanf("%d",&z);
// n個の整数のスキャン
/*
ll a[n] = {};
rep(i,n){
scanf("%lld",&a[i]);
}
*/
// 文字列スキャン
/*
string s;
cin >> s;
*/
// n個の文字列スキャン
/*
vector<string> slist;
rep(i,n){
string s;
cin >> s;
slist.push_back(s);
}
*/
int main() {
int n, a, b;
scanf("%d%d%d", &n, &a, &b);
int ma = 0;
int mi = 99999;
ma = max(a, b);
mi = max(a + b - n, 0);
cout << ma << ' ' << mi << endl;
return 0;
}
| #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)), x.end())
#define snuke srand((unsigned)clock() + (unsigned)time(NULL));
#define show(x) cout << #x << " = " << x << endl;
#define PQ(T) priority_queue<T, v(T), greater<T>>
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() {
int x;
scanf("%d", &x);
return x;
}
template <typename T> inline istream &operator>>(istream &i, v(T) & v) {
rep(j, sz(v)) i >> v[j];
return i;
}
template <typename T> string join(const v(T) & v) {
stringstream s;
rep(i, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <typename T> inline ostream &operator<<(ostream &o, const v(T) & v) {
if (sz(v))
o << join(v);
return o;
}
template <typename T1, typename T2>
inline istream &operator>>(istream &i, pair<T1, T2> &v) {
return i >> v.fi >> v.se;
}
template <typename T1, typename T2>
inline ostream &operator<<(ostream &o, const pair<T1, T2> &v) {
return o << v.fi << "," << v.se;
}
template <typename T> inline ll suma(const v(T) & a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame \
{ \
puts("-1"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
const int MX = 200005;
// 整数スキャン(複数)
/*
int x;
scanf("%d",&x);
int y;
scanf("%d",&y);
int z;
scanf("%d",&z);
// n個の整数のスキャン
/*
ll a[n] = {};
rep(i,n){
scanf("%lld",&a[i]);
}
*/
// 文字列スキャン
/*
string s;
cin >> s;
*/
// n個の文字列スキャン
/*
vector<string> slist;
rep(i,n){
string s;
cin >> s;
slist.push_back(s);
}
*/
int main() {
int n, a, b;
scanf("%d%d%d", &n, &a, &b);
int ma = 0;
int mi = 99999;
ma = min(a, b);
mi = max(a + b - n, 0);
cout << ma << ' ' << mi << endl;
return 0;
}
| [
"misc.opposites",
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 940,184 | 940,185 | u791593901 | cpp |
p03139 | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)), x.end())
#define snuke srand((unsigned)clock() + (unsigned)time(NULL));
#define show(x) cout << #x << " = " << x << endl;
#define PQ(T) priority_queue<T, v(T), greater<T>>
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() {
int x;
scanf("%d", &x);
return x;
}
template <typename T> inline istream &operator>>(istream &i, v(T) & v) {
rep(j, sz(v)) i >> v[j];
return i;
}
template <typename T> string join(const v(T) & v) {
stringstream s;
rep(i, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <typename T> inline ostream &operator<<(ostream &o, const v(T) & v) {
if (sz(v))
o << join(v);
return o;
}
template <typename T1, typename T2>
inline istream &operator>>(istream &i, pair<T1, T2> &v) {
return i >> v.fi >> v.se;
}
template <typename T1, typename T2>
inline ostream &operator<<(ostream &o, const pair<T1, T2> &v) {
return o << v.fi << "," << v.se;
}
template <typename T> inline ll suma(const v(T) & a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame \
{ \
puts("-1"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
const int MX = 200005;
// 整数スキャン(複数)
/*
int x;
scanf("%d",&x);
int y;
scanf("%d",&y);
int z;
scanf("%d",&z);
// n個の整数のスキャン
/*
ll a[n] = {};
rep(i,n){
scanf("%lld",&a[i]);
}
*/
// 文字列スキャン
/*
string s;
cin >> s;
*/
// n個の文字列スキャン
/*
vector<string> slist;
rep(i,n){
string s;
cin >> s;
slist.push_back(s);
}
*/
int main() {
int n, a, b;
scanf("%d%d%d", &n, &a, &b);
int ma = 0;
int mi = 99999;
ma = max(a, b);
mi = a + b - n;
cout << ma << ' ' << mi << endl;
return 0;
}
| #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)), x.end())
#define snuke srand((unsigned)clock() + (unsigned)time(NULL));
#define show(x) cout << #x << " = " << x << endl;
#define PQ(T) priority_queue<T, v(T), greater<T>>
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() {
int x;
scanf("%d", &x);
return x;
}
template <typename T> inline istream &operator>>(istream &i, v(T) & v) {
rep(j, sz(v)) i >> v[j];
return i;
}
template <typename T> string join(const v(T) & v) {
stringstream s;
rep(i, sz(v)) s << ' ' << v[i];
return s.str().substr(1);
}
template <typename T> inline ostream &operator<<(ostream &o, const v(T) & v) {
if (sz(v))
o << join(v);
return o;
}
template <typename T1, typename T2>
inline istream &operator>>(istream &i, pair<T1, T2> &v) {
return i >> v.fi >> v.se;
}
template <typename T1, typename T2>
inline ostream &operator<<(ostream &o, const pair<T1, T2> &v) {
return o << v.fi << "," << v.se;
}
template <typename T> inline ll suma(const v(T) & a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame \
{ \
puts("-1"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
const int MX = 200005;
// 整数スキャン(複数)
/*
int x;
scanf("%d",&x);
int y;
scanf("%d",&y);
int z;
scanf("%d",&z);
// n個の整数のスキャン
/*
ll a[n] = {};
rep(i,n){
scanf("%lld",&a[i]);
}
*/
// 文字列スキャン
/*
string s;
cin >> s;
*/
// n個の文字列スキャン
/*
vector<string> slist;
rep(i,n){
string s;
cin >> s;
slist.push_back(s);
}
*/
int main() {
int n, a, b;
scanf("%d%d%d", &n, &a, &b);
int ma = 0;
int mi = 99999;
ma = min(a, b);
mi = max(a + b - n, 0);
cout << ma << ' ' << mi << endl;
return 0;
}
| [
"misc.opposites",
"assignment.value.change",
"identifier.change",
"call.function.change",
"call.add",
"call.arguments.add"
] | 940,186 | 940,185 | u791593901 | cpp |
p03139 | #include <iostream>
using namespace std;
int max(int a, int b) {
if (a < b)
return b;
else
return a;
}
int min(int a, int b) {
if (a < b)
return a;
else
return b;
}
int main() {
int N, A, B;
cin >> N >> A >> B;
int ma = min(A, B);
int mi = max(0, A + B - N);
cout << ma << mi << endl;
} | #include <iostream>
using namespace std;
int max(int a, int b) {
if (a < b)
return b;
else
return a;
}
int min(int a, int b) {
if (a < b)
return a;
else
return b;
}
int main() {
int N, A, B;
cin >> N >> A >> B;
int ma = min(A, B);
int mi = max(0, A + B - N);
cout << ma << " " << mi << endl;
}
| [
"io.output.change"
] | 940,194 | 940,195 | u058186113 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
int c;
c = a + b - c;
if (c < 0)
c = 0;
cout << min(a, b) << " " << c << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
int c;
c = a + b - n;
if (c < 0)
c = 0;
cout << min(a, b) << " " << c << endl;
}
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 940,198 | 940,199 | u501130777 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
int c;
c = a + b - c;
if (c < 0)
c = 0;
cout << max(a, b) << " " << c << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
int c;
c = a + b - n;
if (c < 0)
c = 0;
cout << min(a, b) << " " << c << endl;
}
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"misc.opposites",
"call.function.change",
"io.output.change"
] | 940,200 | 940,199 | u501130777 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << max(a + b - n, 0);
// your code goes here
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(a + b - n, 0);
// your code goes here
return 0;
} | [
"io.output.change"
] | 940,201 | 940,202 | u214610627 | cpp |
p03139 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <set>
#include <string>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, k, n) for (int i = (k); i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A + B <= 10) {
cout << min(A, B) << " " << 0 << endl;
} else {
cout << min(A, B) << " " << A + B - N << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <set>
#include <string>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, k, n) for (int i = (k); i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A + B <= N) {
cout << min(A, B) << " " << 0 << endl;
} else {
cout << min(A, B) << " " << A + B - N << endl;
}
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 940,205 | 940,206 | u709746636 | cpp |
p03139 | #include <iostream>
using namespace std;
int main(void) {
int A, B, N, MAX, MIN, tmp;
cin >> N >> A >> B;
MAX = min(A, B);
tmp = A + B - N;
if (tmp > 0) {
MIN = tmp;
} else {
MIN = 0;
}
cout << MAX << MIN << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main(void) {
int A, B, N, MAX, MIN, tmp;
cin >> N >> A >> B;
MAX = min(A, B);
tmp = A + B - N;
if (tmp > 0) {
MIN = tmp;
} else {
MIN = 0;
}
cout << MAX << " " << MIN << endl;
return 0;
}
| [
"io.output.change"
] | 940,207 | 940,208 | u011869847 | cpp |
p03138 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, K, n;
long long res = 0, ans = 0;
cin >> N >> K;
vector<long long> v(N), vs(N);
for (int i = 0; i < N; i++) {
cin >> v[i];
}
vs = v;
vector<long long> v2(40);
for (int i = 0; i < N; i++) {
n = 0;
while (v[i] > 0) {
v2[n] += v[i] % 2;
v[i] /= 2;
n++;
}
}
n = 39;
reverse(v2.begin(), v2.end());
for (long long i : v2) {
if (i <= N / 2 && res + pow(2, n) <= K) {
res += pow(2, n);
}
n--;
if (res >= K) {
break;
}
}
for (long long i : vs) {
ans += i ^ res;
}
cout << res << endl << ans << endl;
}
// sort(v.rbegin(), v.rend(), [](auto& x, auto& y){return x[1] < y[1];}); | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, K, n;
long long res = 0, ans = 0;
cin >> N >> K;
vector<long long> v(N), vs(N);
for (int i = 0; i < N; i++) {
cin >> v[i];
}
vs = v;
vector<long long> v2(40);
for (int i = 0; i < N; i++) {
n = 0;
while (v[i] > 0) {
v2[n] += v[i] % 2;
v[i] /= 2;
n++;
}
}
n = 39;
reverse(v2.begin(), v2.end());
for (long long i : v2) {
if (i <= N / 2 && res + pow(2, n) <= K) {
res += pow(2, n);
}
n--;
if (res >= K) {
break;
}
}
for (long long i : vs) {
ans += i ^ res;
}
cout << ans << endl;
}
// sort(v.rbegin(), v.rend(), [](auto& x, auto& y){return x[1] < y[1];}); | [
"expression.operation.binary.remove"
] | 940,219 | 940,220 | u335278042 | cpp |
p03138 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define INF (1 << 29)
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
Int a[216000], n, k;
Int f(Int x) {
Int res = 0;
for (int i = 0; i < n; i++)
res += x ^ a[i];
return res;
}
Int greedy[45];
int main() {
cin >> n >> k;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int j = 0; j < 45; j++) {
greedy[j + 1] = greedy[j];
if (f(greedy[j + 1]) < greedy[j + 1] + (1LL << j))
greedy[j + 1] += 1LL << j;
}
Int res = f(0);
Int p = 0;
Int tk = k;
while (true) {
while (p + 1 < 45 && tk + greedy[p + 1] <= k)
p++;
res = max(res, f(tk + greedy[p]));
if (tk == 0)
break;
tk -= tk & -tk;
}
cout << res << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define INF (1 << 29)
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
Int a[216000], n, k;
Int f(Int x) {
Int res = 0;
for (int i = 0; i < n; i++)
res += x ^ a[i];
return res;
}
Int greedy[47];
int main() {
cin >> n >> k;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int j = 0; j < 45; j++) {
greedy[j + 1] = greedy[j];
if (f(greedy[j + 1]) < f(greedy[j + 1] + (1LL << j)))
greedy[j + 1] += 1LL << j;
}
Int res = f(0);
Int p = 0;
Int tk = k;
while (true) {
while (p + 1 < 45 && tk + greedy[p + 1] <= k)
p++;
res = max(res, f(tk + greedy[p]));
if (tk == 0)
break;
tk -= tk & -tk;
}
cout << res << endl;
return 0;
} | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.add"
] | 940,228 | 940,226 | u299869545 | cpp |
p03138 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define N 200005
int freq[40][2];
int pref[40];
map<pair<int, int>, int> me;
int find_ans(int ind, int k) {
if (ind < 0)
return 0;
if (me.find({ind, k}) != me.end())
return me[{ind, k}];
int p = pow(2, ind);
if (k < p) {
int temp = freq[ind][1] * p + find_ans(ind - 1, k);
me[{ind, k}] = temp;
return temp;
}
int temp = freq[ind][1] * p;
if (ind > 0)
temp += pref[ind - 1];
int temp1 = freq[ind][0] * p + find_ans(ind - 1, k - p);
me[{ind, k}] = max(temp, temp1);
return max(temp, temp1);
}
int32_t main() {
// ios_base::sync_with_stdio(false);
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
int temp = a[i];
for (int j = 0; j < 40; j++) {
int d = temp % 2;
temp /= 2;
freq[j][d]++;
}
}
for (int i = 0; i < 40; i++) {
if (i > 0)
pref[i] = pref[i - 1];
int d = pow(2, i);
pref[i] = max(freq[i][0], freq[i][1]) * d;
}
cout << find_ans(39, k) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define N 200005
int freq[40][2];
int pref[40];
map<pair<int, int>, int> me;
int find_ans(int ind, int k) {
if (ind < 0)
return 0;
if (me.find({ind, k}) != me.end())
return me[{ind, k}];
int p = pow(2, ind);
if (k < p) {
int temp = freq[ind][1] * p + find_ans(ind - 1, k);
me[{ind, k}] = temp;
return temp;
}
int temp = freq[ind][1] * p;
if (ind > 0)
temp += pref[ind - 1];
int temp1 = freq[ind][0] * p + find_ans(ind - 1, k - p);
me[{ind, k}] = max(temp, temp1);
return max(temp, temp1);
}
int32_t main() {
// ios_base::sync_with_stdio(false);
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
int temp = a[i];
for (int j = 0; j < 40; j++) {
int d = temp % 2;
temp /= 2;
freq[j][d]++;
}
}
for (int i = 0; i < 40; i++) {
if (i > 0)
pref[i] = pref[i - 1];
int d = pow(2, i);
pref[i] += max(freq[i][0], freq[i][1]) * d;
}
cout << find_ans(39, k) << endl;
return 0;
} | [
"assignment.value.change"
] | 940,262 | 940,263 | u991382421 | cpp |
p03138 | #include <algorithm>
#include <climits>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
// using
using namespace std;
// typedef
typedef long long ll;
// define
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REVERSE(c) reverse(ALL(c))
#define UNIQ(c) unique(ALL(c))
#define FOR(i, a, b, c) for (int i = (int)(a); i < (int)(b); i += (int)(c))
#define REP(i, n) FOR(i, 0, n, 1)
#define RFOR(i, a, b, c) for (int i = (int)(a); i >= (int)(b); i -= (int)(c))
#define RREP(i, n) RFOR(i, n, 0, 1)
// functions
template <class T> T ceil(T a, T b) { return (a + b - 1) / b; }
template <class T> T round(T a, T b) { return (a + b / 2) / b; }
template <class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <class T> T lcm(T a, T b) { return a * b / gcd(a, b); }
template <class T> bool amax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool amin(T &a, const T &b) {
if (b < a) {
a = b;
return true;
}
return false;
}
// main
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, K;
cin >> N >> K;
vector<ll> A(N), cnt(45, 0);
REP(i, N) {
cin >> A[i];
int j = 0;
while ((A[i] >> j) > 0) {
if ((A[i] >> j) & 1) {
cnt[j]++;
}
j++;
}
}
ll X = 0L;
REP(i, 45) {
if (cnt[i] >= N - cnt[i]) {
continue;
}
ll Y = X + (1L << i);
if (Y > K) {
break;
}
X = Y;
}
ll res = 0L;
REP(i, N) { res += (X ^ A[i]); }
cout << res << "\n";
return 0;
}
| #include <algorithm>
#include <climits>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
// using
using namespace std;
// typedef
typedef long long ll;
// define
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REVERSE(c) reverse(ALL(c))
#define UNIQ(c) unique(ALL(c))
#define FOR(i, a, b, c) for (int i = (int)(a); i < (int)(b); i += (int)(c))
#define REP(i, n) FOR(i, 0, n, 1)
#define RFOR(i, a, b, c) for (int i = (int)(a); i >= (int)(b); i -= (int)(c))
#define RREP(i, n) RFOR(i, n, 0, 1)
// functions
template <class T> T ceil(T a, T b) { return (a + b - 1) / b; }
template <class T> T round(T a, T b) { return (a + b / 2) / b; }
template <class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <class T> T lcm(T a, T b) { return a * b / gcd(a, b); }
template <class T> bool amax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool amin(T &a, const T &b) {
if (b < a) {
a = b;
return true;
}
return false;
}
// main
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, K;
cin >> N >> K;
vector<ll> A(N), cnt(45, 0);
REP(i, N) {
cin >> A[i];
int j = 0;
while ((A[i] >> j) > 0) {
if ((A[i] >> j) & 1) {
cnt[j]++;
}
j++;
}
}
ll X = 0L;
RREP(i, 44) {
if (cnt[i] >= N - cnt[i]) {
continue;
}
ll Y = X + (1L << i);
if (Y > K) {
continue;
}
X = Y;
}
ll res = 0L;
REP(i, N) { res += (X ^ A[i]); }
cout << res << "\n";
return 0;
}
| [
"identifier.change",
"call.function.change",
"literal.number.change",
"call.arguments.change",
"control_flow.break.remove",
"control_flow.continue.add"
] | 940,264 | 940,265 | u164300951 | cpp |
p03138 | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll n, k, bit[45], ans, a;
vector<ll> vec;
ll pow(ll r, ll t) {
if (t == 0)
return 1;
if (t % 2)
return r * pow(r, t - 1);
else {
ll yy = pow(r, t / 2);
return yy * yy;
}
}
int main(void) {
// Your code here!
cin >> n >> k;
for (ll i = 0; i < n; i++) {
cin >> a;
ll j = 0;
while (a) {
bit[j] += a % 2;
a /= 2;
j++;
}
}
while (k) {
vec.push_back(k % 2);
k /= 2;
}
bool u = false;
for (ll i = vec.size() - 1; i >= 0; i--) {
if (u) {
if (vec[i] == 0) {
ans += pow(2, bit[i]);
} else {
if (bit[i] >= n - bit[i]) {
ans += bit[i] * pow(2, i);
u = true;
} else {
ans += (n - bit[i]) * pow(2, i);
}
}
} else {
ans += max(bit[i], (n - bit[i])) * pow(2, i);
}
}
for (ll i = vec.size(); i <= 44; i++) {
ans += bit[i] * pow(2, i);
}
cout << ans << endl;
}
| #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll n, k, bit[45], ans, a;
vector<ll> vec;
ll pow(ll r, ll t) {
if (t == 0)
return 1;
if (t % 2)
return r * pow(r, t - 1);
else {
ll yy = pow(r, t / 2);
return yy * yy;
}
}
int main(void) {
// Your code here!
cin >> n >> k;
for (ll i = 0; i < n; i++) {
cin >> a;
ll j = 0;
while (a) {
bit[j] += a % 2;
a /= 2;
j++;
}
}
while (k) {
vec.push_back(k % 2);
k /= 2;
}
bool u = false;
for (ll i = vec.size() - 1; i >= 0; i--) {
if (!u) {
if (vec[i] == 0) {
ans += pow(2, i) * bit[i];
} else {
if (bit[i] >= n - bit[i]) {
ans += bit[i] * pow(2, i);
u = true;
} else {
ans += (n - bit[i]) * pow(2, i);
}
}
} else {
ans += max(bit[i], (n - bit[i])) * pow(2, i);
}
}
for (ll i = vec.size(); i <= 44; i++) {
ans += bit[i] * pow(2, i);
}
cout << ans << endl;
}
| [
"expression.operation.unary.add",
"control_flow.branch.if.condition.change",
"assignment.change",
"call.arguments.change"
] | 940,271 | 940,272 | u475007080 | cpp |
p03138 | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
constexpr ll INF = 1000000000; /* 1e+9a */
void solve(istream &cin) {
ll N;
if (!(cin >> N)) {
return;
}
ll K;
cin >> K;
vector<ll> A;
vector<ll> dsum(60, 0);
for (int i = 0; i < N; ++i) {
ll tmp;
cin >> tmp;
A.push_back(tmp);
int d = 0;
while (tmp > 0) {
if (tmp & 1) {
dsum[d]++;
}
d++;
tmp /= 2;
}
} // end i
stack<int> stk;
ll pp = 0;
ll harf = N / 2;
for (ll i = dsum.size() - 1; i >= 0; --i) {
ll curr = 1ll << i;
if (dsum[i] <= harf) {
if ((pp | curr) <= K) {
pp |= curr;
stk.push(i);
// cerr << "push:" << i << endl;
} else {
if (stk.empty())
continue;
int j = stk.top();
if (N - dsum[i] < ((N - dsum[j]) << (j - i))) {
// cerr << "pop:" << j << endl;
stk.pop();
pp &= !(1ll << j);
pp |= curr;
stk.push(i);
// cerr << "push:" << i << endl;
}
}
}
} // end i
if (pp > K) {
throw "out";
}
ll ans = 0;
for (int i = 0; i < N; ++i) {
ans += A[i] ^ pp;
} // end i
cout << ans << endl;
}
int main(int argc, char *argv[]) {
string FileName("D"), Modifier("MEPH_");
string ExecutionName = Modifier + FileName;
string sub(argv[0]);
// /home/USER/.../MEPH_X -> MEPH_X
if (sub.size() > ExecutionName.size())
sub = sub.substr(sub.size() - ExecutionName.size(), ExecutionName.size());
cout << setprecision(16) << scientific;
if (sub != ExecutionName) {
cin.tie(nullptr);
ios::sync_with_stdio(false);
while (cin) {
solve(cin);
}
} else {
cerr << sub << " test" << endl;
string inFile = FileName + ".txt";
auto fs = fstream(inFile, fstream::in);
while (fs) {
solve(fs);
}
}
}
| #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
constexpr ll INF = 1000000000; /* 1e+9a */
void solve(istream &cin) {
ll N;
if (!(cin >> N)) {
return;
}
ll K;
cin >> K;
vector<ll> A;
vector<ll> dsum(60, 0);
for (int i = 0; i < N; ++i) {
ll tmp;
cin >> tmp;
A.push_back(tmp);
int d = 0;
while (tmp > 0) {
if (tmp & 1) {
dsum[d]++;
}
d++;
tmp /= 2;
}
} // end i
stack<int> stk;
ll pp = 0;
ll harf = N / 2;
for (ll i = dsum.size() - 1; i >= 0; --i) {
ll curr = 1ll << i;
if (dsum[i] <= harf) {
if ((pp | curr) <= K) {
pp |= curr;
stk.push(i);
// cerr << "push:" << i << endl;
} else {
if (stk.empty())
continue;
int j = stk.top();
if (N - 2 * dsum[i] > ((N - 2 * dsum[j]) << (j - i))) {
// cerr << "pop:" << j << endl;
stk.pop();
pp &= !(1ll << j);
pp |= curr;
stk.push(i);
// cerr << "push:" << i << endl;
}
}
}
} // end i
if (pp > K) {
throw "out";
}
// cerr << "pp:" << pp << endl;
ll ans = 0;
for (int i = 0; i < N; ++i) {
ans += A[i] ^ pp;
} // end i
cout << ans << endl;
}
int main(int argc, char *argv[]) {
string FileName("D"), Modifier("MEPH_");
string ExecutionName = Modifier + FileName;
string sub(argv[0]);
// /home/USER/.../MEPH_X -> MEPH_X
if (sub.size() > ExecutionName.size())
sub = sub.substr(sub.size() - ExecutionName.size(), ExecutionName.size());
cout << setprecision(16) << scientific;
if (sub != ExecutionName) {
cin.tie(nullptr);
ios::sync_with_stdio(false);
while (cin) {
solve(cin);
}
} else {
cerr << sub << " test" << endl;
string inFile = FileName + ".txt";
auto fs = fstream(inFile, fstream::in);
while (fs) {
solve(fs);
}
}
}
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.opposites",
"expression.operator.compare.change"
] | 940,273 | 940,274 | u896838289 | cpp |
p03138 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N, K;
vector<ll> A;
ll ret = 0;
ll f0;
void input() {
ll temp;
cin >> N >> K;
for (ll i = 0; i < N; i++) {
cin >> temp;
A.push_back(temp);
}
}
ll func(ll X) {
ll ans = 0;
for (ll i = 0; i < N; i++) {
ans += X ^ A[i];
}
return ans;
}
void solve() {
f0 = func(0);
ll e = 1;
while (e < K) {
e *= 2;
}
e *= 2;
for (; e > 0; e = e / 2) {
if (ret + e < K) {
if (func(e) > func(0)) {
ret += e;
}
}
}
}
int main(void) {
// Your code here!
input();
solve();
cout << func(ret) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N, K;
vector<ll> A;
ll ret = 0;
ll f0;
void input() {
ll temp;
cin >> N >> K;
for (ll i = 0; i < N; i++) {
cin >> temp;
A.push_back(temp);
}
}
ll func(ll X) {
ll ans = 0;
for (ll i = 0; i < N; i++) {
ans += X ^ A[i];
}
return ans;
}
void solve() {
f0 = func(0);
ll e = 1;
while (e < K) {
e *= 2;
}
e *= 2;
for (; e > 0; e = e / 2) {
if (ret + e <= K) {
if (func(e) > func(0)) {
ret += e;
}
}
}
}
int main(void) {
// Your code here!
input();
solve();
cout << func(ret) << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 940,284 | 940,285 | u790171360 | cpp |
p03138 | #include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define TOSTRING(x) #x
#define SZ(x) (int)(x).size()
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REPR(i, n) for (int i = (n)-1; i >= 0; i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase(unique(ALL(v)), v.end());
#define PAU system("pause")
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<vb> vvb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 28);
const ll LINF = 1e18;
const double PI = acos(-1);
typedef tuple<int, ll, int> T;
const int VEC_SIZE = 60;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, K;
cin >> N >> K;
vll A(N);
REP(i, N) { cin >> A[i]; }
vll bits(VEC_SIZE, 0);
REP(i, N) {
REP(j, VEC_SIZE) {
bits[j] += A[i] % 2;
A[i] >>= 1;
}
}
ll mul = 1;
vector<T> VT(41);
REP(i, VEC_SIZE) {
VT[i] = T((N - 2 * bits[i]) * mul, mul, i);
mul *= 2;
}
so(VT);
rev(VT);
ll cur = 0;
vb isRev(VEC_SIZE, false);
REP(i, VEC_SIZE) {
if (get<0>(VT[i]) < 0)
break;
if (cur + get<1>(VT[i]) <= K) {
isRev[get<2>(VT[i])] = true;
cur += get<1>(VT[i]);
}
}
ll ans = 0;
mul = 1;
REP(i, VEC_SIZE) {
if (isRev[i])
ans += (N - bits[i]) * mul;
else
ans += bits[i] * mul;
mul *= 2;
}
cout << ans << endl;
PAU;
return 0;
}
| #include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define TOSTRING(x) #x
#define SZ(x) (int)(x).size()
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REPR(i, n) for (int i = (n)-1; i >= 0; i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase(unique(ALL(v)), v.end());
#define PAU system("pause")
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<vb> vvb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 28);
const ll LINF = 1e18;
const double PI = acos(-1);
typedef tuple<ll, ll, int> T;
const int VEC_SIZE = 60;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, K;
cin >> N >> K;
vll A(N);
REP(i, N) { cin >> A[i]; }
vll bits(VEC_SIZE, 0);
REP(i, N) {
REP(j, VEC_SIZE) {
bits[j] += A[i] % 2;
A[i] >>= 1;
}
}
ll mul = 1;
vector<T> VT(VEC_SIZE);
REP(i, VEC_SIZE) {
VT[i] = T((N - 2 * bits[i]) * mul, mul, i);
mul *= 2;
}
so(VT);
rev(VT);
ll cur = 0;
vb isRev(VEC_SIZE, false);
REP(i, VEC_SIZE) {
if (get<0>(VT[i]) < 0)
break;
if (cur + get<1>(VT[i]) <= K) {
isRev[get<2>(VT[i])] = true;
cur += get<1>(VT[i]);
}
}
ll ans = 0;
mul = 1;
REP(i, VEC_SIZE) {
if (isRev[i])
ans += (N - bits[i]) * mul;
else
ans += bits[i] * mul;
mul *= 2;
}
cout << ans << endl;
PAU;
return 0;
}
| [
"call.arguments.change"
] | 940,301 | 940,300 | u137332130 | cpp |
p03138 | #include <bits/stdc++.h>
using namespace std;
#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++)
#define all(x) (x).begin(), (x).end()
#define foreach(u, v) for (auto(u) : (v))
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<ll, ll> pll;
typedef vector<ll> vl;
const int inf = 1e9;
const ll linf = 1LL << 60;
const ll mod = 1e9 + 7;
const double eps = 1e-9;
/*
*/
ll n, k;
vl a;
signed main() {
cin >> n >> k;
rep(i, n) {
ll A;
cin >> A;
a.pb(A);
}
ll ans = 0;
vi c(60, 0);
rep(i, n) {
rep(j, 60) {
if (a[i] >> j & 1)
c[j]++;
}
}
ll x = 0;
for (int i = 59; i >= 0; i--) {
if (c[i] < n - c[i]) {
if (x + 1LL << i <= k) {
x += 1LL << i;
}
}
}
rep(i, n) { ans += x ^ a[i]; }
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#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++)
#define all(x) (x).begin(), (x).end()
#define foreach(u, v) for (auto(u) : (v))
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<ll, ll> pll;
typedef vector<ll> vl;
const int inf = 1e9;
const ll linf = 1LL << 60;
const ll mod = 1e9 + 7;
const double eps = 1e-9;
/*
*/
ll n, k;
vl a;
signed main() {
cin >> n >> k;
rep(i, n) {
ll A;
cin >> A;
a.pb(A);
}
ll ans = 0;
vi c(60, 0);
rep(i, n) {
rep(j, 60) {
if (a[i] >> j & 1)
c[j]++;
}
}
ll x = 0;
for (int i = 59; i >= 0; i--) {
if (c[i] < n - c[i]) {
// cout << i << ":" << (1LL<<i) << endl;
if (x + (1LL << i) <= k) {
x += 1LL << i;
}
}
}
rep(i, n) { ans += x ^ a[i]; }
cout << ans << endl;
// cout << x << endl;
return 0;
}
| [
"control_flow.branch.if.condition.change"
] | 940,310 | 940,311 | u057866967 | cpp |
p03138 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
inline ll read() {
ll x = 0, f = 1;
char ch = getchar();
for (; ch < '0' || ch > '9'; ch = getchar())
if (ch == '-')
f = -f;
for (; ch >= '0' && ch <= '9'; ch = getchar())
x = x * 10 + ch - '0';
return x * f;
}
#define _ read()
ll n, k, a[100005], res, ans, cnt[2];
int main() {
n = _;
k = _;
for (ll i = 1; i <= n; i++)
a[i] = _;
for (ll j = 42; j; j--) {
cnt[1] = cnt[0] = 0;
for (ll i = 1; i <= n; i++)
cnt[(a[i] & (1ll << j)) ? 1 : 0]++;
if (cnt[0] > cnt[1] && res + (1ll << j) <= k)
res += (1ll << j);
}
for (ll i = 1; i <= n; i++)
ans += (res ^ a[i]);
cout << ans;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
inline ll read() {
ll x = 0, f = 1;
char ch = getchar();
for (; ch < '0' || ch > '9'; ch = getchar())
if (ch == '-')
f = -f;
for (; ch >= '0' && ch <= '9'; ch = getchar())
x = x * 10 + ch - '0';
return x * f;
}
#define _ read()
ll n, k, a[100005], res, ans, cnt[2];
int main() {
n = _;
k = _;
for (ll i = 1; i <= n; i++)
a[i] = _;
for (ll j = 42; ~j; j--) {
cnt[1] = cnt[0] = 0;
for (ll i = 1; i <= n; i++)
cnt[(a[i] & (1ll << j)) ? 1 : 0]++;
if (cnt[0] > cnt[1] && res + (1ll << j) <= k)
res += (1ll << j);
}
for (ll i = 1; i <= n; i++)
ans += (res ^ a[i]);
cout << ans;
} | [
"expression.operation.unary.add"
] | 940,322 | 940,323 | u513391017 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int n, a, b;
int max, min;
cin >> n >> a >> b;
if (a <= b) {
max = a;
}
if (b <= a) {
max = b;
}
min = a + b - n;
if (min < 10) {
min = 0;
}
cout << max << " " << min;
} | #include <iostream>
using namespace std;
int main() {
int n, a, b;
int max, min;
cin >> n >> a >> b;
if (a <= b) {
max = a;
}
if (b <= a) {
max = b;
}
min = a + b - n;
if (a + b <= n) {
min = 0;
}
cout << max << " " << min;
} | [
"control_flow.branch.if.condition.change"
] | 940,329 | 940,330 | u365178348 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A > B)
cout << B << " ";
else
cout << A << " ";
if (N < A + B) {
if (A > B)
cout << A + B - N << endl;
} else {
cout << 0 << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
if (A > B)
cout << B << " ";
else
cout << A << " ";
if (N < A + B) {
cout << A + B - N << endl;
} else {
cout << 0 << endl;
}
return 0;
} | [] | 940,344 | 940,345 | u239087789 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
int C = A + B;
int news_min;
if (C > N)
news_min = C - N;
else
news_min = 0;
if (A > B)
cout << A << " " << news_min << endl;
else
cout << A << " " << news_min << endl;
}
| #include <iostream>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
int C = A + B;
int news_min;
if (C > N)
news_min = C - N;
else
news_min = 0;
if (A > B)
cout << B << " " << news_min << endl;
else
cout << A << " " << news_min << endl;
}
| [
"identifier.change",
"io.output.change"
] | 940,348 | 940,349 | u809700806 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << min(0, a + b - n) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
return 0;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,353 | 940,354 | u683718016 | cpp |
p03139 | #include <bits/stdc++.h>
#define INF (1 << 31) - 1 // INT_MAX/2
#define MOD 1000000007
#define PI acos(-1)
using ll = long long;
using ull = unsigned long long;
using P = std::pair<int, int>;
int main(int argc, char *argv[]) {
int N, A, B;
std::cin >> N >> A >> B;
int max = 0;
int min = 0;
max = std::min(A, B);
if (N < A + B) {
min = N - (A + B);
} else {
min = 0;
}
std::cout << max << " " << min << std::endl;
return 0;
}
| #include <bits/stdc++.h>
#define INF (1 << 31) - 1 // INT_MAX/2
#define MOD 1000000007
#define PI acos(-1)
using ll = long long;
using ull = unsigned long long;
using P = std::pair<int, int>;
int main(int argc, char *argv[]) {
int N, A, B;
std::cin >> N >> A >> B;
int max = 0;
int min = 0;
max = std::min(A, B);
if (N < A + B) {
min = A + B - N;
} else {
min = 0;
}
std::cout << max << " " << min << std::endl;
return 0;
}
| [
"expression.operation.binary.remove",
"assignment.value.change",
"expression.operation.binary.change"
] | 940,355 | 940,356 | u458798873 | cpp |
p03139 | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
int N, A, B;
std::cin >> N;
std::cin >> A;
std::cin >> B;
int M = 0;
M = std::max(A, B);
int Mi = 0;
if (A + B > N)
Mi = A + B - N;
std::cout << std::to_string(M) + " " + std::to_string(Mi);
return 0;
}
| #include <algorithm>
#include <iostream>
#include <vector>
int main() {
int N, A, B;
std::cin >> N;
std::cin >> A;
std::cin >> B;
int M = 0;
M = std::min(A, B);
int Mi = 0;
if (A + B > N)
Mi = A + B - N;
std::cout << std::to_string(M) + " " + std::to_string(Mi);
return 0;
}
| [
"misc.opposites",
"assignment.value.change",
"identifier.change"
] | 940,359 | 940,360 | u817999507 | cpp |
p03139 | #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << max(0, b + c - 10) << endl;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << max(0, b + c - a) << endl;
} | [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 940,363 | 940,364 | u454670021 | cpp |
p03139 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
#define ll long long
int main() {
int N, A, B;
cin >> N >> A >> B;
int m = min(A, B);
cout << m;
cout << max(A + B - N, 0) << endl;
} | #include <iostream>
#include <string>
#include <vector>
using namespace std;
#define ll long long
int main() {
int N, A, B;
cin >> N >> A >> B;
int m = min(A, B);
cout << m << " ";
cout << max(A + B - N, 0) << endl;
} | [
"io.output.change"
] | 940,367 | 940,368 | u949692208 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c;
if (b > c)
d = c;
else
d = b;
e = c + b - a;
cout << d << ' ' << (e > 0) ? e : 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c;
if (b > c)
d = c;
else
d = b;
e = c + b - a;
cout << d << ' ' << ((e > 0) ? e : 0);
}
| [] | 940,381 | 940,382 | u950603962 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repi(i, start, end) for (int i = start; i < end; i++)
#define all(x) (x).begin(), (x).end()
#define debug(x) cout << (x) << endl;
#define MAX 999999999
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << (b + c - a) << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repi(i, start, end) for (int i = start; i < end; i++)
#define all(x) (x).begin(), (x).end()
#define debug(x) cout << (x) << endl;
#define MAX 999999999
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << max(0, b + c - a) << endl;
} | [
"call.add",
"call.arguments.add"
] | 940,383 | 940,384 | u934073187 | cpp |
p03139 | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long int;
using pa = pair<int, int>;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << max(A + B - N, 0);
return 0;
} | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long int;
using pa = pair<int, int>;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(A + B - N, 0);
return 0;
} | [
"io.output.change"
] | 940,385 | 940,386 | u486021106 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
int main(void) {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - 10) << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
int main(void) {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
} | [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 940,389 | 940,390 | u633967774 | cpp |
p03139 | #include <bits/stdc++.h>
#define INF 1 << 30
#define mod 1000000007
#define ll long long
#define pb push_back
#define pp pop_back
#define Loop(i, s, e) for (ll(i) = (s); (i) <= (e); ++(i))
#define desLoop(i, s, e) for (ll(i) = (s); (i) >= (e); --(i))
using namespace std;
typedef struct {
int x, y;
} point;
void Swap(ll *a, int x, int y) {
ll t = a[x];
a[x] = a[y];
a[y] = t;
}
void Qsort(ll *n, int l, int r) {
if (l >= r)
return;
int i = l - 1, j = r + 1;
ll m = n[(i + j) / 2];
while (1) {
while (n[++i] < m)
;
while (n[--j] > m)
;
if (i >= j)
break;
Swap(n, i, j);
}
Qsort(n, l, i - 1);
Qsort(n, j + 1, r);
}
ll min4(ll a, ll b, ll c, ll d) { return min(min(a, b), min(c, d)); }
ll max4(ll a, ll b, ll c, ll d) { return max(max(a, b), max(c, d)); }
int main() {
int tot, a, b;
while (cin >> tot >> a >> b) {
cout << min(a, b) << ' ' << a + b - tot << '\n';
}
return 0;
}
| #include <bits/stdc++.h>
#define INF 1 << 30
#define mod 1000000007
#define ll long long
#define pb push_back
#define pp pop_back
#define Loop(i, s, e) for (ll(i) = (s); (i) <= (e); ++(i))
#define desLoop(i, s, e) for (ll(i) = (s); (i) >= (e); --(i))
using namespace std;
typedef struct {
int x, y;
} point;
void Swap(ll *a, int x, int y) {
ll t = a[x];
a[x] = a[y];
a[y] = t;
}
void Qsort(ll *n, int l, int r) {
if (l >= r)
return;
int i = l - 1, j = r + 1;
ll m = n[(i + j) / 2];
while (1) {
while (n[++i] < m)
;
while (n[--j] > m)
;
if (i >= j)
break;
Swap(n, i, j);
}
Qsort(n, l, i - 1);
Qsort(n, j + 1, r);
}
ll min4(ll a, ll b, ll c, ll d) { return min(min(a, b), min(c, d)); }
ll max4(ll a, ll b, ll c, ll d) { return max(max(a, b), max(c, d)); }
int main() {
int tot, a, b;
while (cin >> tot >> a >> b) {
cout << min(a, b) << ' ' << max(a + b - tot, 0) << '\n';
}
return 0;
}
| [
"call.add",
"call.arguments.add"
] | 940,395 | 940,396 | u516708338 | cpp |
p03139 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define PRINT(str) printf(#str "\n")
#define yOUT PRINT(Yes)
#define nOUT PRINT(No)
#define YOUT PRINT(YES)
#define NOUT PRINT(NO)
#define pb(a) push_back(a)
#define all(x) (x).begin(), (x).end()
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << min(b, c) - (a - max(b, c)) << endl;
}
| #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define PRINT(str) printf(#str "\n")
#define yOUT PRINT(Yes)
#define nOUT PRINT(No)
#define YOUT PRINT(YES)
#define NOUT PRINT(NO)
#define pb(a) push_back(a)
#define all(x) (x).begin(), (x).end()
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(b, c) << " " << max(0, min(b, c) - (a - max(b, c))) << endl;
}
| [
"call.add",
"call.arguments.change"
] | 940,397 | 940,398 | u833064541 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int e;
int d = min(c, b);
if (a < b + c) {
e = b + c - a;
} else {
e = 0;
}
cout << d << e << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int e;
int d = min(c, b);
if (a < b + c) {
e = b + c - a;
} else {
e = 0;
}
cout << d << " " << e << endl;
}
| [
"io.output.change"
] | 940,403 | 940,404 | u686352452 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int e;
int d = min(a, b);
if (a < b + c) {
e = b + c - a;
} else {
e = 0;
}
cout << d << e << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int e;
int d = min(c, b);
if (a < b + c) {
e = b + c - a;
} else {
e = 0;
}
cout << d << " " << e << endl;
}
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 940,405 | 940,404 | u686352452 | cpp |
p03139 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, x) for (__typeof(x) i = 0; i < x; i++)
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define sci(x) \
int x; \
scanf("%d", &x);
#define scii(x, y) \
int x, y; \
scanf("%d %d", &x, &y);
#define sciii(x, y, z) \
int x, y, z; \
scanf("%d %d %d", &x, &y, &z);
#define TC(x) \
sci(x); \
while (x--)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define debug(x) \
{ cerr << #x << " = " << x << endl; }
#define repi(i, x) for (__typeof(x) i = x - 1; i >= 0; i--)
#define fore(itr, x) \
for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr++)
#define forei(itr, x) \
for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr--)
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef vector<vector<int>> vvi;
const int infi = numeric_limits<int>::max();
const double eps = 0;
const int ms = 0;
int main() {
ios::sync_with_stdio(false); // endl->"\n"
cin.tie(0);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << max((A + B) - N, 0) << "\n";
return 0;
} |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, x) for (__typeof(x) i = 0; i < x; i++)
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define sci(x) \
int x; \
scanf("%d", &x);
#define scii(x, y) \
int x, y; \
scanf("%d %d", &x, &y);
#define sciii(x, y, z) \
int x, y, z; \
scanf("%d %d %d", &x, &y, &z);
#define TC(x) \
sci(x); \
while (x--)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define debug(x) \
{ cerr << #x << " = " << x << endl; }
#define repi(i, x) for (__typeof(x) i = x - 1; i >= 0; i--)
#define fore(itr, x) \
for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr++)
#define forei(itr, x) \
for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr--)
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef vector<vector<int>> vvi;
const int infi = numeric_limits<int>::max();
const double eps = 0;
const int ms = 0;
int main() {
ios::sync_with_stdio(false); // endl->"\n"
cin.tie(0);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max((A + B) - N, 0) << "\n";
return 0;
} | [
"io.output.change"
] | 940,416 | 940,417 | u500451627 | cpp |
p03139 | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
#define ll long long
int N, A, B;
int main() {
cin >> N >> A >> B;
cout << min(A, B) << " " << min(0, A + B - N) << endl;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
#define ll long long
int N, A, B;
int main() {
cin >> N >> A >> B;
cout << min(A, B) << " " << max(0, A + B - N) << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,428 | 940,429 | u718394671 | cpp |
p03139 | #include <bits/stdc++.h>
#define Inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
inline ll min(ll x, ll y) { return x < y ? x : y; }
inline ll max(ll x, ll y) { return x > y ? x : y; }
const int Maxn = 1e5 + 5;
int a, b, c;
int main() {
cin >> a >> b >> c;
cout << min(a, b) << " " << max(0, b + c - a) << endl;
return 0;
}
| #include <bits/stdc++.h>
#define Inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
inline ll min(ll x, ll y) { return x < y ? x : y; }
inline ll max(ll x, ll y) { return x > y ? x : y; }
const int Maxn = 1e5 + 5;
int a, b, c;
int main() {
cin >> a >> b >> c;
cout << min(c, b) << " " << max(0, b + c - a) << endl;
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 940,430 | 940,431 | u554106628 | cpp |
p03139 | #include <iostream>
using namespace std;
int main() {
int a, b, n;
cin >> n >> a >> b;
cout << min(a, b) << max(0, a + b - n) << endl;
} | #include <iostream>
using namespace std;
int main() {
int a, b, n;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, a + b - n) << endl;
} | [
"io.output.change"
] | 940,432 | 940,433 | u621509943 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << a + b - n << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << " " << max(a + b - n, 0) << endl;
} | [
"call.add",
"call.arguments.add"
] | 940,434 | 940,435 | u158758819 | cpp |
p03139 | #include <bits/stdc++.h>
typedef long long ll;
#define rep(i, a, b) for (long long i = a; i < b; ++i)
#define rrep(i, a, b) for (int i = a; i >= b; --i)
#define yesno(flag) \
if (flag) \
cout << "Yes" << endl; \
else \
cout << "No" << endl;
using namespace std;
const ll INF = 1000000000000LL;
const ll r197 = 1000000007;
typedef pair<ll, ll> P;
typedef pair<P, P> Pa;
bool Inframe(int a, int b, int c, int d, int h, int w) {
if (a + b >= 0 && a + b < h && c + d >= 0 && c + d < w)
return true;
return false;
}
ll C[100005] = {};
vector<P> v;
vector<ll> ma2;
int n, m;
int a, b, c;
int main() {
cin >> n >> a >> b;
cout << min(a, b) << " " << min(0, (a + b) - n) << endl;
return 0;
}
| #include <bits/stdc++.h>
typedef long long ll;
#define rep(i, a, b) for (long long i = a; i < b; ++i)
#define rrep(i, a, b) for (int i = a; i >= b; --i)
#define yesno(flag) \
if (flag) \
cout << "Yes" << endl; \
else \
cout << "No" << endl;
using namespace std;
const ll INF = 1000000000000LL;
const ll r197 = 1000000007;
typedef pair<ll, ll> P;
typedef pair<P, P> Pa;
bool Inframe(int a, int b, int c, int d, int h, int w) {
if (a + b >= 0 && a + b < h && c + d >= 0 && c + d < w)
return true;
return false;
}
ll C[100005] = {};
vector<P> v;
vector<ll> ma2;
int n, m;
int a, b, c;
int main() {
cin >> n >> a >> b;
cout << min(a, b) << " " << max(0, (a + b) - n) << endl;
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,444 | 940,445 | u770256251 | cpp |
p03139 | #include "bits/stdc++.h"
#define double long double
#define int long long
#define mii map<int, int>
#define low lower_bound
#define upp upper_bound
#define inf 1000000007 // 10^9+7
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(vec) vec.begin(), vec.end()
#define sort(vec) sort(all(vec));
#define rever(vec) reverse(all(vec));
#define bisea binary_search
#define unsort(vec) \
sort(vec); \
rever(vec);
#define cend cout << endl;
#define F first
#define S second
using namespace std;
signed main() {
int n, a, b;
cin >> n >> a >> b;
if (0 <= n - (a + b)) {
cout << min(a, b) << 0 << endl;
} else {
cout << min(a, b) << " " << a + b - n << endl;
}
} | #include "bits/stdc++.h"
#define double long double
#define int long long
#define mii map<int, int>
#define low lower_bound
#define upp upper_bound
#define inf 1000000007 // 10^9+7
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(vec) vec.begin(), vec.end()
#define sort(vec) sort(all(vec));
#define rever(vec) reverse(all(vec));
#define bisea binary_search
#define unsort(vec) \
sort(vec); \
rever(vec);
#define cend cout << endl;
#define F first
#define S second
using namespace std;
signed main() {
int n, a, b;
cin >> n >> a >> b;
if (0 <= n - (a + b)) {
cout << min(a, b) << " " << 0 << endl;
} else {
cout << min(a, b) << " " << a + b - n << endl;
}
} | [
"io.output.change"
] | 940,446 | 940,447 | u054475353 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) \
cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \
<< " " << __FILE__ << endl;
template <typename T> void vprint(T &v) {
REP(i, v.size()) { cout << v[i] << " "; }
cout << endl;
}
int main() {
ll N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << A + B - N << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) \
cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \
<< " " << __FILE__ << endl;
template <typename T> void vprint(T &v) {
REP(i, v.size()) { cout << v[i] << " "; }
cout << endl;
}
int main() {
ll N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(A + B - N, 0ll) << endl;
return 0;
} | [
"call.add",
"call.arguments.add"
] | 940,448 | 940,449 | u895971408 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
const int INF32 = 1e9 + 10;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << min(0, (A + B) - N) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
const int INF32 = 1e9 + 10;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(0, (A + B) - N) << endl;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,450 | 940,451 | u028516426 | cpp |
p03139 | #include <bits/stdc++.h>
#define int long long
#define f(i, n) for (int i = 0; i < n; i++)
#define F first
#define S second
#define mod 1000000007
#define P pair<int, int>
using namespace std;
signed main() {
int a, b, c;
cin >> c >> a >> b;
cout << min(a, b) << " " << min((int)(0), (a + b - c)) << endl;
return 0;
}
| #include <bits/stdc++.h>
#define int long long
#define f(i, n) for (int i = 0; i < n; i++)
#define F first
#define S second
#define mod 1000000007
#define P pair<int, int>
using namespace std;
signed main() {
int a, b, c;
cin >> c >> a >> b;
cout << min(a, b) << " " << max((int)(0), (a + b - c)) << endl;
return 0;
}
| [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,452 | 940,453 | u259210975 | cpp |
p03139 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
ll N, A, B;
void input() { cin >> N >> A >> B; }
void solve() { cout << min(A, B) << ' ' << A + B - N << endl; }
int main() {
input();
// cout << solve() << endl;
solve();
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
ll N, A, B;
void input() { cin >> N >> A >> B; }
void solve() { cout << min(A, B) << ' ' << max(A + B - N, 0ll) << endl; }
int main() {
input();
// cout << solve() << endl;
solve();
return 0;
}
| [
"call.add",
"call.arguments.add"
] | 940,454 | 940,455 | u500092662 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << ' ';
if (a + b <= 10) {
cout << 0 << endl;
return 0;
} else {
cout << abs((n - a) - b) << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n >> a >> b;
cout << min(a, b) << ' ';
if (a + b <= n) {
cout << 0 << endl;
return 0;
} else {
cout << abs((n - a) - b) << endl;
}
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 940,456 | 940,457 | u810067372 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
typedef pair<int, int> P;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main() {
int n, a, b;
cin >> n >> a >> b;
int ans1 = min(a, b);
int ans2 = 0;
if (a + b >= n) {
ans2 = n - a - b;
}
cout << ans1 << " " << ans2 << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
typedef pair<int, int> P;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main() {
int n, a, b;
cin >> n >> a >> b;
int ans1 = min(a, b);
int ans2 = 0;
if (a + b >= n) {
ans2 = a + b - n;
}
cout << ans1 << " " << ans2 << endl;
} | [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"assignment.change"
] | 940,462 | 940,463 | u342051078 | cpp |
p03139 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
cout << min(A, B) << " " << max(0, A + B - 100) << endl;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(0, A + B - N) << endl;
}
| [
"variable_declaration.add",
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 940,470 | 940,471 | u041282550 | cpp |
p03139 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define ull unsigned long long
#define ul unsigned long
#define ll long long
#define size_t unsigned long long
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
// sort(td.begin(), td.end(), [](auto& x, auto& y){return x[0] > y[0];});
int n, a, b;
std::cin >> n >> a >> b;
int ma;
ma = max(a, b);
if (a + b - n > 0) {
std::cout << ma << " " << a + b - n << '\n';
} else {
std::cout << ma << " " << 0 << '\n';
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define ull unsigned long long
#define ul unsigned long
#define ll long long
#define size_t unsigned long long
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
// sort(td.begin(), td.end(), [](auto& x, auto& y){return x[0] > y[0];});
int n, a, b;
std::cin >> n >> a >> b;
int ma;
ma = min(a, b);
if (a + b - n > 0) {
std::cout << ma << " " << a + b - n << '\n';
} else {
std::cout << ma << " " << 0 << '\n';
}
return 0;
}
| [
"misc.opposites",
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 940,472 | 940,473 | u131033623 | cpp |
p03139 | #include <iostream>
#include <string>
#include <vector>
int main() {
int N, A, B;
int max, min;
std::cin >> N >> A >> B;
max = std::max(A, B);
min = std::max(A + B - N, 0);
std::cout << max << " " << min << std::endl;
return 0;
} | #include <iostream>
#include <string>
#include <vector>
int main() {
int N, A, B;
int max, min;
std::cin >> N >> A >> B;
max = std::min(A, B);
min = std::max(A + B - N, 0);
std::cout << max << " " << min << std::endl;
return 0;
} | [
"misc.opposites",
"assignment.value.change",
"identifier.change"
] | 940,479 | 940,480 | u005702636 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = (0); (i) < (int)(n); ++(i))
using ll = long long;
using P = pair<ll, ll>;
using namespace std;
template <class T> void vin(vector<T> &v, int n) {
v.resize(n);
for (int i = 0; i < n; ++i) {
cin >> v[i];
}
}
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << ' ';
if (A + B < 10) {
cout << 0 << endl;
} else if (A == B and A == N) {
cout << N << endl;
} else {
cout << (A + B) - N << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = (0); (i) < (int)(n); ++(i))
using ll = long long;
using P = pair<ll, ll>;
using namespace std;
template <class T> void vin(vector<T> &v, int n) {
v.resize(n);
for (int i = 0; i < n; ++i) {
cin >> v[i];
}
}
int main() {
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << ' ';
if (A + B < N) {
cout << 0 << endl;
} else if (A == B and A == N) {
cout << N << endl;
} else {
cout << (A + B) - N << endl;
}
}
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 940,484 | 940,485 | u482544950 | cpp |
p03139 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, x, y;
int main() {
scanf("%d %d %d", &n, &x, &y);
if (x > y)
swap(x, y);
printf("%d %d", y, max(0, x + y - n));
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, x, y;
int main() {
scanf("%d %d %d", &n, &x, &y);
if (x < y)
swap(x, y);
printf("%d %d", y, max(0, x + y - n));
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 940,486 | 940,487 | u764522757 | cpp |
p03139 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define FOR(I, A, B) for (int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, A, B;
cin >> N >> A >> B;
cout << max(A, B) << " " << max(0, A + B - N) << endl;
} | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define FOR(I, A, B) for (int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, A, B;
cin >> N >> A >> B;
cout << min(A, B) << " " << max(0, A + B - N) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 940,490 | 940,491 | u310790595 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.