#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> h;
int n;
int trg = 0;
void init(int N, std::vector<int> H)
{
n = N;
h = H;
trg = 0;
for(; trg+1 < n ; trg++)
{
if(h[trg] > h[trg + 1])
break;
}
}
int max_towers(int L, int R, int D)
{
if(R <= trg || L >= trg)
return 1;
return max(1 , R - L);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |