Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
9 values
p03076
#include <bits/stdc++.h> #define countof(a) (sizeof(a) / sizeof(*a)) #define vi std::vector<int> #define vvi std::vector<std::vector<int>> #define vpi std::vector<pi> #define pi std::pair<int, int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) \ for (int var = (from), var##down = ((int)(to)) < ((int)(from)); \ var##down ? (var >= (int)(to)) : (var <= (int)(to)); \ var##down ? var-- : var++) #define UPTO(var, from, to) for (int var = (from); var <= ((int)(to)); var++) #define DOWNTO(var, from, to) for (int var = (from); var >= ((int)(to)); var--) #define FOR(var, to) UPTO(var, 0, (to)-1) #define DOWN(var, from) DOWNTO(var, (from)-1, 0) #define INIT(var, val) FOR(i, countof(var)) var[i] = val #define INPUT(var) FOR(i, countof(var)) cin >> var[i] #define INPUT1(var) FOR(i, countof(var)) cin >> var[i], var[i]-- #define SORT(v) qsort(v, countof(v), sizeof(*v), int_less) #define SORTT(v) qsort(v, countof(v), sizeof(*v), int_greater) #define QSORT(v, b) qsort(v, countof(v), sizeof(*v), b) typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; static const int MOD = 1000000007; static const int INF = ((1 << 30) - 1); static const s64 LINF = ((1LL << 62) - 1); struct Comb { std::vector<std::vector<s64>> a; Comb(int n) { // O(n^2) a.resize(n + 1); FOR(i, n + 1) { a[i].resize(i + 1, 1); UPTO(j, 1, i - 1) a[i][j] = a[i - 1][j] + a[i - 1][j]; } } s64 ncr(int n, int r) { assert(n >= 0); assert(n <= (int)a.size()); assert(r >= 0); assert(r <= n); return a[n][r]; } }; #define gc(c) (c) = getchar() int ri() { int c, s = 0, r = 0; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } s64 rs64() { s64 r; int c, s; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } int int_less(const void *a, const void *b) { return (*(const int *)a - *(const int *)b); } int int_greater(const void *a, const void *b) { return (*(const int *)b - *(const int *)a); } std::string operator*(const std::string &s, int n) { std::string res; FOR(i, n) res += s; return res; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> a) { for (auto i : a) os << i << " "; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::set<T> a) { for (auto i : a) os << i << " "; return os; } template <class A, class B> std::ostream &operator<<(std::ostream &os, std::pair<A, B> a) { os << a.fi << "," << a.se; return os; } int main() { int a[5]; FOR(i, 5) a[i] = ri(); int min = INF; FOR(i, 5) { if (a[i] % 10 && min > a[i] % 10) min = a[i] % 10; if (a[i] % 10) a[i] -= a[i] % 10 - 10; } if (min == INF) min = 10; std::cerr << a[0] + a[1] + a[2] + a[3] + a[4] - (10 - min) << std::endl; return 0; }
#include <bits/stdc++.h> #define countof(a) (sizeof(a) / sizeof(*a)) #define vi std::vector<int> #define vvi std::vector<std::vector<int>> #define vpi std::vector<pi> #define pi std::pair<int, int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) \ for (int var = (from), var##down = ((int)(to)) < ((int)(from)); \ var##down ? (var >= (int)(to)) : (var <= (int)(to)); \ var##down ? var-- : var++) #define UPTO(var, from, to) for (int var = (from); var <= ((int)(to)); var++) #define DOWNTO(var, from, to) for (int var = (from); var >= ((int)(to)); var--) #define FOR(var, to) UPTO(var, 0, (to)-1) #define DOWN(var, from) DOWNTO(var, (from)-1, 0) #define INIT(var, val) FOR(i, countof(var)) var[i] = val #define INPUT(var) FOR(i, countof(var)) cin >> var[i] #define INPUT1(var) FOR(i, countof(var)) cin >> var[i], var[i]-- #define SORT(v) qsort(v, countof(v), sizeof(*v), int_less) #define SORTT(v) qsort(v, countof(v), sizeof(*v), int_greater) #define QSORT(v, b) qsort(v, countof(v), sizeof(*v), b) typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; static const int MOD = 1000000007; static const int INF = ((1 << 30) - 1); static const s64 LINF = ((1LL << 62) - 1); struct Comb { std::vector<std::vector<s64>> a; Comb(int n) { // O(n^2) a.resize(n + 1); FOR(i, n + 1) { a[i].resize(i + 1, 1); UPTO(j, 1, i - 1) a[i][j] = a[i - 1][j] + a[i - 1][j]; } } s64 ncr(int n, int r) { assert(n >= 0); assert(n <= (int)a.size()); assert(r >= 0); assert(r <= n); return a[n][r]; } }; #define gc(c) (c) = getchar() int ri() { int c, s = 0, r = 0; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } s64 rs64() { s64 r; int c, s; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } int int_less(const void *a, const void *b) { return (*(const int *)a - *(const int *)b); } int int_greater(const void *a, const void *b) { return (*(const int *)b - *(const int *)a); } std::string operator*(const std::string &s, int n) { std::string res; FOR(i, n) res += s; return res; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> a) { for (auto i : a) os << i << " "; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::set<T> a) { for (auto i : a) os << i << " "; return os; } template <class A, class B> std::ostream &operator<<(std::ostream &os, std::pair<A, B> a) { os << a.fi << "," << a.se; return os; } int main() { int a[5]; FOR(i, 5) a[i] = ri(); int min = INF; FOR(i, 5) { if (a[i] % 10 && min > a[i] % 10) min = a[i] % 10; if (a[i] % 10) a[i] -= a[i] % 10 - 10; } if (min == INF) min = 10; std::cout << a[0] + a[1] + a[2] + a[3] + a[4] - (10 - min) << std::endl; return 0; }
[ "identifier.change", "expression.operation.binary.change" ]
890,971
890,972
u040490988
cpp
p03076
#include <bits/stdc++.h> #define countof(a) (sizeof(a) / sizeof(*a)) #define vi std::vector<int> #define vvi std::vector<std::vector<int>> #define vpi std::vector<pi> #define pi std::pair<int, int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) \ for (int var = (from), var##down = ((int)(to)) < ((int)(from)); \ var##down ? (var >= (int)(to)) : (var <= (int)(to)); \ var##down ? var-- : var++) #define UPTO(var, from, to) for (int var = (from); var <= ((int)(to)); var++) #define DOWNTO(var, from, to) for (int var = (from); var >= ((int)(to)); var--) #define FOR(var, to) UPTO(var, 0, (to)-1) #define DOWN(var, from) DOWNTO(var, (from)-1, 0) #define INIT(var, val) FOR(i, countof(var)) var[i] = val #define INPUT(var) FOR(i, countof(var)) cin >> var[i] #define INPUT1(var) FOR(i, countof(var)) cin >> var[i], var[i]-- #define SORT(v) qsort(v, countof(v), sizeof(*v), int_less) #define SORTT(v) qsort(v, countof(v), sizeof(*v), int_greater) #define QSORT(v, b) qsort(v, countof(v), sizeof(*v), b) typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; static const int MOD = 1000000007; static const int INF = ((1 << 30) - 1); static const s64 LINF = ((1LL << 62) - 1); struct Comb { std::vector<std::vector<s64>> a; Comb(int n) { // O(n^2) a.resize(n + 1); FOR(i, n + 1) { a[i].resize(i + 1, 1); UPTO(j, 1, i - 1) a[i][j] = a[i - 1][j] + a[i - 1][j]; } } s64 ncr(int n, int r) { assert(n >= 0); assert(n <= (int)a.size()); assert(r >= 0); assert(r <= n); return a[n][r]; } }; #define gc(c) (c) = getchar() int ri() { int c, s = 0, r = 0; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } s64 rs64() { s64 r; int c, s; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } int int_less(const void *a, const void *b) { return (*(const int *)a - *(const int *)b); } int int_greater(const void *a, const void *b) { return (*(const int *)b - *(const int *)a); } std::string operator*(const std::string &s, int n) { std::string res; FOR(i, n) res += s; return res; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> a) { for (auto i : a) os << i << " "; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::set<T> a) { for (auto i : a) os << i << " "; return os; } template <class A, class B> std::ostream &operator<<(std::ostream &os, std::pair<A, B> a) { os << a.fi << "," << a.se; return os; } int main() { int a[5]; FOR(i, 5) a[i] = ri(); int min = INF; FOR(i, 5) { if (a[i] % 10 && min > a[i] % 10) min = a[i] % 10; if (a[i] % 10) a[i] -= a[i] % 10 - 10; } if (min == INF) min = 0; std::cerr << a[0] + a[1] + a[2] + a[3] + a[4] - (10 - min) << std::endl; return 0; }
#include <bits/stdc++.h> #define countof(a) (sizeof(a) / sizeof(*a)) #define vi std::vector<int> #define vvi std::vector<std::vector<int>> #define vpi std::vector<pi> #define pi std::pair<int, int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) \ for (int var = (from), var##down = ((int)(to)) < ((int)(from)); \ var##down ? (var >= (int)(to)) : (var <= (int)(to)); \ var##down ? var-- : var++) #define UPTO(var, from, to) for (int var = (from); var <= ((int)(to)); var++) #define DOWNTO(var, from, to) for (int var = (from); var >= ((int)(to)); var--) #define FOR(var, to) UPTO(var, 0, (to)-1) #define DOWN(var, from) DOWNTO(var, (from)-1, 0) #define INIT(var, val) FOR(i, countof(var)) var[i] = val #define INPUT(var) FOR(i, countof(var)) cin >> var[i] #define INPUT1(var) FOR(i, countof(var)) cin >> var[i], var[i]-- #define SORT(v) qsort(v, countof(v), sizeof(*v), int_less) #define SORTT(v) qsort(v, countof(v), sizeof(*v), int_greater) #define QSORT(v, b) qsort(v, countof(v), sizeof(*v), b) typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; static const int MOD = 1000000007; static const int INF = ((1 << 30) - 1); static const s64 LINF = ((1LL << 62) - 1); struct Comb { std::vector<std::vector<s64>> a; Comb(int n) { // O(n^2) a.resize(n + 1); FOR(i, n + 1) { a[i].resize(i + 1, 1); UPTO(j, 1, i - 1) a[i][j] = a[i - 1][j] + a[i - 1][j]; } } s64 ncr(int n, int r) { assert(n >= 0); assert(n <= (int)a.size()); assert(r >= 0); assert(r <= n); return a[n][r]; } }; #define gc(c) (c) = getchar() int ri() { int c, s = 0, r = 0; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } s64 rs64() { s64 r; int c, s; for (;;) { gc(c); if (c == '-') { s = 1; break; } if (c >= '0' && c <= '9') { r = c - '0'; break; } } for (;;) { gc(c); if (c < '0' || c > '9') break; r *= 10; r += c - '0'; } if (s) r = -r; return r; } int int_less(const void *a, const void *b) { return (*(const int *)a - *(const int *)b); } int int_greater(const void *a, const void *b) { return (*(const int *)b - *(const int *)a); } std::string operator*(const std::string &s, int n) { std::string res; FOR(i, n) res += s; return res; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> a) { for (auto i : a) os << i << " "; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::set<T> a) { for (auto i : a) os << i << " "; return os; } template <class A, class B> std::ostream &operator<<(std::ostream &os, std::pair<A, B> a) { os << a.fi << "," << a.se; return os; } int main() { int a[5]; FOR(i, 5) a[i] = ri(); int min = INF; FOR(i, 5) { if (a[i] % 10 && min > a[i] % 10) min = a[i] % 10; if (a[i] % 10) a[i] -= a[i] % 10 - 10; } if (min == INF) min = 10; std::cout << a[0] + a[1] + a[2] + a[3] + a[4] - (10 - min) << std::endl; return 0; }
[ "literal.number.change", "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
890,973
890,972
u040490988
cpp
p03076
#include <bits/stdc++.h> using namespace std; int main(void) { vector<int> A(5); vector<int> B(5); for (int i = 0; i < 5; i++) { cin >> A[i]; if (A[i] % 10 == 0) { B[i] = 0; } else { B[i] = 10 - A[i] % 10; } } // 添え字取得 vector<int>::iterator max = min_element(B.begin(), B.end()); size_t max_index = distance(B.begin(), max); int sol = 0; // 待ち時間は、10で割り切れない数の場合以外変わらない // また、 for (int i = 0; i < 5; i++) { if (i != max_index) { if (A[i] % 10 == 0) { sol += A[i]; } else { sol += A[i] + 10 - A[i] % 10; } } else { sol += A[i]; } } cout << sol; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { vector<int> A(5); vector<int> B(5); for (int i = 0; i < 5; i++) { cin >> A[i]; if (A[i] % 10 == 0) { B[i] = 0; } else { B[i] = 10 - A[i] % 10; } } // 添え字取得 vector<int>::iterator max = max_element(B.begin(), B.end()); size_t max_index = distance(B.begin(), max); int sol = 0; // 待ち時間は、どの注文する順番で頼んでも、同じ時間かかる // 理由としては、結局10秒の倍数だけ待つため // なので、待ち時間が最大のものが最後に注文するべきもの for (int i = 0; i < 5; i++) { if (i != max_index) { if (A[i] % 10 == 0) { sol += A[i]; } else { sol += A[i] + 10 - A[i] % 10; } } else { sol += A[i]; } } cout << sol; return 0; }
[ "identifier.change", "call.function.change" ]
890,996
890,997
u934246119
cpp
p03076
#include <bits/stdc++.h> using namespace std; int a[10]; bool cmp(int a, int b) { int t = (a % 10 == 0) ? 10 : a % 10; int t1 = (b % 10 == 0) ? 10 : b % 10; return t < t1; } int main() { int n = 5; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n, cmp); long long res = 0; for (int i = 1; i < 5; i++) { res += (a[i] + ((a[i] % 10 == 0) ? 0 : 10)); } res += a[0]; cout << res; return 0; }
#include <bits/stdc++.h> using namespace std; int a[10]; bool cmp(int a, int b) { int t = (a % 10 == 0) ? 10 : a % 10; int t1 = (b % 10 == 0) ? 10 : b % 10; return t < t1; } int main() { int n = 5; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n, cmp); long long res = 0; for (int i = 1; i < 5; i++) { res += (a[i] / 10 * 10 + ((a[i] % 10 == 0) ? 0 : 10)); } res += a[0]; cout << res; return 0; }
[ "assignment.change" ]
891,056
891,057
u232901495
cpp
p03076
#include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <istream> #include <sstream> #include <string> #include <vector> using namespace std; int main() { vector<int> a; int s[4]; int m = 0; int min = 0; int i; int j; int t = 0; for (i = 0; i < 5; i++) { cin >> j; a.push_back(j); } for (i = 0; i < 5; i++) { t = t + a[i]; if (t % 10 == 0) { } else if (t % 10 != 0) { for (;;) { t = t + 1; m = m + 1; if (t % 10 == 0) { if (m > min) { min = m; m = 0; } break; } } } } cout << t - min << endl; }
#include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <istream> #include <sstream> #include <string> #include <vector> using namespace std; int main() { vector<int> a; int s[4]; int m = 0; int min = 0; int i; int j; int t = 0; for (i = 0; i < 5; i++) { cin >> j; a.push_back(j); } for (i = 0; i < 5; i++) { t = t + a[i]; if (t % 10 == 0) { } else if (t % 10 != 0) { for (;;) { t = t + 1; m = m + 1; if (t % 10 == 0) { if (m > min) { min = m; m = 0; } m = 0; break; } } } } cout << t - min << endl; }
[ "assignment.add" ]
891,058
891,059
u230139835
cpp
p03076
#include <bits/stdc++.h> int main() { int ans = 0, min = 0; for (int i = 0, a; i < 5; i++) { std::cin >> a, ans += (a + 9) / 10 * 10, min = std::min(min, (a + 9) / 10 * 10 - a); } std::cout << ans - min << std::endl; return 0; }
#include <bits/stdc++.h> int main() { int ans = 0, min = 0; for (int i = 0, a; i < 5; i++) { std::cin >> a, ans += (a + 9) / 10 * 10, min = std::max(min, (a + 9) / 10 * 10 - a); } std::cout << ans - min << std::endl; return 0; }
[ "misc.opposites", "assignment.value.change", "identifier.change" ]
891,093
891,094
u603303736
cpp
p03076
#include <algorithm> #include <cstdlib> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define INF (1000000007) #define distance(x1, y1, x2, y2) \ sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); #define rep(i, N) for (ll i = 0; i < N; i++) #define rep2(i, j, k) for (ll i = j; i < k; i++) typedef long long int ll; using namespace std; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vi = vector<int>; using vvi = vector<vector<int>>; using vs = vector<string>; using vvs = vector<vector<string>>; template <typename T> void print(T v) { for (size_t i = 0; i < v.size(); i++) { cout << i << ": " << v[i] << endl; } } template <typename T> void print2(T v) { for (size_t i = 0; i < v.size(); i++) { cout << i << ": "; for (size_t j = 0; j < v[0].size(); j++) { cout << v[i][j] << " "; } cout << endl; } } template <typename T> T slice(T v, ll left, ll right) { T ret(0); copy(v.begin() + left, v.begin() + right, back_inserter(ret)); return ret; } bool func(vl s, vl t) { return s[1] < t[1]; } int main() { vl vec(5); rep(i, 5) { cin >> vec[i]; } ll sum = 0; ll max = 0; ll t; rep(i, 5) { t = vec[i] % 10; if (t != 0) { sum += vec[i] + 10 - t; } else { sum += vec[i]; } if (max < 10 - t) { max = 10 - t; } } cout << sum - max << endl; return 0; }
#include <algorithm> #include <cstdlib> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define INF (1000000007) #define distance(x1, y1, x2, y2) \ sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); #define rep(i, N) for (ll i = 0; i < N; i++) #define rep2(i, j, k) for (ll i = j; i < k; i++) typedef long long int ll; using namespace std; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vi = vector<int>; using vvi = vector<vector<int>>; using vs = vector<string>; using vvs = vector<vector<string>>; template <typename T> void print(T v) { for (size_t i = 0; i < v.size(); i++) { cout << i << ": " << v[i] << endl; } } template <typename T> void print2(T v) { for (size_t i = 0; i < v.size(); i++) { cout << i << ": "; for (size_t j = 0; j < v[0].size(); j++) { cout << v[i][j] << " "; } cout << endl; } } template <typename T> T slice(T v, ll left, ll right) { T ret(0); copy(v.begin() + left, v.begin() + right, back_inserter(ret)); return ret; } bool func(vl s, vl t) { return s[1] < t[1]; } int main() { vl vec(5); rep(i, 5) { cin >> vec[i]; } ll sum = 0; ll max = 0; ll t; rep(i, 5) { t = vec[i] % 10; if (t != 0) { sum += vec[i] + 10 - t; } else { sum += vec[i]; } if (t != 0 && max < 10 - t) { max = 10 - t; } } cout << sum - max << endl; return 0; }
[ "control_flow.branch.if.condition.change" ]
891,114
891,115
u396824275
cpp
p03076
#include <bits/stdc++.h> using namespace std; int main() { int a[5]; int b = 10; int c = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; if (a[i] % 10 < b && a[i] % 10 != 0) { c = i; b = a[i]; } } int ans = 0; for (int i = 0; i < 5; i++) { if (i == c) { ans += a[i]; } else { int x = a[i] % 10; if (x != 0) { x = a[i] + 10 - x; ans += x; } else { x = a[i]; ans += x; } } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a[5]; int b = 10; int c = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; if (a[i] % 10 < b && a[i] % 10 != 0) { c = i; b = a[i] % 10; } } int ans = 0; for (int i = 0; i < 5; i++) { if (i == c) { ans += a[i]; } else { int x = a[i] % 10; if (x != 0) { x = a[i] + 10 - x; ans += x; } else { x = a[i]; ans += x; } } } cout << ans << endl; }
[ "assignment.change" ]
891,126
891,127
u578806044
cpp
p03076
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> P; int main() { cin.tie(0); ios::sync_with_stdio(false); int menu[5]; int mod[5]; int ans = 0; int last = 10; int id = 0; for (int i = 0; i < 5; i++) { cin >> menu[i]; mod[i] = menu[i] % 10; if ((last > mod[i]) && (mod[i] != 0)) { last = menu[i]; id = i; } } for (int i = 0; i < 5; i++) { if (mod[i] == 0 || id == i) { ans += menu[i]; } else { ans += menu[i] + (10 - mod[i]); } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> P; int main() { cin.tie(0); ios::sync_with_stdio(false); int menu[5]; int mod[5]; int ans = 0; int last = 10; int id = 0; for (int i = 0; i < 5; i++) { cin >> menu[i]; mod[i] = menu[i] % 10; if ((last > mod[i]) && (mod[i] != 0)) { last = mod[i]; id = i; } } for (int i = 0; i < 5; i++) { if (mod[i] == 0 || id == i) { ans += menu[i]; } else { ans += menu[i] + (10 - mod[i]); } } cout << ans << endl; return 0; }
[ "assignment.value.change", "identifier.change" ]
891,148
891,149
u019780057
cpp
p03076
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> P; int main() { cin.tie(0); ios::sync_with_stdio(false); int menu[5]; int mod[5]; int ans = 0; int last = 10; int id = 0; for (int i = 0; i < 5; i++) { cin >> menu[i]; mod[i] = menu[i] % 10; if ((last > mod[i]) && mod != 0) { last = menu[i]; id = i; } } for (int i = 0; i < 5; i++) { if (mod[i] == 0 || id == i) { ans += menu[i]; } else { ans += menu[i] + (10 - mod[i]); } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> P; int main() { cin.tie(0); ios::sync_with_stdio(false); int menu[5]; int mod[5]; int ans = 0; int last = 10; int id = 0; for (int i = 0; i < 5; i++) { cin >> menu[i]; mod[i] = menu[i] % 10; if ((last > mod[i]) && (mod[i] != 0)) { last = mod[i]; id = i; } } for (int i = 0; i < 5; i++) { if (mod[i] == 0 || id == i) { ans += menu[i]; } else { ans += menu[i] + (10 - mod[i]); } } cout << ans << endl; return 0; }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "assignment.value.change", "identifier.change" ]
891,150
891,149
u019780057
cpp
p03076
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; long long mod = 1000000000 + 7; int main() { vector<int> time; for (int i = 0; i < 5; i++) { int k = 0; cin >> k; time.push_back(k); } sort(time.begin(), time.end()); int ans = 0; int sh = 11; for (int i = 0; i < 5; i++) { if (time[i] % 10 == 0) { ans = i + time[i]; } else { sh = min(sh, time[i] % 10); ans = ans + time[i] - time[i] % 10 + 10; } } if (sh < 11) { ans = ans + sh - 10; } cout << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; long long mod = 1000000000 + 7; int main() { vector<int> time; for (int i = 0; i < 5; i++) { int k = 0; cin >> k; time.push_back(k); } sort(time.begin(), time.end()); int ans = 0; int sh = 11; for (int i = 0; i < 5; i++) { if (time[i] % 10 == 0) { ans = ans + time[i]; } else { sh = min(sh, time[i] % 10); ans = ans + time[i] - time[i] % 10 + 10; } } if (sh < 11) { ans = ans + sh - 10; } cout << ans << endl; return 0; }
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
891,186
891,187
u289871545
cpp
p03076
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int a[5], ans = 0, k = 1000, c = 0; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; rep(i, 5) if (a[i] % 10 != 0 && a[i] % 10 < k) k = a[i], c = i; rep(i, 5) { if (a[i] % 10 == 0 || i == c) ans += a[i]; else ans += (a[i] / 10 + 1) * 10; } cout << ans; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { int a[5], ans = 0, k = 1000, c = 0; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; rep(i, 5) if (a[i] % 10 != 0 && a[i] % 10 < k) k = a[i] % 10, c = i; rep(i, 5) { if (a[i] % 10 == 0 || i == c) ans += a[i]; else ans += (a[i] / 10 + 1) * 10; } cout << ans; }
[ "assignment.change" ]
891,192
891,193
u441296840
cpp
p03076
#include <iostream> #include <string> using namespace std; int main() { int a[5]; int loss[5]; int maxloss = 0; int sum = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; loss[i] = 10 - (a[i] % 10); if (maxloss < loss[i]) { maxloss = loss[i]; } sum += (a[i] + loss[i]); } sum -= maxloss; cout << sum; return 0; }
#include <iostream> #include <string> using namespace std; int main() { int a[5]; int loss[5]; int maxloss = 0; int sum = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; loss[i] = (10 - (a[i] % 10)) % 10; if (maxloss < loss[i]) { maxloss = loss[i]; } sum += (a[i] + loss[i]); } sum -= maxloss; cout << sum; return 0; }
[ "assignment.change" ]
891,236
891,237
u982234424
cpp
p03076
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stdio.h> #include <string.h> #include <string> #include <utility> #include <vector> typedef long long ll; using namespace std; // cout << << endl; int main() { int a, b, c, e, f, g; int d[5]; string s, t; cin >> d[0] >> d[1] >> d[2] >> d[3] >> d[4]; int ans; int max = 0; int index; for (int i = 0; i < 5; i++) { /* ans += d[i] + (10-d[i]%10); if(d[i]%10==0){ ans -= 10; }*/ if (10 - d[i] % 10 >= max && d[i] % 10 != 0) { max = 10 - d[i] % 10; index = i; } } for (int i = 0; i < 5; i++) { if (i != index) { ans += d[i] + (10 - d[i] % 10); if (d[i] % 10 == 0) { ans -= 10; } } } cout << ans + d[index] << endl; return 0; }
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stdio.h> #include <string.h> #include <string> #include <utility> #include <vector> typedef long long ll; using namespace std; // cout << << endl; int main() { int a, b, c, e, f, g; int d[5]; string s, t; cin >> d[0] >> d[1] >> d[2] >> d[3] >> d[4]; int ans = 0; int max = 0; int index; for (int i = 0; i < 5; i++) { if (10 - d[i] % 10 >= max && d[i] % 10 != 0) { max = 10 - d[i] % 10; index = i; } } for (int i = 0; i < 5; i++) { if (i != index) { ans += d[i] + (10 - d[i] % 10); if (d[i] % 10 == 0) { ans -= 10; } } } cout << ans + d[index] << endl; return 0; }
[ "variable_declaration.value.change" ]
891,257
891,258
u775451660
cpp
p03076
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; int main() { int a[5], k, i, a1[5]; for (int i = 0; i < 5; i++) { scanf("%d", &a[i]); a1[i] = a[i] % 10; } int zj = 1; for (int i = 0; i < 5; i++) { if (a1[i] != 0) { zj = 0; } } if (zj == 1) k = 0; else for (i = 0, k = 9; i < 5; i++) { if (a1[i] < k && a1[i] != 0) k = a1[i]; } for (int i = 0; i < 5; i++) { if (a[i] % 10 == 0) k += a[i]; else k += ((a[i] / 10) + 1) * 10; } printf("%d", k); }
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; int main() { int a[5], k, i, a1[5]; for (int i = 0; i < 5; i++) { scanf("%d", &a[i]); a1[i] = a[i] % 10; } int zj = 1; for (int i = 0; i < 5; i++) { if (a1[i] != 0) { zj = 0; } } if (zj == 1) k = 10; else for (i = 0, k = 9; i < 5; i++) { if (a1[i] < k && a1[i] != 0) k = a1[i]; } for (int i = 0; i < 5; i++) { if (a[i] % 10 == 0) k += a[i]; else k += ((a[i] / 10) + 1) * 10; } printf("%d", k - 10); }
[ "literal.number.change", "assignment.value.change" ]
891,288
891,289
u977890326
cpp
p03076
#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() { VI v; VI _v; for (int i = 0; i < 5; i++) { int x; cin >> x; v.push_back(x); _v.push_back(x % 10); } int ans = 0; for (int i = 0; i < 5; i++) { ans += (v[i] % 10 ? ((v[i] / 10) + 1) * 10 : v[i]); } sort(_v.begin(), _v.end()); for (int i = 0; i < 5; i++) { if (_v[i]) ans -= (10 - _v[i]); break; } cout << ans << 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() { VI v; VI _v; for (int i = 0; i < 5; i++) { int x; cin >> x; v.push_back(x); _v.push_back(x % 10); } int ans = 0; for (int i = 0; i < 5; i++) { ans += (v[i] % 10 ? ((v[i] / 10) + 1) * 10 : v[i]); } sort(_v.begin(), _v.end()); for (int i = 0; i < 5; i++) { if (_v[i]) { ans -= (10 - _v[i]); break; } } cout << ans << endl; return 0; }
[]
891,311
891,312
u657512990
cpp
p03076
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; int a, b, c, d, e, x, y, z, h, w; int sum = 0; void input() { cin >> a >> b >> c >> d >> e; sum += a + b + c + d + e; } void solve() { sum += a % 10 == 0 ? 0 : 10 - a % 10; sum += b % 10 == 0 ? 0 : 10 - b % 10; sum += c % 10 == 0 ? 0 : 10 - c % 10; sum += d % 10 == 0 ? 0 : 10 - d % 10; sum += e % 10 == 0 ? 0 : 10 - e % 10; int m = 10; if (a % 10 != 0) { m = min(m, a % 10); } if (b % 10 != 0) { m = min(m, b % 10); } if (c % 10 != 0) { m = min(m, c % 10); } if (d % 10 != 0) { m = min(m, d % 10); } if (e % 10 != 0) { m = min(m, e % 10); } if (m == 10) { cout << sum << endl; } else { cout << sum - m << endl; } } int main() { input(); solve(); }
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; int a, b, c, d, e, x, y, z, h, w; int sum = 0; void input() { cin >> a >> b >> c >> d >> e; sum += a + b + c + d + e; } void solve() { sum += a % 10 == 0 ? 0 : 10 - a % 10; sum += b % 10 == 0 ? 0 : 10 - b % 10; sum += c % 10 == 0 ? 0 : 10 - c % 10; sum += d % 10 == 0 ? 0 : 10 - d % 10; sum += e % 10 == 0 ? 0 : 10 - e % 10; int m = 10; if (a % 10 != 0) { m = min(m, a % 10); } if (b % 10 != 0) { m = min(m, b % 10); } if (c % 10 != 0) { m = min(m, c % 10); } if (d % 10 != 0) { m = min(m, d % 10); } if (e % 10 != 0) { m = min(m, e % 10); } if (m == 10) { cout << sum << endl; } else { cout << sum - (10 - m) << endl; } } int main() { input(); solve(); }
[]
891,317
891,318
u789199225
cpp
p03076
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int input[5]; for (int i = 0; i < 5; i++) { cin >> input[i]; } vector<int> n; for (int i = 0; i < 5; i++) { n.push_back(input[i] % 10); } int lastDigit = -1; int index; for (int i = 1; i < 11; i++) { auto itr = std::find(n.begin(), n.end(), i); if (itr != n.end()) { lastDigit = *itr; index = itr - n.begin(); } } int ans = 0; for (int i = 0; i < 5; i++) { if (i == index) { // cout << i <<endl << input[i] << endl; ans += input[i]; } else { if (n[i] == 0) ans += input[i]; else ans += input[i] + 10 - n[i]; } } cout << ans; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int input[5]; for (int i = 0; i < 5; i++) { cin >> input[i]; } vector<int> n; for (int i = 0; i < 5; i++) { n.push_back(input[i] % 10); } int lastDigit = -1; int index; for (int i = 1; i < 10; i++) { auto itr = std::find(n.begin(), n.end(), i); if (itr != n.end()) { lastDigit = *itr; index = itr - n.begin(); break; } } int ans = 0; for (int i = 0; i < 5; i++) { if (i == index) { // cout << i << endl << input[i] << endl; ans += input[i]; } else { if (n[i] == 0) ans += input[i]; else ans += input[i] + 10 - n[i]; } } cout << ans; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
891,333
891,334
u650163631
cpp
p03076
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int input[5]; for (int i = 0; i < 5; i++) { cin >> input[i]; } vector<int> n; for (int i = 0; i < 5; i++) { n.push_back(input[i] % 10); } int lastDigit = -1; int index; for (int i = 1; i < 11; i++) { auto itr = std::find(n.begin(), n.end(), 5); if (itr != n.end()) { lastDigit = *itr; index = itr - n.begin(); } } int ans = 0; for (int i = 0; i < 5; i++) { if (i == index) { ans += input[i]; } else { if (n[i] == 0) ans += input[i]; else ans += input[i] + 10 - n[i]; } } cout << ans; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int input[5]; for (int i = 0; i < 5; i++) { cin >> input[i]; } vector<int> n; for (int i = 0; i < 5; i++) { n.push_back(input[i] % 10); } int lastDigit = -1; int index; for (int i = 1; i < 10; i++) { auto itr = std::find(n.begin(), n.end(), i); if (itr != n.end()) { lastDigit = *itr; index = itr - n.begin(); break; } } int ans = 0; for (int i = 0; i < 5; i++) { if (i == index) { // cout << i << endl << input[i] << endl; ans += input[i]; } else { if (n[i] == 0) ans += input[i]; else ans += input[i] + 10 - n[i]; } } cout << ans; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change" ]
891,335
891,334
u650163631
cpp
p03076
/* https://atcoder.jp/contests/abc123/tasks/abc123_b */ #include <cmath> #include <iostream> #include <vector> std::vector<int> X(5); void solve() { int min_cost = 123 * 5; for (int i = 0; i < 5; ++i) { int cost_i = std::ceil(X.at(i) * 0.1) * 10; for (int j = 0; j < 5; ++j) { if (i == j) { continue; } int cost_j = std::ceil((cost_i + X.at(j)) * 0.1) * 10; for (int k = 0; k < 5; ++k) { if (j == k || i == k) { continue; } int cost_k = std::ceil((cost_j + X.at(k)) * 0.1) * 10; for (int l = 0; l < 5; ++l) { if (k == l || j == l || i == l) { continue; } int cost_l = std::ceil((cost_k + X.at(l)) * 0.1) * 10; for (int m = 0; m < 5; ++m) { if (l == m || k == m || j == m || i == m) { continue; } int cost_m = cost_l + X.at(m); min_cost = std::min(cost_m, min_cost); } } } } } std::cout << min_cost << std::endl; return; } int main(int argc, char *argv[]) { // Input for (int &e : X) { std::cin >> e; } // Output solve(); return 0; }
/* https://atcoder.jp/contests/abc123/tasks/abc123_b */ #include <cmath> #include <iostream> #include <vector> std::vector<int> X(5); void solve() { int min_cost = 1e9; for (int i = 0; i < 5; ++i) { int cost_i = std::ceil(X.at(i) * 0.1) * 10; for (int j = 0; j < 5; ++j) { if (i == j) { continue; } int cost_j = std::ceil((cost_i + X.at(j)) * 0.1) * 10; for (int k = 0; k < 5; ++k) { if (j == k || i == k) { continue; } int cost_k = std::ceil((cost_j + X.at(k)) * 0.1) * 10; for (int l = 0; l < 5; ++l) { if (k == l || j == l || i == l) { continue; } int cost_l = std::ceil((cost_k + X.at(l)) * 0.1) * 10; for (int m = 0; m < 5; ++m) { if (l == m || k == m || j == m || i == m) { continue; } int cost_m = cost_l + X.at(m); min_cost = std::min(cost_m, min_cost); } } } } } std::cout << min_cost << std::endl; return; } int main(int argc, char *argv[]) { // Input for (int &e : X) { std::cin >> e; } // Output solve(); return 0; }
[ "literal.number.change", "variable_declaration.value.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
891,340
891,341
u969227675
cpp
p03076
#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() { vector<int> dish(5); vector<int> flag(5, 0); int amari = 9; for (int i = 0; i < 5; ++i) { cin >> dish[i]; if (dish[i] % 10 == 0) { flag[i] = 1; } else { amari = min(amari, dish[i] % 10); dish[i] += (10 - dish[i] % 10); } } // cout << dish << endl; // cout << amari << endl; int sum = 0; for (int i = 0; i < 5; ++i) { sum += dish[i]; } int ansflag = 0; for (int i = 0; i < 5; ++i) { ansflag += flag[1]; } if (ansflag != 5) { cout << sum << endl; } else { cout << sum - 10 + amari << endl; } }
#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() { vector<int> dish(5); vector<int> flag(5, 0); int amari = 9; for (int i = 0; i < 5; ++i) { cin >> dish[i]; if (dish[i] % 10 == 0) { flag[i] = 1; } else { amari = min(amari, dish[i] % 10); dish[i] += (10 - dish[i] % 10); } } // cout << dish << endl; // cout << amari << endl; int sum = 0; for (int i = 0; i < 5; ++i) { sum += dish[i]; } int ansflag = 0; for (int i = 0; i < 5; ++i) { ansflag += flag[i]; } if (ansflag == 5) { cout << sum << endl; } else { cout << sum - 10 + amari << endl; } }
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change", "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
891,349
891,350
u162172626
cpp
p03076
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> using namespace std; int main() { int a[5], b[5]; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; sort(a, a + 5); for (int i = 0; i < 5; i++) { b[i] = ((a[i] + (9)) / 10) * 10; } int res[5]; res[0] = b[0] + b[1] + b[2] + b[3] + a[4]; res[1] = b[0] + b[1] + b[2] + a[3] + b[4]; res[2] = b[0] + b[1] + a[2] + b[3] + b[4]; res[3] = b[0] + a[1] + b[2] + b[3] + b[4]; res[4] = a[0] + b[1] + b[2] + b[3] + a[4]; sort(res, res + 5); cout << res[0] << endl; return 0; }
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> using namespace std; int main() { int a[5], b[5]; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; sort(a, a + 5); for (int i = 0; i < 5; i++) { b[i] = ((a[i] + (9)) / 10) * 10; } int res[5]; res[0] = b[0] + b[1] + b[2] + b[3] + a[4]; res[1] = b[0] + b[1] + b[2] + a[3] + b[4]; res[2] = b[0] + b[1] + a[2] + b[3] + b[4]; res[3] = b[0] + a[1] + b[2] + b[3] + b[4]; res[4] = a[0] + b[1] + b[2] + b[3] + b[4]; sort(res, res + 5); cout << res[0] << endl; return 0; }
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
891,364
891,365
u360180938
cpp
p03076
#include <bits/stdc++.h> using namespace std; int main() { //入力 vector<int> abc(5); for (int i = 0; i < 5; i++) { cin >> abc[i]; } //処理 int ans = 0; for (int i = 0; i < 5; i++) { ans += abc[i]; abc[i] = abc[i] % 10; } sort(abc.begin(), abc.end()); // reverse(abc.begin(),abc.end()); int o = 0; for (int i = 1; i < 5; i++) { if (abc[i] == 0) { continue; } else if (o == 1) { ans += 10 - abc[i]; } else { o++; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { //入力 vector<int> abc(5); for (int i = 0; i < 5; i++) { cin >> abc[i]; } //処理 int ans = 0; for (int i = 0; i < 5; i++) { ans += abc[i]; abc[i] = abc[i] % 10; } sort(abc.begin(), abc.end()); // reverse(abc.begin(),abc.end()); int o = 0; for (int i = 0; i < 5; i++) { if (abc[i] == 0) { continue; } else if (o == 1) { ans += 10 - abc[i]; } else { o++; } } cout << ans << endl; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
891,366
891,367
u775507068
cpp
p03076
#include <iostream> using namespace std; int main() { int n[7]; n[6] = 0; for (int i = 0; i < 6; i++) { cin >> n[i]; } for (int j = 1; j < 5; j++) { if (n[0] % 10 == 0) { n[5] = n[0]; n[0] = n[j]; n[j] = n[5]; } else if (n[0] % 10 > n[j] % 10 && n[j] % 10 != 0) { n[5] = n[0]; n[0] = n[j]; n[j] = n[5]; } else { } } for (int l = 1; l < 5; l++) { if (n[l] % 10 == 0) { n[6] += n[l]; } else { n[6] += (n[7] / 10 + 1) * 10; } } cout << n[6] + n[0] << endl; }
#include <iostream> using namespace std; int main() { int n[7]; n[6] = 0; for (int i = 0; i < 5; i++) { cin >> n[i]; } for (int j = 1; j < 5; j++) { if (n[0] % 10 == 0) { n[5] = n[0]; n[0] = n[j]; n[j] = n[5]; } else if (n[0] % 10 > n[j] % 10 && n[j] % 10 != 0) { n[5] = n[0]; n[0] = n[j]; n[j] = n[5]; } else { } } for (int l = 1; l < 5; l++) { if (n[l] % 10 == 0) { n[6] += n[l]; } else { n[6] += (n[l] / 10 + 1) * 10; } } cout << n[6] + n[0] << endl; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change" ]
891,371
891,372
u461896927
cpp
p03076
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; int timeNeeded(int time) { if (time % 10 == 0) { return time; } else { return time - (time % 10) + 10; } } int main() { int a, min = 10, min_idx = -1, res; vector<int> time, mod; for (int i = 0; i < 5; i++) { cin >> a; time.push_back(a); if ((a % 10) != 0 && ((a % 10) < min)) { min = (a % 7); min_idx = i; // cout << "min idx " << min_idx << endl; } } if (min_idx == -1) { res = 0; for (int i = 0; i < 5; i++) { res += time[i]; } } else { // cout << "min idx " << min_idx << endl; res = time[min_idx]; // cout << "cur is " << res << endl; for (int i = 0; i < 5; i++) { if (i != min_idx) { res += timeNeeded(time[i]); // cout << "cur is " << res << endl; } } } cout << res << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; int timeNeeded(int time) { if (time % 10 == 0) { return time; } else { return time - (time % 10) + 10; } } int main() { int a, min = 10, min_idx = -1, res; vector<int> time; for (int i = 0; i < 5; i++) { cin >> a; time.push_back(a); if ((a % 10) != 0 && ((a % 10) < min)) { min = (a % 10); min_idx = i; // cout << "min idx " << min_idx << endl; } } if (min_idx == -1) { res = 0; for (int i = 0; i < 5; i++) { res += time[i]; } } else { // cout << "min idx " << min_idx << endl; res = time[min_idx]; // cout << "cur is " << res << endl; for (int i = 0; i < 5; i++) { if (i != min_idx) { res += timeNeeded(time[i]); // cout << "cur is " << res << endl; } } } cout << res << endl; return 0; }
[ "variable_declaration.remove", "literal.number.change", "assignment.value.change", "expression.operation.binary.change" ]
891,397
891,398
u981890679
cpp
p03076
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; int a, b, c, d, e; a = A % 10; b = B % 10; c = C % 10; d = D % 10; e = E % 10; int k; k = 10; if (k > a && a != 0) { k = b; } if (k > b && b != 0) { k = b; } if (k > c && c != 0) { k = c; } if (k > d && d != 0) { k = d; } if (k > e && e != 0) { k = e; } if (a == 0) { a = 10; } if (b == 0) { b = 10; } if (c == 0) { c = 10; } if (d == 0) { d = 10; } if (e == 0) { e = 10; } cout << (A + B + C + D + E - a - b - c - d - e + 40 + k); }
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; int a, b, c, d, e; a = A % 10; b = B % 10; c = C % 10; d = D % 10; e = E % 10; int k; k = 10; if (k > a && a != 0) { k = a; } if (k > b && b != 0) { k = b; } if (k > c && c != 0) { k = c; } if (k > d && d != 0) { k = d; } if (k > e && e != 0) { k = e; } if (a == 0) { a = 10; } if (b == 0) { b = 10; } if (c == 0) { c = 10; } if (d == 0) { d = 10; } if (e == 0) { e = 10; } cout << (A + B + C + D + E - a - b - c - d - e + 40 + k); }
[ "assignment.value.change", "identifier.change" ]
891,403
891,404
u478094431
cpp
p03076
#include <stdio.h> int main() { int a, b, c, d, e, n = 9, i = 1, t; scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); if (n > a % 10 && a % 10 != 0) { n = a % 10; } if (n > b % 10 && b % 10 != 0) { n = b % 10; } if (n > c % 10 && c % 10 != 0) { n = c % 10; } if (n > d % 10 && d % 10 != 0) { n = d % 10; } if (n > e % 10 && e % 10 != 0) { n = e % 10; } if (a % 10 == 0 && b % 10 == 0 && c % 10 == 0 && d % 10 == 0 && e % 10 == 0 && n == 9) { n = 0; i = 0; } int A = 1, B = 1, C = 1, D = 1, E = 1; if (a % 10 == 0) { A = 0; } if (b % 10 == 0) { B = 0; } if (c % 10 == 0) { C = 0; } if (d % 10 == 0) { D = 0; } if (e % 10 == 0) { E = 0; } t = (a / 10 + b / 10 + c / 10 + d / 10 + e / 10 + A + B + C + D + E) * 10 + n; printf("\n%d", t); return 0; }
#include <stdio.h> int main() { int a, b, c, d, e, n = 9, i = 1, t; scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); if (n > a % 10 && a % 10 != 0) { n = a % 10; } if (n > b % 10 && b % 10 != 0) { n = b % 10; } if (n > c % 10 && c % 10 != 0) { n = c % 10; } if (n > d % 10 && d % 10 != 0) { n = d % 10; } if (n > e % 10 && e % 10 != 0) { n = e % 10; } if (a % 10 == 0 && b % 10 == 0 && c % 10 == 0 && d % 10 == 0 && e % 10 == 0 && n == 9) { n = 0; i = 0; } int A = 1, B = 1, C = 1, D = 1, E = 1; if (a % 10 == 0) { A = 0; } if (b % 10 == 0) { B = 0; } if (c % 10 == 0) { C = 0; } if (d % 10 == 0) { D = 0; } if (e % 10 == 0) { E = 0; } t = (a / 10 + b / 10 + c / 10 + d / 10 + e / 10 + A + B + C + D + E - i) * 10 + n; printf("\n%d", t); return 0; }
[ "assignment.change" ]
891,422
891,423
u433204705
cpp
p03076
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <vector> using namespace std; vector<int> v; int Max = 0; void load(int a) { if (a % 10 != 0) v.push_back(10 - (a % 10)); Max = max(Max, 10 - (a % 10)); } int main() { int a, b, c, d, e; scanf("%d", &a); load(a); scanf("%d", &b); load(b); scanf("%d", &c); load(c); scanf("%d", &d); load(d); scanf("%d", &e); load(e); int res = 0; for (auto i : v) res += i; cout << a + b + c + d + e + res - Max; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <vector> using namespace std; vector<int> v; int Max = 0; void load(int a) { if (a % 10 != 0) { v.push_back(10 - (a % 10)); Max = max(Max, 10 - (a % 10)); } } int main() { int a, b, c, d, e; scanf("%d", &a); load(a); scanf("%d", &b); load(b); scanf("%d", &c); load(c); scanf("%d", &d); load(d); scanf("%d", &e); load(e); int res = 0; for (auto i : v) res += i; cout << a + b + c + d + e + res - Max; return 0; }
[]
891,424
891,425
u325138098
cpp
p03076
#include <bits/stdc++.h> using namespace std; int main() { int a[5]; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; int min = 10, count = 0, m; for (int i = 0; i < 5; i++) { if (min > a[i] % 10 && a[i] % 10 != 0) { min = a[i]; m = i; } } for (int i = 0; i < 5; i++) { if (a[i] < 10 && m != i && a[i] % 10 != 0) a[i] = 10; } for (int i = 0; i < 5; i++) { if (a[i] > 10 && i != m && a[i] % 10 != 0) a[i] = (a[i] / 10 + 1) * 10; } for (int i = 0; i < 5; i++) count += a[i]; cout << count; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a[5]; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; int min = 10, count = 0, m; for (int i = 0; i < 5; i++) { if (min > a[i] % 10 && a[i] % 10 != 0) { min = a[i] % 10; m = i; } } for (int i = 0; i < 5; i++) { if (a[i] < 10 && m != i && a[i] % 10 != 0) a[i] = 10; } for (int i = 0; i < 5; i++) { if (a[i] > 10 && i != m && a[i] % 10 != 0) a[i] = (a[i] / 10 + 1) * 10; } for (int i = 0; i < 5; i++) count += a[i]; cout << count; return 0; }
[ "assignment.change" ]
891,439
891,440
u072320198
cpp
p03076
#include <bits/stdc++.h> using namespace std; #define INF 99999 int main() { int input[5]; cin >> input[0]; cin >> input[1]; cin >> input[2]; cin >> input[3]; cin >> input[4]; int time = 0; const int N = 5; vector<int> v(N); iota(v.begin(), v.end(), 0); int min = INF; do { time = 0; int count = 0; for (auto x : v) { time += input[x]; int addnum = 5 - time % 5; if (addnum == 5) addnum = 0; if (count != 4) time += addnum; count++; } min = std::min(min, time); } while (next_permutation(v.begin(), v.end())); // 次の順列を生成 cout << min << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define INF 99999 int main() { int input[5]; cin >> input[0]; cin >> input[1]; cin >> input[2]; cin >> input[3]; cin >> input[4]; int time = 0; const int N = 5; vector<int> v(N); iota(v.begin(), v.end(), 0); int min = INF; do { time = 0; int count = 0; for (auto x : v) { time += input[x]; int addnum = 10 - time % 10; if (addnum == 10) addnum = 0; if (count != 4) time += addnum; count++; } min = std::min(min, time); } while (next_permutation(v.begin(), v.end())); // 次の順列を生成 cout << min << endl; return 0; }
[ "literal.number.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
891,459
891,460
u761335395
cpp
p03076
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> i_i; typedef pair<ll, ll> l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) // const ll mod = 1000000007; int main() { int a[5], b[5]; int last = INF; int mem1, mem2, sum = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; b[i] = a[i] % 10; if (b[i] != 0) { if (last >= b[i]) { last = b[i]; mem1 = a[i]; mem2 = i; } a[i] = (a[i] / 10) + 1; a[i] = a[i] * 10; } sum += a[i]; } if (last = INF) { cout << sum << endl; return 0; } sum -= a[mem2]; sum += mem1; cout << sum << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> i_i; typedef pair<ll, ll> l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) // const ll mod = 1000000007; int main() { int a[5], b[5]; int last = INF; int mem1, mem2, sum = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; b[i] = a[i] % 10; if (b[i] != 0) { if (last >= b[i]) { last = b[i]; mem1 = a[i]; mem2 = i; } a[i] = (a[i] / 10) + 1; a[i] = a[i] * 10; } sum += a[i]; } if (last == INF) { cout << sum << endl; return 0; } sum -= a[mem2]; sum += mem1; cout << sum << endl; }
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
891,500
891,501
u324219643
cpp
p03076
#include <bits/stdc++.h> using namespace std; using ll = long; int main() { ll ans = 0, last = 0; for (ll i = 0; i < 5; i++) { ll a; cin >> a; ans += (a + 9) / 10; last = max(last, (1000 - a) % 10); } cout << ans - last; }
#include <bits/stdc++.h> using namespace std; using ll = long; int main() { ll ans = 0, last = 0; for (ll i = 0; i < 5; i++) { ll a; cin >> a; ans += (a + 9) / 10 * 10; last = max(last, (1000 - a) % 10); } cout << ans - last; }
[ "assignment.change" ]
891,509
891,510
u874644572
cpp
p03076
#include <bits/stdc++.h> #include <unistd.h> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i = 0; i < v.size(); i++) \ cerr << " " << v[i]; \ cerr << endl #define DEBUG_MAT(v) \ cerr << #v << endl; \ for (int i = 0; i < v.size(); i++) { \ for (int j = 0; j < v[i].size(); j++) { \ cerr << v[i][j] << " "; \ } \ cerr << endl; \ } typedef long long ll; #define vi vector<int> #define vl vector<ll> #define vii vector<vector<int>> #define vll vector<vector<ll>> #define vs vector<string> #define pii pair<int, int> #define pis pair<int, string> #define psi pair<string, int> #define pll pair<ll, ll> template <class S, class T> pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first + t.first, s.second + t.second); } template <class S, class T> pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first - t.first, s.second - t.second); } template <class S, class T> ostream &operator<<(ostream &os, pair<S, T> p) { os << "(" << p.first << ", " << p.second << ")"; return os; } #define X first #define Y second #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rrep1(i, n) for (int i = (n); i > 0; i--) #define REP(i, a, b) for (int i = a; i < b; i++) #define in(x, a, b) (a <= x && x < b) #define all(c) c.begin(), c.end() template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } #define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end()); const ll inf = 1000000001; const ll INF = (ll)1e18 + 1; const ll MOD = 1000000007; // const ll MOD = 998244353; const double pi = 3.14159265358979323846; #define Sp(p) cout << setprecision(15) << fixed << p << endl; int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1}; #define fio() \ cin.tie(0); \ ios::sync_with_stdio(false); //#define mp make_pair int main() { ll sum = 0; vi a(5); rep(i, 5) { cin >> a[i]; if (a[i] % 10 == 0) sum += a[i]; else sum += (a[i] / 10 * 10) + 10; } int ma = 0; rep(i, 5) { chmax(ma, 10 - a[i] % 10); } sum -= ma; cout << sum << endl; }
#include <bits/stdc++.h> #include <unistd.h> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i = 0; i < v.size(); i++) \ cerr << " " << v[i]; \ cerr << endl #define DEBUG_MAT(v) \ cerr << #v << endl; \ for (int i = 0; i < v.size(); i++) { \ for (int j = 0; j < v[i].size(); j++) { \ cerr << v[i][j] << " "; \ } \ cerr << endl; \ } typedef long long ll; #define vi vector<int> #define vl vector<ll> #define vii vector<vector<int>> #define vll vector<vector<ll>> #define vs vector<string> #define pii pair<int, int> #define pis pair<int, string> #define psi pair<string, int> #define pll pair<ll, ll> template <class S, class T> pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first + t.first, s.second + t.second); } template <class S, class T> pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first - t.first, s.second - t.second); } template <class S, class T> ostream &operator<<(ostream &os, pair<S, T> p) { os << "(" << p.first << ", " << p.second << ")"; return os; } #define X first #define Y second #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rrep1(i, n) for (int i = (n); i > 0; i--) #define REP(i, a, b) for (int i = a; i < b; i++) #define in(x, a, b) (a <= x && x < b) #define all(c) c.begin(), c.end() template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } #define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end()); const ll inf = 1000000001; const ll INF = (ll)1e18 + 1; const ll MOD = 1000000007; // const ll MOD = 998244353; const double pi = 3.14159265358979323846; #define Sp(p) cout << setprecision(15) << fixed << p << endl; int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1}; #define fio() \ cin.tie(0); \ ios::sync_with_stdio(false); //#define mp make_pair int main() { ll sum = 0; vi a(5); rep(i, 5) { cin >> a[i]; if (a[i] % 10 == 0) sum += a[i]; else sum += (a[i] / 10 * 10) + 10; } int ma = 0; rep(i, 5) { chmax(ma, (10 - a[i] % 10) % 10); } sum -= ma; cout << sum << endl; }
[ "call.arguments.change", "call.arguments.add" ]
891,515
891,516
u579152247
cpp
p03076
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; ++i) #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define FORR(i, a, b) for (int i = a; i >= b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector<int> VI; typedef vector<ll> VL; typedef vector<VI> VVI; typedef vector<VL> VVL; typedef pair<int, int> P; typedef pair<ll, ll> PL; int in() { int x; scanf("%d", &x); return x; } ll lin() { ll x; scanf("%lld", &x); return x; } int main() { int n = 5; int mi = 10, ans = 0; REP(i, n) { int x = in(); mi = min(mi, x % 10); x = 10 * ((x + 9) / 10); ans += x; } cout << ans - 10 + mi << endl; return 0; }
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; ++i) #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define FORR(i, a, b) for (int i = a; i >= b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector<int> VI; typedef vector<ll> VL; typedef vector<VI> VVI; typedef vector<VL> VVL; typedef pair<int, int> P; typedef pair<ll, ll> PL; int in() { int x; scanf("%d", &x); return x; } ll lin() { ll x; scanf("%lld", &x); return x; } int main() { int n = 5; int mi = 10, ans = 0; REP(i, n) { int x = in(); if (x % 10) mi = min(mi, x % 10); x = 10 * ((x + 9) / 10); ans += x; } cout << ans - 10 + mi << endl; return 0; }
[ "control_flow.branch.if.add" ]
891,517
891,518
u016572066
cpp
p03076
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(v) (v).begin(), (v).end() const int INF = 0x3f3f3f3f; const long long LINF = 0x3f3f3f3f3f3f3f3fLL; const double EPS = 1e-8; const int MOD = 1000000007; // 998244353; const int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1}; /*-------------------------------------------------*/ int main() { cin.tie(0); ios::sync_with_stdio(false); // freopen("input.txt", "r", stdin); vector<int> a(5); REP(i, 5) cin >> a[i]; int ans = 0, kasa = 0; REP(i, 5) { int tmp = a[i]; while (tmp % 5 != 0) ++tmp; ans += tmp; kasa = max(kasa, tmp - a[i]); } cout << ans - kasa << '\n'; return 0; }
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(v) (v).begin(), (v).end() const int INF = 0x3f3f3f3f; const long long LINF = 0x3f3f3f3f3f3f3f3fLL; const double EPS = 1e-8; const int MOD = 1000000007; // 998244353; const int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1}; /*-------------------------------------------------*/ int main() { cin.tie(0); ios::sync_with_stdio(false); // freopen("input.txt", "r", stdin); vector<int> a(5); REP(i, 5) cin >> a[i]; int ans = 0, kasa = 0; REP(i, 5) { int tmp = a[i]; while (tmp % 10 != 0) ++tmp; ans += tmp; kasa = max(kasa, tmp - a[i]); } cout << ans - kasa << '\n'; return 0; }
[ "literal.number.change", "control_flow.loop.condition.change" ]
891,519
891,520
u219786796
cpp
p03076
#include <iostream> using namespace std; int main(int argc, const char *argv[]) { int times[5] = {0, 0, 0, 0, 0}; for (int i = 0; i < 5; i++) { cin >> times[i]; } int mintime = 124; int pastTime = 0; for (int i = 0; i < 5; i++) { if (mintime > times[i] % 10 && times[i] % 10 != 0) { mintime = times[i] % 10; } pastTime += (times[i] / 10) * 10; if (times[i] % 10 != 0) { pastTime += 10; } } int result = 0; if (mintime == 124) { result = pastTime; } else { pastTime + mintime - 10; } cout << result << endl; return 0; }
#include <iostream> using namespace std; int main(int argc, const char *argv[]) { int times[5] = {0, 0, 0, 0, 0}; for (int i = 0; i < 5; i++) { cin >> times[i]; } int mintime = 124; int pastTime = 0; for (int i = 0; i < 5; i++) { if (mintime > times[i] % 10 && times[i] % 10 != 0) { mintime = times[i] % 10; } pastTime += (times[i] / 10) * 10; if (times[i] % 10 != 0) { pastTime += 10; } } int result = 0; if (mintime == 124) { result = pastTime; } else { result = pastTime + mintime - 10; } cout << result << endl; return 0; }
[ "assignment.change" ]
891,525
891,526
u655548174
cpp
p03076
#include <bits/stdc++.h> using namespace std; int main() { int order[5]; int loss[5]; int time = 0; for (int i = 0; i < 5; i++) { cin >> order[i]; } for (int i = 0; i < 5; i++) { int hoge; hoge = order[i]; for (int j = 0; j <= 9; j++) { if (hoge % 10 != 0) { hoge += j; } else { loss[i] = j; break; } } } size_t index[5]; iota(index, index + 5, 0); stable_sort(index, index + 5, [&loss](size_t i1, size_t i2) { return loss[i1] < loss[i2]; }); for (int i = 0; i < 5; i++) { while (time % 10 != 0) time++; time += order[index[i]]; } cout << time << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int order[5]; int loss[5]; int time = 0; for (int i = 0; i < 5; i++) { cin >> order[i]; } for (int i = 0; i < 5; i++) { int hoge; hoge = order[i]; for (int j = 0; j <= 9; j++) { if (hoge % 10 != 0) { hoge++; } else { loss[i] = j; break; } } } size_t index[5]; iota(index, index + 5, 0); stable_sort(index, index + 5, [&loss](size_t i1, size_t i2) { return loss[i1] < loss[i2]; }); for (int i = 0; i < 5; i++) { while (time % 10 != 0) time++; time += order[index[i]]; } cout << time << endl; return 0; }
[]
891,552
891,553
u839938263
cpp
p03076
#include <iostream> using namespace std; int main(void) { int a[5]; int b, b_b = 10; int last; int val; int time = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; } for (int i = 0; i < 5; i++) { b = a[i] % 10; if ((b_b > b) && (b != 0)) { b_b = b; last = b; } } for (int i = 0; i < 5; i++) { val = a[i] % 10; if (val == 0) { val = 0; } else { val = 10 - val; } val = a[i] + val; time = time + val; } time = time - last; cout << time << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int a[5]; int b, b_b = 10; int last; int val; int time = 0; for (int i = 0; i < 5; i++) { cin >> a[i]; } for (int i = 0; i < 5; i++) { b = a[i] % 10; if ((b_b > b) && (b != 0)) { b_b = b; last = 10 - b; } } for (int i = 0; i < 5; i++) { val = a[i] % 10; if (val == 0) { val = 0; } else { val = 10 - val; } val = a[i] + val; time = time + val; } time = time - last; cout << time << endl; return 0; }
[ "assignment.change" ]
891,554
891,555
u510688220
cpp
p03076
#include <bits/stdc++.h> using namespace std; int a[6], ans = 0, mi = 10; int main() { for (int i = 1; i <= 5; i++) { cin >> a[i]; if (a[i] % 10 == 0) { ans += a[i]; } else { ans += a[i] + 10 - a[i] % 10; mi = min(mi, a[i] % 11); } // cout<<ans; } if (mi == 10) { cout << ans; } else { cout << ans + mi - 10; } return 0; }
#include <bits/stdc++.h> using namespace std; int a[6], ans = 0, mi = 10; int main() { for (int i = 1; i <= 5; i++) { cin >> a[i]; if (a[i] % 10 == 0) { ans += a[i]; } else { ans += a[i] + 10 - a[i] % 10; mi = min(mi, a[i] % 10); } // cout<<ans; } if (mi == 10) { cout << ans; } else { cout << ans + mi - 10; } return 0; }
[ "literal.number.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
891,567
891,568
u547457320
cpp
p03076
#include <bits/stdc++.h> using namespace std; int a[6], ans = 0, mi = 11; int main() { for (int i = 1; i <= 5; i++) { cin >> a[i]; if (a[i] % 10 == 0) { ans += a[i]; } else { ans += a[i] + 10 - a[i] % 10; mi = min(mi, a[i] % 10); } // cout<<ans; } if (mi == 10) { cout << ans; } else { cout << ans - mi; } return 0; }
#include <bits/stdc++.h> using namespace std; int a[6], ans = 0, mi = 10; int main() { for (int i = 1; i <= 5; i++) { cin >> a[i]; if (a[i] % 10 == 0) { ans += a[i]; } else { ans += a[i] + 10 - a[i] % 10; mi = min(mi, a[i] % 10); } // cout<<ans; } if (mi == 10) { cout << ans; } else { cout << ans + mi - 10; } return 0; }
[ "literal.number.change", "variable_declaration.value.change", "misc.opposites", "expression.operator.arithmetic.change", "io.output.change" ]
891,569
891,568
u547457320
cpp
p03076
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main(void) { int all = 0; int a[5] = {0}, b = 0, c = 10; for (int i = 0; i < 5; i++) { cin >> a[i]; if (a[i] % 10 != 0) { all += 10; } b = a[i] / 10; all += b * 10; if (a[i] - b * 10 > c && a[i] % 10 != 0) { c = min(c, a[i] - b * 10); } } cout << all - (10 - c) << endl; return 0; }
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main(void) { int all = 0; int a[5] = {0}, b = 0, c = 10; for (int i = 0; i < 5; i++) { cin >> a[i]; if (a[i] % 10 != 0) { all += 10; } b = a[i] / 10; all += b * 10; if (a[i] - b * 10 < c && a[i] % 10 != 0) { c = min(c, a[i] - b * 10); } } cout << all - (10 - c) << endl; return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
891,623
891,624
u440140106
cpp
p03076
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int n[5]; rep(i, 5) { cin >> n[i]; } int digit[5]; rep(i, 5) { digit[i] = (n[i] % 100) % 10; } int sum, ans = 0; rep(i, 5) { sum += digit[i]; } if (sum == 0) { rep(i, 5) { ans += n[i]; } cout << ans << endl; return 0; } int index = 0; for (int i = 1; i < 10; i++) { rep(j, 5) { if (digit[j] == i) { index = j; break; } } if (index != 0) { break; } } rep(i, 5) { if (i == index) { continue; } if (digit[i] != 0) { n[i] += (10 - digit[i]); } ans += n[i]; } ans += n[index]; cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int n[5]; rep(i, 5) { cin >> n[i]; } int digit[5]; rep(i, 5) { digit[i] = (n[i] % 100) % 10; } int sum, ans = 0; rep(i, 5) { sum += digit[i]; } if (sum == 0) { rep(i, 5) { ans += n[i]; } cout << ans << endl; return 0; } int index = -1; for (int i = 1; i < 10; i++) { rep(j, 5) { if (digit[j] == i) { index = j; break; } } if (index != -1) { break; } } rep(i, 5) { if (i == index) { continue; } if (digit[i] != 0) { n[i] += (10 - digit[i]); } ans += n[i]; } ans += n[index]; cout << ans << endl; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.branch.if.condition.change" ]
891,627
891,628
u532086793
cpp
p03076
#include <iostream> int main(void) { int a, b, c, d, e, sum, min = 11, flag = 0; std::cin >> a >> b >> c >> d >> e; if (a % 10 == 0) { flag++; } if (b % 10 == 0) { flag++; } if (c % 10 == 0) { flag++; } if (d % 10 == 0) { flag++; } if (e % 10 == 0) { flag++; } if (flag == 1 || flag == 5) { flag--; } flag = 40 - flag * 10; // std::cout << flag; if (a % 10 > b % 10 && b % 10 != 0) { min = b % 10; } else if (a % 10 != 0) { min = a % 10; } if (min > c % 10 && c % 10 != 0) { min = c % 10; } if (min > d % 10 && d % 10 != 0) { min = d % 10; } if (min > e % 10 && e % 10 != 0) { min = e % 10; } if (min == 11) { min = 0; } std::cout << a - a % 10 + b - b % 10 + c - c % 10 + d - d % 10 + e - e % 10 + flag + min << std::endl; return 0; }
#include <iostream> int main(void) { int a, b, c, d, e, sum, min = 11, flag = 0; std::cin >> a >> b >> c >> d >> e; if (a % 10 == 0) { flag++; } if (b % 10 == 0) { flag++; } if (c % 10 == 0) { flag++; } if (d % 10 == 0) { flag++; } if (e % 10 == 0) { flag++; } if (flag == 5) { flag--; } flag = 40 - flag * 10; // std::cout << flag; if (a % 10 > b % 10 && b % 10 != 0) { min = b % 10; } else if (a % 10 != 0) { min = a % 10; } if (min > c % 10 && c % 10 != 0) { min = c % 10; } if (min > d % 10 && d % 10 != 0) { min = d % 10; } if (min > e % 10 && e % 10 != 0) { min = e % 10; } if (min == 11) { min = 0; } std::cout << a - a % 10 + b - b % 10 + c - c % 10 + d - d % 10 + e - e % 10 + flag + min << std::endl; return 0; }
[ "expression.operation.binary.remove" ]
891,681
891,682
u934064105
cpp
p03076
#include <algorithm> #include <iostream> #include <math.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; int main() { int a, count = 0, modmin = 9; bool flag = false; for (int i = 0; i < 5; i++) { if (a % 10 > 0) { flag = true; modmin = min(modmin, a % 10); count += ((int)(a / 10)) * 10 + 10; } else { count += a; } } if (flag) { cout << count - 10 + modmin << endl; } else { cout << count << endl; } return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; int main() { int a, count = 0, modmin = 9; bool flag = false; for (int i = 0; i < 5; i++) { cin >> a; if (a % 10 > 0) { flag = true; modmin = min(modmin, a % 10); count += ((int)(a / 10)) * 10 + 10; } else { count += a; } } if (flag) { cout << count - 10 + modmin << endl; } else { cout << count << endl; } return 0; }
[]
891,704
891,705
u793275002
cpp
p03077
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << ll(5) + n / (min({a, b, c, d, e})) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << ll(5) + (n - 1) / (min({a, b, c, d, e})) << endl; return 0; }
[]
891,728
891,729
u027630431
cpp
p03077
#include <bits/stdc++.h> #define endl "\n" #define ll long long int #define mod 1000000007 #define inf 1000000000000000001; using namespace std; int main() { // #ifndef ONLINE_JUDGE // // for getting input from input.txt // freopen("input.txt", "r", stdin); // // for writing output to output.txt // freopen("output.txt", "w", stdout); // #endif std::ios::sync_with_stdio(false); cin.tie(NULL); ll n, v[5], m = inf; cin >> n; for (int i = 0; i < 5; ++i) { cin >> v[i]; m = min(v[i], m); } // cout<<n<<m; cout << ceil(n / m) + 5; return 0; }
#include <bits/stdc++.h> #define endl "\n" #define ll long long int #define mod 1000000007 #define inf 1000000000000000001; using namespace std; int main() { // #ifndef ONLINE_JUDGE // for getting input from input.txt // freopen("input.txt", "r", stdin); // for writing output to output.txt // freopen("output.txt", "w", stdout); // #endif std::ios::sync_with_stdio(false); cin.tie(NULL); ll n, v[5], m = inf; cin >> n; for (int i = 0; i < 5; ++i) { cin >> v[i]; m = min(v[i], m); } // cout<<n<<m; cout << (n - 1) / m + 5; return 0; }
[ "call.arguments.change" ]
891,732
891,733
u219987462
cpp
p03077
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { int n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; int m = min({a, b, c, d, e}); cout << (n + m - 1) / m + 4 << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long long m = min({a, b, c, d, e}); cout << (n + m - 1) / m + 4 << endl; return 0; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
891,750
891,751
u994074033
cpp
p03077
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long double m = min({a, b, c, d, e}); cout << (n + m - 1) / m + 4 << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long long m = min({a, b, c, d, e}); cout << (n + m - 1) / m + 4 << endl; return 0; }
[ "variable_declaration.type.primitive.change" ]
891,752
891,751
u994074033
cpp
p03077
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #define prints(x) cout << fixed << setprecision(20) << x << endl #define printc(x) cout << setw(2) << setfill('0') << x << endl; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl //配列入力 vector<long long> vecin(ll n) { vector<long long> res(n); for (int i = 0; i < n; i++) cin >> res[i]; return res; } // begin() end() #define all(x) (x).begin(), (x).end() // for #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define rep(i, a, b) for (int i = (a); i < (b); i++) //最大公約数 ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } // 最小公倍数 unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; } // a = max(a, b), a = min(a, b) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } // num ^ pow(mod取る) ll pow_mod(ll num, ll pow, ll mod) { ll prod = 1; num %= mod; while (pow > 0) { if (pow & 1) prod = prod * num % mod; num = num * num % mod; pow >>= 1; } return prod; } // 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度) // COMinit() // COM(x, y) // とコンビで使う // テーブルを作る前処理 long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } // UnionFind struct UnionFind { vector<int> par; vector<int> rank; vector<ll> Size; UnionFind(int n = 1) { init(n); } void init(int n = 1) { par.resize(n + 1); rank.resize(n + 1); Size.resize(n + 1); for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, Size[i] = 1; } int root(int x) { if (par[x] == x) { return x; } else { int r = root(par[x]); return par[x] = r; } } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (rank[x] < rank[y]) swap(x, y); if (rank[x] == rank[y]) ++rank[x]; par[y] = x; Size[x] += Size[y]; return true; } ll size(int x) { return Size[root(x)]; } }; // modint構造体 struct Mint { int val; Mint inv() const { int tmp, a = val, b = mod, x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) { if ((val = x % mod) < 0) val += mod; } Mint pow(ll t) { Mint res = 1, b = *this; while (t) { if (t & 1) res *= b; b *= b; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: // factorial fact(10000010); // fact.nCr(a, b) //「fact」の部分は自由に名前変更可能 factorial(int maxx) { Fact.resize(maxx + 1), Finv.resize(maxx + 1); Fact[0] = Mint(1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i; } Mint fact(int n, bool inv = 0) { if (inv) return Finv[n]; else return Fact[n]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[n - r]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[r] * Finv[n - r]; } }; // 1 * 2 * 3 .... * n (mod) ll modfact(ll n) { if (n <= 1) return 1; return (n * modfact(n - 1)) % MOD; } // kが角度だった場合:cos(k * (PI / 180)); // const double PI = acos(-1);のまま使うと円周率(M_PIもあるよ) const double PI = acos(-1); // 多次元 vector 生成 例: auto dp = make_vec<long long>(N+1, 5, 5, 5); template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...)); } //素因数分解 vector<pair<long long, int>> factorize(long long n) { vector<pair<long long, int>> res; for (long long i = 2; i * i <= n; ++i) { if (n % i) continue; res.emplace_back(i, 0); while (n % i == 0) { n /= i; res.back().second++; } } if (n != 1) res.emplace_back(n, 1); return res; } // 素数判定 bool primejudge(long long a) { if (a <= 1) return false; for (long long i = 2; i * i <= a; i++) { if (a % i == 0) return false; } return true; } // 累積和 // vector<long long>sums(vector<int>n){ // vector<long long>res(n.size() + 1, 0); // for(int i = 0; i < n.size(); i++) res[i + 1] = n[i] + res[i]; // return res; // } int dy[4] = {0, 1, 0, -1}, dx[4] = {1, 0, -1, 0}; int dp[1100][1100]; int main() { ll n; cin >> n; ll m = LINF; REP(i, 5) { ll x; cin >> x; chmin(m, x); } ll ans = ((n + m - 1) / m) + 4; return 0; }
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #define prints(x) cout << fixed << setprecision(20) << x << endl #define printc(x) cout << setw(2) << setfill('0') << x << endl; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl //配列入力 vector<long long> vecin(ll n) { vector<long long> res(n); for (int i = 0; i < n; i++) cin >> res[i]; return res; } // begin() end() #define all(x) (x).begin(), (x).end() // for #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define rep(i, a, b) for (int i = (a); i < (b); i++) //最大公約数 ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } // 最小公倍数 unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; } // a = max(a, b), a = min(a, b) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } // num ^ pow(mod取る) ll pow_mod(ll num, ll pow, ll mod) { ll prod = 1; num %= mod; while (pow > 0) { if (pow & 1) prod = prod * num % mod; num = num * num % mod; pow >>= 1; } return prod; } // 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度) // COMinit() // COM(x, y) // とコンビで使う // テーブルを作る前処理 long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } // UnionFind struct UnionFind { vector<int> par; vector<int> rank; vector<ll> Size; UnionFind(int n = 1) { init(n); } void init(int n = 1) { par.resize(n + 1); rank.resize(n + 1); Size.resize(n + 1); for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, Size[i] = 1; } int root(int x) { if (par[x] == x) { return x; } else { int r = root(par[x]); return par[x] = r; } } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (rank[x] < rank[y]) swap(x, y); if (rank[x] == rank[y]) ++rank[x]; par[y] = x; Size[x] += Size[y]; return true; } ll size(int x) { return Size[root(x)]; } }; // modint構造体 struct Mint { int val; Mint inv() const { int tmp, a = val, b = mod, x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) { if ((val = x % mod) < 0) val += mod; } Mint pow(ll t) { Mint res = 1, b = *this; while (t) { if (t & 1) res *= b; b *= b; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: // factorial fact(10000010); // fact.nCr(a, b) //「fact」の部分は自由に名前変更可能 factorial(int maxx) { Fact.resize(maxx + 1), Finv.resize(maxx + 1); Fact[0] = Mint(1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i; } Mint fact(int n, bool inv = 0) { if (inv) return Finv[n]; else return Fact[n]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[n - r]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[r] * Finv[n - r]; } }; // 1 * 2 * 3 .... * n (mod) ll modfact(ll n) { if (n <= 1) return 1; return (n * modfact(n - 1)) % MOD; } // kが角度だった場合:cos(k * (PI / 180)); // const double PI = acos(-1);のまま使うと円周率(M_PIもあるよ) const double PI = acos(-1); // 多次元 vector 生成 例: auto dp = make_vec<long long>(N+1, 5, 5, 5); template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...)); } //素因数分解 vector<pair<long long, int>> factorize(long long n) { vector<pair<long long, int>> res; for (long long i = 2; i * i <= n; ++i) { if (n % i) continue; res.emplace_back(i, 0); while (n % i == 0) { n /= i; res.back().second++; } } if (n != 1) res.emplace_back(n, 1); return res; } // 素数判定 bool primejudge(long long a) { if (a <= 1) return false; for (long long i = 2; i * i <= a; i++) { if (a % i == 0) return false; } return true; } // 累積和 // vector<long long>sums(vector<int>n){ // vector<long long>res(n.size() + 1, 0); // for(int i = 0; i < n.size(); i++) res[i + 1] = n[i] + res[i]; // return res; // } int dy[4] = {0, 1, 0, -1}, dx[4] = {1, 0, -1, 0}; int dp[1100][1100]; int main() { ll n; cin >> n; ll m = LINF; REP(i, 5) { ll x; cin >> x; chmin(m, x); } ll ans = ((n + m - 1) / m) + 4; print(ans); return 0; }
[ "call.add" ]
891,755
891,756
u832995587
cpp
p03077
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #define prints(x) cout << fixed << setprecision(10) << x << endl #define printc(x) cout << setw(2) << setfill('0') << x << endl; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() end() #define all(x) (x).begin(), (x).end() // for #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) //最大公約数 unsigned gcd(unsigned a, unsigned b) { if (a < b) return gcd(b, a); unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } // 最小公倍数 unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; } // a = max(a, b), a = min(a, b) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } // 階乗(MODをとる) ll pow_mod(ll num, ll pow, ll mod) { ll prod = 1; num %= mod; while (pow > 0) { if (pow & 1) prod = prod * num % mod; num = num * num % mod; pow >>= 1; } return prod; } // 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度) // COMinit() // COM(x, y) // とコンビで使う // テーブルを作る前処理 long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } // int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0}; struct UnionFind { vector<int> par; vector<int> rank; vector<ll> Size; UnionFind(int n = 1) { init(n); } void init(int n = 1) { par.resize(n + 1); rank.resize(n + 1); Size.resize(n + 1); for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, Size[i] = 1; } int root(int x) { if (par[x] == x) { return x; } else { int r = root(par[x]); return par[x] = r; } } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (rank[x] < rank[y]) swap(x, y); if (rank[x] == rank[y]) ++rank[x]; par[y] = x; Size[x] += Size[y]; return true; } ll size(int x) { return Size[root(x)]; } }; #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define rep(i, a, b) for (int i = (a); i < (b); i++) struct Mint { int val; Mint inv() const { int tmp, a = val, b = mod, x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) { if ((val = x % mod) < 0) val += mod; } Mint pow(ll t) { Mint res = 1, b = *this; while (t) { if (t & 1) res *= b; b *= b; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: factorial(int maxx) { Fact.resize(maxx + 1), Finv.resize(maxx + 1); Fact[0] = Mint(1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i; } Mint fact(int n, bool inv = 0) { if (inv) return Finv[n]; else return Fact[n]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[n - r]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[r] * Finv[n - r]; } }; ll modfact(ll n) { if (n <= 1) return 1; return (n * modfact(n - 1)) % MOD; } int main() { int n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; int v = min({a, b, c, d, e}); int ans = ((n + (v - 1)) / v) + 4; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #define prints(x) cout << fixed << setprecision(10) << x << endl #define printc(x) cout << setw(2) << setfill('0') << x << endl; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() end() #define all(x) (x).begin(), (x).end() // for #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) //最大公約数 unsigned gcd(unsigned a, unsigned b) { if (a < b) return gcd(b, a); unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } // 最小公倍数 unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; } // a = max(a, b), a = min(a, b) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } // 階乗(MODをとる) ll pow_mod(ll num, ll pow, ll mod) { ll prod = 1; num %= mod; while (pow > 0) { if (pow & 1) prod = prod * num % mod; num = num * num % mod; pow >>= 1; } return prod; } // 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度) // COMinit() // COM(x, y) // とコンビで使う // テーブルを作る前処理 long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } // int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0}; struct UnionFind { vector<int> par; vector<int> rank; vector<ll> Size; UnionFind(int n = 1) { init(n); } void init(int n = 1) { par.resize(n + 1); rank.resize(n + 1); Size.resize(n + 1); for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, Size[i] = 1; } int root(int x) { if (par[x] == x) { return x; } else { int r = root(par[x]); return par[x] = r; } } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (rank[x] < rank[y]) swap(x, y); if (rank[x] == rank[y]) ++rank[x]; par[y] = x; Size[x] += Size[y]; return true; } ll size(int x) { return Size[root(x)]; } }; #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define rep(i, a, b) for (int i = (a); i < (b); i++) struct Mint { int val; Mint inv() const { int tmp, a = val, b = mod, x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) { if ((val = x % mod) < 0) val += mod; } Mint pow(ll t) { Mint res = 1, b = *this; while (t) { if (t & 1) res *= b; b *= b; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: factorial(int maxx) { Fact.resize(maxx + 1), Finv.resize(maxx + 1); Fact[0] = Mint(1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i; } Mint fact(int n, bool inv = 0) { if (inv) return Finv[n]; else return Fact[n]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[n - r]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[r] * Finv[n - r]; } }; ll modfact(ll n) { if (n <= 1) return 1; return (n * modfact(n - 1)) % MOD; } int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll v = min({a, b, c, d, e}); ll ans = (n + (v - 1)) / v + 4; cout << ans << endl; return 0; }
[ "variable_declaration.type.change" ]
891,757
891,758
u832995587
cpp
p03077
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #define prints(x) cout << fixed << setprecision(10) << x << endl #define printc(x) cout << setw(2) << setfill('0') << x << endl; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() end() #define all(x) (x).begin(), (x).end() // for #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) //最大公約数 unsigned gcd(unsigned a, unsigned b) { if (a < b) return gcd(b, a); unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } // 最小公倍数 unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; } // a = max(a, b), a = min(a, b) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } // 階乗(MODをとる) ll pow_mod(ll num, ll pow, ll mod) { ll prod = 1; num %= mod; while (pow > 0) { if (pow & 1) prod = prod * num % mod; num = num * num % mod; pow >>= 1; } return prod; } // 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度) // COMinit() // COM(x, y) // とコンビで使う // テーブルを作る前処理 long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } // int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0}; struct UnionFind { vector<int> par; vector<int> rank; vector<ll> Size; UnionFind(int n = 1) { init(n); } void init(int n = 1) { par.resize(n + 1); rank.resize(n + 1); Size.resize(n + 1); for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, Size[i] = 1; } int root(int x) { if (par[x] == x) { return x; } else { int r = root(par[x]); return par[x] = r; } } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (rank[x] < rank[y]) swap(x, y); if (rank[x] == rank[y]) ++rank[x]; par[y] = x; Size[x] += Size[y]; return true; } ll size(int x) { return Size[root(x)]; } }; #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define rep(i, a, b) for (int i = (a); i < (b); i++) struct Mint { int val; Mint inv() const { int tmp, a = val, b = mod, x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) { if ((val = x % mod) < 0) val += mod; } Mint pow(ll t) { Mint res = 1, b = *this; while (t) { if (t & 1) res *= b; b *= b; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: factorial(int maxx) { Fact.resize(maxx + 1), Finv.resize(maxx + 1); Fact[0] = Mint(1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i; } Mint fact(int n, bool inv = 0) { if (inv) return Finv[n]; else return Fact[n]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[n - r]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[r] * Finv[n - r]; } }; ll modfact(ll n) { if (n <= 1) return 1; return (n * modfact(n - 1)) % MOD; } int main() { int n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; int v = min({a, b, c, d, e}); int ans = (n + (v - 1)) / v + 4; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; // long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x << endl #define prints(x) cout << fixed << setprecision(10) << x << endl #define printc(x) cout << setw(2) << setfill('0') << x << endl; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() end() #define all(x) (x).begin(), (x).end() // for #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) //最大公約数 unsigned gcd(unsigned a, unsigned b) { if (a < b) return gcd(b, a); unsigned r; while ((r = a % b)) { a = b; b = r; } return b; } // 最小公倍数 unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; } // a = max(a, b), a = min(a, b) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } // 階乗(MODをとる) ll pow_mod(ll num, ll pow, ll mod) { ll prod = 1; num %= mod; while (pow > 0) { if (pow & 1) prod = prod * num % mod; num = num * num % mod; pow >>= 1; } return prod; } // 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度) // COMinit() // COM(x, y) // とコンビで使う // テーブルを作る前処理 long long fac[MAX], finv[MAX], inv[MAX]; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } // int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0}; struct UnionFind { vector<int> par; vector<int> rank; vector<ll> Size; UnionFind(int n = 1) { init(n); } void init(int n = 1) { par.resize(n + 1); rank.resize(n + 1); Size.resize(n + 1); for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, Size[i] = 1; } int root(int x) { if (par[x] == x) { return x; } else { int r = root(par[x]); return par[x] = r; } } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (rank[x] < rank[y]) swap(x, y); if (rank[x] == rank[y]) ++rank[x]; par[y] = x; Size[x] += Size[y]; return true; } ll size(int x) { return Size[root(x)]; } }; #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define rep(i, a, b) for (int i = (a); i < (b); i++) struct Mint { int val; Mint inv() const { int tmp, a = val, b = mod, x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) { if ((val = x % mod) < 0) val += mod; } Mint pow(ll t) { Mint res = 1, b = *this; while (t) { if (t & 1) res *= b; b *= b; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: factorial(int maxx) { Fact.resize(maxx + 1), Finv.resize(maxx + 1); Fact[0] = Mint(1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i; } Mint fact(int n, bool inv = 0) { if (inv) return Finv[n]; else return Fact[n]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[n - r]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); else return Fact[n] * Finv[r] * Finv[n - r]; } }; ll modfact(ll n) { if (n <= 1) return 1; return (n * modfact(n - 1)) % MOD; } int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll v = min({a, b, c, d, e}); ll ans = (n + (v - 1)) / v + 4; cout << ans << endl; return 0; }
[ "variable_declaration.type.change" ]
891,759
891,758
u832995587
cpp
p03077
#include <iostream> using namespace std; using ll = long long; int main() { ll n, i, c, bn; cin >> n; for (i = 0; i < 5; ++i) { cin >> c; bn = min(bn, c); } if (n % bn == 0) cout << n / bn + 4 << endl; else cout << n / bn + 5 << endl; return 0; }
#include <iostream> using namespace std; using ll = long long; int main() { ll n, i, c, bn = 1e15 + 1; cin >> n; for (i = 0; i < 5; ++i) { cin >> c; bn = min(bn, c); } if (n % bn == 0) cout << n / bn + 4 << endl; else cout << n / bn + 5 << endl; return 0; }
[ "variable_declaration.value.change" ]
891,760
891,761
u714732628
cpp
p03077
#include <bits/stdc++.h> #define ll long long int #define endl '\n' #define M 1000000007 #define yes cout << "YES\n" #define no cout << "NO\n" #define f first #define s second #define b begin #define e end #define pb push_back #define mp make_pair #define FOR(i, a, b) for (i = a; i < b; i++) #define RFOR(i, a, b) for (i = a; i >= b; i--) #define all(x) x.begin(), x.end() #define itfr(it, x) for (it = x.begin(); it != x.end(); it++) #define flash \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) using namespace std; int main() { flash; // sieve(); ll a, b, c, d, e, n, mx; cin >> n >> a >> b >> c >> d >> e; mx = min(a, min(b, min(c, min(d, e)))); cout << 4 + ceil((double)n / mx); }
#include <bits/stdc++.h> #define ll long long int #define endl '\n' #define M 1000000007 #define yes cout << "YES\n" #define no cout << "NO\n" #define f first #define s second #define b begin #define e end #define pb push_back #define mp make_pair #define FOR(i, a, b) for (i = a; i < b; i++) #define RFOR(i, a, b) for (i = a; i >= b; i--) #define all(x) x.begin(), x.end() #define itfr(it, x) for (it = x.begin(); it != x.end(); it++) #define flash \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) using namespace std; int main() { flash; // sieve(); ll a, b, c, d, e, n, mx; cin >> n >> a >> b >> c >> d >> e; mx = min(a, min(b, min(c, min(d, e)))); cout << 4 + (ll)ceil((double)n / mx); }
[ "type_conversion.add" ]
891,763
891,764
u587086245
cpp
p03077
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; using P = pair<int, int>; constexpr int INF = 1e9; constexpr ll INFLL = 1e18; constexpr int MOD = 1e9 + 7; const ld PI = acosl(-1); #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(n) n.begin(), n.end() int main() { ios::sync_with_stdio(false); cin.tie(nullptr); // cout << fixed << setprecision(6); ll n; cin >> n; vll a(5); rep(i, 5) cin >> a[i]; ll mine = *min_element(a.begin(), a.end()); ll ans = (n + mine) / mine + 4; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; using P = pair<int, int>; constexpr int INF = 1e9; constexpr ll INFLL = 1e18; constexpr int MOD = 1e9 + 7; const ld PI = acosl(-1); #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(n) n.begin(), n.end() int main() { ios::sync_with_stdio(false); cin.tie(nullptr); // cout << fixed << setprecision(6); ll n; cin >> n; vll a(5); rep(i, 5) cin >> a[i]; ll mine = *min_element(a.begin(), a.end()); ll ans = (n + mine - 1) / mine + 4; cout << ans << endl; return 0; }
[ "assignment.change" ]
891,788
891,789
u959682820
cpp
p03077
#include <iostream> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long long pos = 0; long long time = 0; time = (n + (a - 1)) / a; pos++; if (a <= b) { time++; b = a; } else time = (n + (b - 1)) / b + pos; pos++; if (b <= c) { time++; c = b; } else time = (n + (c - 1)) / c + pos; pos++; if (c <= d) { time++; d = c; } else time = (n + (d - 1)) / d + pos; pos++; if (d <= e) { time++; e = d; } else time = (n + (d - 1)) / d + pos; pos++; cout << time << endl; return 0; }
#include <iostream> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long long pos = 0; long long time = 0; time = (n + (a - 1)) / a; pos++; if (a <= b) { time++; b = a; } else time = (n + (b - 1)) / b + pos; pos++; if (b <= c) { time++; c = b; } else time = (n + (c - 1)) / c + pos; pos++; if (c <= d) { time++; d = c; } else time = (n + (d - 1)) / d + pos; pos++; if (d <= e) { time++; e = d; } else time = (n + (e - 1)) / e + pos; pos++; cout << time << endl; return 0; }
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
891,792
891,793
u509420256
cpp
p03077
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++) #define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--) #define ALL(x) (x).begin(), (x).end() #define SIZE(x) ((ll)(x).size()) #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) #define INF 1000000000 using namespace std; typedef long long ll; int main() { ll N, a[5]; cin >> N; REP(i, 5) { cin >> a[i]; } sort(a, a + 5); ll x = ceil(N / a[0]); ll ans = x + 5; cout << ans << endl; }
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++) #define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--) #define ALL(x) (x).begin(), (x).end() #define SIZE(x) ((ll)(x).size()) #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) #define INF 1000000000 using namespace std; typedef long long ll; int main() { ll N, a[5]; cin >> N; REP(i, 5) { cin >> a[i]; } sort(a, a + 5); ll x = ceil((double)N / a[0]); ll ans = x + 4; cout << ans << endl; }
[ "literal.number.change", "expression.operation.binary.change" ]
891,806
891,807
u511096055
cpp
p03077
#include <bits/stdc++.h> using namespace std; using ll = long long; const long long INF = 1LL << 60; int main() { ll N; cin >> N; vector<ll> V(5); ll min_v = 1e16; for (int i = 0; i < 5; i++) { cin >> V[i]; min_v = min(min_v, V[i]); } ll X = N / min_v; if (N % min_v == 0) { X--; } cout << 5 + (ll)(N / min_v) << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; const long long INF = 1LL << 60; int main() { ll N; cin >> N; vector<ll> V(5); ll min_v = 1e16; for (int i = 0; i < 5; i++) { cin >> V[i]; min_v = min(min_v, V[i]); } ll X = N / min_v; if (N % min_v == 0) { X--; } cout << 5 + (ll)(X) << endl; }
[ "io.output.change", "expression.operation.binary.remove" ]
891,808
891,809
u418892821
cpp
p03077
#include <bits/stdc++.h> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repp(i, n, m) for (int i = m; i < (n); ++i) #define repl(i, n) for (long long i = 0; i < (n); ++i) #define reppl(i, n, m) for (long long i = m; i < (n); ++i) using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; using PL = pair<long long, long long>; using Pxy = pair<double, double>; using T = tuple<int, int, bool>; const int INF = 1001001007; const int mod = 1000000007; const int MOD = 998244353; const ll inf = 1e18; template <typename AT> void printvec(vector<AT> &ar) { rep(i, ar.size() - 1) cout << ar[i] << " "; cout << ar[ar.size() - 1] << endl; } template <typename Q> void printvvec(vector<vector<Q>> &ar) { rep(i, ar.size()) { rep(j, ar[0].size() - 1) cout << ar[i][j] << " "; cout << ar[i][ar[0].size() - 1] << endl; } } template <typename S> bool range(S a, S b, S x) { return (a <= x && x < b); } void yes(int n) { cout << "Yes" << endl; } void no(int n) { cout << "No" << endl; } int cel(int a, int b) { if (a % b == 0) return a / b; else return a / b + 1; } int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; cout << cel(n, min({a, b, c, d, e})) + 4LL << endl; }
#include <bits/stdc++.h> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repp(i, n, m) for (int i = m; i < (n); ++i) #define repl(i, n) for (long long i = 0; i < (n); ++i) #define reppl(i, n, m) for (long long i = m; i < (n); ++i) using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; using PL = pair<long long, long long>; using Pxy = pair<double, double>; using T = tuple<int, int, bool>; const int INF = 1001001007; const int mod = 1000000007; const int MOD = 998244353; const ll inf = 1e18; template <typename AT> void printvec(vector<AT> &ar) { rep(i, ar.size() - 1) cout << ar[i] << " "; cout << ar[ar.size() - 1] << endl; } template <typename Q> void printvvec(vector<vector<Q>> &ar) { rep(i, ar.size()) { rep(j, ar[0].size() - 1) cout << ar[i][j] << " "; cout << ar[i][ar[0].size() - 1] << endl; } } template <typename S> bool range(S a, S b, S x) { return (a <= x && x < b); } void yes(int n) { cout << "Yes" << endl; } void no(int n) { cout << "No" << endl; } ll cel(ll a, ll b) { if (a % b == 0) return a / b; else return a / b + 1; } int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; cout << cel(n, min({a, b, c, d, e})) + 4LL << endl; }
[]
891,816
891,817
u772395065
cpp
p03077
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++) using namespace std; typedef long long ll; int my_ceil(int a, int b) { return (a + b - 1) / b; } ll N, A, B, C, D, E; int main() { cin >> N >> A >> B >> C >> D >> E; cout << 5 + (my_ceil(N, min({A, B, C, D, E})) - 1) << endl; }
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++) using namespace std; typedef long long ll; ll my_ceil(ll a, ll b) { return (a + b - 1) / b; } ll N, A, B, C, D, E; int main() { cin >> N >> A >> B >> C >> D >> E; cout << 5 + (my_ceil(N, min({A, B, C, D, E})) - 1) << endl; }
[]
891,818
891,819
u805392425
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 int main() { ll n; cin >> n; ll arr[5]; int mini = LONG_MAX; for (int i = 0; i < 5; i++) { cin >> arr[i]; if (arr[i] < mini) mini = arr[i]; } ll time = 4; if (n % mini == 0) time += n / mini; else time += n / mini + 1; cout << time; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 int main() { ll n; cin >> n; ll arr[5]; ll mini = LONG_MAX; for (int i = 0; i < 5; i++) { cin >> arr[i]; if (arr[i] < mini) mini = arr[i]; } ll time = 4; if (n % mini == 0) time += n / mini; else time += n / mini + 1; cout << time; return 0; }
[ "variable_declaration.type.change" ]
891,822
891,823
u511332668
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define all(x) (x).begin(), (x).end() #define pb push_back #define F_OR(i, a, b, s) \ for (int i = (a); (s) > 0 ? i < (b) : i > (b); i += (s)) #define F_OR1(e) F_OR(i, 0, e, 1) #define F_OR2(i, e) F_OR(i, 0, e, 1) #define F_OR3(i, b, e) F_OR(i, b, e, 1) #define F_OR4(i, b, e, s) F_OR(i, b, e, s) #define GET5(a, b, c, d, e, ...) e #define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1) #define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__) #define EACH(x, a) for (auto &x : a) // debug templates #define debug(x) cerr << #x << " : " << x << endl; #define debuga(A, N) \ cerr << #A << " : ["; \ for (int i = 0; i < N; i++) \ cerr << A[i] << " "; \ cerr << "]\n"; #define debuga2(A, N, M) \ cerr << #A << " : \n"; \ for (int i = 0; i < N; i++) { \ cerr << "["; \ for (int j = 0; j < M; ++j) \ cerr << A[i][j] << " "; \ cerr << "]\n"; \ } #define debugp(p) \ cerr << #p << " : " \ << "(" << (p).first << "," << (p).second << ")\n"; #define debugv(v) \ cerr << #v << " : " \ << "["; \ for (int i = 0; i < (v).size(); i++) \ cerr << v[i] << " "; \ cerr << "]\n"; #define debugv2(v) \ cerr << #v << " : \n"; \ for (int i = 0; i < v.size(); i++) { \ cerr << "["; \ for (int j = 0; j < (v[0].size()); ++j) \ cerr << v[i][j] << " "; \ cerr << "]\n"; \ } #define debugs(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << *itr << " "; \ cerr << "]\n"; #define debugm(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << "(" << itr->first << "," << itr->second << ") "; \ cerr << "]\n"; void solve() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll minn = min({a, b, c, d, e}); ll ans = 5 + ceill(n / minn); cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define all(x) (x).begin(), (x).end() #define pb push_back #define F_OR(i, a, b, s) \ for (int i = (a); (s) > 0 ? i < (b) : i > (b); i += (s)) #define F_OR1(e) F_OR(i, 0, e, 1) #define F_OR2(i, e) F_OR(i, 0, e, 1) #define F_OR3(i, b, e) F_OR(i, b, e, 1) #define F_OR4(i, b, e, s) F_OR(i, b, e, s) #define GET5(a, b, c, d, e, ...) e #define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1) #define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__) #define EACH(x, a) for (auto &x : a) // debug templates #define debug(x) cerr << #x << " : " << x << endl; #define debuga(A, N) \ cerr << #A << " : ["; \ for (int i = 0; i < N; i++) \ cerr << A[i] << " "; \ cerr << "]\n"; #define debuga2(A, N, M) \ cerr << #A << " : \n"; \ for (int i = 0; i < N; i++) { \ cerr << "["; \ for (int j = 0; j < M; ++j) \ cerr << A[i][j] << " "; \ cerr << "]\n"; \ } #define debugp(p) \ cerr << #p << " : " \ << "(" << (p).first << "," << (p).second << ")\n"; #define debugv(v) \ cerr << #v << " : " \ << "["; \ for (int i = 0; i < (v).size(); i++) \ cerr << v[i] << " "; \ cerr << "]\n"; #define debugv2(v) \ cerr << #v << " : \n"; \ for (int i = 0; i < v.size(); i++) { \ cerr << "["; \ for (int j = 0; j < (v[0].size()); ++j) \ cerr << v[i][j] << " "; \ cerr << "]\n"; \ } #define debugs(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << *itr << " "; \ cerr << "]\n"; #define debugm(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << "(" << itr->first << "," << itr->second << ") "; \ cerr << "]\n"; // look at first test case // 1:5 // 2:5 // 3:6 // 4:6 // 5:7 void solve() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll minn = min({a, b, c, d, e}); ll ans = 5 + (n - 1) / minn; cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); return 0; }
[ "call.arguments.change" ]
891,824
891,825
u626618167
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define all(x) (x).begin(), (x).end() #define pb push_back #define F_OR(i, a, b, s) \ for (int i = (a); (s) > 0 ? i < (b) : i > (b); i += (s)) #define F_OR1(e) F_OR(i, 0, e, 1) #define F_OR2(i, e) F_OR(i, 0, e, 1) #define F_OR3(i, b, e) F_OR(i, b, e, 1) #define F_OR4(i, b, e, s) F_OR(i, b, e, s) #define GET5(a, b, c, d, e, ...) e #define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1) #define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__) #define EACH(x, a) for (auto &x : a) // debug templates #define debug(x) cerr << #x << " : " << x << endl; #define debuga(A, N) \ cerr << #A << " : ["; \ for (int i = 0; i < N; i++) \ cerr << A[i] << " "; \ cerr << "]\n"; #define debuga2(A, N, M) \ cerr << #A << " : \n"; \ for (int i = 0; i < N; i++) { \ cerr << "["; \ for (int j = 0; j < M; ++j) \ cerr << A[i][j] << " "; \ cerr << "]\n"; \ } #define debugp(p) \ cerr << #p << " : " \ << "(" << (p).first << "," << (p).second << ")\n"; #define debugv(v) \ cerr << #v << " : " \ << "["; \ for (int i = 0; i < (v).size(); i++) \ cerr << v[i] << " "; \ cerr << "]\n"; #define debugv2(v) \ cerr << #v << " : \n"; \ for (int i = 0; i < v.size(); i++) { \ cerr << "["; \ for (int j = 0; j < (v[0].size()); ++j) \ cerr << v[i][j] << " "; \ cerr << "]\n"; \ } #define debugs(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << *itr << " "; \ cerr << "]\n"; #define debugm(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << "(" << itr->first << "," << itr->second << ") "; \ cerr << "]\n"; void solve() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll minn = min({a, b, c, d, e}); ll ans = 5 + ceil(n / minn); cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define all(x) (x).begin(), (x).end() #define pb push_back #define F_OR(i, a, b, s) \ for (int i = (a); (s) > 0 ? i < (b) : i > (b); i += (s)) #define F_OR1(e) F_OR(i, 0, e, 1) #define F_OR2(i, e) F_OR(i, 0, e, 1) #define F_OR3(i, b, e) F_OR(i, b, e, 1) #define F_OR4(i, b, e, s) F_OR(i, b, e, s) #define GET5(a, b, c, d, e, ...) e #define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1) #define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__) #define EACH(x, a) for (auto &x : a) // debug templates #define debug(x) cerr << #x << " : " << x << endl; #define debuga(A, N) \ cerr << #A << " : ["; \ for (int i = 0; i < N; i++) \ cerr << A[i] << " "; \ cerr << "]\n"; #define debuga2(A, N, M) \ cerr << #A << " : \n"; \ for (int i = 0; i < N; i++) { \ cerr << "["; \ for (int j = 0; j < M; ++j) \ cerr << A[i][j] << " "; \ cerr << "]\n"; \ } #define debugp(p) \ cerr << #p << " : " \ << "(" << (p).first << "," << (p).second << ")\n"; #define debugv(v) \ cerr << #v << " : " \ << "["; \ for (int i = 0; i < (v).size(); i++) \ cerr << v[i] << " "; \ cerr << "]\n"; #define debugv2(v) \ cerr << #v << " : \n"; \ for (int i = 0; i < v.size(); i++) { \ cerr << "["; \ for (int j = 0; j < (v[0].size()); ++j) \ cerr << v[i][j] << " "; \ cerr << "]\n"; \ } #define debugs(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << *itr << " "; \ cerr << "]\n"; #define debugm(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << "(" << itr->first << "," << itr->second << ") "; \ cerr << "]\n"; // look at first test case // 1:5 // 2:5 // 3:6 // 4:6 // 5:7 void solve() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll minn = min({a, b, c, d, e}); ll ans = 5 + (n - 1) / minn; cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); return 0; }
[ "call.arguments.change" ]
891,826
891,825
u626618167
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define all(x) (x).begin(), (x).end() #define pb push_back #define F_OR(i, a, b, s) \ for (int i = (a); (s) > 0 ? i < (b) : i > (b); i += (s)) #define F_OR1(e) F_OR(i, 0, e, 1) #define F_OR2(i, e) F_OR(i, 0, e, 1) #define F_OR3(i, b, e) F_OR(i, b, e, 1) #define F_OR4(i, b, e, s) F_OR(i, b, e, s) #define GET5(a, b, c, d, e, ...) e #define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1) #define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__) #define EACH(x, a) for (auto &x : a) // debug templates #define debug(x) cerr << #x << " : " << x << endl; #define debuga(A, N) \ cerr << #A << " : ["; \ for (int i = 0; i < N; i++) \ cerr << A[i] << " "; \ cerr << "]\n"; #define debuga2(A, N, M) \ cerr << #A << " : \n"; \ for (int i = 0; i < N; i++) { \ cerr << "["; \ for (int j = 0; j < M; ++j) \ cerr << A[i][j] << " "; \ cerr << "]\n"; \ } #define debugp(p) \ cerr << #p << " : " \ << "(" << (p).first << "," << (p).second << ")\n"; #define debugv(v) \ cerr << #v << " : " \ << "["; \ for (int i = 0; i < (v).size(); i++) \ cerr << v[i] << " "; \ cerr << "]\n"; #define debugv2(v) \ cerr << #v << " : \n"; \ for (int i = 0; i < v.size(); i++) { \ cerr << "["; \ for (int j = 0; j < (v[0].size()); ++j) \ cerr << v[i][j] << " "; \ cerr << "]\n"; \ } #define debugs(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << *itr << " "; \ cerr << "]\n"; #define debugm(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << "(" << itr->first << "," << itr->second << ") "; \ cerr << "]\n"; void solve() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; int minn = min({a, b, c, d, e}); ll ans = 5 + ceil(n / minn); cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define all(x) (x).begin(), (x).end() #define pb push_back #define F_OR(i, a, b, s) \ for (int i = (a); (s) > 0 ? i < (b) : i > (b); i += (s)) #define F_OR1(e) F_OR(i, 0, e, 1) #define F_OR2(i, e) F_OR(i, 0, e, 1) #define F_OR3(i, b, e) F_OR(i, b, e, 1) #define F_OR4(i, b, e, s) F_OR(i, b, e, s) #define GET5(a, b, c, d, e, ...) e #define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1) #define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__) #define EACH(x, a) for (auto &x : a) // debug templates #define debug(x) cerr << #x << " : " << x << endl; #define debuga(A, N) \ cerr << #A << " : ["; \ for (int i = 0; i < N; i++) \ cerr << A[i] << " "; \ cerr << "]\n"; #define debuga2(A, N, M) \ cerr << #A << " : \n"; \ for (int i = 0; i < N; i++) { \ cerr << "["; \ for (int j = 0; j < M; ++j) \ cerr << A[i][j] << " "; \ cerr << "]\n"; \ } #define debugp(p) \ cerr << #p << " : " \ << "(" << (p).first << "," << (p).second << ")\n"; #define debugv(v) \ cerr << #v << " : " \ << "["; \ for (int i = 0; i < (v).size(); i++) \ cerr << v[i] << " "; \ cerr << "]\n"; #define debugv2(v) \ cerr << #v << " : \n"; \ for (int i = 0; i < v.size(); i++) { \ cerr << "["; \ for (int j = 0; j < (v[0].size()); ++j) \ cerr << v[i][j] << " "; \ cerr << "]\n"; \ } #define debugs(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << *itr << " "; \ cerr << "]\n"; #define debugm(m) \ cerr << #m << " : [ "; \ for (auto itr = m.begin(); itr != m.end(); itr++) \ cerr << "(" << itr->first << "," << itr->second << ") "; \ cerr << "]\n"; // look at first test case // 1:5 // 2:5 // 3:6 // 4:6 // 5:7 void solve() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll minn = min({a, b, c, d, e}); ll ans = 5 + (n - 1) / minn; cout << ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); return 0; }
[ "variable_declaration.type.change", "call.arguments.change" ]
891,827
891,825
u626618167
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define ALL(x) (x).begin(), (x).end() typedef long long ll; typedef pair<int, int> pii; const int INF = 1e9; const int MOD = 1000000007; const double PI = acos(-1); int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; void solve() { ll n; cin >> n; vector<ll> v(5); rep(i, 5) cin >> v[i]; ll mn = v[0]; rep(i, 5) mn = min(v[i], mn); if (mn == n) { cout << 5 << endl; return; } cout << n / mn + mn / mn + 4ll << endl; } int main() { solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define ALL(x) (x).begin(), (x).end() typedef long long ll; typedef pair<int, int> pii; const int INF = 1e9; const int MOD = 1000000007; const double PI = acos(-1); int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; void solve() { ll n; cin >> n; vector<ll> v(5); rep(i, 5) cin >> v[i]; ll mn = v[0]; rep(i, 5) mn = min(v[i], mn); if (mn == n) { cout << 5 << endl; return; } cout << (n + mn - 1) / mn + 4ll << endl; } int main() { solve(); return 0; }
[ "expression.operation.binary.remove" ]
891,828
891,829
u280175105
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define ALL(x) (x).begin(), (x).end() typedef long long ll; typedef pair<int, int> pii; const int INF = 1e9; const int MOD = 1000000007; const double PI = acos(-1); int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; void solve() { ll n; cin >> n; vector<ll> v(5); rep(i, 5) cin >> v[i]; ll mn = v[0]; rep(i, 5) mn = min(v[i], mn); if (mn == n) { cout << 5 << endl; return; } cout << (n + mn) / mn + 4ll << endl; } int main() { solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define ALL(x) (x).begin(), (x).end() typedef long long ll; typedef pair<int, int> pii; const int INF = 1e9; const int MOD = 1000000007; const double PI = acos(-1); int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; void solve() { ll n; cin >> n; vector<ll> v(5); rep(i, 5) cin >> v[i]; ll mn = v[0]; rep(i, 5) mn = min(v[i], mn); if (mn == n) { cout << 5 << endl; return; } cout << (n + mn - 1) / mn + 4ll << endl; } int main() { solve(); return 0; }
[ "expression.operation.binary.add" ]
891,830
891,829
u280175105
cpp
p03077
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define all(x) (x).begin(), (x).end() #define PI 3.14159265358979323846264338327950L #define NUM 1000000000000010 using namespace std; typedef long long ll; typedef long double ld; int main() { ll n, a, mini = NUM; cin >> n; rep(i, 5) { cin >> a; if (a < mini) mini = a; } ll ans; if (n % mini >= 1) ans = n / mini + 4; else ans = n / mini + 5; cout << ans << endl; }
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #define all(x) (x).begin(), (x).end() #define PI 3.14159265358979323846264338327950L #define NUM 1000000000000010 using namespace std; typedef long long ll; typedef long double ld; int main() { ll n, a, mini = NUM; cin >> n; rep(i, 5) { cin >> a; if (a < mini) mini = a; } ll ans; if (n % mini == 0) ans = n / mini + 4; else ans = n / mini + 5; cout << ans << endl; }
[]
891,835
891,836
u151236434
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { long long v, a, b, c, d, e; cin >> v >> a >> b >> c >> d >> e; long long slow = min({a, b, c, d, e}); cout << 4LL + v + slow - 1LL / slow; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long v, a, b, c, d, e; cin >> v >> a >> b >> c >> d >> e; long long slow = min({a, b, c, d, e}); cout << (v + slow - 1) / slow + 4; return 0; }
[ "io.output.change", "expression.operation.binary.remove" ]
891,837
891,838
u118058164
cpp
p03077
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { long N; vector<long> t; cin >> N; for (int i = 0; i < 5; ++i) { long k; cin >> k; t.push_back(k); } long min = *min_element(begin(t), end(t)); cout << (N / min) + 5 << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { long N; vector<long> t; cin >> N; for (int i = 0; i < 5; ++i) { long k; cin >> k; t.push_back(k); } long min = *min_element(begin(t), end(t)); cout << ((N - 1) / min) + 5 << endl; return 0; }
[]
891,844
891,845
u357724709
cpp
p03077
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using vi = vector<int>; using P = pair<int, int>; using Graph = vector<vector<int>>; template <typename T> void ndarray(vector<T> &vec, int len) { vec.resize(len); } template <typename T, typename... Args> void ndarray(vector<T> &vec, int len, Args... args) { vec.resize(len); for (auto &v : vec) ndarray(v, args...); } int main() { cin.tie(0); ios::sync_with_stdio(false); ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll res = min(a, min(b, min(c, min(d, e)))); ll time = 5 + (n / res); cout << time << "\n"; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using vi = vector<int>; using P = pair<int, int>; using Graph = vector<vector<int>>; template <typename T> void ndarray(vector<T> &vec, int len) { vec.resize(len); } template <typename T, typename... Args> void ndarray(vector<T> &vec, int len, Args... args) { vec.resize(len); for (auto &v : vec) ndarray(v, args...); } int main() { cin.tie(0); ios::sync_with_stdio(false); ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll res = min(a, min(b, min(c, min(d, e)))); ll time = 5 + ((n - 1) / res); cout << time << "\n"; return 0; }
[]
891,853
891,854
u070335689
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { int64_t N; cin >> N; int64_t memo = 10000000000000000; for (int i = 0; i < 5; i++) { int64_t memo2; cin >> memo2; memo = min(memo2, memo); } cout << 5 + N / memo << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t N; cin >> N; int64_t memo = 10000000000000000; for (int i = 0; i < 5; i++) { int64_t memo2; cin >> memo2; memo = min(memo2, memo); } cout << 5 + (N - 1) / memo << endl; }
[]
891,859
891,860
u453366189
cpp
p03077
#include <bits/stdc++.h> #define rep(i, cc, n) for (int i = cc; i <= n; ++i) using namespace std; typedef long long ll; int main() { ll N; cin >> N; vector<ll> v(5); rep(i, 0, 4) cin >> v[i]; ll min = *min_element(v.begin(), v.end()); if (N <= min) { cout << 5 << endl; return 0; } ll t = (N + 1) / min; cout << t + 4 << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, cc, n) for (int i = cc; i <= n; ++i) using namespace std; typedef long long ll; int main() { ll N; cin >> N; vector<ll> v(5); rep(i, 0, 4) cin >> v[i]; ll min = *min_element(v.begin(), v.end()); if (N <= min) { cout << 5 << endl; return 0; } ll t = (N + min - 1) / min; cout << t + 4 << endl; return 0; }
[ "assignment.change" ]
891,868
891,869
u752006685
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, n, j) for (int i = (j); i < (n); ++i) #define rrep(i, n) for (int i = (n); i >= 0; --i) #define ssort(n) sort((n).begin(), (n).end()) #define rsort(n) sort((n).begin(), (n).end(), greater<ll>()) using ll = long long; using ld = long double; typedef pair<int, int> P; #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define INF 117117117117117 int main() { ll n; vector<ll> num(5); cin >> n >> num[0] >> num[1] >> num[2] >> num[3] >> num[4]; ll min; ssort(num); min = num[0]; ll times = n / min; if (min % n != 0) { times++; } cout << times + 4 << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, n, j) for (int i = (j); i < (n); ++i) #define rrep(i, n) for (int i = (n); i >= 0; --i) #define ssort(n) sort((n).begin(), (n).end()) #define rsort(n) sort((n).begin(), (n).end(), greater<ll>()) using ll = long long; using ld = long double; typedef pair<int, int> P; #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define INF 117117117117117 int main() { ll n; vector<ll> num(5); cin >> n >> num[0] >> num[1] >> num[2] >> num[3] >> num[4]; ll min; ssort(num); min = num[0]; ll times = n / min; if (n % min != 0) { times++; } cout << times + 4 << endl; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
891,870
891,871
u149757670
cpp
p03077
#include <bits/stdc++.h> #include <unistd.h> #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define pb push_back #define dame \ { \ puts("-1"); \ return 0; \ } #define show(x) cerr << #x << " = " << x << endl; using namespace std; using ll = long long; using ld = long double; using pl = pair<ll, ll>; ll LINF = 1000000000000000000; typedef vector<ll> vl; typedef vector<pl> vp; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } struct edge { ll to, cost; }; struct dijkstra { ll V; vector<vector<edge>> G; vector<ll> d; dijkstra(ll n) { init(n); } void init(ll n) { V = n; G.resize(V); d.resize(V); rep(i, V) { d[i] = LINF; } } void add_edge(ll s, ll t, ll cost) { edge e; e.to = t, e.cost = cost; G[s].push_back(e); } void run(ll s) { rep(i, V) { d[i] = LINF; } d[s] = 0; priority_queue<pl, vector<pl>, greater<pl>> que; que.push(pl(0, s)); while (!que.empty()) { pl p = que.top(); que.pop(); ll v = p.second; if (d[v] < p.first) continue; for (auto e : G[v]) { if (d[e.to] > d[v] + e.cost) { d[e.to] = d[v] + e.cost; que.push(pl(d[e.to], e.to)); } } } } }; // auto mod int // https://youtu.be/L8grWxBlIZ4?t=9858 // https://youtu.be/ERZuLAxZffQ?t=4807 : optimize // https://youtu.be/8uowVvQ_-Mo?t=1329 : division const ll mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint operator-() const { return mint(-x); } mint &operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint &operator-=(const mint a) { if ((x += mod - a.x) >= mod) x -= mod; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { return mint(*this) += a; } mint operator-(const mint a) const { return mint(*this) -= a; } mint operator*(const mint a) const { return mint(*this) *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(mod - 2); } mint &operator/=(const mint a) { return *this *= a.inv(); } mint operator/(const mint a) const { return mint(*this) /= a; } }; istream &operator>>(istream &is, const mint &a) { return is >> a.x; } ostream &operator<<(ostream &os, const mint &a) { return os << a.x; } // combination mod prime // https://www.youtube.com/watch?v=8uowVvQ_-Mo&feature=youtu.be&t=1619 struct combination { vector<mint> fact, ifact; combination(int n) : fact(n + 1), ifact(n + 1) { assert(n < mod); fact[0] = 1; for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i; ifact[n] = fact[n].inv(); for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i; } mint operator()(int n, int k) { if (k < 0 || k > n) return 0; return fact[n] * ifact[k] * ifact[n - k]; } } c(200005); // Sieve of Eratosthenes // https://youtu.be/UTVg7wzMWQc?t=2774 struct Sieve { int n; vector<int> f, primes; Sieve(int n = 1) : n(n), f(n + 1) { f[0] = f[1] = -1; for (ll i = 2; i <= n; ++i) { if (f[i]) continue; primes.push_back(i); f[i] = i; for (ll j = i * i; j <= n; j += i) { if (!f[j]) f[j] = i; } } } bool isPrime(int x) { return f[x] == x; } vector<int> factorList(int x) { vector<int> res; while (x != 1) { res.push_back(f[x]); x /= f[x]; } return res; } vector<pl> factor(int x) { vector<int> fl = factorList(x); if (fl.size() == 0) return {}; vector<pl> res(1, pl(fl[0], 0)); for (int p : fl) { if (res.back().first == p) { res.back().second++; } else { res.emplace_back(p, 1); } } return res; } vector<pair<ll, int>> factor(ll x) { vector<pair<ll, int>> res; for (int p : primes) { int y = 0; while (x % p == 0) x /= p, ++y; if (y != 0) res.emplace_back(p, y); } if (x != 1) res.emplace_back(x, 1); return res; } }; using data = pair<ll, vector<ll>>; vector<ll> v; void fff(ll n) { if (n == 0) return; if (n == 4) { cout << 3 << endl; cout << 1 << endl; return; } rep(i, 10000) { if (i * (i + 1) / 2 >= n) { cout << i << endl; n -= (i); break; } } fff(n); } int main() { ll n; cin >> n; vector<ll> A(5); rep(i, 5) cin >> A[i]; ll bn = 10; ll idx = 5; rrep(i, 5) if (bn > A[i]) { idx = i; bn = A[i]; } ll ans = 0; if (A[idx] >= n) ans = 5; else { ans = (n + A[idx] - 1) / A[idx] + 4; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #include <unistd.h> #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n)-1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define pb push_back #define dame \ { \ puts("-1"); \ return 0; \ } #define show(x) cerr << #x << " = " << x << endl; using namespace std; using ll = long long; using ld = long double; using pl = pair<ll, ll>; ll LINF = 1000000000000000000; typedef vector<ll> vl; typedef vector<pl> vp; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } struct edge { ll to, cost; }; struct dijkstra { ll V; vector<vector<edge>> G; vector<ll> d; dijkstra(ll n) { init(n); } void init(ll n) { V = n; G.resize(V); d.resize(V); rep(i, V) { d[i] = LINF; } } void add_edge(ll s, ll t, ll cost) { edge e; e.to = t, e.cost = cost; G[s].push_back(e); } void run(ll s) { rep(i, V) { d[i] = LINF; } d[s] = 0; priority_queue<pl, vector<pl>, greater<pl>> que; que.push(pl(0, s)); while (!que.empty()) { pl p = que.top(); que.pop(); ll v = p.second; if (d[v] < p.first) continue; for (auto e : G[v]) { if (d[e.to] > d[v] + e.cost) { d[e.to] = d[v] + e.cost; que.push(pl(d[e.to], e.to)); } } } } }; // auto mod int // https://youtu.be/L8grWxBlIZ4?t=9858 // https://youtu.be/ERZuLAxZffQ?t=4807 : optimize // https://youtu.be/8uowVvQ_-Mo?t=1329 : division const ll mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint operator-() const { return mint(-x); } mint &operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint &operator-=(const mint a) { if ((x += mod - a.x) >= mod) x -= mod; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { return mint(*this) += a; } mint operator-(const mint a) const { return mint(*this) -= a; } mint operator*(const mint a) const { return mint(*this) *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(mod - 2); } mint &operator/=(const mint a) { return *this *= a.inv(); } mint operator/(const mint a) const { return mint(*this) /= a; } }; istream &operator>>(istream &is, const mint &a) { return is >> a.x; } ostream &operator<<(ostream &os, const mint &a) { return os << a.x; } // combination mod prime // https://www.youtube.com/watch?v=8uowVvQ_-Mo&feature=youtu.be&t=1619 struct combination { vector<mint> fact, ifact; combination(int n) : fact(n + 1), ifact(n + 1) { assert(n < mod); fact[0] = 1; for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i; ifact[n] = fact[n].inv(); for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i; } mint operator()(int n, int k) { if (k < 0 || k > n) return 0; return fact[n] * ifact[k] * ifact[n - k]; } } c(200005); // Sieve of Eratosthenes // https://youtu.be/UTVg7wzMWQc?t=2774 struct Sieve { int n; vector<int> f, primes; Sieve(int n = 1) : n(n), f(n + 1) { f[0] = f[1] = -1; for (ll i = 2; i <= n; ++i) { if (f[i]) continue; primes.push_back(i); f[i] = i; for (ll j = i * i; j <= n; j += i) { if (!f[j]) f[j] = i; } } } bool isPrime(int x) { return f[x] == x; } vector<int> factorList(int x) { vector<int> res; while (x != 1) { res.push_back(f[x]); x /= f[x]; } return res; } vector<pl> factor(int x) { vector<int> fl = factorList(x); if (fl.size() == 0) return {}; vector<pl> res(1, pl(fl[0], 0)); for (int p : fl) { if (res.back().first == p) { res.back().second++; } else { res.emplace_back(p, 1); } } return res; } vector<pair<ll, int>> factor(ll x) { vector<pair<ll, int>> res; for (int p : primes) { int y = 0; while (x % p == 0) x /= p, ++y; if (y != 0) res.emplace_back(p, y); } if (x != 1) res.emplace_back(x, 1); return res; } }; using data = pair<ll, vector<ll>>; vector<ll> v; void fff(ll n) { if (n == 0) return; if (n == 4) { cout << 3 << endl; cout << 1 << endl; return; } rep(i, 10000) { if (i * (i + 1) / 2 >= n) { cout << i << endl; n -= (i); break; } } fff(n); } int main() { ll n; cin >> n; vector<ll> A(5); rep(i, 5) cin >> A[i]; ll bn = LINF; ll idx = 5; rrep(i, 5) if (bn > A[i]) { idx = i; bn = A[i]; } ll ans = 0; if (A[idx] >= n) ans = 5; else { ans = (n + A[idx] - 1) / A[idx] + 4; } cout << ans << endl; return 0; }
[ "variable_declaration.value.change", "identifier.replace.add", "literal.replace.remove" ]
891,876
891,877
u442810826
cpp
p03077
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--) #define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++) #define repit(itr, x) for (auto itr = x.begin(); itr != x.end(); itr++) #define rrepit(ritr, x) for (auto ritr = x.rbegin(); ritr != x.rend(); ritr++) #define ALL(n) begin(n), end(n) using ll = long long; using namespace std; int main() { ll n; cin >> n; ll a, b, c, d, e; cin >> a >> b >> c >> d >> e; ll mn = min({a, b, c, d, e}); ll ans = (n + 1 - mn) / mn; ans += 5; cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--) #define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++) #define repit(itr, x) for (auto itr = x.begin(); itr != x.end(); itr++) #define rrepit(ritr, x) for (auto ritr = x.rbegin(); ritr != x.rend(); ritr++) #define ALL(n) begin(n), end(n) using ll = long long; using namespace std; int main() { ll n; cin >> n; ll a, b, c, d, e; cin >> a >> b >> c >> d >> e; ll mn = min({a, b, c, d, e}); ll ans = (n - 1 + mn) / mn; ans += 4; cout << ans << endl; return 0; }
[ "expression.operation.binary.remove", "literal.number.change", "assignment.value.change" ]
891,878
891,879
u617826263
cpp
p03077
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; int main() { long long n; cin >> n; long long *a = new long long[5]; for (int i = 0; i < 5; i++) cin >> a[i]; long long min = n; for (int i = 0; i < 4; i++) { if (min > a[i]) { min = a[i]; } } long long k = ceill((long double)n / (long double)min); if (min == n) { cout << "5" << endl; } else { cout << 5 + k - 1 << endl; } return 0; }
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; int main() { long long n; cin >> n; long long *a = new long long[5]; for (int i = 0; i < 5; i++) cin >> a[i]; long long min = n; for (int i = 0; i < 5; i++) { if (min > a[i]) { min = a[i]; } } long long k = (long long)ceill((long double)n / (long double)min); if (min == n) { cout << "5" << endl; } else { cout << 5 + k - 1 << endl; } return 0; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
891,882
891,883
u712993629
cpp
p03077
#include <bits/stdc++.h> using namespace std; typedef long long llint; typedef long double ld; #define inf 1e18 #define mod 1000000007 #define sort(v) sort(v.begin(), v.end()) #define reverse(v) reverse(v.begin(), v.end()) priority_queue<llint, vector<llint>, greater<llint>> que; priority_queue<llint> Que; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } void solve() { llint n; vector<llint> a(5, 0); cin >> n; for (int i = 0; i < 5; i++) cin >> a[i]; llint t = a[0]; for (int i = 1; i < 5; i++) t = min(a[i], t); llint ans = (n + t) / t; if (n % t == 0) ans = n / t + 4; cout << ans + 4 << endl; } int main() { solve(); return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long llint; typedef long double ld; #define inf 1e18 #define mod 1000000007 #define sort(v) sort(v.begin(), v.end()) #define reverse(v) reverse(v.begin(), v.end()) priority_queue<llint, vector<llint>, greater<llint>> que; priority_queue<llint> Que; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } void solve() { llint n; vector<llint> a(5, 0); cin >> n; for (int i = 0; i < 5; i++) cin >> a[i]; llint t = a[0]; for (int i = 1; i < 5; i++) t = min(a[i], t); llint ans = (n + t) / t; if (n % t == 0) ans = n / t; cout << ans + 4 << endl; } int main() { solve(); return 0; }
[ "expression.operation.binary.remove" ]
891,884
891,885
u332253305
cpp
p03077
// // main.cpp // AC // // Created by makinofuya on 2019/07/08. // Copyright © 2019 makinofuya. All rights reserved. // #include <algorithm> #include <iostream> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; #define mod 1000000007 #define rep(i, n) for (ll i = 0; i < n; i++) #define out(s) cout << s << endl int main() { ll n; cin >> n; vector<ll> v(5); rep(i, 5) { cin >> v[i]; } ll m = *min_element(v.begin(), v.end()); ll time = n / m + 5; out(time); return 0; }
// // main.cpp // AC // // Created by makinofuya on 2019/07/08. // Copyright © 2019 makinofuya. All rights reserved. // #include <algorithm> #include <iostream> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; #define mod 1000000007 #define rep(i, n) for (ll i = 0; i < n; i++) #define out(s) cout << s << endl int main() { ll n; cin >> n; vector<ll> v(5); rep(i, 5) { cin >> v[i]; } ll m = *min_element(v.begin(), v.end()); ll time = (n - 1) / m + 5; out(time); return 0; }
[]
891,886
891,887
u332253305
cpp
p03077
#include <bits/stdc++.h> using namespace std; constexpr long long MOD = 1000000007; using ll = long long; int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; cout << (n + min({a, b, c, d, e}) - 1 / min({a, b, c, d, e})) + 4 << endl; }
#include <bits/stdc++.h> using namespace std; constexpr long long MOD = 1000000007; using ll = long long; int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; cout << (n + min({a, b, c, d, e}) - 1) / min({a, b, c, d, e}) + 4 << endl; }
[]
891,892
891,893
u371051907
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { // long long num; long long a, b, c, d, e; long long numA = 0; long long numB = 0; long long numC = 0; long long numD = 0; long long numE = 0; long long cnt = 0; long long Min; cin >> num >> a >> b >> c >> d >> e; numA = num; Min = min(min(min(min(a, b), c), d), e); cnt = (num + Min) / Min + 4; cout << cnt; }
#include <bits/stdc++.h> using namespace std; int main() { // long long num; long long a, b, c, d, e; long long numA = 0; long long numB = 0; long long numC = 0; long long numD = 0; long long numE = 0; long long cnt = 0; long long Min; cin >> num >> a >> b >> c >> d >> e; numA = num; Min = min(min(min(min(a, b), c), d), e); cnt = (num + Min - 1) / Min + 4; cout << cnt; }
[ "assignment.change" ]
891,906
891,907
u367131219
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { int64_t N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; int64_t F = min(A, min(B, min(C, min(D, min(E, F))))); if (N % F == 0) { cout << N / F + 4 << endl; } else { cout << N / F + 5 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; int64_t F = min(A, min(B, min(C, min(D, E)))); if (N % F == 0) { cout << N / F + 4 << endl; } else { cout << N / F + 5 << endl; } return 0; }
[ "call.remove", "call.arguments.change" ]
891,916
891,917
u124187388
cpp
p03077
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; typedef pair<ll, P> PP; static const double EPS = 1e-8; static const double PI = 4.0 * atan(1.0); static const ll INF = 1023456789; #define REP(i, n) for (int i = 0; i < n; ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, s, n) for (int i = s; i < n; ++i) #define FORR(i, s, n) for (int i = n - 1; i >= s; --i) #define ALL(c) (c).begin(), (c).end() #define CLEAR(v) memset(v, 0, sizeof(v)) #define MP(a, b) make_pair((a), (b)) #define ABS(a) ((a) > 0 ? (a) : -(a)) #define F first #define S second ll n, a[5]; int main(int argc, char **argv) { cin >> n; REP(i, 5) cin >> a[i]; ll res = 0; REP(i, 5) res = max(res + 1, i + (n + a[i]) / a[i]); cout << res << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; typedef pair<ll, P> PP; static const double EPS = 1e-8; static const double PI = 4.0 * atan(1.0); static const ll INF = 1023456789; #define REP(i, n) for (int i = 0; i < n; ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, s, n) for (int i = s; i < n; ++i) #define FORR(i, s, n) for (int i = n - 1; i >= s; --i) #define ALL(c) (c).begin(), (c).end() #define CLEAR(v) memset(v, 0, sizeof(v)) #define MP(a, b) make_pair((a), (b)) #define ABS(a) ((a) > 0 ? (a) : -(a)) #define F first #define S second ll n, a[5]; int main(int argc, char **argv) { cin >> n; REP(i, 5) cin >> a[i]; ll res = 0; REP(i, 5) res = max(res + 1, i + (n + a[i] - 1) / a[i]); cout << res << endl; return 0; }
[ "assignment.change" ]
891,918
891,919
u900485130
cpp
p03077
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define FOR(i, a, n) for (ll i = a; i < (ll)(n); i++) int main() { ll N; cin >> N; ll min = 10e15; rep(i, 5) { ll x; cin >> x; min = std::min(x, min); } cout << ceil(N / (double)min) + 4 << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define FOR(i, a, n) for (ll i = a; i < (ll)(n); i++) int main() { ll N; cin >> N; ll min = 10e15; rep(i, 5) { ll x; cin >> x; min = std::min(x, min); } cout << (ll)ceil(N / (double)min) + 4 << endl; }
[ "type_conversion.add" ]
891,920
891,921
u526365587
cpp
p03077
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <sstream> #include <string> #include <vector> const int64_t cc = pow(10, 9) + 7; int main() { int64_t a, b, c, d; std::cin >> a; c = 5; d = 0; for (int i = 0; i < 5; i++) { std::cin >> b; if (d == 0 || b < d) { d = b; } } c += a / d; std::cout << c; }
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <sstream> #include <string> #include <vector> const int64_t cc = pow(10, 9) + 7; int main() { int64_t a, b, c, d; std::cin >> a; c = 5; d = 0; for (int i = 0; i < 5; i++) { std::cin >> b; if (d == 0 || b < d) { d = b; } } c += (a - 1) / d; std::cout << c; }
[]
891,942
891,943
u184115330
cpp
p03077
#include <bits/stdc++.h> using ll = long long; using namespace std; ll n, a[5]; int main() { cin >> n; for (int i = 0; i < 5; ++i) cin >> a[i]; ll mi = (ll)1e15; for (int i = 0; i < 4; ++i) mi = min(mi, a[i]); cout << (ll)ceil(1.0 * n / mi) + 4 << endl; }
#include <bits/stdc++.h> using ll = long long; using namespace std; ll n, a[5]; int main() { cin >> n; for (int i = 0; i < 5; ++i) cin >> a[i]; ll mi = (ll)1e15; for (int i = 0; i < 5; ++i) mi = min(mi, a[i]); cout << (ll)ceil(1.0 * n / mi) + 4 << endl; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
891,946
891,947
u694951525
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; vector<long long int> capacity(5); for (int i = 0; i < 5; i++) { cin >> capacity[i]; } sort(capacity.begin(), capacity.end()); cout << n / capacity[0] + 5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; vector<long long int> capacity(5); for (int i = 0; i < 5; i++) { cin >> capacity[i]; } sort(capacity.begin(), capacity.end()); cout << (n - 1) / capacity[0] + 5 << endl; return 0; }
[]
891,950
891,951
u180716041
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; vector<int> capacity(5); for (int i = 0; i < 5; i++) { cin >> capacity[i]; } sort(capacity.begin(), capacity.end()); cout << n / capacity[0] + 5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; vector<long long int> capacity(5); for (int i = 0; i < 5; i++) { cin >> capacity[i]; } sort(capacity.begin(), capacity.end()); cout << (n - 1) / capacity[0] + 5 << endl; return 0; }
[ "variable_declaration.type.widen.change" ]
891,952
891,951
u180716041
cpp
p03077
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll K = 1000000007; int Kuriage(ll a, ll b) { if (a % b) { return a / b + 1; } else { return a / b; } } int main() { ll N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; ll O, P, Q, R, S, T; O = Kuriage(N, A); P = Kuriage(N, B); Q = Kuriage(N, C); R = Kuriage(N, D); S = Kuriage(N, E); ll MaxA = max(O, P); ll MaxB = max(Q, R); MaxA = max(MaxA, S); MaxA = max(MaxA, MaxB); cout << MaxA + 4; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll K = 1000000007; ll Kuriage(ll a, ll b) { if (a % b) { return a / b + 1; } else { return a / b; } } int main() { ll N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; ll O, P, Q, R, S, T; O = Kuriage(N, A); P = Kuriage(N, B); Q = Kuriage(N, C); R = Kuriage(N, D); S = Kuriage(N, E); ll MaxA = max(O, P); ll MaxB = max(Q, R); MaxA = max(MaxA, S); MaxA = max(MaxA, MaxB); cout << MaxA + 4; }
[]
891,958
891,959
u196629968
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long long minmove = min({a, b, c, d, e}); int ans = (n + minmove - 1) / minmove + 4; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; long long minmove = min({a, b, c, d, e}); long long ans = (n + minmove - 1) / minmove + 4; cout << ans << endl; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
891,965
891,966
u880909682
cpp
p03077
#include <iostream> using namespace std; #include <algorithm> #include <bits/stdc++.h> #include <math.h> #include <stdio.h> #include <string> #include <utility> #include <vector> int main() { long long int N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; long long int p[6]; for (int i = 0; i < 6; ++i) { p[i] = 0; } long long int t[5]; t[0] = A; t[1] = B; t[2] = C; t[3] = D; t[4] = E; p[1] = N; long long int num = 0; long long int para_min; long long int r[5]; long long int tmp = 0; long long int right = 0; sort(t, t + 5); num = ceil(N - 1 / t[0]) + 5; cout << num; }
#include <iostream> using namespace std; #include <algorithm> #include <bits/stdc++.h> #include <math.h> #include <stdio.h> #include <string> #include <utility> #include <vector> int main() { long long int N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; long long int p[6]; for (int i = 0; i < 6; ++i) { p[i] = 0; } long long int t[5]; t[0] = A; t[1] = B; t[2] = C; t[3] = D; t[4] = E; p[1] = N; long long int num = 0; long long int para_min; long long int r[5]; long long int tmp = 0; long long int right = 0; sort(t, t + 5); num = ceil((N - 1) / t[0]) + 5; cout << num; }
[ "call.arguments.change" ]
891,973
891,974
u266763028
cpp
p03077
#include <iostream> using namespace std; #include <algorithm> #include <bits/stdc++.h> #include <math.h> #include <stdio.h> #include <string> #include <utility> #include <vector> int main() { long long int N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; long long int p[6]; for (int i = 0; i < 6; ++i) { p[i] = 0; } long long int t[5]; t[0] = A; t[1] = B; t[2] = C; t[3] = D; t[4] = E; p[1] = N; long long int num = 0; long long int para_min; long long int r[5]; long long int tmp = 0; long long int right = 0; sort(t, t + 5); num = ceil(N / t[0]) + 5; cout << num; }
#include <iostream> using namespace std; #include <algorithm> #include <bits/stdc++.h> #include <math.h> #include <stdio.h> #include <string> #include <utility> #include <vector> int main() { long long int N, A, B, C, D, E; cin >> N >> A >> B >> C >> D >> E; long long int p[6]; for (int i = 0; i < 6; ++i) { p[i] = 0; } long long int t[5]; t[0] = A; t[1] = B; t[2] = C; t[3] = D; t[4] = E; p[1] = N; long long int num = 0; long long int para_min; long long int r[5]; long long int tmp = 0; long long int right = 0; sort(t, t + 5); num = ceil((N - 1) / t[0]) + 5; cout << num; }
[ "call.arguments.change" ]
891,975
891,974
u266763028
cpp
p03077
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #define _USE_MATH_DEFINES #include <functional> #include <math.h> using namespace std; #define rep(i, x) for (int i = 0; i < x; i++) #define repn(i, x) for (int i = 1; i <= x; i++) typedef long long ll; const ll INF = 1e17; const ll MOD = 1000000007; const ll MAX = 1000000; ll max(ll a, ll b) { if (a > b) { return a; } return b; } ll min(ll a, ll b) { if (a > b) { return b; } return a; } /////////////////////////// int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll m = min(a, min(b, min(a, min(d, e)))); cout << 4 + (n + m - 1) / m; system("PAUSE"); }
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #define _USE_MATH_DEFINES #include <functional> #include <math.h> using namespace std; #define rep(i, x) for (int i = 0; i < x; i++) #define repn(i, x) for (int i = 1; i <= x; i++) typedef long long ll; const ll INF = 1e17; const ll MOD = 1000000007; const ll MAX = 1000000; ll max(ll a, ll b) { if (a > b) { return a; } return b; } ll min(ll a, ll b) { if (a > b) { return b; } return a; } /////////////////////////// int main() { ll n, a, b, c, d, e; cin >> n >> a >> b >> c >> d >> e; ll m = min(a, min(b, min(c, min(d, e)))); cout << 4 + (n + m - 1) / m; system("PAUSE"); }
[ "identifier.change", "call.arguments.change" ]
891,976
891,977
u004411048
cpp
p03077
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, hoge[5], neck, ans; cin >> n; for (int i = 0; i < 5; i++) { cin >> hoge[i]; } neck = 10000000000000001; for (int i = 0; i < 5; i++) { neck = min(neck, hoge[i]); } ans = 5 + n / neck; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, hoge[5], neck, ans; cin >> n; for (int i = 0; i < 5; i++) { cin >> hoge[i]; } neck = 10000000000000001; for (int i = 0; i < 5; i++) { neck = min(neck, hoge[i]); } ans = 5 + (n - 1) / neck; cout << ans << endl; }
[]
891,994
891,995
u364916333
cpp
p03077
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, hoge[5], neck, ans; cin >> n; for (int i = 0; i < 5; i++) { cin >> hoge[i]; } neck = 1000000000000001; for (int i = 0; i < 5; i++) { neck = min(neck, hoge[i]); } ans = 5 + n / neck; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, hoge[5], neck, ans; cin >> n; for (int i = 0; i < 5; i++) { cin >> hoge[i]; } neck = 10000000000000001; for (int i = 0; i < 5; i++) { neck = min(neck, hoge[i]); } ans = 5 + (n - 1) / neck; cout << ans << endl; }
[ "literal.number.change", "assignment.value.change" ]
891,996
891,995
u364916333
cpp
p03077
#include <iostream> int main() { long n, a, t; std::cin >> n >> a; while (std::cin >> t) { a = (t < a ? t : a); } std::cout << n / a + 5 << "\n"; }
#include <iostream> int main() { long n, a, t; std::cin >> n >> a; while (std::cin >> t) { a = (t < a ? t : a); } std::cout << (n - 1) / a + 5 << "\n"; }
[]
892,016
892,017
u854175276
cpp
p03077
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { ll N; cin >> N; vector<ll> A(5); rep(i, 5) cin >> A.at(i); ll ans = 10e16; rep(i, 5) ans = min(ans, A.at(i)); if (ans % N == 0) cout << (ll)5 + N / ans - 1 << endl; else cout << (ll)5 + N / ans << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { ll N; cin >> N; vector<ll> A(5); rep(i, 5) cin >> A.at(i); ll ans = 10e16; rep(i, 5) ans = min(ans, A.at(i)); if (N % ans == 0) cout << (ll)5 + N / ans - 1 << endl; else cout << (ll)5 + N / ans << endl; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
892,018
892,019
u854161810
cpp
p03077
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; using vi = vector<int>; using vii = vector<vi>; using vs = vector<string>; using pii = pair<int, int>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, m, n) for (int i = m; i < n; i++) #define vsort(v) sort(v.begin(), v.end()) #define rv(v) reverse(v.begin(), v.end()) #define ll long long #define PI 3.141592653589793 using vll = vector<ll>; using Graph = vii; const ll MOD = 1e9 + 7; int main() { ll n; cin >> n; vll p(5); rep(i, 5) { cin >> p[i]; } ll bn = p[0]; rep(i, 5) { if (p[i] < bn) { bn = p[i]; } } ll ans = 5 + n / bn; if (n % bn != 0) ans++; cout << ans << endl; }
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; using vi = vector<int>; using vii = vector<vi>; using vs = vector<string>; using pii = pair<int, int>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, m, n) for (int i = m; i < n; i++) #define vsort(v) sort(v.begin(), v.end()) #define rv(v) reverse(v.begin(), v.end()) #define ll long long #define PI 3.141592653589793 using vll = vector<ll>; using Graph = vii; const ll MOD = 1e9 + 7; int main() { ll n; cin >> n; vll p(5); rep(i, 5) { cin >> p[i]; } ll bn = p[0]; rep(i, 5) { if (p[i] < bn) { bn = p[i]; } } ll ans = 4 + n / bn; if (n % bn != 0) ans++; cout << ans << endl; }
[ "literal.number.change", "expression.operation.binary.change" ]
892,020
892,021
u654115433
cpp
p03077
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll num[5]; for (int i = 0; i < 5; i++) cin >> num[i]; sort(num, num + 5); cout << n / num[0] + 5 << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll num[5]; for (int i = 0; i < 5; i++) cin >> num[i]; sort(num, num + 5); cout << (n - 1) / num[0] + 5 << endl; }
[]
892,028
892,029
u351265848
cpp
p03077
#include <bits/stdc++.h> using namespace std; int main() { long long n, ans = 0, mi = 1e15; cin >> n; for (int i = 0; i < 5; i++) { long long tmp; cin >> tmp; mi = min(mi, tmp); } cout << n / mi + 5; }
#include <bits/stdc++.h> using namespace std; int main() { long long n, ans = 0, mi = 1e15; cin >> n; for (int i = 0; i < 5; i++) { long long tmp; cin >> tmp; mi = min(mi, tmp); } cout << (n - 1) / mi + 5; }
[]
892,034
892,035
u082801599
cpp
p03077
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define vi vector<ll> #define pp pair<ll, ll> #define mp make_pair #define all(v) v.begin(), v.end() #define pb push_back #define FOR(i, a, b) for (i = a; i < b; i++) #define FREV(i, a, b) for (i = a; i >= b; i--) #define DEBUG(x) \ cerr << "In file " << __FILE__ << " at line " << __LINE__ << " :: " << #x \ << " = " << x << endl #define S(n) scanf("%lld", &n) using namespace std; int main() { ull n; vector<ull> city(5); cin >> n >> city[0] >> city[1] >> city[2] >> city[3] >> city[4]; ull bottle_neck = *min_element(all(city)); ull ans = 5 + n / bottle_neck; cout << ans; return 0; }
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define vi vector<ll> #define pp pair<ll, ll> #define mp make_pair #define all(v) v.begin(), v.end() #define pb push_back #define FOR(i, a, b) for (i = a; i < b; i++) #define FREV(i, a, b) for (i = a; i >= b; i--) #define DEBUG(x) \ cerr << "In file " << __FILE__ << " at line " << __LINE__ << " :: " << #x \ << " = " << x << endl #define S(n) scanf("%lld", &n) using namespace std; int main() { ull n; vector<ull> city(5); cin >> n >> city[0] >> city[1] >> city[2] >> city[3] >> city[4]; ull bottle_neck = *min_element(all(city)); ull ans = 5 + (n - 1) / bottle_neck; cout << ans; return 0; }
[]
892,036
892,037
u500006160
cpp
p03077
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 int main() { ll n, MIN = 1000000000000010; cin >> n; for (int i = 0; i < 5; i++) { ll z; cin >> z; MIN = min(MIN, z); } cout << n / MIN + 5; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL << 62 #define inf 1000000007 int main() { ll n, MIN = INF; cin >> n; for (int i = 0; i < 5; i++) { ll z; cin >> z; MIN = min(MIN, z); } cout << (n - 1) / MIN + 5; }
[ "variable_declaration.value.change", "identifier.replace.add", "literal.replace.remove" ]
892,042
892,043
u166378830
cpp