# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
278145 |
2020-08-21T10:54:56 Z |
test2 |
Zalmoxis (BOI18_zalmoxis) |
C++14 |
|
74 ms |
4348 KB |
#include<bits/stdc++.h>
#define I inline void
using namespace std ;
using ll = long long ;
using ld = long double ;
const int N = 2e6 + 7 ;
// How interesting!
int n , k ;
int a[N] ;
int dfs(int x , int val){
if(a[x] > val){
cout<< val <<" " ;
return x ;
}
if(!val)return n ;
if(a[x] == val){
cout<< val <<" " ;
return x + 1 ;
}
int ret1 = dfs(x , val - 1) ;
//if(ret1 == n)
// return n;
int ret2 = dfs(ret1 , val -1 ) ;
if(ret2 == ret1){
//cout<< val <<" " ;
}
return ret2 ;
}
int main(){
ios_base::sync_with_stdio(0) ;
cin.tie(0) ;
//freopen("in.in", "r" , stdin) ;
cin >> n >> k ;
a[n] = (1<<30) ;
for(int i = 0 ;i < n ; i++){
cin >> a[i] ;
}
dfs(0 , 30 ) ;
return 0 ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
65 ms |
4192 KB |
Unexpected end of file - int32 expected |
2 |
Incorrect |
63 ms |
4216 KB |
Unexpected end of file - int32 expected |
3 |
Incorrect |
64 ms |
4216 KB |
Unexpected end of file - int32 expected |
4 |
Incorrect |
64 ms |
4216 KB |
Unexpected end of file - int32 expected |
5 |
Incorrect |
63 ms |
4216 KB |
Unexpected end of file - int32 expected |
6 |
Incorrect |
64 ms |
4216 KB |
Unexpected end of file - int32 expected |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
66 ms |
4216 KB |
Unexpected end of file - int32 expected |
2 |
Incorrect |
69 ms |
4216 KB |
Unexpected end of file - int32 expected |
3 |
Incorrect |
66 ms |
4216 KB |
Unexpected end of file - int32 expected |
4 |
Incorrect |
66 ms |
4216 KB |
Unexpected end of file - int32 expected |
5 |
Incorrect |
64 ms |
4240 KB |
Unexpected end of file - int32 expected |
6 |
Incorrect |
66 ms |
4252 KB |
Unexpected end of file - int32 expected |
7 |
Incorrect |
74 ms |
4348 KB |
Unexpected end of file - int32 expected |
8 |
Incorrect |
68 ms |
4344 KB |
Unexpected end of file - int32 expected |
9 |
Incorrect |
52 ms |
3456 KB |
Unexpected end of file - int32 expected |
10 |
Incorrect |
23 ms |
1536 KB |
Unexpected end of file - int32 expected |
11 |
Incorrect |
38 ms |
2424 KB |
Unexpected end of file - int32 expected |
12 |
Incorrect |
0 ms |
384 KB |
Unexpected end of file - int32 expected |
13 |
Incorrect |
0 ms |
384 KB |
Unexpected end of file - int32 expected |
14 |
Incorrect |
1 ms |
384 KB |
Unexpected end of file - int32 expected |