답안 #738481

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
738481 2023-05-08T20:29:49 Z Elvin_Fritl 커다란 상품 (IOI17_prize) C++17
0 / 100
1 ms 296 KB
#include <bits/stdc++.h>
using namespace std;
#include "prize.h"

const int mx=2e6+5;

int tree[mx*4];

int min_segment(int l,int r){
    int mid=(l+r)>>1;
    vector<int>a = ask(mid);
    if(a[0] == 0 && a[1] == 0){
        return mid;
    }
    if(l==r){
        return 0;
    }
    int tmp1=min_segment(l,mid-1);
    int tmp2=min_segment(mid+1,r);
    return max(tmp1,tmp2);
}

int find_best(int n) {
	return min_segment(0,n-1);
}

# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Integer -1 violates the range [0, 199999]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 296 KB Integer -1 violates the range [0, 199999]
2 Halted 0 ms 0 KB -