#include "bits/stdc++.h"
using namespace std;
signed main () {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n, k, cnt = 0;
cin >> n >> k;
vector <int> a;
for(int i = 0; i < n; i ++) {
int x;
cin >> x;
a.push_back(x);
cnt += (1 << x);
}
int need = (1 << 30) - cnt;
cnt = 0;
while(need > 1) {
cnt ++;
need /= 2;
}
int f = -1;
for(auto i : a) {
cout << i << " ";
if(i == cnt + 1 && f == -1) {
f = 1;
cout << cnt << " ";
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
85 ms |
7660 KB |
not a zalsequence |
2 |
Incorrect |
86 ms |
7660 KB |
not a zalsequence |
3 |
Incorrect |
85 ms |
7948 KB |
not a zalsequence |
4 |
Incorrect |
87 ms |
7940 KB |
not a zalsequence |
5 |
Incorrect |
94 ms |
8304 KB |
not a zalsequence |
6 |
Incorrect |
86 ms |
7952 KB |
not a zalsequence |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
86 ms |
7612 KB |
Unexpected end of file - int32 expected |
2 |
Incorrect |
86 ms |
7616 KB |
Unexpected end of file - int32 expected |
3 |
Incorrect |
85 ms |
7968 KB |
Unexpected end of file - int32 expected |
4 |
Incorrect |
87 ms |
8216 KB |
Unexpected end of file - int32 expected |
5 |
Incorrect |
86 ms |
8124 KB |
Unexpected end of file - int32 expected |
6 |
Incorrect |
94 ms |
7648 KB |
Unexpected end of file - int32 expected |
7 |
Incorrect |
87 ms |
8128 KB |
Unexpected end of file - int32 expected |
8 |
Incorrect |
111 ms |
8132 KB |
Unexpected end of file - int32 expected |
9 |
Incorrect |
77 ms |
6668 KB |
Unexpected end of file - int32 expected |
10 |
Incorrect |
27 ms |
3284 KB |
Unexpected end of file - int32 expected |
11 |
Incorrect |
44 ms |
4300 KB |
Unexpected end of file - int32 expected |
12 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |
13 |
Incorrect |
1 ms |
348 KB |
Unexpected end of file - int32 expected |
14 |
Incorrect |
0 ms |
344 KB |
Unexpected end of file - int32 expected |