| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1329434 | ezzzay | 커다란 상품 (IOI17_prize) | C++20 | 1061 ms | 420 KiB |
#include "prize.h"
#include<bits/stdc++.h>
using namespace std;
int find_best(int n) {
map<int,vector<int>>mp;
vector<int>v=ask(0);
mp[0]=v;
int l=v[0]+v[1];
int x=0;
while(l!=0){
if(mp[x].empty())mp[x]=ask(x);
vector<int>v=mp[x];
if(mp[x][0]){
x/=2;
}
else{ // baruun taldaa baigaa
x= (n-1+x)/2;
}
if(mp[x].empty())mp[x]=ask(x);
l=mp[x][0]+mp[x][1];
}
return x;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
