# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
778881 | kingfran1907 | 커다란 상품 (IOI17_prize) | C++14 | 55 ms | 2852 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "prize.h"
#include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
typedef long long llint;
const int maxn = 2e5+10;
int l[maxn], r[maxn];
int out = -1;
int maxi = 0;
pair<int,int> query(int x) {
if (l[x] != -1) return {l[x], r[x]};
vector< int > v = ask(x);
l[x] = v[0], r[x] = v[1];
return {l[x], r[x]};
}
llint ra() {
return (llint)rand() * rand() + rand() + rand();
}
void solve(int l, int r) {
if (l > r) return;
if (out != -1) return;
if (query(l).X + query(l).Y == 0) {
out = l;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |