Submission #1079456

#TimeUsernameProblemLanguageResultExecution timeMemory
1079456asdasdqwerRadio Towers (IOI22_towers)C++17
0 / 100
459 ms1592 KiB
#include "towers.h" #include <bits/stdc++.h> using namespace std; int mxPos = -1; int mx = -1; vector<int> h; void init(int N, std::vector<int> H) { for (int i=0;i<N;i++) { if (H[i] > mx) { mx = H[i]; mxPos = i; } } h = H; } int max_towers(int L, int R, int D) { if (L >= mxPos || R <= mxPos) return 0; if (mx - D < max(h[L], h[R])) return 0; return 2; }
#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...