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 <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<n; i++)
finalHeight[i] = height[i];
for (int oper = 0; oper<k; oper++)
{
int typ = op[oper];
int l = left[oper];
int r = right[oper];
int h = height[oper];
for (int i=l; i<=r; i++)
{
if (typ==1)
finalHeight[i] = max(finalHeight[i], h);
else
finalHeight[i] = min(finalHeight[i], h);
}
}
}
# | 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... |