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 "wall.h"
#include "bits/stdc++.h"
using namespace std;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
int i = 0;
while(i < k){
if(op[i] == 1){
while(left[i] <= right[i]){
finalHeight[left[i]] = max(finalHeight[left[i]], height[i]);
left[i]++;
}
} else {
while(left[i] <= right[i]){
finalHeight[left[i]] = min(finalHeight[left[i]], height[i]);
left[i]++;
}
}
i++;
}
return;
}
# | 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... |