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 operations[], int gauche[], int droite[], int hauteur[], int hauteurFinale[]) {
for (int i = 0; i < N; i ++)
hauteurFinale[i] = 0;
for (int iOperation = 0; iOperation < K; iOperation ++) {
if (operations[iOperation] == 1) {
for (int indice = gauche[iOperation]; indice <= droite[iOperation]; indice ++) {
if (hauteurFinale[indice] <= hauteur[iOperation])
hauteurFinale[indice] = hauteur[iOperation];
}
}
else {
for (int indice = gauche[iOperation]; indice <= droite[iOperation]; indice ++) {
if (hauteurFinale[indice] >= hauteur[iOperation])
hauteurFinale[indice] = hauteur[iOperation];
}
}
}
}
# | 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... |