This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
#include <wall.h>
using namespace std;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
if(n <= 10000 && k <= 5000){
vector<int> heightl (n, 0);
for(int update = 0; update < k; update++){
for(int setter = left[update]; setter <= right[update]; setter++){
if(op[update] == 1) heightl[setter] = max(heightl[setter], height[update]);
else heightl[setter] = min(heightl[setter], height[update]);
}
}
for(int finisher = 0; finisher < n; finisher++) finalHeight[finisher] = heightl[finisher];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |