# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
64056 | 2018-08-03T09:08:39 Z | Just_Solve_The_Problem | Zalmoxis (BOI18_zalmoxis) | C++11 | 239 ms | 10528 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = (int)1e6 + 7; const int inf = (int)1e9 + 7; int n, k; ll a[N]; map < ll, int > cnt; main() { scanf("%d %d", &n, &k); if (k != 1) { return 0; } ll mn = (ll)1e18; for (int i = 1; i <= n; i++) { scanf("%lld", &a[i]); mn = min(mn, a[i]); cnt[a[i]]++; } ll cur = -1; while (1) { if (cnt[mn] & 1) { cur = mn; break; } cnt[mn + 1] += cnt[mn] / 2; cnt[mn] = 0; mn++; } for (int i = 1; i <= n; i++) { if (a[i] <= cur) { if (cur != -1) { printf("%lld ", cur); cur = -1; } } printf("%lld ", a[i]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 197 ms | 10196 KB | not a zalsequence |
2 | Incorrect | 220 ms | 10224 KB | not a zalsequence |
3 | Incorrect | 238 ms | 10444 KB | not a zalsequence |
4 | Incorrect | 206 ms | 10444 KB | not a zalsequence |
5 | Incorrect | 239 ms | 10528 KB | not a zalsequence |
6 | Incorrect | 200 ms | 10528 KB | not a zalsequence |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
2 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
3 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
4 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
5 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
6 | Incorrect | 3 ms | 10528 KB | Unexpected end of file - int32 expected |
7 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
8 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
9 | Incorrect | 3 ms | 10528 KB | Unexpected end of file - int32 expected |
10 | Incorrect | 3 ms | 10528 KB | Unexpected end of file - int32 expected |
11 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
12 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
13 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |
14 | Incorrect | 2 ms | 10528 KB | Unexpected end of file - int32 expected |