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 |
|---|---|---|---|---|---|---|---|
p03075 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int K;
int input;
vector<int> a;
for (int i = 0; i < 5; i++) {
cin >> input;
a.push_back(input);
}
cin >> K;
string ans = "Yay!";
for (int i = 0; i < a.size(); i++) {
for (int j = 0; j < a.size(); j++) {
int dist = abs(a[i] - a[j]);
if (dist >= K) {
ans = ":(";
}
}
}
cout << ans << endl;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int K;
int input;
vector<int> a;
for (int i = 0; i < 5; i++) {
cin >> input;
a.push_back(input);
}
cin >> K;
string ans = "Yay!";
for (int i = 0; i < a.size(); i++) {
for (int j = 0; j < a.size(); j++) {
int dist = abs(a[i] - a[j]);
if (dist > K) {
ans = ":(";
}
}
}
cout << ans << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,361 | 889,362 | u498436815 | cpp |
p03075 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <utility>
#include <vector>
using namespace std;
int main() {
int antena[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> antena[i];
}
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (i != j) {
if ((antena[j] - antena[i]) >= k) {
cout << ":(" << endl;
return 0;
}
}
}
}
cout << "Yay!" << endl;
} | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <utility>
#include <vector>
using namespace std;
int main() {
int antena[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> antena[i];
}
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (i != j) {
if ((antena[j] - antena[i]) > k) {
cout << ":(" << endl;
return 0;
}
}
}
}
cout << "Yay!" << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,363 | 889,364 | u563518571 | cpp |
p03075 | #include <bits/stdc++.h>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (abs(a - e) < k) {
cout << "Yay!";
} else {
cout << ":(";
}
} | #include <bits/stdc++.h>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (abs(a - e) <= k) {
cout << "Yay!";
} else {
cout << ":(";
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,374 | 889,375 | u637568962 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
const ll MOD = 1000000007;
const ll nmax = 8;
const ll INF = 1e9;
bool graph[nmax][nmax];
vector<vector<ll>> dist = vector<vector<ll>>(nmax, vector<ll>(nmax, INF));
void warshall_floyd(ll n) {
for (size_t i = 0; i < n; i++) {
for (size_t j = 0; j < n; j++) {
for (size_t k = 0; k < n; k++) {
dist[j][k] = min(dist[j][k], dist[j][i] + dist[i][k]);
}
}
}
}
class UnionFind {
public:
vector<ll> Parent;
UnionFind(ll N) { Parent = vector<ll>(N, -1); }
ll find(ll A) {
if (Parent[A] < 0)
return A;
return Parent[A] = find(Parent[A]);
}
ll size(ll A) { return -Parent[find(A)]; }
bool Union(ll A, ll B) {
A = find(A);
B = find(B);
if (A == B) {
return false;
}
if (size(A) < size(B))
swap(A, B);
Parent[A] += Parent[B];
Parent[B] = A;
return true;
}
};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
ll g = gcd(a, b);
return a / g * b;
}
ll mulMod(ll a, ll b) { return (((a % MOD) * (b % MOD)) % MOD); }
ll powMod(ll a, ll p) {
if (p == 0) {
return 1;
} else if (p % 2 == 0) {
ll half = powMod(a, p / 2);
return mulMod(half, half);
} else {
return mulMod(powMod(a, p - 1), a);
}
}
void solve(long long a, long long b, long long c, long long d, long long e,
long long k) {
if (d - a > k) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
}
int main() {
long long a;
scanf("%lld", &a);
long long b;
scanf("%lld", &b);
long long c;
scanf("%lld", &c);
long long d;
scanf("%lld", &d);
long long e;
scanf("%lld", &e);
long long k;
scanf("%lld", &k);
solve(a, b, c, d, e, k);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
const ll MOD = 1000000007;
const ll nmax = 8;
const ll INF = 1e9;
bool graph[nmax][nmax];
vector<vector<ll>> dist = vector<vector<ll>>(nmax, vector<ll>(nmax, INF));
void warshall_floyd(ll n) {
for (size_t i = 0; i < n; i++) {
for (size_t j = 0; j < n; j++) {
for (size_t k = 0; k < n; k++) {
dist[j][k] = min(dist[j][k], dist[j][i] + dist[i][k]);
}
}
}
}
class UnionFind {
public:
vector<ll> Parent;
UnionFind(ll N) { Parent = vector<ll>(N, -1); }
ll find(ll A) {
if (Parent[A] < 0)
return A;
return Parent[A] = find(Parent[A]);
}
ll size(ll A) { return -Parent[find(A)]; }
bool Union(ll A, ll B) {
A = find(A);
B = find(B);
if (A == B) {
return false;
}
if (size(A) < size(B))
swap(A, B);
Parent[A] += Parent[B];
Parent[B] = A;
return true;
}
};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
ll g = gcd(a, b);
return a / g * b;
}
ll mulMod(ll a, ll b) { return (((a % MOD) * (b % MOD)) % MOD); }
ll powMod(ll a, ll p) {
if (p == 0) {
return 1;
} else if (p % 2 == 0) {
ll half = powMod(a, p / 2);
return mulMod(half, half);
} else {
return mulMod(powMod(a, p - 1), a);
}
}
void solve(long long a, long long b, long long c, long long d, long long e,
long long k) {
if (e - a > k) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
}
int main() {
long long a;
scanf("%lld", &a);
long long b;
scanf("%lld", &b);
long long c;
scanf("%lld", &c);
long long d;
scanf("%lld", &d);
long long e;
scanf("%lld", &e);
long long k;
scanf("%lld", &k);
solve(a, b, c, d, e, k);
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 889,378 | 889,379 | u228295160 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 10000000000000009
//#define INF 9223372036854775807
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define OREP(i, n) for (int i = 1; i <= (n); ++i)
#define ORREP(i, n) for (int i = (n); i >= 1; --i)
#define ZREP(i, n) for (int i = 1; i < (n); ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define rollcall cout << "I'm Sucu." << endl;
#define YES(s) s ? cout << "YES" << endl : cout << "NO" << endl
#define Yes(s) s ? cout << "Yay!" << endl : cout << ":(" << endl
#define Taka(s) s ? cout << "Takahashi" << endl : cout << "Aoki" << endl
#define out(s, t, u) s ? cout << t << endl : cout << u << endl
#define int ll
#define Endl endl
signed main() {
int a[5], k;
REP(i, 5) { cin >> a[i]; }
cin >> k;
Yes(a[4] - a[0] < k);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 10000000000000009
//#define INF 9223372036854775807
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define OREP(i, n) for (int i = 1; i <= (n); ++i)
#define ORREP(i, n) for (int i = (n); i >= 1; --i)
#define ZREP(i, n) for (int i = 1; i < (n); ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define rollcall cout << "I'm Sucu." << endl;
#define YES(s) s ? cout << "YES" << endl : cout << "NO" << endl
#define Yes(s) s ? cout << "Yay!" << endl : cout << ":(" << endl
#define Taka(s) s ? cout << "Takahashi" << endl : cout << "Aoki" << endl
#define out(s, t, u) s ? cout << t << endl : cout << u << endl
#define int ll
#define Endl endl
signed main() {
int a[5], k;
REP(i, 5) { cin >> a[i]; }
cin >> k;
Yes(a[4] - a[0] <= k);
return 0;
}
| [
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 889,384 | 889,385 | u554953477 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i))
#define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u); ++(i))
#define INF (int)1e9 + 7
static const int dy[4] = {0, 1, 0, -1};
static const int dx[4] = {1, 0, -1, 0};
using namespace std;
int main() {
int a[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
bool flag = true;
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 4; j++) {
if (a[j] - a[i] > k)
flag = false;
}
}
if (flag)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i))
#define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u); ++(i))
#define INF (int)1e9 + 7
static const int dy[4] = {0, 1, 0, -1};
static const int dx[4] = {1, 0, -1, 0};
using namespace std;
int main() {
int a[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
bool flag = true;
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (a[j] - a[i] > k)
flag = false;
}
}
if (flag)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 889,392 | 889,393 | u484962958 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a[6];
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> a[5];
int flag = 1;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (abs(a[i] - a[j]) > a[5]) {
flag = 0;
break;
}
}
if (!flag)
break;
}
if (flag) {
cout << "Yay!";
} else {
cout << ":(";
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a[6];
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> a[5];
int flag = 1;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (abs(a[i] - a[j]) > a[5]) {
flag = 0;
break;
}
}
if (!flag)
break;
}
if (flag) {
cout << "Yay!";
} else {
cout << ":(";
}
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 889,418 | 889,419 | u887066391 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if ((e - a) < k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if ((e - a) <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,420 | 889,421 | u348723622 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 100000000000;
const long long int Mod = 1000000007;
using ll = long long int; // long long int は64bit
using vi = vector<int>;
using Vi = vector<long long int>;
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define mt make_tuple
#define all(x) (x).begin(), (x).end()
#define rep(i, N) for (long long int i = 0; i < N; i++)
#define np nullptr
template <class T> bool chmax(T &former, const T &b) {
if (former <= b) {
former = b;
return true;
}
return false;
}
template <class T> bool chmin(T &former, const T &b) {
if (b < former) {
former = b;
return true;
}
return false;
}
template <class T> T sqar(T x) { return x * x; } // sqrt(x)は平方根;
#define Sort(v) \
std::sort(v.begin(), v.end(), \
std::greater<decltype(v[0])>()) //降順でVをソート
#define fill(x, num) memset(x, num, sizeof(x));
typedef vector<vector<ll>> matrix;
typedef pair<ll, ll> Pair;
bool p_compare(const Pair &firstP, const Pair &secondP) {
return firstP.second < secondP.second;
} // sort(all(v),p_compare)で昇順ソート
//////////////////////////^^ *Emile
///^^^//////////////////////////////////////////////////////
// Snipet -> Caps Lock
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll a, b, c, d, e, k;
vi v;
ll aaa;
bool ck = true;
rep(i, 5) {
cin >> aaa;
v.pb(aaa);
}
cin >> k;
rep(i, 5 - 1) {
if (v[i] - v[0] > k)
ck = false;
}
if (ck)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 100000000000;
const long long int Mod = 1000000007;
using ll = long long int; // long long int は64bit
using vi = vector<int>;
using Vi = vector<long long int>;
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define mt make_tuple
#define all(x) (x).begin(), (x).end()
#define rep(i, N) for (long long int i = 0; i < N; i++)
#define np nullptr
template <class T> bool chmax(T &former, const T &b) {
if (former <= b) {
former = b;
return true;
}
return false;
}
template <class T> bool chmin(T &former, const T &b) {
if (b < former) {
former = b;
return true;
}
return false;
}
template <class T> T sqar(T x) { return x * x; } // sqrt(x)は平方根;
#define Sort(v) \
std::sort(v.begin(), v.end(), \
std::greater<decltype(v[0])>()) //降順でVをソート
#define fill(x, num) memset(x, num, sizeof(x));
typedef vector<vector<ll>> matrix;
typedef pair<ll, ll> Pair;
bool p_compare(const Pair &firstP, const Pair &secondP) {
return firstP.second < secondP.second;
} // sort(all(v),p_compare)で昇順ソート
//////////////////////////^^ *Emile
///^^^//////////////////////////////////////////////////////
// Snipet -> Caps Lock
vi v;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll a, b, c, d, e, k;
vi v;
ll aaa;
bool ck = true;
rep(i, 5) {
cin >> aaa;
v.pb(aaa);
}
cin >> k;
rep(i, 5) {
if (v[i] - v[0] > k)
ck = false;
}
if (ck)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
} | [
"variable_declaration.add",
"expression.operation.binary.remove"
] | 889,428 | 889,429 | u896014917 | cpp |
p03075 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, k;
int maxx = -1, minn = 10000;
for (int i = 1; i <= 5; i++) {
scanf("%d", &x);
maxx = max(maxx, x);
minn = min(minn, x);
}
scanf("%d", &k);
if (maxx - minn < k)
printf("Yay!\n");
else
printf(":(\n");
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, k;
int maxx = -1, minn = 10000;
for (int i = 1; i <= 5; i++) {
scanf("%d", &x);
maxx = max(maxx, x);
minn = min(minn, x);
}
scanf("%d", &k);
if (maxx - minn <= k)
printf("Yay!\n");
else
printf(":(\n");
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,434 | 889,435 | u276626173 | cpp |
p03075 | #include <iostream>
using namespace std;
int main() {
int a[5];
int k;
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> k;
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (k < a[j] - a[i]) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yey!" << endl;
} | #include <iostream>
using namespace std;
int main() {
int a[5];
int k;
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> k;
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (k < a[j] - a[i]) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
} | [
"literal.string.change",
"io.output.change"
] | 889,436 | 889,437 | u754489932 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
int ab, ac, ad, ae;
int bc, bd, be;
int cd, ce;
int de;
ab = b - a;
ac = c - a;
ad = d - a;
ae = e - a;
bc = c - b;
bd = d - b;
be = e - b;
cd = d - c;
ce = e - c;
de = e - d;
if (ab > k || ac > k || ad > k || bc > k || bd > k || be > k || cd > k ||
ce > k || de > k)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
int ab, ac, ad, ae;
int bc, bd, be;
int cd, ce;
int de;
ab = b - a;
ac = c - a;
ad = d - a;
ae = e - a;
bc = c - b;
bd = d - b;
be = e - b;
cd = d - c;
ce = e - c;
de = e - d;
if (ab > k || ac > k || ad > k || ae > k || bc > k || bd > k || be > k ||
cd > k || ce > k || de > k)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
} | [
"control_flow.branch.if.condition.change"
] | 889,438 | 889,439 | u698136564 | cpp |
p03075 |
#include <algorithm>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define LL long long
#define ALF "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LLBIG 1999999999999999999
#define INTBIG 1111111111
#define MOD 1000000007
#define PI pair<int, int>
#define VI vector<int>
#define VVI vector<vector<int>>
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k)
cout << "Yey!" << endl;
else
cout << ":(" << endl;
return 0;
}
|
#include <algorithm>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define LL long long
#define ALF "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LLBIG 1999999999999999999
#define INTBIG 1111111111
#define MOD 1000000007
#define PI pair<int, int>
#define VI vector<int>
#define VVI vector<vector<int>>
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 889,451 | 889,452 | u657512990 | cpp |
p03075 | #include <bits/stdc++.h>
#define ll long long
#define en "\n"
using namespace std;
const int M = 1e9 + 7;
int a[8];
int main() {
ios::sync_with_stdio(false);
int k;
for (int i = 1; i < 6; i++)
cin >> a[i];
cin >> k;
for (int i = 1; i < 6; i++) {
for (int j = i + 1; j < 6; j++)
if (abs(i - j) > k) {
cout << ":(" << endl;
return 0;
}
}
cout << "Yay!" << endl;
return 0;
}
| #include <bits/stdc++.h>
#define ll long long
#define en "\n"
using namespace std;
const int M = 1e9 + 7;
int a[8];
int main() {
ios::sync_with_stdio(false);
int k;
for (int i = 1; i < 6; i++)
cin >> a[i];
cin >> k;
for (int i = 1; i < 6; i++) {
for (int j = i + 1; j < 6; j++)
if (abs(a[i] - a[j]) > k) {
cout << ":(" << endl;
return 0;
}
}
cout << "Yay!" << endl;
return 0;
}
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 889,453 | 889,454 | u399616977 | cpp |
p03075 | #include <algorithm>
#include <complex>
#include <iostream>
#include <numeric>
#include <stdio.h>
#include <string.h>
#include <vector>
#define ll long long
using namespace std;
int main() {
int a[6], k, ans;
ans = 0;
for (int i = 0; i < 5; i++)
cin >> a[i];
cin >> k;
for (int i = 0; i < 5; i++)
for (int j = 0; j < 5; j++) {
if (i == j)
continue;
if (abs(a[i] - a[j]) < k)
ans++;
}
if (ans > 0)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
return 0;
} | #include <algorithm>
#include <complex>
#include <iostream>
#include <numeric>
#include <stdio.h>
#include <string.h>
#include <vector>
#define ll long long
using namespace std;
int main() {
int a[6], k, ans;
ans = 0;
for (int i = 0; i < 5; i++)
cin >> a[i];
cin >> k;
for (int i = 0; i < 5; i++)
for (int j = 0; j < 5; j++) {
if (i == j)
continue;
if (abs(a[i] - a[j]) > k)
ans++;
}
if (ans > 0)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,455 | 889,456 | u902428263 | cpp |
p03075 | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const ll MOD = (ll)1e9 + 7;
int main() {
int a;
cin >> a;
int dist = 0;
for (int i = 0; i < 4; i++) {
int b;
cin >> b;
int d = b - a;
dist = max(dist, d);
}
int k;
cin >> k;
cout << ((dist < k) ? "Yay!" : ":(");
return 0;
}
| #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const ll MOD = (ll)1e9 + 7;
int main() {
int a;
cin >> a;
int dist = 0;
for (int i = 0; i < 4; i++) {
int b;
cin >> b;
int d = b - a;
dist = max(dist, d);
}
int k;
cin >> k;
cout << ((dist <= k) ? "Yay!" : ":(");
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"io.output.change"
] | 889,457 | 889,458 | u525672296 | cpp |
p03075 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
typedef long long ll;
using namespace std;
int inputValue() {
int a;
cin >> a;
return a;
}
void inputArray(int *p, int a) {
rep(i, a) { cin >> p[i]; }
}
void inputVector(vector<int> *p, int a) {
rep(i, a) {
int input;
cin >> input;
p->push_back(input);
}
}
template <typename T> void output(T a, int precision) {
if (precision > 0) {
cout << setprecision(precision) << a << "\n";
} else {
cout << a << "\n";
}
}
int main() {
// source
int a[5];
int k;
rep(i, 5) { cin >> a[i]; }
cin >> k;
bool ans = true;
int big = 0;
rep(i, 5) {
rep(j, 5) { big = max(big, a[j] - a[i]); }
}
ans = (k > big);
if (ans) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
typedef long long ll;
using namespace std;
int inputValue() {
int a;
cin >> a;
return a;
}
void inputArray(int *p, int a) {
rep(i, a) { cin >> p[i]; }
}
void inputVector(vector<int> *p, int a) {
rep(i, a) {
int input;
cin >> input;
p->push_back(input);
}
}
template <typename T> void output(T a, int precision) {
if (precision > 0) {
cout << setprecision(precision) << a << "\n";
} else {
cout << a << "\n";
}
}
int main() {
// source
int a[5];
int k;
rep(i, 5) { cin >> a[i]; }
cin >> k;
bool ans = true;
int big = 0;
rep(i, 5) {
rep(j, 5) { big = max(big, a[j] - a[i]); }
}
ans = (k >= big);
if (ans) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
}
| [
"expression.operator.compare.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 889,465 | 889,466 | u030992242 | cpp |
p03075 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int i, l, a[10], k;
for (i = 0; i < 5; i++) {
scanf("%d", &a[i]);
}
sort(a, a + 5);
scanf("%d", &k);
if (a[4] - a[0] < k) {
printf("Yay!");
} else
printf(":(");
return 0;
}
| #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int i, l, a[10], k;
for (i = 0; i < 5; i++) {
scanf("%d", &a[i]);
}
sort(a, a + 5);
scanf("%d", &k);
if (a[4] - a[0] <= k) {
printf("Yay!");
} else
printf(":(");
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,467 | 889,468 | u007614284 | cpp |
p03075 | #include <iostream>
int main() {
int a[5];
int k;
for (auto i = 0; i < 5; i++) {
std::cin >> a[i];
}
std::cin >> k;
auto isOk = true;
for (auto i = 0; i < 5; i++) {
for (auto j = i + 1; j < 5; j++) {
if (abs(a[j] - a[i]) > k) {
isOk = false;
}
}
}
if (isOk) {
std::cout << ":(";
} else {
std::cout << "Yay!";
}
}
| #include <iostream>
int main() {
int a[5];
int k;
for (auto i = 0; i < 5; i++) {
std::cin >> a[i];
}
std::cin >> k;
auto isOk = true;
for (auto i = 0; i < 5; i++) {
for (auto j = i + 1; j < 5; j++) {
if (abs(a[j] - a[i]) > k) {
isOk = false;
}
}
}
if (isOk) {
std::cout << "Yay!";
} else {
std::cout << ":(";
}
}
| [
"literal.string.change",
"expression.operation.binary.change"
] | 889,472 | 889,473 | u664102385 | cpp |
p03075 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int p[5];
for (int i = 0; i < 5; i++) {
cin >> p[i];
}
int k;
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (abs(p[i] - p[j]) >= k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int p[5];
for (int i = 0; i < 5; i++) {
cin >> p[i];
}
int k;
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (abs(p[i] - p[j]) > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,476 | 889,477 | u269476572 | cpp |
p03075 | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
int m[5];
// cin >> a >> b >> c >> d >> e >> k;
for (int i = 0; i < 5; i++) {
cin >> m[i];
}
cin >> k;
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
if (k <= m[j] - m[i]) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
} | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
int m[5];
// cin >> a >> b >> c >> d >> e >> k;
for (int i = 0; i < 5; i++) {
cin >> m[i];
}
cin >> k;
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j <= 4; j++) {
if (k < m[j] - m[i]) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 889,482 | 889,483 | u506431348 | cpp |
p03075 | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
int m[5];
// cin >> a >> b >> c >> d >> e >> k;
for (int i = 0; i < 5; i++) {
cin >> m[i];
}
cin >> k;
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
if (k < m[j] - m[i]) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
} | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
int m[5];
// cin >> a >> b >> c >> d >> e >> k;
for (int i = 0; i < 5; i++) {
cin >> m[i];
}
cin >> k;
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j <= 4; j++) {
if (k < m[j] - m[i]) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 889,484 | 889,483 | u506431348 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int k;
int ans = 0;
#define INF 10e+11 + 7
void calc(int a, int b) {
if (abs(a - b) >= k) {
ans = 1;
}
}
int main() {
int a[5];
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (i != j) {
calc(a[i], a[j]);
}
}
}
if (ans == 0) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int k;
int ans = 0;
#define INF 10e+11 + 7
void calc(int a, int b) {
if (abs(a - b) > k) {
ans = 1;
}
}
int main() {
int a[5];
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (i != j) {
calc(a[i], a[j]);
}
}
}
if (ans == 0) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,485 | 889,486 | u798944838 | cpp |
p03075 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
vector<int> list;
list.push_back(a);
list.push_back(b);
list.push_back(c);
list.push_back(d);
list.push_back(e);
bool flg = false;
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 5; ++j) {
auto diff = std::abs(list[i] - list[j]);
if (diff > k) {
cout << diff;
flg = true;
}
}
}
if (flg) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
}
| #include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
vector<int> list;
list.push_back(a);
list.push_back(b);
list.push_back(c);
list.push_back(d);
list.push_back(e);
bool flg = false;
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 5; ++j) {
auto diff = std::abs(list[i] - list[j]);
if (diff > k) {
flg = true;
}
}
}
if (flg) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
}
| [] | 889,487 | 889,488 | u336096593 | cpp |
p03075 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
vector<int> list;
list.push_back(a);
list.push_back(b);
list.push_back(c);
list.push_back(d);
list.push_back(e);
bool flg = false;
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 5; ++j) {
auto diff = std::abs(list[i] - list[j]);
if (diff > k) {
flg = true;
}
}
}
if (flg) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
}
| #include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
vector<int> list;
list.push_back(a);
list.push_back(b);
list.push_back(c);
list.push_back(d);
list.push_back(e);
bool flg = false;
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 5; ++j) {
auto diff = std::abs(list[i] - list[j]);
if (diff > k) {
flg = true;
}
}
}
if (flg) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 889,489 | 889,488 | u336096593 | cpp |
p03075 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> a(5);
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
int k;
cin >> k;
for (int i = 1; i < 5; i++) {
for (int j = 1; j < 5; j++) {
if (a[i] - a[j] > 15 || a[i] - a[j] < -15) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
} | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> a(5);
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
int k;
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (a[i] - a[j] > k || a[i] - a[j] < -k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
} | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 889,492 | 889,493 | u707072292 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// #include "prettyprint.hpp"
typedef long long ll;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a < k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// #include "prettyprint.hpp"
typedef long long ll;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,501 | 889,502 | u162172626 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <vector>
using namespace std;
template <typename T = int> T in() {
T temp;
cin >> temp;
return temp;
}
template <typename VType = int> list<VType> const LR(VType start, VType end) {
list<VType> ret;
for (VType i = start; i < end; i++)
ret.push_back(i);
return move(ret);
}
int main() {
int diff = 0;
int x(in());
int temp;
for (int i = 0; i < 4; i++) {
temp = in();
}
cout << (((temp - x) < in()) ? "Yay!" : ":(") << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <vector>
using namespace std;
template <typename T = int> T in() {
T temp;
cin >> temp;
return temp;
}
template <typename VType = int> list<VType> const LR(VType start, VType end) {
list<VType> ret;
for (VType i = start; i < end; i++)
ret.push_back(i);
return move(ret);
}
int main() {
int diff = 0;
int x(in());
int temp;
for (int i = 0; i < 4; i++) {
temp = in();
}
cout << (((temp - x) <= in()) ? "Yay!" : ":(") << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"io.output.change"
] | 889,509 | 889,510 | u074059110 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int a[5], q;
int main() {
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
q = max(q, abs(a[i] - a[j]));
}
}
int k;
cin >> k;
if (k > q) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int a[5], q = -1;
int main() {
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
q = max(q, abs(a[i] - a[j]));
}
}
int k;
cin >> k;
if (k >= q) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | [
"variable_declaration.value.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,513 | 889,514 | u207310767 | cpp |
p03075 | #include <stdio.h>
#define NUM 5
int main(void) {
int a[NUM];
int k;
for (int i = 0; i < 5; i++) {
scanf("%d", &a[i]);
}
scanf("%d", &k);
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (a[j] - a[i] > k) {
printf(":()\n");
return 0;
}
}
}
printf("Yay!\n");
return 0;
}
| #include <stdio.h>
#define NUM 5
int main(void) {
int a[NUM];
int k;
for (int i = 0; i < 5; i++) {
scanf("%d", &a[i]);
}
scanf("%d", &k);
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (a[j] - a[i] > k) {
printf(":(\n");
return 0;
}
}
}
printf("Yay!\n");
return 0;
}
| [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 889,517 | 889,518 | u101519275 | cpp |
p03075 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a < k)
cout << "Yay!";
else
cout << ":(";
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k)
cout << "Yay!";
else
cout << ":(";
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,519 | 889,520 | u772041670 | cpp |
p03075 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (b - a <= k && c - a <= k && d - a <= k && a - e <= k && c - b <= k &&
d - b <= k && e - b <= k && d - c <= k && e - c <= k && e - d <= k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (b - a <= k && c - a <= k && d - a <= k && e - a <= k && c - b <= k &&
d - b <= k && e - b <= k && d - c <= k && e - c <= k && e - d <= k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
} | [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 889,521 | 889,522 | u958128735 | cpp |
p03075 | // SeeAlso: https://atcoder.jp/contests/abc123/tasks/abc123_a
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
using namespace std;
#define MAX 100
int main() {
int a, b, c, d, e, k;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> k;
if ((e - a) < k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
}
| // SeeAlso: https://atcoder.jp/contests/abc123/tasks/abc123_a
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
using namespace std;
#define MAX 100
int main() {
int a, b, c, d, e, k;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> k;
if ((e - a) <= k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,525 | 889,526 | u185518252 | cpp |
p03075 | //#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define MAX_INT 2100000000
using namespace std;
typedef long long int ll;
//#include "Header.h"
int main() {
int a, b, c, d, e, k, i, j;
cin >> a >> b >> c >> d >> e >> k;
if (e - a < k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
}
| //#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define MAX_INT 2100000000
using namespace std;
typedef long long int ll;
//#include "Header.h"
int main() {
int a, b, c, d, e, k, i, j;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,542 | 889,543 | u697367509 | cpp |
p03075 | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
cout << (e - a > k ? ": (" : "Yay!") << endl;
}
| #include <algorithm>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
cout << (e - a > k ? ":(" : "Yay!") << endl;
}
| [
"literal.string.change",
"io.output.change"
] | 889,544 | 889,545 | u317177661 | cpp |
p03075 | #include <stdio.h>
int main(void) {
int p[5];
int k;
for (int i = 0; i < 5; i++) {
scanf("%d", &p[i]);
}
scanf("%d", &k);
for (int j = 0; j < 4; j++) {
for (int i = j + 1; i < 5; i++) {
int x = p[j] - p[i];
if (x > k) {
printf(":(");
return 0;
}
}
}
printf("Yay!");
return 0;
} | #include <stdio.h>
int main(void) {
int p[5];
int k;
for (int i = 0; i < 5; i++) {
scanf("%d", &p[i]);
}
scanf("%d", &k);
for (int j = 0; j < 4; j++) {
for (int i = j + 1; i < 5; i++) {
int x = p[i] - p[j];
if (x > k) {
printf(":(");
return 0;
}
}
}
printf("Yay!");
return 0;
} | [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 889,550 | 889,551 | u245335950 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int k;
vector<int> cor(5, 0);
for (int i = 0; i < 5; i++) {
cin >> cor[i];
}
cin >> k;
if (cor[4] - cor[0] > k)
cout << ":(";
cout << "Yay!";
return 0;
}
| #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int k;
vector<int> cor(5, 0);
for (int i = 0; i < 5; i++) {
cin >> cor[i];
}
cin >> k;
if (cor[4] - cor[0] > k)
cout << ":(";
else
cout << "Yay!";
return 0;
}
| [
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 889,556 | 889,557 | u074014027 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int k;
vector<int> cor(5, 0);
for (int i = 0; i < 5; i++) {
cin >> cor[i];
}
if (cor[4] - cor[0] > k)
cout << ":(";
cout << "Yay!";
return 0;
} | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int k;
vector<int> cor(5, 0);
for (int i = 0; i < 5; i++) {
cin >> cor[i];
}
cin >> k;
if (cor[4] - cor[0] > k)
cout << ":(";
else
cout << "Yay!";
return 0;
}
| [
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 889,558 | 889,557 | u074014027 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 5;
vector<int> annt;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
annt.push_back(x);
}
int k = 0;
cin >> k;
// int ret = 0;
// for (int i = 1; i < n; i++) {
// if (annt[i] - annt[i-1] > k) {
// ret++;
// break;
// }
// }
if (annt[4] - annt[0] > k) {
cout << ":(" << endl;
} else {
cout << "Yey!" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 5;
vector<int> annt;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
annt.push_back(x);
}
int k = 0;
cin >> k;
// int ret = 0;
// for (int i = 1; i < n; i++) {
// if (annt[i] - annt[i-1] > k) {
// ret++;
// break;
// }
// }
if (annt[4] - annt[0] > k) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 889,559 | 889,560 | u611087334 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 5;
vector<int> annt;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
annt.push_back(x);
}
int k = 0;
cin >> k;
// int ret = 0;
// for (int i = 1; i < n; i++) {
// if (annt[i] - annt[i-1] > k) {
// ret++;
// break;
// }
// }
if (annt[4] - annt[0] > 0) {
cout << ":(" << endl;
} else {
cout << "Yey!" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 5;
vector<int> annt;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
annt.push_back(x);
}
int k = 0;
cin >> k;
// int ret = 0;
// for (int i = 1; i < n; i++) {
// if (annt[i] - annt[i-1] > k) {
// ret++;
// break;
// }
// }
if (annt[4] - annt[0] > k) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 889,561 | 889,560 | u611087334 | cpp |
p03075 | #include <array>
#include <iostream>
using namespace std;
int main() {
array<int, 5> x;
int k;
for (int i = 0; i < 5; i++) {
cin >> x.at(i);
}
cin >> k;
bool ok = (x.at(4) - x.at(0)) < k;
if (!ok) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
} | #include <array>
#include <iostream>
using namespace std;
int main() {
array<int, 5> x;
int k;
for (int i = 0; i < 5; i++) {
cin >> x.at(i);
}
cin >> k;
bool ok = (x.at(4) - x.at(0)) <= k;
if (!ok) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
} | [
"expression.operator.compare.change",
"expression.operation.binary.change"
] | 889,564 | 889,565 | u123729319 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5];
int k;
bool check = true;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (a[j] - a[i] <= k) {
check = false;
}
}
}
if (check) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5];
int k;
bool check = true;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = i + 1; j < 5; j++) {
if (a[j] - a[i] > k) {
check = false;
}
}
}
if (check) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,566 | 889,567 | u652790949 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k, ch;
cin >> a >> b >> c >> d >> e >> k;
ch = b - a + c - b + d - b + e - d;
if (ch > k)
cout << ":(" << endl;
else {
cout << "Yay!" << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k, ch;
cin >> a >> b >> c >> d >> e >> k;
ch = b - a + c - b + d - c + e - d;
if (ch > k)
cout << ":(" << endl;
else {
cout << "Yay!" << endl;
}
return 0;
} | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 889,569 | 889,570 | u817014213 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
vector<int> v(6);
int k;
for (int i = 1; i < 6; i++)
cin >> v[i];
cin >> k;
sort(v.begin(), v.end());
int n;
n = v[1] - v[5];
// for(int i=1;i<6;i++)cout<<v[i]<<" ";
if (n > k)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
vector<int> v(6);
int k;
for (int i = 1; i < 6; i++)
cin >> v[i];
cin >> k;
sort(v.begin(), v.end());
int n;
n = v[5] - v[1];
// for(int i=1;i<6;i++)cout<<v[i]<<" ";
// cout<<n<<endl;
if (n > k)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
} | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 889,573 | 889,574 | u330689597 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
vector<int> v(6);
int k;
for (int i = 0; i < 5; i++)
cin >> v[i];
cin >> k;
sort(v.begin(), v.end());
int n;
n = v[0] - v[4];
if (n > k)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
vector<int> v(6);
int k;
for (int i = 1; i < 6; i++)
cin >> v[i];
cin >> k;
sort(v.begin(), v.end());
int n;
n = v[5] - v[1];
// for(int i=1;i<6;i++)cout<<v[i]<<" ";
// cout<<n<<endl;
if (n > k)
cout << ":(" << endl;
else
cout << "Yay!" << endl;
} | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 889,575 | 889,574 | u330689597 | cpp |
p03075 | #include <iostream>
using namespace std;
int main() {
int a[6], k;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
for (int i = 0; i < 5; ++i) {
for (int j = i + 1; j < 4 - i; j++) {
if (a[j] - a[i] > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a[6], k;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
for (int i = 0; i < 5; ++i) {
for (int j = i + 1; j < 5 - i; j++) {
if (a[j] - a[i] > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 889,593 | 889,594 | u111160776 | cpp |
p03075 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
int b = 1;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 5; j++) {
if (abs(a[i] - a[j] > k)) {
b = 0;
}
}
}
if (b == 1) {
cout << "Yay!";
} else {
cout << ":(";
}
return 0;
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
int b = 1;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 5; j++) {
if (abs(a[i] - a[j]) > k) {
b = 0;
}
}
}
if (b == 1) {
cout << "Yay!";
} else {
cout << ":(";
}
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 889,599 | 889,600 | u850867546 | cpp |
p03075 | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> antennas(5);
for (int i = 0; i < 5; i++) {
cin >> antennas[i];
}
int k;
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 4; j > i; j++) {
if (antennas[j] - antennas[i] > k) {
cout << ":(";
return 0;
}
}
}
cout << "Yay!";
return 0;
}
| #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> antennas(5);
for (int i = 0; i < 5; i++) {
cin >> antennas[i];
}
int k;
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 4; j > i; j--) {
if (antennas[j] - antennas[i] > k) {
cout << ":(";
return 0;
}
}
}
cout << "Yay!";
return 0;
}
| [] | 889,610 | 889,611 | u117615163 | cpp |
p03075 | // C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file stdc++.h
* This is an implementation file for a precompiled header.
*/
// 17.4.1.2 Headers
// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
// #include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <type_traits>
#include <typeindex>
#include <unordered_map>
#include <unordered_set>
#endif
using namespace std;
typedef long long ll;
int main() {
ll k;
ll s[5];
for (ll i = 0; i < 5; i++) {
cin >> s[i];
}
cin >> k;
for (ll i = 0; i < 5; i++) {
for (ll j = i + 1; j < 5 - 1; j++) {
if (abs(s[i] - s[j]) > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
}
| // C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file stdc++.h
* This is an implementation file for a precompiled header.
*/
// 17.4.1.2 Headers
// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
// #include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <type_traits>
#include <typeindex>
#include <unordered_map>
#include <unordered_set>
#endif
using namespace std;
typedef long long ll;
int main() {
ll k;
ll s[5];
for (ll i = 0; i < 5; i++) {
cin >> s[i];
}
cin >> k;
for (ll i = 0; i < 5 - 1; i++) {
for (ll j = i + 1; j < 5; j++) {
if (abs(s[i] - s[j]) > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
}
| [
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"expression.operation.binary.remove"
] | 889,624 | 889,625 | u139458416 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a < k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,626 | 889,627 | u566640130 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
string ret = ":(";
if (e - a < k) {
ret = "Yay!";
}
cout << ret << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
string ret = ":(";
if (e - a <= k) {
ret = "Yay!";
}
cout << ret << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,632 | 889,633 | u966286365 | cpp |
p03075 | #include <algorithm>
#include <cstdint>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <stdio.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
//#include<boost/multiprecision/cpp_int.hpp>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define vi vector<int>
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
// namespace mp = boost::multiprecision;
// using cpp_int = mp::cpp_int;
using ll = long long;
using namespace std;
int main() {
vector<int> an(5);
rep(i, 5) { cin >> an[i]; }
int k;
cin >> k;
bool ans = true;
rep(i, 4) {
rep(j, 4) {
if (abs(an[i] - an[j]) > k) {
ans = false;
}
}
}
if (ans) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
}
| #include <algorithm>
#include <cstdint>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <stdio.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
//#include<boost/multiprecision/cpp_int.hpp>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define vi vector<int>
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
// namespace mp = boost::multiprecision;
// using cpp_int = mp::cpp_int;
using ll = long long;
using namespace std;
int main() {
vector<int> an(5);
rep(i, 5) { cin >> an[i]; }
int k;
cin >> k;
bool ans = true;
rep(i, 5) {
rep(j, 5) {
if (abs(an[i] - an[j]) > k) {
ans = false;
}
}
}
if (ans) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
}
| [
"literal.number.change",
"call.arguments.change"
] | 889,634 | 889,635 | u775013393 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <string>
#include <utility>
#include <vector>
#define rep(p, q) for (int i = p; i < q; i++)
using namespace std;
const int cons = 1e9 + 7;
int main(void) {
string ans = "Yay!";
int a, b, c, d, e, k;
int n[5];
cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4] >> k;
rep(0, 4) {
for (int j = i + 1; j < 5; j++) {
if (abs(n[i] - n[j]) > k)
ans = ":(";
break;
}
if (ans == ":(")
break;
}
cout << ans << endl;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <string>
#include <utility>
#include <vector>
#define rep(p, q) for (int i = p; i < q; i++)
using namespace std;
const int cons = 1e9 + 7;
/*
//B
int main(void) {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
}
*/
// A
int main(void) {
string ans = "Yay!";
int a, b, c, d, e, k;
int n[5];
cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4] >> k;
rep(0, 4) {
for (int j = i + 1; j < 5; j++) {
if (abs(n[i] - n[j]) > k) {
ans = ":(";
break;
}
}
if (ans == ":(")
break;
}
cout << ans << endl;
} | [] | 889,636 | 889,637 | u693569496 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int d[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> d[i];
}
cin >> k;
if (d[4] - d[0] >= k)
cout << ":(\n";
else
cout << "Yay!\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int d[5];
int k;
for (int i = 0; i < 5; i++) {
cin >> d[i];
}
cin >> k;
if (d[4] - d[0] > k)
cout << ":(\n";
else
cout << "Yay!\n";
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,647 | 889,648 | u069389947 | cpp |
p03075 | #include <bits/stdc++.h> // include all standard C++ libraries
using namespace std;
// Loops
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define _rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a) - 1; i >= int(b); --i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define rrep(...) _overload3(__VA_ARGS__, rrepi, _rrep, )(__VA_ARGS__)
#define each(xi, x) for (auto &&xi : x)
// Note: we can use rep(i,N) or rep(i,from,to)
// typedef
using ll = long long;
template <class T> using vec = vector<T>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
// Constants
#define INF 1e9
// Algorithms
#define all(x) (x).begin(), (x).end()
#define uniq(v) v.erase(unique(all(v)), v.end())
#define perm(c) \
sort(all(c)); \
for (bool c##p = 1; c##p; c##p = next_permutation(all(c)))
template <class T> inline bool chmax(T &maxval, const T &newval) {
if (maxval < newval) {
maxval = newval;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &minval, const T &newval) {
if (minval < newval) {
minval = newval;
return 1;
}
return 0;
}
// Utilities
// Grid world utilities
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
#define inside(H, W, y, x) 0 <= (x) && (x) < (W) && 0 <= (y) && (y) < (H)
inline int in() {
int x;
cin >> x;
return x;
} // read int from cin
inline ll IN() {
ll x;
cin >> x;
return x;
} // read ll from cin
// Shorter repr for frequently used terms
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
// Debug
#ifdef LOCAL
#include "dump.hpp"
#define debug(x) cerr << #x << ": " << x << '\n'
#else
#define dump(...)
#define debug(x)
#endif
// Paste snippets here!!
//
int main() {
cin.tie(0);
ios::sync_with_stdio(false); // Magic for faster cin
int a[5];
rep(i, 5) cin >> a[i];
int k = in();
rep(i, 5) {
rep(j, i + 1, 5) {
dump(k, i, j, a[i], a[j], a[j] - a[i]);
if (a[j] - a[i] > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yey!" << endl;
return 0;
}
| #include <bits/stdc++.h> // include all standard C++ libraries
using namespace std;
// Loops
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define _rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a) - 1; i >= int(b); --i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define rrep(...) _overload3(__VA_ARGS__, rrepi, _rrep, )(__VA_ARGS__)
#define each(xi, x) for (auto &&xi : x)
// Note: we can use rep(i,N) or rep(i,from,to)
// typedef
using ll = long long;
template <class T> using vec = vector<T>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
// Constants
#define INF 1e9
// Algorithms
#define all(x) (x).begin(), (x).end()
#define uniq(v) v.erase(unique(all(v)), v.end())
#define perm(c) \
sort(all(c)); \
for (bool c##p = 1; c##p; c##p = next_permutation(all(c)))
template <class T> inline bool chmax(T &maxval, const T &newval) {
if (maxval < newval) {
maxval = newval;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &minval, const T &newval) {
if (minval < newval) {
minval = newval;
return 1;
}
return 0;
}
// Utilities
// Grid world utilities
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
#define inside(H, W, y, x) 0 <= (x) && (x) < (W) && 0 <= (y) && (y) < (H)
inline int in() {
int x;
cin >> x;
return x;
} // read int from cin
inline ll IN() {
ll x;
cin >> x;
return x;
} // read ll from cin
// Shorter repr for frequently used terms
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
// Debug
#ifdef LOCAL
#include "dump.hpp"
#define debug(x) cerr << #x << ": " << x << '\n'
#else
#define dump(...)
#define debug(x)
#endif
// Paste snippets here!!
//
int main() {
cin.tie(0);
ios::sync_with_stdio(false); // Magic for faster cin
int a[5];
rep(i, 5) cin >> a[i];
int k = in();
rep(i, 5) {
rep(j, i + 1, 5) {
dump(k, i, j, a[i], a[j], a[j] - a[i]);
if (a[j] - a[i] > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 889,649 | 889,650 | u292813062 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, min, max) for (int i = min; i < max; i++)
#define rrep(i, min, max) for (int i = max; i >= min; i--)
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - k <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, min, max) for (int i = min; i < max; i++)
#define rrep(i, min, max) for (int i = max; i >= min; i--)
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (e - a <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 889,651 | 889,652 | u780709476 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
using namespace std;
int main() {
int k;
vector<int> an;
int tmp;
for (int i = 0; i < 5; i++) {
scanf("%d\n", &tmp);
an.push_back(tmp);
}
scanf("%d\n", &k);
if ((*max_element(an.begin(), an.end()) -
*min_element(an.begin(), an.end())) < k) {
printf("Yay!\n");
} else {
printf(":(\n");
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
using namespace std;
int main() {
int k;
vector<int> an;
int tmp;
for (int i = 0; i < 5; i++) {
scanf("%d\n", &tmp);
an.push_back(tmp);
}
scanf("%d\n", &k);
if ((*max_element(an.begin(), an.end()) -
*min_element(an.begin(), an.end())) <= k) {
printf("Yay!\n");
} else {
printf(":(\n");
}
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,656 | 889,657 | u784332273 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5];
int k, sum = 0;
int count = 0;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (a[i] - a[j] > 15)
count++;
}
}
if (count > 0) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5], b = 1;
int k, sum = 0;
int count = 0;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
cin >> k;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (a[i] - a[j] > k)
count++;
}
}
if (count > 0) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
} | [
"variable_declaration.add",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 889,658 | 889,659 | u167755809 | cpp |
p03075 | #include <iostream>
using namespace std;
int main() {
int a[5];
int k, i;
for (i = 0; i < 5; i++)
cin >> a[i];
cin >> k;
if (a[4] - a[0] < k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a[5];
int k, i;
for (i = 0; i < 5; i++)
cin >> a[i];
cin >> k;
if (a[4] - a[0] <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,664 | 889,665 | u638264018 | cpp |
p03075 | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[5], k, i, s;
for (i = 0; i < 5; i++)
scanf("%d", &a[i]);
scanf("%d", &k);
sort(a, a + 5);
s = a[4] - a[0];
if (s < k)
printf("Yay!\n");
else
printf(":(\n");
return 0;
}
| #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[5], k, i, s;
for (i = 0; i < 5; i++)
scanf("%d", &a[i]);
scanf("%d", &k);
sort(a, a + 5);
s = a[4] - a[0];
if (s <= k)
printf("Yay!\n");
else
printf(":(\n");
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,673 | 889,674 | u680968127 | cpp |
p03075 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
std::ios::sync_with_stdio(0);
cin.tie(0);
ll ans = 0;
ll anss = 0;
ll count = 0;
ll i, j;
ll aa[5];
ll k;
ll Q, N;
string S;
cin >> aa[0] >> aa[1] >> aa[2] >> aa[3] >> aa[4] >> k;
// for(i=0;i<5;i++){
// for(j=1;j=4-i;j++){
// if(abs(aa[i]-aa[i+j])>k){
// cout<<":("<<endl;
// return 0;
// }
// }
// }
// for(i=0;i<Q;i++){
// cin>>a[i]>>b[i];
// scanf("%d", &a);
// scanf("%d", &b);
// printf("%d\n",a[i]);
// }
if (aa[4] - aa[0] > k) {
cout << ":(" << endl;
} else {
cout << "Yay" << endl;
}
return 0;
} | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
std::ios::sync_with_stdio(0);
cin.tie(0);
ll ans = 0;
ll anss = 0;
ll count = 0;
ll i, j;
ll aa[5];
ll k;
ll Q, N;
string S;
cin >> aa[0] >> aa[1] >> aa[2] >> aa[3] >> aa[4] >> k;
// for(i=0;i<5;i++){
// for(j=1;j=4-i;j++){
// if(abs(aa[i]-aa[i+j])>k){
// cout<<":("<<endl;
// return 0;
// }
// }
// }
// for(i=0;i<Q;i++){
// cin>>a[i]>>b[i];
// scanf("%d", &a);
// scanf("%d", &b);
// printf("%d\n",a[i]);
// }
if (aa[4] - aa[0] > k) {
cout << ":(" << endl;
} else {
cout << "Yay!" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 889,675 | 889,676 | u924153316 | cpp |
p03075 | #define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
int d[] = {0, 0, 0, 0, 0};
int k;
rep(i, 5) { cin >> d[i]; }
cin >> k;
bool ok = true;
rep(i, 5) {
rep(j, 5) {
if (i == j)
continue;
if (abs(d[i] - d[j] >= k))
ok = false;
}
}
if (ok) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | #define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
int d[] = {0, 0, 0, 0, 0};
int k;
rep(i, 5) { cin >> d[i]; }
cin >> k;
bool ok = true;
rep(i, 5) {
rep(j, 5) {
if (i == j)
continue;
if (abs(d[i] - d[j] > k))
ok = false;
}
}
if (ok) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,679 | 889,680 | u992287017 | cpp |
p03075 | #include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (abs(e - a) < k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | #include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
if (abs(e - a) <= k) {
cout << "Yay!" << endl;
} else {
cout << ":(" << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 889,681 | 889,682 | u767430468 | cpp |
p03075 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
#define repi(i, a, b) for (ll i = a; i < b; i++)
#define rep(i, a) repi(i, 0, a)
#define all(u) u.begin(), u.end()
#define pl pair<ll, ll>
#define fi first
#define se second
#define mod 1000000007
#define inf 1 << 30
#define mp(a, b) make_pair(a, b)
#define len(u, N) u.begin(), u.begin() + N
ll k;
vector<ll> A(10);
int main() {
rep(i, 5) cin >> A[i];
cin >> k;
rep(i, 4) {
repi(j, i + 1, 5) {
if (abs(A[i] - A[j]) > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yey!" << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
#define repi(i, a, b) for (ll i = a; i < b; i++)
#define rep(i, a) repi(i, 0, a)
#define all(u) u.begin(), u.end()
#define pl pair<ll, ll>
#define fi first
#define se second
#define mod 1000000007
#define inf 1 << 30
#define mp(a, b) make_pair(a, b)
#define len(u, N) u.begin(), u.begin() + N
ll k;
vector<ll> A(10);
int main() {
rep(i, 5) cin >> A[i];
cin >> k;
rep(i, 4) {
repi(j, i + 1, 5) {
if (abs(A[i] - A[j]) > k) {
cout << ":(" << endl;
return 0;
}
}
}
cout << "Yay!" << endl;
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 889,691 | 889,692 | u640303028 | cpp |
p03075 | #include <bits/stdc++.h>
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int min = 124, max = -1;
int antenna;
int k = 0;
for (int i = 0; i < 5; ++i) {
std::cin >> antenna;
min = std::min(min, antenna);
max = std::max(max, antenna);
}
std::cin >> k;
std::cout << (max - min < k ? "Yay!" : ":(") << std::endl;
} | #include <bits/stdc++.h>
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int min = 124, max = -1;
int antenna;
int k = 0;
for (int i = 0; i < 5; ++i) {
std::cin >> antenna;
min = std::min(min, antenna);
max = std::max(max, antenna);
}
std::cin >> k;
std::cout << (max - min <= k ? "Yay!" : ":(") << std::endl;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 889,703 | 889,704 | u264304509 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<pair<int, int>> vec(5);
int i;
for (i = 0; i < 5; i++) {
int a;
cin >> a;
vec.at(i) = make_pair(a % 10, a);
if (vec.at(i).first == 0) {
vec.at(i).first = 10;
}
}
sort(vec.begin(), vec.end());
reverse(vec.begin(), vec.end());
int sum = 0;
for (i = 0; i < 4; i++) {
if (vec.at(i).first == 0) {
sum += vec.at(i).second;
} else {
sum += vec.at(i).second - vec.at(i).second % 10 + 10;
}
}
sum += vec.at(4).second;
cout << sum;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<pair<int, int>> vec(5);
int i;
for (i = 0; i < 5; i++) {
int a;
cin >> a;
vec.at(i) = make_pair(a % 10, a);
if (vec.at(i).first == 0) {
vec.at(i).first = 10;
}
}
sort(vec.begin(), vec.end());
reverse(vec.begin(), vec.end());
int sum = 0;
for (i = 0; i < 4; i++) {
if (vec.at(i).first == 10) {
sum += vec.at(i).second;
} else {
sum += vec.at(i).second - vec.at(i).second % 10 + 10;
}
}
sum += vec.at(4).second;
cout << sum;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 889,723 | 889,724 | u130651752 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> menu(5);
int mini = 9;
for (int i = 0; i < 5; i++) {
cin >> menu[i];
if (menu[i] % 10 != 0) {
mini = min(mini, menu[i] % 10);
}
}
int sum = 0;
for (int i = 0; i < 5; i++) {
if (menu[i] % 10 == 0) {
sum += menu[i] / 10;
} else if (menu[i] % 10 == mini && sum % 10 == 0) {
sum += menu[i];
} else {
sum += (menu[i] / 10) * 10 + 10;
}
}
cout << sum << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> menu(5);
int mini = 9;
for (int i = 0; i < 5; i++) {
cin >> menu[i];
if (menu[i] % 10 != 0) {
mini = min(mini, menu[i] % 10);
}
}
int sum = 0;
for (int i = 0; i < 5; i++) {
if (menu[i] % 10 == 0) {
sum += menu[i];
} else if (menu[i] % 10 == mini && sum % 10 == 0) {
sum += menu[i];
} else {
sum += (menu[i] / 10) * 10 + 10;
}
}
cout << sum << endl;
} | [
"expression.operation.binary.remove"
] | 889,763 | 889,764 | u176218583 | cpp |
p03076 | #include <algorithm>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(i, a, n) for (int i = (a); i < (n); i++)
#define ll long long
#define llint long long int
#define sort(s) sort(s.begin(), s.end())
#define reverse(v) reverse(v.begin(), v.end());
#define Yes(ans) \
if (ans) \
cout << "Yes" << endl; \
else \
cout << "No" << endl;
#define YES(ans) \
if (ans) \
cout << "YES" << endl; \
else \
cout << "NO" << endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF UnionFind
#define rt0 return 0
#define INF 100000000
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで!
// 2のn乗を求めるよ!!!
int ni(int n) {
if (n == 0)
return 1;
int x = ni(n / 2);
x *= x;
if (n % 2 == 1)
x *= 2;
return x;
}
//フィボナッチ数列のx番目を求めるよ!
llint f(int x, vector<llint> &s) {
if (x == 0)
return 0;
if (x == 1)
return 1;
if (s[x] != 0)
return s[x];
return s[x] = f(x - 1, s) + f(x - 2, s);
}
// aとbの最大公約数を求めるよ!
llint gcd(llint a, llint b) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
return gcd(b, a % b);
}
// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1)
res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
// mod. m での a の逆元 a^{-1} を計算するよ!
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
// aCbをmod.mで割った余りを求める
ll int c(ll int a, ll int b, ll int m) {
ll int ans = 1;
for (ll int i = 0; i < b; i++) {
ans *= a - i;
ans %= m;
}
for (ll int i = 1; i <= b; i++) {
ans *= modinv(i, m);
ans %= m;
}
return ans;
}
// m進数のn桁を全列挙やで
int dfs(int m, int n, vector<int> a, vector<int> s) {
int MIN = 100000000;
stack<string> st;
st.push("");
while (!st.empty()) {
string now = st.top();
st.pop();
if (now.size() == n) {
int x[3] = {0};
int y[3] = {0};
for (int i = 0; i < n; i++) {
if (now[i] - '0' != 3) {
x[now[i] - '0'] += s[i];
y[now[i] - '0']++;
}
}
int sum = 0;
int ng = 0;
for (int i = 0; i < 3; i++) {
if (x[i] == 0)
ng = 1;
sum += abs(x[i] - a[i]);
if (y[i] > 1)
sum += 10 * (y[i] - 1);
}
if (ng == 0)
MIN = min(MIN, sum);
} else {
for (int i = m - 1; i >= 0; i--) {
string next = now + to_string(i);
st.push(next);
}
}
}
return MIN;
}
//迷路やで
void bfs() {
int sx, sy;
int gx, gy;
int h, w;
cin >> h >> w;
cin >> sx >> sy >> gx >> gy;
sx--;
sy--;
gx--;
gy--;
whei(char) a(h, vector<char>(w));
whei(int) d(h, vector<int>(w, INF));
rep(i, 0, h) rep(j, 0, w) { cin >> a[i][j]; }
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
d[sx][sy] = 0;
queue<pair<int, int>> que;
que.push(pair<int, int>(sx, sy));
while (que.size()) {
pair<int, int> p = que.front();
que.pop();
if (p.first == gx && p.second == gy)
break;
for (int i = 0; i < 4; i++) {
int nx = p.first + dx[i];
int ny = p.second + dy[i];
if (0 <= nx && 0 <= ny && nx < h && ny < w && a[nx][ny] != '#' &&
d[nx][ny] == INF) {
que.push(pair<int, int>(nx, ny));
d[nx][ny] = d[p.first][p.second] + 1;
}
}
}
cout << d[gx][gy] << endl;
}
void press(vector<int> &v) { v.erase(unique((v).begin(), (v).end()), v.end()); }
void press(vector<char> &v) {
v.erase(unique((v).begin(), (v).end()), v.end());
}
llint min(llint a, llint b) {
if (a < b)
return a;
return b;
}
llint max(llint a, llint b) {
if (a < b)
swap(a, b);
return a;
}
llint p(int n) {
if (n == 1)
return 1;
return n * p(n - 1);
}
struct UnionFind {
vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2
UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
for (int i = 0; i < N; i++)
par[i] = i;
}
int size(int a) { return par[root(a)]; }
int root(int x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根}
if (par[x] == x)
return x;
return par[x] = root(par[x]);
}
void unite(int x, int y) { // xとyの木を併合
int rx = root(x); // xの根をrx
int ry = root(y); // yの根をry
if (rx == ry)
return; // xとyの根が同じ(=同じ木にある)時はそのまま
par[rx] =
ry; // xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける
}
bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
int rx = root(x);
int ry = root(y);
return rx == ry;
}
};
int main() {
hei(int) a(5);
int sum = 0;
int x = 0;
rep(i, 0, 5) cin >> a[i];
rep(i, 0, 5) {
for (int i = 0;; i += 10) {
if (i >= a[i]) {
sum += i;
x = max(x, i - a[i]);
break;
}
}
}
int ans = sum - x;
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(i, a, n) for (int i = (a); i < (n); i++)
#define ll long long
#define llint long long int
#define sort(s) sort(s.begin(), s.end())
#define reverse(v) reverse(v.begin(), v.end());
#define Yes(ans) \
if (ans) \
cout << "Yes" << endl; \
else \
cout << "No" << endl;
#define YES(ans) \
if (ans) \
cout << "YES" << endl; \
else \
cout << "NO" << endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF UnionFind
#define rt0 return 0
#define INF 100000000
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで!
// 2のn乗を求めるよ!!!
int ni(int n) {
if (n == 0)
return 1;
int x = ni(n / 2);
x *= x;
if (n % 2 == 1)
x *= 2;
return x;
}
//フィボナッチ数列のx番目を求めるよ!
llint f(int x, vector<llint> &s) {
if (x == 0)
return 0;
if (x == 1)
return 1;
if (s[x] != 0)
return s[x];
return s[x] = f(x - 1, s) + f(x - 2, s);
}
// aとbの最大公約数を求めるよ!
llint gcd(llint a, llint b) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
return gcd(b, a % b);
}
// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1)
res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
// mod. m での a の逆元 a^{-1} を計算するよ!
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
// aCbをmod.mで割った余りを求める
ll int c(ll int a, ll int b, ll int m) {
ll int ans = 1;
for (ll int i = 0; i < b; i++) {
ans *= a - i;
ans %= m;
}
for (ll int i = 1; i <= b; i++) {
ans *= modinv(i, m);
ans %= m;
}
return ans;
}
// m進数のn桁を全列挙やで
int dfs(int m, int n, vector<int> a, vector<int> s) {
int MIN = 100000000;
stack<string> st;
st.push("");
while (!st.empty()) {
string now = st.top();
st.pop();
if (now.size() == n) {
int x[3] = {0};
int y[3] = {0};
for (int i = 0; i < n; i++) {
if (now[i] - '0' != 3) {
x[now[i] - '0'] += s[i];
y[now[i] - '0']++;
}
}
int sum = 0;
int ng = 0;
for (int i = 0; i < 3; i++) {
if (x[i] == 0)
ng = 1;
sum += abs(x[i] - a[i]);
if (y[i] > 1)
sum += 10 * (y[i] - 1);
}
if (ng == 0)
MIN = min(MIN, sum);
} else {
for (int i = m - 1; i >= 0; i--) {
string next = now + to_string(i);
st.push(next);
}
}
}
return MIN;
}
//迷路やで
void bfs() {
int sx, sy;
int gx, gy;
int h, w;
cin >> h >> w;
cin >> sx >> sy >> gx >> gy;
sx--;
sy--;
gx--;
gy--;
whei(char) a(h, vector<char>(w));
whei(int) d(h, vector<int>(w, INF));
rep(i, 0, h) rep(j, 0, w) { cin >> a[i][j]; }
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
d[sx][sy] = 0;
queue<pair<int, int>> que;
que.push(pair<int, int>(sx, sy));
while (que.size()) {
pair<int, int> p = que.front();
que.pop();
if (p.first == gx && p.second == gy)
break;
for (int i = 0; i < 4; i++) {
int nx = p.first + dx[i];
int ny = p.second + dy[i];
if (0 <= nx && 0 <= ny && nx < h && ny < w && a[nx][ny] != '#' &&
d[nx][ny] == INF) {
que.push(pair<int, int>(nx, ny));
d[nx][ny] = d[p.first][p.second] + 1;
}
}
}
cout << d[gx][gy] << endl;
}
void press(vector<int> &v) { v.erase(unique((v).begin(), (v).end()), v.end()); }
void press(vector<char> &v) {
v.erase(unique((v).begin(), (v).end()), v.end());
}
llint min(llint a, llint b) {
if (a < b)
return a;
return b;
}
llint max(llint a, llint b) {
if (a < b)
swap(a, b);
return a;
}
llint p(int n) {
if (n == 1)
return 1;
return n * p(n - 1);
}
struct UnionFind {
vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2
UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
for (int i = 0; i < N; i++)
par[i] = i;
}
int size(int a) { return par[root(a)]; }
int root(int x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根}
if (par[x] == x)
return x;
return par[x] = root(par[x]);
}
void unite(int x, int y) { // xとyの木を併合
int rx = root(x); // xの根をrx
int ry = root(y); // yの根をry
if (rx == ry)
return; // xとyの根が同じ(=同じ木にある)時はそのまま
par[rx] =
ry; // xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける
}
bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
int rx = root(x);
int ry = root(y);
return rx == ry;
}
};
int main() {
hei(int) a(5);
int sum = 0;
int x = 0;
rep(i, 0, 5) cin >> a[i];
rep(i, 0, 5) {
for (int j = 0;; j += 10) {
if (j >= a[i]) {
sum += j;
x = max(x, j - a[i]);
break;
}
}
}
int ans = sum - x;
cout << ans << endl;
return 0;
}
| [
"variable_declaration.name.change",
"identifier.change",
"control_flow.loop.for.initializer.change",
"assignment.variable.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 889,769 | 889,770 | u407213771 | cpp |
p03076 | #include "bits/stdc++.h"
using namespace std;
int main() {
int A, B, C, D, E;
cin >> A >> B >> C >> D >> E;
int ans = (A + 9) / 10 * 10 + (B + 9) / 10 * 10 + (C + 9) / 10 * 10 +
(D + 9) / 10 * 10 + (E + 9) / 10 * 10;
ans +=
max({(A + 9) / 10 * 10 - A, (B + 9) / 10 * 10 - B, (C + 9) / 10 * 10 - C,
(D + 9) / 10 * 10 - D, (E + 9) / 10 * 10 - E});
cout << ans << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int A, B, C, D, E;
cin >> A >> B >> C >> D >> E;
int ans = (A + 9) / 10 * 10 + (B + 9) / 10 * 10 + (C + 9) / 10 * 10 +
(D + 9) / 10 * 10 + (E + 9) / 10 * 10;
ans -=
max({(A + 9) / 10 * 10 - A, (B + 9) / 10 * 10 - B, (C + 9) / 10 * 10 - C,
(D + 9) / 10 * 10 - D, (E + 9) / 10 * 10 - E});
cout << ans << endl;
return 0;
} | [
"expression.operator.change"
] | 889,777 | 889,778 | u906839513 | cpp |
p03076 | #include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;
int main() {
int a[5];
int ans = 0;
int a_max = 0;
REP(i, 5) {
cin >> a[i];
if (a[i] % 10 != 0) {
a_max = max(a_max, a[i] % 10);
a[i] += 10 - (a[i] % 10);
}
ans += a[i];
}
ans -= a_max;
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;
int main() {
int a[5];
int ans = 0;
int a_max = 0;
REP(i, 5) {
cin >> a[i];
if (a[i] % 10 != 0) {
a_max = max(a_max, 10 - a[i] % 10);
a[i] += 10 - (a[i] % 10);
}
ans += a[i];
}
ans -= a_max;
cout << ans << endl;
return 0;
}
| [
"assignment.change"
] | 889,779 | 889,780 | u281876921 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main() {
ll a, b, c, d, e, h;
in3(a, b, c);
in2(d, e);
out(min({(a + 9) / 10 * 10 + (b + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(d + 9) / 10 * 10 + e,
(a + 9) / 10 * 10 + (b + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(e + 9) / 10 * 10 + d,
(a + 9) / 10 * 10 + (b + 9) / 10 * 10 + (e + 9) / 10 * 10 +
(d + 9) / 10 * 10 + c,
(a + 9) / 10 * 10 + (e + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(d + 9) / 10 * 10 + b,
(+9) / 10 * 10 + (b + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(d + 9) / 10 * 10 + a}));
memi;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main() {
ll a, b, c, d, e, h;
in3(a, b, c);
in2(d, e);
out(min({(a + 9) / 10 * 10 + (b + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(d + 9) / 10 * 10 + e,
(a + 9) / 10 * 10 + (b + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(e + 9) / 10 * 10 + d,
(a + 9) / 10 * 10 + (b + 9) / 10 * 10 + (e + 9) / 10 * 10 +
(d + 9) / 10 * 10 + c,
(a + 9) / 10 * 10 + (e + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(d + 9) / 10 * 10 + b,
(e + 9) / 10 * 10 + (b + 9) / 10 * 10 + (c + 9) / 10 * 10 +
(d + 9) / 10 * 10 + a}));
memi;
} | [
"call.arguments.change"
] | 889,788 | 889,789 | u917049698 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
vector<int> A(5);
for (int i = 0; i < 5; i++)
cin >> A[i];
int matsu = 9;
int jun = 0;
for (int i = 0; i < 5; i++) {
if (A[i] >= 100 && A[i] % 100 != 0) {
matsu = min(matsu, A[i] % 100);
if (matsu == A[i] % 100)
jun = i;
} else if (A[i] < 100 && A[i] % 10 != 0) {
matsu = min(matsu, A[i] % 10);
if (matsu == A[i] % 10)
jun = i;
}
}
// cout << matsu << " " << jun << endl;
int jikan = 0;
for (int i = 0; i < 5; i++) {
if (i == jun)
jikan += A[i];
else if (A[i] % 10 == 0)
jikan += A[i];
else
jikan += A[i] / 10 * 10 + 10;
}
cout << jikan << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
vector<int> A(5);
for (int i = 0; i < 5; i++)
cin >> A[i];
int matsu = 9;
int jun = 0;
for (int i = 0; i < 5; i++) {
if (A[i] >= 100 && A[i] % 10 != 0) {
matsu = min(matsu, A[i] % 10);
if (matsu == A[i] % 10)
jun = i;
} else if (A[i] < 100 && A[i] % 10 != 0) {
matsu = min(matsu, A[i] % 10);
if (matsu == A[i] % 10)
jun = i;
}
}
// cout << matsu << " " << jun << endl;
int jikan = 0;
for (int i = 0; i < 5; i++) {
if (i == jun)
jikan += A[i];
else if (A[i] % 10 == 0)
jikan += A[i];
else
jikan += A[i] / 10 * 10 + 10;
}
cout << jikan << endl;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 889,812 | 889,813 | u406634703 | cpp |
p03076 | #include <iostream>
using namespace std;
int main() {
int c, mx;
mx = 0;
int ans = 0;
for (int i = 0; i < 5; i++) {
cin >> c;
ans += (c + 9) / 10;
if (mx < 10 - c % 10 && c % 10 != 0)
mx = 10 - c % 10;
}
cout << ans - mx << endl;
} | #include <iostream>
using namespace std;
int main() {
int c, mx;
mx = 0;
int ans = 0;
for (int i = 0; i < 5; i++) {
cin >> c;
ans += (c + 9) / 10;
if (mx < 10 - c % 10 && c % 10 != 0)
mx = 10 - c % 10;
}
cout << ans * 10 - mx << endl;
} | [
"expression.operation.binary.add"
] | 889,820 | 889,821 | u993074316 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D, E, a, b, c, d, e;
cin >> A >> B >> C >> D >> E;
a = (A + 9) / 10;
b = (B + 9) / 10;
c = (C + 9) / 10;
d = (D + 9) / 10;
e = (E + 9) / 10;
a *= 10;
b *= 10;
c *= 10;
d *= 10;
e *= 10;
cout << a + b + c + d + e - min({a - A, b - B, c - C, d - D, e - E}) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C, D, E, a, b, c, d, e;
cin >> A >> B >> C >> D >> E;
a = (A + 9) / 10;
b = (B + 9) / 10;
c = (C + 9) / 10;
d = (D + 9) / 10;
e = (E + 9) / 10;
a *= 10;
b *= 10;
c *= 10;
d *= 10;
e *= 10;
cout << a + b + c + d + e - max({a - A, b - B, c - C, d - D, e - E}) << endl;
} | [
"misc.opposites",
"identifier.change",
"call.function.change",
"io.output.change"
] | 889,824 | 889,825 | u820224016 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5], sum = 0, min = 10;
for (int i = 0; i < 5; i++) {
cin >> a[i];
if (a[i] % 10 == 0) {
sum += a[i];
continue;
} else if (a[i] % 10 < min) {
min = a[i] % 10;
}
sum += a[i] + 10 - (a[i] % 10);
}
cout << sum - min << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5], sum = 0, min = 10;
for (int i = 0; i < 5; i++) {
cin >> a[i];
if (a[i] % 10 == 0) {
sum += a[i];
continue;
} else if (a[i] % 10 < min) {
min = a[i] % 10;
}
sum += a[i] + 10 - (a[i] % 10);
}
cout << sum - 10 + min << endl;
} | [
"expression.operation.binary.add"
] | 889,828 | 889,829 | u950901760 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5], sum = 0, min = 10;
for (int i = 0; i < 5; i++) {
cin >> a[i];
if (a[i] % 10 == 0) {
sum += a[i];
continue;
} else if (a[i] % 10 < min) {
min = a[i] % 10;
}
sum += a[i] + 10 - a[i] % 10;
}
cout << sum - min << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[5], sum = 0, min = 10;
for (int i = 0; i < 5; i++) {
cin >> a[i];
if (a[i] % 10 == 0) {
sum += a[i];
continue;
} else if (a[i] % 10 < min) {
min = a[i] % 10;
}
sum += a[i] + 10 - (a[i] % 10);
}
cout << sum - 10 + min << endl;
} | [
"expression.operation.binary.add"
] | 889,830 | 889,829 | u950901760 | cpp |
p03076 | #include <algorithm> //next_permutation
#include <cmath> //min,max
#include <complex>
#include <iomanip>
#include <iostream> //swap(#inc<utility>より)
#include <locale>
#include <map> //map
#include <math.h> //要ります?
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h> //printf("%.*f\n",*********);
#include <string> //char('a'=32+'A'),to_string,substr
#include <vector> //s.erase(n),vector
#define rt "\n" //改行
#define rep(i, n) for (int i = 0; i < n; i++)
#define rop(i, n) for (int i = 1; i <= n; i++) // start=1
#define drep(i, n) for (int i = n - 1; 0 <= i; i--)
#define drop(i, n) for (int i = n; 0 < i; i--) // end=1
#define yes(ans) \
if (ans) \
cout << "yes" << rt; \
else \
cout << "no" << rt;
#define Yes(ans) \
if (ans) \
cout << "Yes" << rt; \
else \
cout << "No" << rt;
#define YES(ans) \
if (ans) \
cout << "YES" << rt; \
else \
cout << "NO" << rt;
#define sec(a, b, ans) \
if (ans) \
cout << a << rt; \
else \
cout << b << rt;
#define vcin(a, n) rep(i, n) cin >> a[i]; // vcin(配列名),(繰り返し回数)
#define sort(s) sort(s.begin(), s.end()) //昇順
#define revesort(s) sort(s), reve(s) //降順
#define reve(s) reverse(s.begin(), s.end()) //反転
#define please return
#define AC 0
#define Inf 2147483647 // int最大
#define llInf 9223372036854775807 // llint最大
#define rapid \
cin.tie(0); \
ios::sync_with_stdio(false)
#define pi 3.1415926535897932384626 // pi
#define nine 1000000000 // 10^9
#define print(a) printf("%.15f\n", a)
using namespace std;
typedef vector<int> vint;
typedef long double ldouble;
typedef vector<string> vstr;
typedef vector<char> vchar;
typedef vector<double> vdou;
typedef vector<double> vdouble;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
typedef vector<vector<double>> vvdouble;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<bool>> vvbool;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;
long long GCD(long long a, long long b) {
if (b == 0)
return a;
else
return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
unsigned GetDigit(unsigned num) { return std::to_string(num).length(); }
int tow(int n) { // 2のn乗
if (n == 0)
return 1;
int x = tow(n / 2);
x *= x;
if (n % 2 == 1)
x *= 2;
return x; //@domino
}
int KETA(int n) { // Sum of Each Digit
int sum = 0;
while (n > 0) {
sum += n % 10;
n /= 10;
}
return sum;
}
unsigned ND(unsigned num) { // Number of Digits
return std::to_string(num).length(); // outmax=10
}
bool KIBN(string s) { //回文判定
rep(i, s.size() / 2) {
if (s[i] != s[s.size() - 1 - i])
return false;
}
return true;
}
bool INTE(double n) { //整数かどうかの判定
if (ceil(n) == floor(n)) { //切り上げ関数,切り下げ関数
return true;
} else
return false;
}
bool KISU(int n) { //奇数かどうかの判定
if (n % 2 == 0)
return false;
else
return true;
}
bool GUSU(int n) { //偶数かどうかの判定
if (n % 2 == 0)
return true;
else
return false;
}
// (char)toupper(a[n])=文字列のn文字目を大文字で出力
//キャストは必ずstatic_castで
// pow(a,b)=aのb乗
//グローバル関数はカスなので作りません。
int xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = 0;
int main(void) {
rapid;
vint a(5);
rep(i, 5) { cin >> a[i]; }
int y = 11;
int cnt = 0;
rep(i, 5) {
if (a[i] % 10 < y && a[i] % 10 != 0) {
y = a[i] % 10;
cnt = i;
}
}
int ans = 0;
rep(i, 5) {
if (i == cnt) {
ans += a[i];
} else {
rep(j, 9) {
if ((a[i] + j) % 10 == 0) {
ans += (a[i] + j);
break;
}
}
}
}
cout << ans << rt;
please AC;
}
//参考:---;
// ACしてくれ~~~~~~~~~~~ | #include <algorithm> //next_permutation
#include <cmath> //min,max
#include <complex>
#include <iomanip>
#include <iostream> //swap(#inc<utility>より)
#include <locale>
#include <map> //map
#include <math.h> //要ります?
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h> //printf("%.*f\n",*********);
#include <string> //char('a'=32+'A'),to_string,substr
#include <vector> //s.erase(n),vector
#define rt "\n" //改行
#define rep(i, n) for (int i = 0; i < n; i++)
#define rop(i, n) for (int i = 1; i <= n; i++) // start=1
#define drep(i, n) for (int i = n - 1; 0 <= i; i--)
#define drop(i, n) for (int i = n; 0 < i; i--) // end=1
#define yes(ans) \
if (ans) \
cout << "yes" << rt; \
else \
cout << "no" << rt;
#define Yes(ans) \
if (ans) \
cout << "Yes" << rt; \
else \
cout << "No" << rt;
#define YES(ans) \
if (ans) \
cout << "YES" << rt; \
else \
cout << "NO" << rt;
#define sec(a, b, ans) \
if (ans) \
cout << a << rt; \
else \
cout << b << rt;
#define vcin(a, n) rep(i, n) cin >> a[i]; // vcin(配列名),(繰り返し回数)
#define sort(s) sort(s.begin(), s.end()) //昇順
#define revesort(s) sort(s), reve(s) //降順
#define reve(s) reverse(s.begin(), s.end()) //反転
#define please return
#define AC 0
#define Inf 2147483647 // int最大
#define llInf 9223372036854775807 // llint最大
#define rapid \
cin.tie(0); \
ios::sync_with_stdio(false)
#define pi 3.1415926535897932384626 // pi
#define nine 1000000000 // 10^9
#define print(a) printf("%.15f\n", a)
using namespace std;
typedef vector<int> vint;
typedef long double ldouble;
typedef vector<string> vstr;
typedef vector<char> vchar;
typedef vector<double> vdou;
typedef vector<double> vdouble;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
typedef vector<vector<double>> vvdouble;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<bool>> vvbool;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;
long long GCD(long long a, long long b) {
if (b == 0)
return a;
else
return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
unsigned GetDigit(unsigned num) { return std::to_string(num).length(); }
int tow(int n) { // 2のn乗
if (n == 0)
return 1;
int x = tow(n / 2);
x *= x;
if (n % 2 == 1)
x *= 2;
return x; //@domino
}
int KETA(int n) { // Sum of Each Digit
int sum = 0;
while (n > 0) {
sum += n % 10;
n /= 10;
}
return sum;
}
unsigned ND(unsigned num) { // Number of Digits
return std::to_string(num).length(); // outmax=10
}
bool KIBN(string s) { //回文判定
rep(i, s.size() / 2) {
if (s[i] != s[s.size() - 1 - i])
return false;
}
return true;
}
bool INTE(double n) { //整数かどうかの判定
if (ceil(n) == floor(n)) { //切り上げ関数,切り下げ関数
return true;
} else
return false;
}
bool KISU(int n) { //奇数かどうかの判定
if (n % 2 == 0)
return false;
else
return true;
}
bool GUSU(int n) { //偶数かどうかの判定
if (n % 2 == 0)
return true;
else
return false;
}
// (char)toupper(a[n])=文字列のn文字目を大文字で出力
//キャストは必ずstatic_castで
// pow(a,b)=aのb乗
//グローバル関数はカスなので作りません。
int xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = 0;
int main(void) {
rapid;
vint a(5);
rep(i, 5) { cin >> a[i]; }
int y = 11;
int cnt = 0;
rep(i, 5) {
if (a[i] % 10 < y && a[i] % 10 != 0) {
y = a[i] % 10;
cnt = i;
}
}
int ans = 0;
rep(i, 5) {
if (i == cnt) {
ans += a[i];
} else {
rep(j, 10) {
if ((a[i] + j) % 10 == 0) {
ans += (a[i] + j);
break;
}
}
}
}
cout << ans << rt;
please AC;
}
//参考:---;
// ACしてくれ~~~~~~~~~~~ | [
"literal.number.change",
"call.arguments.change"
] | 889,874 | 889,875 | u742306624 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> T(5);
int Min = 9, last, Last, sum = 0;
for (int i = 0; i < 5; i++) {
cin >> T[i];
if (T[i] % 10 < Min && T[i] != 0) {
last = i;
Min = T[i] % 10;
}
}
Last = T[last];
T[last] = 0;
for (int i = 0; i < 5; i++) {
if (T[i] % 10 == 0) {
sum += T[i];
} else {
sum += T[i] - T[i] % 10 + 10;
}
}
cout << sum + Last << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> T(5);
int Min = 9, last, Last, sum = 0;
for (int i = 0; i < 5; i++) {
cin >> T[i];
if (T[i] % 10 < Min && T[i] % 10 != 0) {
last = i;
Min = T[i] % 10;
}
}
Last = T[last];
T[last] = 0;
for (int i = 0; i < 5; i++) {
if (T[i] % 10 == 0) {
sum += T[i];
} else {
sum += T[i] - T[i] % 10 + 10;
}
}
cout << sum + Last << endl;
return 0;
} | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 889,897 | 889,898 | u410888565 | cpp |
p03076 | #include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#define MIN 100000
using namespace std;
int main() {
int a[6];
int flag = 0, ans;
for (int i = 1; i < 6; i++) {
cin >> a[i];
if (i > 1)
if (a[i] != a[i - 1])
flag = 1;
}
if (!flag) {
if (a[1] % 10 == 0) {
cout << a[1] * 5 << endl;
} else {
int rem = a[1] % 10;
int add = 10 - rem;
a[1] = a[1] + add;
int m = a[1] * 4;
ans = m + a[2];
cout << ans;
return 0;
}
}
else if (flag) {
int sum = 0, ANS = MIN;
for (int turn = 1; turn < 6; turn++) {
swap(a[turn], a[5]);
for (int i = 1; i < 5; i++) {
int n = a[i];
if (n % 10 == 0)
sum += n;
else {
int rem = n % 10;
int add = 10 - rem;
n = n + add;
sum += n;
}
}
sum += a[5];
ANS = min(ANS, sum);
swap(a[turn], a[5]);
}
cout << ANS << endl;
}
return 0;
}
| #include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#define MIN 100000
using namespace std;
int main() {
int a[6];
int flag = 0, ans;
for (int i = 1; i < 6; i++) {
cin >> a[i];
if (i > 1)
if (a[i] != a[i - 1])
flag = 1;
}
if (!flag) {
if (a[1] % 10 == 0) {
cout << a[1] * 5 << endl;
} else {
int rem = a[1] % 10;
int add = 10 - rem;
a[1] = a[1] + add;
int m = a[1] * 4;
ans = m + a[2];
cout << ans;
return 0;
}
}
else if (flag) {
int sum = 0, ANS = MIN;
for (int turn = 1; turn < 6; turn++) {
swap(a[turn], a[5]);
for (int i = 1; i < 5; i++) {
int n = a[i];
if (n % 10 == 0)
sum += n;
else {
int rem = n % 10;
int add = 10 - rem;
n = n + add;
sum += n;
}
}
sum += a[5];
// cout<<sum<<endl;
ANS = min(ANS, sum);
swap(a[turn], a[5]);
sum = 0;
}
cout << ANS << endl;
}
return 0;
}
| [
"assignment.add"
] | 889,899 | 889,900 | u615884372 | cpp |
p03076 | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <string>
#include <vector>
int main() {
std::vector<int> D(5);
int min = 10;
int I;
for (int i = 0; i < 5; ++i) {
std::cin >> D[i];
if (D[i] % 10 < min && D[i] % 10 != 0) {
min = D[i] % 10;
I = i;
}
}
int ans = 0;
for (int i = 0; i < 5; ++i) {
if (i == I)
ans += D[i];
else {
if (D[i] % 2 == 0)
ans += D[i];
else
ans += ((D[i] / 10) + 1) * 10;
}
}
std::cout << ans << std::endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <string>
#include <vector>
int main() {
std::vector<int> D(5);
int min = 10;
int I;
for (int i = 0; i < 5; ++i) {
std::cin >> D[i];
if (D[i] % 10 < min && D[i] % 10 != 0) {
min = D[i] % 10;
I = i;
}
}
int ans = 0;
for (int i = 0; i < 5; ++i) {
if (i == I)
ans += D[i];
else {
if (D[i] % 10 == 0)
ans += D[i];
else
ans += ((D[i] / 10) + 1) * 10;
}
}
std::cout << ans << std::endl;
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 889,940 | 889,941 | u917678406 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
int t[5];
for (int i = 0; i < 5; i++)
cin >> t[i];
vector<vector<int>> perm(0, vector<int>(5));
for (int a = 0; a < 5; a++) {
for (int b = 0; b < 5; b++) {
if (b != a) {
for (int c = 0; c < 5; c++) {
if (c != a && c != b) {
for (int d = 0; d < 5; d++) {
if (d != a && d != b && d != c) {
for (int e = 0; e < 5; e++) {
if (e != a && e != b && e != c && e != d) {
perm.push_back({a, b, c, d, e});
}
}
}
}
}
}
}
}
}
int ans = 10000000;
for (int i = 0; i < perm.size(); i++) {
int time = 0;
for (int j = 0; j < 5; j++) {
if (t[perm[i][j]] % 10 == 0)
time += t[perm[i][j]];
else {
time += t[perm[i][j]] + 10 - t[perm[i][j]] % 10;
}
}
ans = min(ans, time);
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int t[5];
for (int i = 0; i < 5; i++)
cin >> t[i];
vector<vector<int>> perm(0, vector<int>(5));
for (int a = 0; a < 5; a++) {
for (int b = 0; b < 5; b++) {
if (b != a) {
for (int c = 0; c < 5; c++) {
if (c != a && c != b) {
for (int d = 0; d < 5; d++) {
if (d != a && d != b && d != c) {
for (int e = 0; e < 5; e++) {
if (e != a && e != b && e != c && e != d) {
perm.push_back({a, b, c, d, e});
}
}
}
}
}
}
}
}
}
int ans = 10000000;
for (int i = 0; i < perm.size(); i++) {
int time = 0;
for (int j = 0; j < 5; j++) {
if (t[perm[i][j]] % 10 == 0 || j == 4)
time += t[perm[i][j]];
else {
time += t[perm[i][j]] + 10 - t[perm[i][j]] % 10;
}
}
ans = min(ans, time);
}
cout << ans << endl;
} | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 889,942 | 889,943 | u528258842 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a, int b) {
if ((a % b) * 2 >= b) {
return (a / b) + 1;
}
return a / b;
}
int gcd(int a, int b) {
int c;
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return a;
} //最大公約数
int lcm(int a, int b) {
int c = gcd(a, b);
a /= c;
return a * b;
} //最小公倍数
int nCr(int a, int b) {
int i, r = 1;
for (i = 1; i <= b; i++) {
r *= (a + 1 - i);
r /= i;
}
return r;
} //コンビネーション
int nHr(int a, int b) { return nCr(a + b - 1, b); } // 重複組み合わせ
int fact(int a) {
int i, r = 1;
for (i = 1; i <= a; i++) {
r *= i;
}
return r;
} //階乗
int pow(int a, int b) {
int i, r = 1;
for (i = 1; i <= b; i++) {
r *= a;
}
return r;
} // a~bまでの階乗
int dsum(int x) {
int r = 0;
while (x) {
r += (x % 10);
x /= 10;
}
return r;
} //数字の各位の和
int dsumb(int x, int b) {
int r = 0;
while (x) {
r += (x % b);
x /= b;
}
return r;
} // b進数の各位の和?
int sankaku(int x) { return ((1 + x) * x) / 2; } //三角数 xまでの和
//以下long long ver
long long llmax(long long a, long long b) {
if (a > b) {
return a;
}
return b;
}
long long llmin(long long a, long long b) {
if (a < b) {
return a;
}
return b;
}
long long llzt(long long a, long long b) { return llmax(a, b) - llmin(a, b); }
long long llround(long long a, long long b) {
if ((a % b) * 2 >= b) {
return (a / b) + 1;
}
return a / b;
}
long long llceil(long long a, long long b) {
if (a % b == 0) {
return a / b;
}
return (a / b) + 1;
}
long long llgcd(long long a, long long b) {
long long c;
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return a;
}
long long lllcm(long long a, long long b) {
long long c = llgcd(a, b);
a /= c;
return a * b;
}
long long llnCr(long long a, long long b) {
long long i, r = 1;
for (i = 1; i <= b; i++) {
r *= (a + 1 - i);
r /= i;
}
return r;
}
long long llnHr(long long a, long long b) { return llnCr(a + b - 1, b); }
long long llfact(long long a) {
long long i, r = 1;
for (i = 1; i <= a; i++) {
r *= i;
}
return r;
}
long long llpow(long long a, long long b) {
long long i, r = 1;
for (i = 1; i <= b; i++) {
r *= a;
}
return r;
}
long long lldsum(long long x) {
long long r = 0;
while (x) {
r += (x % 10);
x /= 10;
}
return r;
}
long long lldsumb(long long x, long long b) {
long long r = 0;
while (x) {
r += (x % b);
x /= b;
}
return r;
}
long long llsankaku(long long x) { return ((1 + x) * x) / 2; }
// double
double dbmax(double a, double b) {
if (a > b) {
return a;
}
return b;
}
double dbmin(double a, double b) {
if (a < b) {
return a;
}
return b;
}
double dbzt(double a, double b) { return dbmax(a, b) - dbmin(a, b); }
typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define forr(i, a, b) \
; \
for (int i = (a); i < (b); i++)
#define clean(arr, val) memset(arr, val, sizeof(arr))
#define forn(i, n) forr(i, 0, n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
bool is_prime(int x) {
if (x <= 1)
return false;
for (int i = 2; i * i <= x; i++) {
if (x % i == 0)
return false;
}
return true;
}
/*CODE START HERE*/
int main() {
vector<int> a(5);
forn(i, 5) { cin >> a.at(i); }
vector<int> b(5);
forn(i, 5) { b.at(i) = a.at(i) % 10; }
int min_amari = 9;
sort(b.begin(), b.end());
if (b.at(4) == 0) {
int sum = 0;
forn(i, 5) { sum += ((a.at(i) + 10) / 10) * 10; }
cout << sum << endl;
return 0;
} else {
int sum = 0;
forn(i, 5) {
if (b.at(i) != 0) {
min_amari = min(b.at(i), min_amari);
}
}
forn(i, 5) { sum += ((a.at(i) + 10) / 10) * 10; }
cout << sum - 10 + min_amari << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a, int b) {
if ((a % b) * 2 >= b) {
return (a / b) + 1;
}
return a / b;
}
int gcd(int a, int b) {
int c;
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return a;
} //最大公約数
int lcm(int a, int b) {
int c = gcd(a, b);
a /= c;
return a * b;
} //最小公倍数
int nCr(int a, int b) {
int i, r = 1;
for (i = 1; i <= b; i++) {
r *= (a + 1 - i);
r /= i;
}
return r;
} //コンビネーション
int nHr(int a, int b) { return nCr(a + b - 1, b); } // 重複組み合わせ
int fact(int a) {
int i, r = 1;
for (i = 1; i <= a; i++) {
r *= i;
}
return r;
} //階乗
int pow(int a, int b) {
int i, r = 1;
for (i = 1; i <= b; i++) {
r *= a;
}
return r;
} // a~bまでの階乗
int dsum(int x) {
int r = 0;
while (x) {
r += (x % 10);
x /= 10;
}
return r;
} //数字の各位の和
int dsumb(int x, int b) {
int r = 0;
while (x) {
r += (x % b);
x /= b;
}
return r;
} // b進数の各位の和?
int sankaku(int x) { return ((1 + x) * x) / 2; } //三角数 xまでの和
//以下long long ver
long long llmax(long long a, long long b) {
if (a > b) {
return a;
}
return b;
}
long long llmin(long long a, long long b) {
if (a < b) {
return a;
}
return b;
}
long long llzt(long long a, long long b) { return llmax(a, b) - llmin(a, b); }
long long llround(long long a, long long b) {
if ((a % b) * 2 >= b) {
return (a / b) + 1;
}
return a / b;
}
long long llceil(long long a, long long b) {
if (a % b == 0) {
return a / b;
}
return (a / b) + 1;
}
long long llgcd(long long a, long long b) {
long long c;
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return a;
}
long long lllcm(long long a, long long b) {
long long c = llgcd(a, b);
a /= c;
return a * b;
}
long long llnCr(long long a, long long b) {
long long i, r = 1;
for (i = 1; i <= b; i++) {
r *= (a + 1 - i);
r /= i;
}
return r;
}
long long llnHr(long long a, long long b) { return llnCr(a + b - 1, b); }
long long llfact(long long a) {
long long i, r = 1;
for (i = 1; i <= a; i++) {
r *= i;
}
return r;
}
long long llpow(long long a, long long b) {
long long i, r = 1;
for (i = 1; i <= b; i++) {
r *= a;
}
return r;
}
long long lldsum(long long x) {
long long r = 0;
while (x) {
r += (x % 10);
x /= 10;
}
return r;
}
long long lldsumb(long long x, long long b) {
long long r = 0;
while (x) {
r += (x % b);
x /= b;
}
return r;
}
long long llsankaku(long long x) { return ((1 + x) * x) / 2; }
// double
double dbmax(double a, double b) {
if (a > b) {
return a;
}
return b;
}
double dbmin(double a, double b) {
if (a < b) {
return a;
}
return b;
}
double dbzt(double a, double b) { return dbmax(a, b) - dbmin(a, b); }
typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define forr(i, a, b) \
; \
for (int i = (a); i < (b); i++)
#define clean(arr, val) memset(arr, val, sizeof(arr))
#define forn(i, n) forr(i, 0, n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
bool is_prime(int x) {
if (x <= 1)
return false;
for (int i = 2; i * i <= x; i++) {
if (x % i == 0)
return false;
}
return true;
}
/*CODE START HERE*/
int main() {
vector<int> a(5);
forn(i, 5) { cin >> a.at(i); }
vector<int> b(5);
forn(i, 5) { b.at(i) = a.at(i) % 10; }
int min_amari = 9;
sort(b.begin(), b.end());
if (b.at(4) == 0) {
int sum = 0;
forn(i, 5) { sum += ((a.at(i) + 9) / 10) * 10; }
cout << sum << endl;
return 0;
} else {
int sum = 0;
forn(i, 5) {
if (b.at(i) != 0) {
min_amari = min(b.at(i), min_amari);
}
}
forn(i, 5) { sum += ((a.at(i) + 9) / 10) * 10; }
cout << sum - 10 + min_amari << endl;
}
} | [
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 889,966 | 889,967 | u946082956 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
vector<int> time = {a, b, c, d, e};
int n = 0;
vector<int> nexttime(n);
for (int i = 0; i < n; i++) {
if (time.at(i) % 10 == 0) {
nexttime.at(i) = time.at(i);
} else {
nexttime.at(i) = time.at(i) - time.at(i) % 10 + 10;
}
}
int besttime = 99999999;
for (int i = 0; i < n; i++) {
int sumtime = 0;
for (int j = 0; j < n; j++) {
if (i == j) {
sumtime += time.at(j);
} else {
sumtime += nexttime.at(j);
}
}
besttime = min(besttime, sumtime);
}
cout << besttime << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
vector<int> time = {a, b, c, d, e};
int n = 5;
vector<int> nexttime(n);
for (int i = 0; i < n; i++) {
if (time.at(i) % 10 == 0) {
nexttime.at(i) = time.at(i);
} else {
nexttime.at(i) = time.at(i) - time.at(i) % 10 + 10;
}
}
int besttime = 99999999;
for (int i = 0; i < n; i++) {
int sumtime = 0;
for (int j = 0; j < n; j++) {
if (i == j) {
sumtime += time.at(j);
} else {
sumtime += nexttime.at(j);
}
}
besttime = min(besttime, sumtime);
}
cout << besttime << endl;
}
| [
"literal.number.change",
"variable_declaration.value.change"
] | 889,968 | 889,969 | u856957535 | cpp |
p03076 | #include <iostream>
using namespace std;
int main() {
int a[6] = {}, f = -1, g = 0, h = 0, j = 0;
for (int i = 0; i < 5; i++) {
cin >> a[i];
if (10 - a[i] % 10 > f && 10 - a[i] % 10 != 10) {
f = 10 - a[i] % 10;
j = a[i];
}
}
for (int i = 0; i < 5; i++) {
if (a[i] == j) {
a[i] = 0;
}
}
for (int i = 0; i < 5; i++) {
if (10 - a[i] % 10 != 10 && a[i] != 0) {
g = g + 10 - a[i] % 10;
}
}
for (int i = 0; i < 5; i++) {
h = h + a[i];
}
cout << h + g + j;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a[6] = {}, f = -1, g = 0, h = 0, j = 0;
for (int i = 0; i < 5; i++) {
cin >> a[i];
if (10 - a[i] % 10 > f && 10 - a[i] % 10 != 10) {
f = 10 - a[i] % 10;
j = a[i];
}
}
for (int i = 0; i < 5; i++) {
if (a[i] == j) {
a[i] = 0;
break;
}
}
for (int i = 0; i < 5; i++) {
if (10 - a[i] % 10 != 10 && a[i] != 0) {
g = g + 10 - a[i] % 10;
}
}
for (int i = 0; i < 5; i++) {
h = h + a[i];
}
cout << h + g + j;
return 0;
} | [
"control_flow.break.add"
] | 889,972 | 889,973 | u834488582 | cpp |
p03076 | #include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
int a, b, c, d, e, x;
int f, h;
x = 0;
char c1;
string s;
// cin>> a;
// cin>> s;
// cin >> b;
// c1 = s[b-1];
// for (int i = 0; i< s.length(); i++){
// if(s[i] ==c1 ){
// cout << s[i];
// }
// else {
// cout << "*";
// }
// }
// return 0;
int a1[5];
f = 0;
h = 10;
for (int i = 0; i < 5; i++) {
cin >> a1[i];
}
for (int i = 0; i < 5; i++) {
if (a1[i] % 10 != 0 && a1[i] % 10 <= h) {
h = a1[i] % 10;
f = i;
}
}
// cout << a1[f];
for (int i = 0; i < 5; i++) {
if (i == f) {
continue;
}
x += a1[i];
// cout << x << endl;
if (a1[i] % 10 != 0) {
while (x % 10 != 1) {
x++;
}
}
}
x = x + s[f];
cout << x;
} | #include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
int a, b, c, d, e, x;
int f, h;
x = 0;
char c1;
string s;
// cin>> a;
// cin>> s;
// cin >> b;
// c1 = s[b-1];
// for (int i = 0; i< s.length(); i++){
// if(s[i] ==c1 ){
// cout << s[i];
// }
// else {
// cout << "*";
// }
// }
// return 0;
int a1[5];
f = 0;
h = 10;
for (int i = 0; i < 5; i++) {
cin >> a1[i];
}
for (int i = 0; i < 5; i++) {
if (a1[i] % 10 != 0 && a1[i] % 10 <= h) {
h = a1[i] % 10;
f = i;
}
}
// cout << a1[f];
for (int i = 0; i < 5; i++) {
if (i == f) {
continue;
}
x += a1[i];
// cout << x << endl;
if (a1[i] % 10 != 0) {
while (x % 10 != 0) {
x++;
}
}
}
// cout << a1[f]<< endl;
// cout << x;
x = x + a1[f];
cout << x;
} | [
"literal.number.change",
"control_flow.loop.condition.change",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 889,974 | 889,975 | u834488582 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
int a1, b1, c1, d1, e1;
int a2, b2, c2, d2, e2;
a1 = a % 10;
a2 = a / 10;
if (a1 != 0)
a2++;
b1 = b % 10;
b2 = b / 10;
if (b1 != 0)
b2++;
c1 = c % 10;
c2 = c / 10;
if (c1 != 0)
c2++;
d1 = d % 10;
d2 = d / 10;
if (d1 != 0)
d2++;
e1 = e % 10;
e2 = e / 10;
if (e1 != 0)
e2++;
int hasuu;
int kotae;
if (a1 + b1 + c1 + d1 + e1 == 0) {
hasuu = 0;
kotae = (a2 + b2 + c2 + d2 + e2) * 10;
cout << kotae << endl;
return 0;
} else {
if (a1 == 0)
a1 = INT_MAX;
if (b1 == 0)
a1 = INT_MAX;
if (c1 == 0)
a1 = INT_MAX;
if (d1 == 0)
a1 = INT_MAX;
if (e1 == 0)
a1 = INT_MAX;
hasuu = min({a1, b1, c1, d1, e1});
kotae = (a2 + b2 + c2 + d2 + e2) * 10 + hasuu - 10;
cout << kotae << endl;
return 0;
}
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
int a1, b1, c1, d1, e1;
int a2, b2, c2, d2, e2;
a1 = a % 10;
a2 = a / 10;
if (a1 != 0)
a2++;
b1 = b % 10;
b2 = b / 10;
if (b1 != 0)
b2++;
c1 = c % 10;
c2 = c / 10;
if (c1 != 0)
c2++;
d1 = d % 10;
d2 = d / 10;
if (d1 != 0)
d2++;
e1 = e % 10;
e2 = e / 10;
if (e1 != 0)
e2++;
int hasuu;
int kotae;
if (a1 + b1 + c1 + d1 + e1 == 0) {
hasuu = 0;
kotae = (a2 + b2 + c2 + d2 + e2) * 10;
cout << kotae << endl;
return 0;
} else {
if (a1 == 0)
a1 = INT_MAX;
if (b1 == 0)
b1 = INT_MAX;
if (c1 == 0)
c1 = INT_MAX;
if (d1 == 0)
d1 = INT_MAX;
if (e1 == 0)
e1 = INT_MAX;
hasuu = min({a1, b1, c1, d1, e1});
kotae = (a2 + b2 + c2 + d2 + e2) * 10 + hasuu - 10;
cout << kotae << endl;
return 0;
}
} | [
"assignment.variable.change",
"identifier.change"
] | 890,012 | 890,013 | u406647332 | cpp |
p03076 | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, g = 0;
cin >> a >> b >> c >> d >> e;
int f = 10;
if (a % 10 == 0)
g += a;
else {
g += a / 10 * 10 + 10;
f = min(f, a % 10);
}
if (b % 10 == 0)
g += b;
else {
g += b / 10 * 10 + 10;
f = min(f, b % 10);
}
if (c % 10 == 0)
g += c;
else {
g += c / 10 * 10 + 10;
f = min(f, c % 10);
}
if (d % 10 == 0)
g += d;
else {
g += d / 10 * 10 + 10;
f = min(f, d % 10);
}
if (a % 10 == 0)
g += e;
else {
g += e / 10 * 10 + 10;
f = min(f, e % 10);
}
if (f == 10)
cout << g;
else
cout << g - 10 + f;
}
| #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, g = 0;
cin >> a >> b >> c >> d >> e;
int f = 10;
if (a % 10 == 0)
g += a;
else {
g += a / 10 * 10 + 10;
f = min(f, a % 10);
}
if (b % 10 == 0)
g += b;
else {
g += b / 10 * 10 + 10;
f = min(f, b % 10);
}
if (c % 10 == 0)
g += c;
else {
g += c / 10 * 10 + 10;
f = min(f, c % 10);
}
if (d % 10 == 0)
g += d;
else {
g += d / 10 * 10 + 10;
f = min(f, d % 10);
}
if (e % 10 == 0)
g += e;
else {
g += e / 10 * 10 + 10;
f = min(f, e % 10);
}
if (f == 10)
cout << g;
else
cout << g - 10 + f;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 890,014 | 890,015 | u683078179 | cpp |
p03076 | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, f = 10, g = 0;
cin >> a >> b >> c >> d >> e;
if (a % 10 != 0) {
f = min(f, a % 10);
g += (a / 10 + 1) * 10;
} else
g += a;
if (b % 10 != 0) {
f = min(f, b % 10);
g += (b / 10 + 1) * 10;
} else
g += b;
if (c % 10 != 0) {
f = min(c, a % 10);
g += (c / 10 + 1) * 10;
} else
g += c;
if (d % 10 != 0) {
f = min(f, d % 10);
g += (d / 10 + 1) * 10;
} else
g += d;
if (e % 10 != 0) {
f = min(f, e % 10);
g += (e / 10 + 1) * 10;
} else
g += e;
cout << g + f - 10;
} | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, f = 10, g = 0;
cin >> a >> b >> c >> d >> e;
if (a % 10 != 0) {
f = min(f, a % 10);
g += (a / 10 + 1) * 10;
} else
g += a;
if (b % 10 != 0) {
f = min(f, b % 10);
g += (b / 10 + 1) * 10;
} else
g += b;
if (c % 10 != 0) {
f = min(f, c % 10);
g += (c / 10 + 1) * 10;
} else
g += c;
if (d % 10 != 0) {
f = min(f, d % 10);
g += (d / 10 + 1) * 10;
} else
g += d;
if (e % 10 != 0) {
f = min(f, e % 10);
g += (e / 10 + 1) * 10;
} else
g += e;
cout << g + f - 10;
} | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 890,016 | 890,017 | u683078179 | cpp |
p03076 | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, f = 10, g = 0;
cin >> a >> b >> c >> d >> e;
if (a % 10 != 0) {
f = min(f, a % 10);
g += (a / 10 + 1) * 10;
} else
g += a;
if (b % 10 != 0) {
f = min(f, b % 10);
g += (b / 10 + 1) * 10;
} else
g += b;
if (c % 10 != 0) {
f = min(c, a % 10);
g += (c / 10 + 1) * 10;
} else
g += c;
if (d % 10 != 0) {
f = min(f, d % 10);
g += (d / 10 + 1) * 10;
} else
g += d;
if (e % 10 != 0) {
f = min(f, e % 10);
g += (e / 10 + 1) * 10;
} else
g += e;
cout << g - f;
} | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, f = 10, g = 0;
cin >> a >> b >> c >> d >> e;
if (a % 10 != 0) {
f = min(f, a % 10);
g += (a / 10 + 1) * 10;
} else
g += a;
if (b % 10 != 0) {
f = min(f, b % 10);
g += (b / 10 + 1) * 10;
} else
g += b;
if (c % 10 != 0) {
f = min(f, c % 10);
g += (c / 10 + 1) * 10;
} else
g += c;
if (d % 10 != 0) {
f = min(f, d % 10);
g += (d / 10 + 1) * 10;
} else
g += d;
if (e % 10 != 0) {
f = min(f, e % 10);
g += (e / 10 + 1) * 10;
} else
g += e;
cout << g + f - 10;
} | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"io.output.change"
] | 890,019 | 890,017 | u683078179 | cpp |
p03076 | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, f = 10, g = 0;
cin >> a >> b >> c >> d >> e;
if (a % 10 != 0) {
f = min(f, a % 10);
g += (a / 10 + 1) * 10;
} else
g += a;
if (b % 10 != 0) {
f = min(f, b % 10);
g += (b / 10 + 1) * 10;
} else
g += b;
if (c % 10 != 0) {
f = min(c, a % 10);
g += (c / 10 + 1) * 10;
} else
g += c;
if (d % 10 != 0) {
f = min(f, d % 10);
g += (d / 10 + 1) * 10;
} else
g += d;
if (e % 10 != 0) {
f = min(f, e % 10);
g += (e / 10 + 1) * 10;
} else
g += e;
cout << e - f;
}
| #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int a, b, c, d, e, f = 10, g = 0;
cin >> a >> b >> c >> d >> e;
if (a % 10 != 0) {
f = min(f, a % 10);
g += (a / 10 + 1) * 10;
} else
g += a;
if (b % 10 != 0) {
f = min(f, b % 10);
g += (b / 10 + 1) * 10;
} else
g += b;
if (c % 10 != 0) {
f = min(f, c % 10);
g += (c / 10 + 1) * 10;
} else
g += c;
if (d % 10 != 0) {
f = min(f, d % 10);
g += (d / 10 + 1) * 10;
} else
g += d;
if (e % 10 != 0) {
f = min(f, e % 10);
g += (e / 10 + 1) * 10;
} else
g += e;
cout << g + f - 10;
} | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 890,020 | 890,017 | u683078179 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
const int inf = 1012345678;
int main() {
vector<int> A(5);
cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
vector<int> P = {0, 1, 2, 3, 4};
int ans = inf;
do {
int tmp = 0;
for (int i = 0; i < 5; i++) {
while (ans % 10 != 0)
ans++; // 料理が注文可能になる時刻まで待機
tmp += A[P[i]];
}
ans = min(ans, tmp);
} while (next_permutation(P.begin(), P.end()));
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
const int inf = 1012345678;
int main() {
vector<int> A(5);
cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
vector<int> P = {0, 1, 2, 3, 4};
int ans = inf;
do {
int tmp = 0;
for (int i = 0; i < 5; i++) {
while (tmp % 10 != 0)
tmp++; // 料理が注文可能になる時刻まで待機
tmp += A[P[i]];
}
ans = min(ans, tmp);
} while (next_permutation(P.begin(), P.end()));
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.condition.change"
] | 890,039 | 890,040 | u336145516 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
const int inf = 1012345678;
int main() {
vector<int> A(5);
cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
vector<int> P = {0, 1, 2, 3, 4};
int ans = inf;
do {
int tmp = 0;
for (int i = 0; i < 5; i++) {
while (ans % 10 != 0)
ans++; // 料理が注文可能になる時刻まで待機
ans += A[P[i]];
}
ans = min(ans, tmp);
} while (next_permutation(P.begin(), P.end()));
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
const int inf = 1012345678;
int main() {
vector<int> A(5);
cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
vector<int> P = {0, 1, 2, 3, 4};
int ans = inf;
do {
int tmp = 0;
for (int i = 0; i < 5; i++) {
while (tmp % 10 != 0)
tmp++; // 料理が注文可能になる時刻まで待機
tmp += A[P[i]];
}
ans = min(ans, tmp);
} while (next_permutation(P.begin(), P.end()));
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.condition.change",
"assignment.variable.change"
] | 890,041 | 890,040 | u336145516 | cpp |
p03076 | bool DBG = false;
// #pragma GCC optimize("Ofast")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_dec_float.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using ll = long long;
using ld = long double;
// using i128 = __int128_t;
// using bint = boost::multiprecision::cpp_int
// using d1024 = boost::multiprecision::number<mp::cpp_dec_float<1024>>;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define IFOR(i, a, b) for (int i = ((b)-1); i >= (a); --i)
#define RPT(i, a, b) for (int i = (a); i < ((a) + (b)); ++i)
#define IRPT(i, a, b) for (int i = ((a) + (b)-1); i >= (a); --i)
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
#define fs first
#define sd second
#define couts(x) cout << (x) << (" ")
#define coutn(x) cout << (x) << ("\n")
#define ncouts(x) numout(x), outst[outst_N++] = ' '
#define ncoutn(x) numout(x), outst[outst_N++] = '\n'
#define scouts(x) strout(x), outst[outst_N++] = ' '
#define scoutn(x) strout(x), outst[outst_N++] = '\n'
#define dcouts(x) \
if (DBG) \
couts(x)
#define dcoutn(x) \
if (DBG) \
coutn(x)
#define endl "\n"
#define psb push_back
#define ppb pop_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define LBIT(x, a) (((x) >> (a)) & 1LL)
#define IBIT(x, a) (((x) >> (a)) & 1)
#define BCOUNT(x) (__builtin_popcount(x))
template <typename T>
std::istream &operator>>(std::istream &is, std::vector<T> &vec) {
for (auto &v : vec)
is >> v;
return is;
}
template <typename T1, typename T2>
std::istream &operator>>(std::istream &is, std::pair<T1, T2> &p) {
is >> p.first >> p.second;
return is;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &vec) {
os << "[";
for (auto v : vec)
os << v << ",";
os << "]";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::deque<T> &vec) {
os << "deque[";
for (auto v : vec)
os << v << ",";
os << "]";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::set<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::unordered_set<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::multiset<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os,
const std::unordered_multiset<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &os, const std::pair<T1, T2> &pa) {
os << "(" << pa.first << "," << pa.second << ")";
return os;
}
template <typename TK, typename TV>
std::ostream &operator<<(std::ostream &os, const std::map<TK, TV> &mp) {
os << "{";
for (auto v : mp)
os << v.first << "=>" << v.second << ",";
os << "}";
return os;
}
template <typename TK, typename TV>
std::ostream &operator<<(std::ostream &os,
const std::unordered_map<TK, TV> &mp) {
os << "{";
for (auto v : mp)
os << v.first << "=>" << v.second << ",";
os << "}";
return os;
}
template <class T> using V = vector<T>;
template <class T> using V2 = V<V<T>>;
template <class T> using V3 = V<V2<T>>;
template <class T> using V4 = V<V3<T>>;
char outst[20'000'000];
int outst_N = 0;
char outst_tmp[200];
template <class NUM> void numout(NUM n) {
if (n < 0) {
n *= -1;
outst[outst_N++] = '-';
}
if (n == 0) {
outst[outst_N++] = '0';
return;
}
int cnt = 0;
while (n > 0) {
outst_tmp[cnt++] = '0' + (n % 10);
n /= 10;
}
IFOR(i, 0, cnt) { outst[outst_N++] = outst_tmp[i]; }
}
void strout(std::string s) {
for (auto x : s) {
outst[outst_N++] = x;
}
}
constexpr ll LINF = 1LL << 60;
constexpr int IINF = 1 << 28;
constexpr ll mod = 1'000'000'007;
void solve() {
V<int> a(5);
cin >> a;
int ans = IINF;
std::vector<int> v = {0, 1, 2, 3, 4};
do {
int tmp = 0;
FOR(i, 0, 5) { tmp += (10 * (tmp % 10 > 0) - tmp % 10) + a[v[i]]; }
ans = min(ans, tmp);
} while (next_permutation(ALL(v)));
coutn(ans);
coutn(ans);
}
int main(void) {
// std::cout << std::fixed << std::setprecision(20);
cin.tie(0);
// ios::sync_with_stdio(false);
solve();
// printf("%s", outst);
return 0;
}
| bool DBG = false;
// #pragma GCC optimize("Ofast")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_dec_float.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using ll = long long;
using ld = long double;
// using i128 = __int128_t;
// using bint = boost::multiprecision::cpp_int
// using d1024 = boost::multiprecision::number<mp::cpp_dec_float<1024>>;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define IFOR(i, a, b) for (int i = ((b)-1); i >= (a); --i)
#define RPT(i, a, b) for (int i = (a); i < ((a) + (b)); ++i)
#define IRPT(i, a, b) for (int i = ((a) + (b)-1); i >= (a); --i)
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
#define fs first
#define sd second
#define couts(x) cout << (x) << (" ")
#define coutn(x) cout << (x) << ("\n")
#define ncouts(x) numout(x), outst[outst_N++] = ' '
#define ncoutn(x) numout(x), outst[outst_N++] = '\n'
#define scouts(x) strout(x), outst[outst_N++] = ' '
#define scoutn(x) strout(x), outst[outst_N++] = '\n'
#define dcouts(x) \
if (DBG) \
couts(x)
#define dcoutn(x) \
if (DBG) \
coutn(x)
#define endl "\n"
#define psb push_back
#define ppb pop_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define LBIT(x, a) (((x) >> (a)) & 1LL)
#define IBIT(x, a) (((x) >> (a)) & 1)
#define BCOUNT(x) (__builtin_popcount(x))
template <typename T>
std::istream &operator>>(std::istream &is, std::vector<T> &vec) {
for (auto &v : vec)
is >> v;
return is;
}
template <typename T1, typename T2>
std::istream &operator>>(std::istream &is, std::pair<T1, T2> &p) {
is >> p.first >> p.second;
return is;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &vec) {
os << "[";
for (auto v : vec)
os << v << ",";
os << "]";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::deque<T> &vec) {
os << "deque[";
for (auto v : vec)
os << v << ",";
os << "]";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::set<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::unordered_set<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::multiset<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os,
const std::unordered_multiset<T> &vec) {
os << "{";
for (auto v : vec)
os << v << ",";
os << "}";
return os;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &os, const std::pair<T1, T2> &pa) {
os << "(" << pa.first << "," << pa.second << ")";
return os;
}
template <typename TK, typename TV>
std::ostream &operator<<(std::ostream &os, const std::map<TK, TV> &mp) {
os << "{";
for (auto v : mp)
os << v.first << "=>" << v.second << ",";
os << "}";
return os;
}
template <typename TK, typename TV>
std::ostream &operator<<(std::ostream &os,
const std::unordered_map<TK, TV> &mp) {
os << "{";
for (auto v : mp)
os << v.first << "=>" << v.second << ",";
os << "}";
return os;
}
template <class T> using V = vector<T>;
template <class T> using V2 = V<V<T>>;
template <class T> using V3 = V<V2<T>>;
template <class T> using V4 = V<V3<T>>;
char outst[20'000'000];
int outst_N = 0;
char outst_tmp[200];
template <class NUM> void numout(NUM n) {
if (n < 0) {
n *= -1;
outst[outst_N++] = '-';
}
if (n == 0) {
outst[outst_N++] = '0';
return;
}
int cnt = 0;
while (n > 0) {
outst_tmp[cnt++] = '0' + (n % 10);
n /= 10;
}
IFOR(i, 0, cnt) { outst[outst_N++] = outst_tmp[i]; }
}
void strout(std::string s) {
for (auto x : s) {
outst[outst_N++] = x;
}
}
constexpr ll LINF = 1LL << 60;
constexpr int IINF = 1 << 28;
constexpr ll mod = 1'000'000'007;
void solve() {
V<int> a(5);
cin >> a;
int ans = IINF;
std::vector<int> v = {0, 1, 2, 3, 4};
do {
int tmp = 0;
FOR(i, 0, 5) { tmp += (10 * (tmp % 10 > 0) - tmp % 10) + a[v[i]]; }
ans = min(ans, tmp);
} while (next_permutation(ALL(v)));
coutn(ans);
}
int main(void) {
// std::cout << std::fixed << std::setprecision(20);
cin.tie(0);
// ios::sync_with_stdio(false);
solve();
// printf("%s", outst);
return 0;
}
| [
"call.remove"
] | 890,042 | 890,043 | u952090000 | cpp |
p03076 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1012345678;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int gcd(int a, int b) {
if (a % b == 0) {
return (b);
} else {
return (gcd(b, a % b));
}
}
int a[6];
int M = 10;
int mod;
int main() {
rep(i, 5) {
cin >> a[i];
if (a[i] % 10 == 0)
break;
else {
mod = a[i] % 10;
a[i] = a[i] + 10 - mod;
M = min(mod, M);
}
}
int time = 0;
if (M == 10) {
rep(i, 5) { time += a[i]; }
} else {
rep(i, 5) { time += a[i]; }
time = time + M - 10;
}
cout << time << endl;
return 0;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1012345678;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int gcd(int a, int b) {
if (a % b == 0) {
return (b);
} else {
return (gcd(b, a % b));
}
}
int a[6];
int M = 10;
int mod;
int main() {
rep(i, 5) {
cin >> a[i];
if (a[i] % 10 == 0)
continue;
else {
mod = a[i] % 10;
a[i] = a[i] + 10 - mod;
M = min(mod, M);
}
}
int time = 0;
if (M == 10) {
rep(i, 5) { time += a[i]; }
} else {
rep(i, 5) { time += a[i]; }
time = time + M - 10;
}
cout << time << endl;
return 0;
}
| [
"control_flow.break.remove",
"control_flow.continue.add"
] | 890,081 | 890,082 | u950174376 | cpp |
p03076 | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> Time(5);
for (int i = 0; i < 5; i++)
cin >> Time.at(i);
vector<int> Mod(5);
for (int i = 0; i < 5; i++)
Mod.at(i) = Time.at(i) % 10;
for (int i = 0; i < 5; i++) {
if (Mod.at(i) != 0)
Mod.at(i) = 10 - Mod.at(i);
}
int Max;
Max = max((((Mod.at(0), Mod.at(1)), Mod.at(2)), Mod.at(3)), Mod.at(4));
int Sum = 0;
for (int i = 0; i < 5; i++) {
Sum += Time.at(i);
Sum += Mod.at(i);
}
Sum -= Max;
cout << Sum << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> Time(5);
for (int i = 0; i < 5; i++)
cin >> Time.at(i);
vector<int> Mod(5);
for (int i = 0; i < 5; i++)
Mod.at(i) = Time.at(i) % 10;
for (int i = 0; i < 5; i++) {
if (Mod.at(i) != 0)
Mod.at(i) = 10 - Mod.at(i);
}
int Max;
Max =
max(max(max(max(Mod.at(0), Mod.at(1)), Mod.at(2)), Mod.at(3)), Mod.at(4));
int Sum = 0;
for (int i = 0; i < 5; i++) {
Sum += Time.at(i);
Sum += Mod.at(i);
}
Sum -= Max;
cout << Sum << endl;
} | [
"assignment.value.change",
"call.arguments.change",
"call.add"
] | 890,085 | 890,086 | u075250977 | cpp |
p03076 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
int N = 5;
vector<int> time = {a, b, c, d, e};
vector<int> nexttime(N);
rep(i, N) {
if (N % 10 == 0)
nexttime[i] = time[i];
else
nexttime[i] = time[i] - (time[i] % 10) + 10;
}
int besttime = 99999999;
rep(i, N) {
int sumtime = 0;
rep(j, N) {
if (i ==
j) { //一番最後の加算(最後の料理を注文してから届くまでの時間を加算する)時の操作
sumtime += time[j];
} else { //一番最後以外の、time以上の10の倍数をsumtimeに加算する操作
sumtime += nexttime[j];
}
}
besttime = min(besttime, sumtime);
}
cout << besttime << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
int N = 5;
vector<int> time = {a, b, c, d, e};
vector<int> nexttime(N);
rep(i, N) {
if (time[i] % 10 == 0)
nexttime[i] = time[i];
else
nexttime[i] = time[i] - time[i] % 10 + 10;
}
int besttime = 99999999;
rep(i, N) {
int sumtime = 0;
rep(j, N) {
if (i ==
j) { //一番最後の加算(最後の料理を注文してから届くまでの時間を加算する)時の操作
sumtime += time[j];
} else { //一番最後以外の、time以上の10の倍数をsumtimeに加算する操作
sumtime += nexttime[j];
}
}
besttime = min(besttime, sumtime);
}
cout << besttime << endl;
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 890,096 | 890,097 | u224794697 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, s, n) for (int i = (s); i < (n); ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define REPR(i, s, n) for (int i = (s); i >= (n); --(i))
#define all(a) (a).begin(), (a).end()
#define reall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define pf push_front
#define MIN(a, b) a = min((a), (b))
#define MAX(a, b) a = max((a), (b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<char> vc;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
typedef vector<P> vP;
using Edge = pair<int, ll>;
using Graph = vector<vector<Edge>>;
const ll mod = 1e9 + 7;
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
void printvll(vll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) cout << v[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvvll(vvll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) {
rep(j, v[i].size()) { cout << v[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void prints(string s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) cout << s[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvs(vs s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) {
rep(j, s[i].size()) { cout << s[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void Yes(bool x) {
if (x)
cout << "Yes\n";
else
cout << "No\n";
}
void YES(bool x) {
if (x)
cout << "YES\n";
else
cout << "NO\n";
}
void yes(bool x) {
if (x)
cout << "yes\n";
else
cout << "no\n";
}
ll d, n, r, l, k, ans = 0, ret = M;
bool flag = false, flag2 = false;
string s, t;
ll a, b, c;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vll v(5);
rep(i, 5) {
cin >> v[i];
// cout << v[i] << endl;
}
cin >> k;
if (v[4] - v[0] > k)
cout << ":(" << endl;
else
cout << "Yey!\n";
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, s, n) for (int i = (s); i < (n); ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define REPR(i, s, n) for (int i = (s); i >= (n); --(i))
#define all(a) (a).begin(), (a).end()
#define reall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define pf push_front
#define MIN(a, b) a = min((a), (b))
#define MAX(a, b) a = max((a), (b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<char> vc;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
typedef vector<P> vP;
using Edge = pair<int, ll>;
using Graph = vector<vector<Edge>>;
const ll mod = 1e9 + 7;
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
void printvll(vll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) cout << v[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvvll(vvll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) {
rep(j, v[i].size()) { cout << v[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void prints(string s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) cout << s[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvs(vs s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) {
rep(j, s[i].size()) { cout << s[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void Yes(bool x) {
if (x)
cout << "Yes\n";
else
cout << "No\n";
}
void YES(bool x) {
if (x)
cout << "YES\n";
else
cout << "NO\n";
}
void yes(bool x) {
if (x)
cout << "yes\n";
else
cout << "no\n";
}
ll d, n, r, l, k, ans = 0, ret = M;
bool flag = false, flag2 = false;
string s, t;
ll a, b, c;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vll v(5);
rep(i, 5) {
cin >> v[i];
// cout << v[i] << endl;
}
cin >> k;
if (v[4] - v[0] > k)
cout << ":(";
else
cout << "Yay!\n";
/*ll x, y, z;
cin >> x >> y >> z >> k;*/
}
| [
"expression.operation.binary.remove",
"literal.string.change",
"io.output.change"
] | 890,102 | 890,103 | u373958718 | cpp |
p03075 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, s, n) for (int i = (s); i < (n); ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define REPR(i, s, n) for (int i = (s); i >= (n); --(i))
#define all(a) (a).begin(), (a).end()
#define reall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define pf push_front
#define MIN(a, b) a = min((a), (b))
#define MAX(a, b) a = max((a), (b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<char> vc;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
typedef vector<P> vP;
using Edge = pair<int, ll>;
using Graph = vector<vector<Edge>>;
const ll mod = 1e9 + 7;
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
void printvll(vll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) cout << v[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvvll(vvll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) {
rep(j, v[i].size()) { cout << v[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void prints(string s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) cout << s[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvs(vs s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) {
rep(j, s[i].size()) { cout << s[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void Yes(bool x) {
if (x)
cout << "Yes\n";
else
cout << "No\n";
}
void YES(bool x) {
if (x)
cout << "YES\n";
else
cout << "NO\n";
}
void yes(bool x) {
if (x)
cout << "yes\n";
else
cout << "no\n";
}
ll d, n, r, l, k, ans = 0, ret = M;
bool flag = false, flag2 = false;
string s, t;
ll a, b, c;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vll v(5);
rep(i, 5) { cin >> v[i]; }
cin >> k;
if (v[4] - v[0] > k)
cout << ":(\n";
else
cout << "Yey!\n";
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, s, n) for (int i = (s); i < (n); ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define REPR(i, s, n) for (int i = (s); i >= (n); --(i))
#define all(a) (a).begin(), (a).end()
#define reall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define pf push_front
#define MIN(a, b) a = min((a), (b))
#define MAX(a, b) a = max((a), (b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<char> vc;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
typedef vector<P> vP;
using Edge = pair<int, ll>;
using Graph = vector<vector<Edge>>;
const ll mod = 1e9 + 7;
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
void printvll(vll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) cout << v[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvvll(vvll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) {
rep(j, v[i].size()) { cout << v[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void prints(string s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) cout << s[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvs(vs s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) {
rep(j, s[i].size()) { cout << s[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void Yes(bool x) {
if (x)
cout << "Yes\n";
else
cout << "No\n";
}
void YES(bool x) {
if (x)
cout << "YES\n";
else
cout << "NO\n";
}
void yes(bool x) {
if (x)
cout << "yes\n";
else
cout << "no\n";
}
ll d, n, r, l, k, ans = 0, ret = M;
bool flag = false, flag2 = false;
string s, t;
ll a, b, c;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vll v(5);
rep(i, 5) {
cin >> v[i];
// cout << v[i] << endl;
}
cin >> k;
if (v[4] - v[0] > k)
cout << ":(";
else
cout << "Yay!\n";
/*ll x, y, z;
cin >> x >> y >> z >> k;*/
}
| [
"literal.string.change",
"io.output.change"
] | 890,104 | 890,103 | u373958718 | cpp |
p03075 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> k;
if ((e - a) < k)
cout << "Yay!";
else {
cout << ":(";
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> k;
if ((e - a) <= k)
cout << "Yay!";
else {
cout << ":(";
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 890,108 | 890,109 | u771072294 | cpp |
p03075 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
int ab, ac, ad, ae;
ab = b - a;
ac = c - a;
ad = d - a;
ae = e - a;
if (ab < k && ac < k && ad < k && ae < k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, k;
cin >> a >> b >> c >> d >> e >> k;
int ab, ac, ad, ae;
ab = b - a;
ac = c - a;
ad = d - a;
ae = e - a;
if (ab <= k && ac <= k && ad <= k && ae <= k)
cout << "Yay!" << endl;
else
cout << ":(" << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 890,110 | 890,111 | u626360077 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.