Submission #638341

#TimeUsernameProblemLanguageResultExecution timeMemory
638341aris12345678Radio Towers (IOI22_towers)C++17
4 / 100
987 ms1440 KiB
#include "towers.h" #include <bits/stdc++.h> using namespace std; int N, k; vector<int> H; void init(int n, vector<int> h) { N = n; H = h; for(int i = 0; i < n-1; i++) { if(h[i+1] < h[i]) { k = i; break; } } } int max_towers(int l, int r, int d) { if(l < k && r > k && H[l] <= H[k]-d && H[r] <= H[k]-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...