#include<bits/stdc++.h>
#include "wall.h"
using namespace std;
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 && finalHeight[j] < height[i]) finalHeight[j] = height[i];
else if(op[i] == 2 && finalHeight[j] > height[i]) finalHeight[j] = height[i];
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
1 ms |
332 KB |
Output is correct |
4 |
Correct |
28 ms |
472 KB |
Output is correct |
5 |
Correct |
25 ms |
600 KB |
Output is correct |
6 |
Correct |
23 ms |
492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
130 ms |
8160 KB |
Output is correct |
3 |
Correct |
953 ms |
3736 KB |
Output is correct |
4 |
Execution timed out |
3058 ms |
8644 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
432 KB |
Output is correct |
3 |
Correct |
1 ms |
304 KB |
Output is correct |
4 |
Correct |
22 ms |
500 KB |
Output is correct |
5 |
Correct |
25 ms |
580 KB |
Output is correct |
6 |
Correct |
23 ms |
460 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
159 ms |
8368 KB |
Output is correct |
9 |
Correct |
940 ms |
3860 KB |
Output is correct |
10 |
Execution timed out |
3030 ms |
8720 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
24 ms |
496 KB |
Output is correct |
5 |
Correct |
24 ms |
496 KB |
Output is correct |
6 |
Correct |
24 ms |
492 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
137 ms |
8304 KB |
Output is correct |
9 |
Correct |
941 ms |
3904 KB |
Output is correct |
10 |
Execution timed out |
3059 ms |
8640 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |