This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> h;
int k = 0;
void init(int N, std::vector<int> H) {
h = H;
for (k = 0; k < N - 1; k++)
{
if (h[k] > h[k + 1])
{
break;
}
}
}
int max_towers(int L, int R, int D) {
if (L < k && k < R && h[L] <= h[k] - D && h[k] - D >= h[R])
{
return 2;
}
return 1;
}
# | 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... |