Submission #626876

#TimeUsernameProblemLanguageResultExecution timeMemory
626876kkkkkkkkRadio Towers (IOI22_towers)C++17
0 / 100
435 ms1328 KiB
#include <bits/stdc++.h> using namespace std; vector<int> visini; int N,k=0; void init(int n,vector<int> H) { N=n; visini=H; for (int i=1;i<N;i++) if (visini[i]<visini[i-1]) k=i; } int max_towers(int l,int r,int d) { if (k<=l||k>=r) return 1; if (visini[k]-d>=visini[l]&&visini[k]-d>=visini[r]) 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...