제출 #966291

#제출 시각아이디문제언어결과실행 시간메모리
96629142kangarooRadio Towers (IOI22_towers)C++17
4 / 100
575 ms1604 KiB
#include "towers.h"
#include "bits/stdc++.h"

#include <vector>

std::vector<int> act;

int maxI = 0;

void init(int N, std::vector<int> H) {
	using namespace std;
	act = H;
	maxI = max_element(act.begin(), act.end()) - act.begin();
}

int max_towers(int L, int R, int D) {
    if (maxI < L || maxI > R) return 1;
	if (act[maxI] - act[L] >= D && act[maxI] - act[R] >= D )return 2;
	return 1;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…