#include <bits/stdc++.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<k;i++){
int l=left[i];
int r=right[i];
for(int j=l;j<=r;j++){
if(finalHeight[j]>height[i]){
if(op[i]==2){
finalHeight[j]=height[i];
}
}else{
if(op[i]==1){
finalHeight[j]=height[i];
}
}
}
}
}
# | 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... |