Submission #667078

#TimeUsernameProblemLanguageResultExecution timeMemory
667078tatyamRadio Towers (IOI22_towers)C++17
4 / 100
804 ms1456 KiB
#include <bits/stdc++.h> using namespace std; int argmax; vector<int> H; void init(int N, vector<int> H) { ::H = H; argmax = max_element(H.begin(), H.end()) - H.begin(); } int max_towers(int L, int R, int D) { if(L < argmax && argmax < R) { if(H[argmax] - max(H[L], H[R]) >= D) 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...