| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1364281 | mannshah1211 | 선물 (IOI25_souvenirs) | C++20 | 0 ms | 344 KiB |
#include "souvenirs.h"
#include <bits/stdc++.h>
using namespace std;
void buy_souvenirs(int n, long long p0) {
if (n == 2) {
transaction(p0 - 1);
} else if (n == 3) {
pair<vector<int>, long long> a = transaction(p0 - 1);
if (a.first.size() == 1) {
// p0 - 1 - a.second
// is the second element
long long sec = p0 - 1 - a.second;
transaction(sec - 1);
transaction(sec - 1);
} else {
long long sum = p0 - 1 - a.second;
transaction(sum / 2);
}
}
return;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
