#include <bits/stdc++.h>
using namespace std;
#include "wall.h"
using ll = long long;
#define fs first
#define sd second
#define ii pair<int,int>
#define iii pair<int, ii>
#define all(A) A.begin(), A.end()
const int N = 2e6 + 5;
int a[N];
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) {
for(int i(0) ; i < k; ++i){
if(op[i] == 1){
for(int j = left[i] ; j <= right[i] ; ++j){
a[j] = max(a[j], height[i]);
}
}
else{
for(int j = left[i] ; j <= right[i] ; ++j){
a[j] = min(a[j], height[i]);
}
}
}
for(int i(0) ; i < n ; ++i){
finalHeight[i] = a[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... |