Submission #825005

#TimeUsernameProblemLanguageResultExecution timeMemory
825005LittleCubeRadio Towers (IOI22_towers)C++17
0 / 100
454 ms1824 KiB
#include "towers.h" #include <bits/stdc++.h> #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define F first #define S second using namespace std; namespace { int N; vector<int> H, s; } void init(int _N, vector<int> _H) { H = _H; N = _N; s.resize(N); for (int i = 1; i + 1 < N; i++) s[i] = (H[i - 1] < H[i] && H[i] > H[i + 1]); for (int i = 1; i < N; i++) s[i] += s[i - 1]; } int max_towers(int L, int R, int D) { if(R - L <= 1) return 1; return max(1, s[R - 1] - s[L]); }
#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...