Submission #1015616

#TimeUsernameProblemLanguageResultExecution timeMemory
1015616nomen_nescioRadio Towers (IOI22_towers)C++17
4 / 100
632 ms1588 KiB
#include "towers.h" #include <vector> int iMaxi = 0, maxi = 0; std::vector<int> hauteurs; void init(int N, std::vector<int> H) { for (int i = 0; i < N; i++) { if(H[i] >= maxi) { iMaxi = i; maxi = H[i]; } } hauteurs = H; } int max_towers(int L, int R, int D) { if (L < iMaxi && R > iMaxi && maxi - D >= hauteurs[L] && maxi - D >= hauteurs[R]) { return 2; } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...