// mrrrow mnyaa ;3c
// go play vivid/stasis! it's a really awesome free game on steam
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) {
for (int it = 0; it < k; it++) {
if (op[it] == 1) {
for (int i = left[it]; i <= right[it]; i++) {
if (finalHeight[i] < height[it]) finalHeight[i] = height[it];
}
} else {
for (int i = left[it]; i <= right[it]; i++) {
if (finalHeight[i] > height[it]) finalHeight[i] = height[it];
}
}
}
}
# | 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... |