| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1357309 | AMel0n | Souvenirs (IOI25_souvenirs) | C++20 | 9 ms | 412 KiB |
#include "souvenirs.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void buy_souvenirs(int N, ll P0) {
vector<int> took(N);
vector<ll> cost(N);
cost[0] = P0;
for(int i = 1; i < N; i++) {
while(took[i] != i) {
if (cost[i] == 0) {
pair<vector<int>, ll> re = transaction(cost[i-1]-1);
cost[i] = cost[i-1]-1;
if (re.second || re.first.size() > 1) {
cost[i]--;
took[re.first[1]]++;
}
} else {
pair<vector<int>, ll> re = transaction(cost[i]);
}
took[i]++;
}
}
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
