# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72401 | 2018-08-26T07:45:13 Z | https://blog.naver.com/nywoo19(#2158, HawkBreaker, njchung99, yu0524) | Nectar with Coconut Jelly (FXCUP3_nectar) | C++17 | 50 ms | 704 KB |
#include<cstdio> #include<algorithm> #define ll long long using namespace std; ll a[1001]; ll q, w, e, r; int main() { scanf("%lld %lld %lld %lld", &q, &w, &e, &r); for (int i = 1; i <= q; i++) a[i] = w; for (int i = 0; i < r; i++) { for (int y = q; y >= 1; y--) { ll t = a[y - 1] / e; if (a[y - 1] % e) t++; a[y] += t; a[y - 1] -= t; } } for (int i = 1; i <=q; i++) printf("%lld\n", a[i]); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Output is correct |
2 | Correct | 4 ms | 356 KB | Output is correct |
3 | Correct | 2 ms | 356 KB | Output is correct |
4 | Correct | 2 ms | 412 KB | Output is correct |
5 | Correct | 2 ms | 488 KB | Output is correct |
6 | Correct | 3 ms | 488 KB | Output is correct |
7 | Correct | 25 ms | 544 KB | Output is correct |
8 | Correct | 44 ms | 544 KB | Output is correct |
9 | Correct | 50 ms | 560 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Output is correct |
2 | Correct | 4 ms | 356 KB | Output is correct |
3 | Correct | 2 ms | 356 KB | Output is correct |
4 | Correct | 2 ms | 412 KB | Output is correct |
5 | Correct | 2 ms | 488 KB | Output is correct |
6 | Correct | 3 ms | 488 KB | Output is correct |
7 | Correct | 25 ms | 544 KB | Output is correct |
8 | Correct | 44 ms | 544 KB | Output is correct |
9 | Correct | 50 ms | 560 KB | Output is correct |
10 | Runtime error | 2 ms | 704 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
11 | Halted | 0 ms | 0 KB | - |