제출 #679428

#제출 시각아이디문제언어결과실행 시간메모리
679428kilikuma벽 (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...