#include "towers.h"
#include "bits/stdc++.h"
using namespace std;
int n,k;
vector<int> h;
void init(int N, vector<int> H) {
n=N; h=H;
for(int i=1;i<n-1;i++)
if(h[i-1]<h[i] && h[i]<h[i+1]) k=i;
}
int max_towers(int l, int r, int d){
if(l<k && k<r) printf("2\n");
else if(l==r) printf("1\n");
else printf("0\n");
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
936 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
1352 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
464 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
936 KB |
Possible tampering with the output or unexpected termination of the program |
2 |
Halted |
0 ms |
0 KB |
- |