Submission #629544

#TimeUsernameProblemLanguageResultExecution timeMemory
629544DarkMatterRadio Towers (IOI22_towers)C++17
4 / 100
851 ms1444 KiB
#include<bits/stdc++.h> #include "towers.h" #include <vector> using namespace std; int idx = -1; vector<int>v; void init(int N, std::vector<int> H) { for (int i = 1; i < N - 1; i++) if (H[i] > H[i - 1] && H[i] > H[i + 1]) idx = i; v = H; } int max_towers(int L, int R, int D) { if (R <= idx || L >= idx || v[idx] - v[L] < D || v[idx] - v[R] < D) return 1; 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...