# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
861849 | 2023-10-17T04:49:49 Z | maks007 | Zalmoxis (BOI18_zalmoxis) | C++14 | 110 ms | 12484 KB |
#include "bits/stdc++.h" using namespace std; int last; vector <int> ans, a; map <int,int> wiped; void f(int v) { if(v == a.back()) { ans.push_back(v); a.pop_back(); return; } if(a.back() > v) { ans.push_back(v); return; } f(v-1); f(v-1); } signed main () { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, k, cnt = 0; cin >> n >> k; for(int i = 0; i < n; i ++) { int x; cin >> x; wiped[x] ++; a.push_back(x); } reverse(a.begin(), a.end()); // int need = (1 << 30) - cnt; // cnt = 0; // while(need > 1) { // cnt ++; // need /= 2; // } f(30); for(auto i : ans) cout << i << " "; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 105 ms | 11712 KB | Expected EOF |
2 | Incorrect | 109 ms | 12228 KB | Expected EOF |
3 | Incorrect | 107 ms | 10512 KB | Expected EOF |
4 | Incorrect | 108 ms | 11456 KB | Expected EOF |
5 | Incorrect | 105 ms | 10736 KB | Expected EOF |
6 | Incorrect | 107 ms | 10944 KB | Expected EOF |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 104 ms | 12484 KB | Unexpected end of file - int32 expected |
2 | Correct | 107 ms | 10432 KB | Output is correct |
3 | Incorrect | 107 ms | 10944 KB | Unexpected end of file - int32 expected |
4 | Incorrect | 106 ms | 11716 KB | Unexpected end of file - int32 expected |
5 | Incorrect | 110 ms | 11204 KB | Unexpected end of file - int32 expected |
6 | Incorrect | 107 ms | 11712 KB | Unexpected end of file - int32 expected |
7 | Incorrect | 106 ms | 11200 KB | Unexpected end of file - int32 expected |
8 | Incorrect | 107 ms | 10688 KB | Unexpected end of file - int32 expected |
9 | Incorrect | 94 ms | 10180 KB | Unexpected end of file - int32 expected |
10 | Incorrect | 44 ms | 4548 KB | Unexpected end of file - int32 expected |
11 | Incorrect | 65 ms | 8268 KB | Unexpected end of file - int32 expected |
12 | Incorrect | 0 ms | 344 KB | Unexpected end of file - int32 expected |
13 | Incorrect | 0 ms | 348 KB | Unexpected end of file - int32 expected |
14 | Incorrect | 0 ms | 344 KB | Unexpected end of file - int32 expected |