Submission #686394

#TimeUsernameProblemLanguageResultExecution timeMemory
686394pere_gilRadio Towers (IOI22_towers)C++17
4 / 100
884 ms1488 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=1;i<n-1;i++) if(h[i-1]<h[i] && h[i]>h[i+1]) k=i; } int max_towers(int l, int r, int d){ if(l<k && k<r){ if(h[l]<=h[k]-d && h[r]<=h[k]-d) return 2; else return 1; } else 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...