#include "wall.h"
#include<algorithm>
using namespace std;
int tab[2000009];
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
for(int i = 0; i < k; i++){
for(int j = left[i]; j <= right[i]; j++){
if(op[i] == 1){
if(tab[j] < height[i]) tab[j] = height[i];
}else{
if(tab[j] > height[i]) tab[j] = height[i];
}
}
}
for(int i = 0; i < n; i++) finalHeight[i] = tab[i];
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
248 KB |
Output is correct |
2 |
Correct |
3 ms |
480 KB |
Output is correct |
3 |
Correct |
3 ms |
516 KB |
Output is correct |
4 |
Correct |
28 ms |
1012 KB |
Output is correct |
5 |
Correct |
28 ms |
1156 KB |
Output is correct |
6 |
Correct |
28 ms |
1236 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1236 KB |
Output is correct |
2 |
Correct |
180 ms |
14760 KB |
Output is correct |
3 |
Correct |
1843 ms |
14760 KB |
Output is correct |
4 |
Execution timed out |
3018 ms |
28524 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
28524 KB |
Output is correct |
2 |
Correct |
3 ms |
28524 KB |
Output is correct |
3 |
Correct |
3 ms |
28524 KB |
Output is correct |
4 |
Correct |
28 ms |
28524 KB |
Output is correct |
5 |
Correct |
28 ms |
28524 KB |
Output is correct |
6 |
Correct |
32 ms |
28524 KB |
Output is correct |
7 |
Correct |
2 ms |
28524 KB |
Output is correct |
8 |
Correct |
196 ms |
34412 KB |
Output is correct |
9 |
Correct |
1868 ms |
34412 KB |
Output is correct |
10 |
Execution timed out |
3025 ms |
48120 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
48120 KB |
Output is correct |
2 |
Correct |
3 ms |
48120 KB |
Output is correct |
3 |
Correct |
4 ms |
48120 KB |
Output is correct |
4 |
Correct |
27 ms |
48120 KB |
Output is correct |
5 |
Correct |
28 ms |
48120 KB |
Output is correct |
6 |
Correct |
30 ms |
48120 KB |
Output is correct |
7 |
Correct |
1 ms |
48120 KB |
Output is correct |
8 |
Correct |
180 ms |
53952 KB |
Output is correct |
9 |
Correct |
1846 ms |
53952 KB |
Output is correct |
10 |
Execution timed out |
3084 ms |
67848 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |