# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
948896 | andrei_marciuc | Prosjek (COCI18_prosjek) | C++14 | 1 ms | 408 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |