Submission #667090

#TimeUsernameProblemLanguageResultExecution timeMemory
667090tatyamRadio Towers (IOI22_towers)C++17
0 / 100
761 ms1824 KiB
#include <bits/stdc++.h> using namespace std; int N; vector<int> H; vector<int> S; void init(int N, vector<int> H) { ::N = N; ::H = H; S.resize(N); for(int i = 1; i + 1 < N; i++) S[i] = S[i - 1] + (H[i - 1] < H[i] && H[i] > H[i + 1]); } int max_towers(int L, int R, int D) { assert(D == 1); return S[R - 1] - S[L] + 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...