#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;
}
for(auto i : a) {
cout << i << " ";
if(i == cnt + 1) cout << cnt << " ";
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
86 ms |
7616 KB |
Expected EOF |
2 |
Incorrect |
85 ms |
7872 KB |
Expected EOF |
3 |
Incorrect |
88 ms |
7924 KB |
Expected EOF |
4 |
Incorrect |
85 ms |
7868 KB |
Expected EOF |
5 |
Incorrect |
87 ms |
7856 KB |
Expected EOF |
6 |
Incorrect |
85 ms |
7712 KB |
Expected EOF |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
87 ms |
7616 KB |
Unexpected end of file - int32 expected |
2 |
Incorrect |
85 ms |
7616 KB |
Unexpected end of file - int32 expected |
3 |
Incorrect |
85 ms |
7744 KB |
Unexpected end of file - int32 expected |
4 |
Incorrect |
92 ms |
8124 KB |
Unexpected end of file - int32 expected |
5 |
Incorrect |
86 ms |
7808 KB |
Unexpected end of file - int32 expected |
6 |
Incorrect |
85 ms |
7872 KB |
Unexpected end of file - int32 expected |
7 |
Incorrect |
86 ms |
7864 KB |
Unexpected end of file - int32 expected |
8 |
Incorrect |
86 ms |
7868 KB |
Unexpected end of file - int32 expected |
9 |
Incorrect |
68 ms |
6596 KB |
Unexpected end of file - int32 expected |
10 |
Incorrect |
27 ms |
3028 KB |
Unexpected end of file - int32 expected |
11 |
Incorrect |
44 ms |
4292 KB |
Unexpected end of file - int32 expected |
12 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |
13 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |
14 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |