| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1249757 | kduckp | 선물 (IOI25_souvenirs) | C++20 | 0 ms | 412 KiB |
#include "souvenirs.h"
#include <bits/stdc++.h>
using namespace std;
pair<vector<int>, long long> transaction(long long);
void buy_souvenirs(int N, long long P0) {
assert(N == 2);
long long low = 1, high = P0 - 1;
long long P1 = -1;
while (low <= high) {
long long mid = (low + high) / 2;
auto [gifts, change] = transaction(mid);
if (!gifts.empty() && gifts[0] == 1) {
P1 = mid - change;
break;
} else {
low = mid + 1;
}
}
transaction(P1);
}
| # | 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... | ||||
