Submission #679428

#TimeUsernameProblemLanguageResultExecution timeMemory
679428kilikumaWall (IOI14_wall)C++14
8 / 100
3075 ms18060 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...