Submission #652749

#TimeUsernameProblemLanguageResultExecution timeMemory
652749BlagojRadio Towers (IOI22_towers)C++17
4 / 100
855 ms1516 KiB
#include "towers.h" #include <bits/stdc++.h> using namespace std; vector<int> h; int k = 0; void init(int N, std::vector<int> H) { h = H; for (k = 0; k < N - 1; k++) { if (h[k] > h[k + 1]) { break; } } } int max_towers(int L, int R, int D) { if (L < k && k < R && h[L] <= h[k] - D && h[k] - D >= h[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...