# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
835260 | 2023-08-23T11:18:22 Z | EntityPlantt | Prosjek (COCI18_prosjek) | C++14 | 0 ms | 284 KB |
#include <cstdio> short n, a[5], i; double r; int main() { scanf("%hd", &n); while (n--) { scanf("%hd", &i); a[--i]++; } for (i = 0; !a[i]; i++); r = ++i; while (true) { while (i < 5 && !a[i]) i++; if (i > 4) break; r = (r + i + 1) / 2.0; a[i]--; } printf("%lf", r); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 280 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 284 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |