Submission #1072223

#TimeUsernameProblemLanguageResultExecution timeMemory
1072223vjudge1Radio Towers (IOI22_towers)C++17
4 / 100
666 ms1880 KiB
#include "towers.h" #include <bits/stdc++.h> using namespace std; using ll = long long; using vll = vector <ll>; using vi = vector <int>; ll n, k; vll ve; void init (int n, vi ve) { ::n = n; k = 0; ::ve = vll(ve.begin(), ve.end()); while (ve[k] < ve[k+1]) k++; } int max_towers (int ql, int qr, int d) { if (k <= ql || qr <= k) return 1; if (ve[ql] <= ve[k]-d && ve[qr] <= ve[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...