Submission #626881

#TimeUsernameProblemLanguageResultExecution timeMemory
626881kkkkkkkkRadio Towers (IOI22_towers)C++17
4 / 100
886 ms1468 KiB
#include <bits/stdc++.h> using namespace std; vector<int> v; int N,k; void init(int N,vector<int> H) { v=H; k=0; for (int i=1; i<N; i++) if (v[i]>v[i-1]) k=i; } int max_towers(int L, int R, int D) { if (L<=k && k<=R && v[L]<=v[k]-D && v[R]<=v[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...