#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
for(int i=0;i<n;i++){
finalHeight[i]=0;
}
for(int i=0;i<k;i++){
int o = op[i];
for(int j=left[i];j<=right[i];j++){
if(finalHeight[j]<height[i] && o==1) finalHeight[j] = height[i];
if(finalHeight[j]>height[i] && o==2) finalHeight[j] = height[i];
}
}
return;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
19 ms |
636 KB |
Output is correct |
5 |
Correct |
16 ms |
604 KB |
Output is correct |
6 |
Correct |
13 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
70 ms |
11148 KB |
Output is correct |
3 |
Correct |
786 ms |
5712 KB |
Output is correct |
4 |
Execution timed out |
3054 ms |
18004 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
600 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
14 ms |
636 KB |
Output is correct |
5 |
Correct |
13 ms |
640 KB |
Output is correct |
6 |
Correct |
16 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
68 ms |
13936 KB |
Output is correct |
9 |
Correct |
775 ms |
7524 KB |
Output is correct |
10 |
Execution timed out |
3050 ms |
18000 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
16 ms |
604 KB |
Output is correct |
5 |
Correct |
16 ms |
604 KB |
Output is correct |
6 |
Correct |
15 ms |
444 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
76 ms |
13892 KB |
Output is correct |
9 |
Correct |
754 ms |
7508 KB |
Output is correct |
10 |
Execution timed out |
3060 ms |
18004 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |