이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
int k=INT_MAX, n;
vector<int> h;
void init(int tempn, vector<int> temph) {
n=tempn;
h=temph;
for (int i = 1; i < n; ++i)
{
if (temph[i]>temph[i+1])
{
k=i;
return;
}
}
return;
}
int max_towers(int L, int R, int D) {
if (k<L || k>R || h[k]-D<max(h[L], h[R])) return 1;
return 2;
}
# | 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... |