| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1358518 | jellybean | 선물 (IOI25_souvenirs) | C++20 | 8 ms | 412 KiB |
#include "souvenirs.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
void buy_souvenirs(signed n, long long p0) {
int cur = p0-1; //less than p0
int cnt = 0;
for(int i=1; i<n-1; i++){
for(int j=0; j<i; j++){
auto[v,res] = transaction(cur);
if(v.size() == 2){
cnt++;
cur--;
p0 = cur;
} else {
p0 = cur-res;
}
}
cur = p0-1;
}
for(int i=0; i<n-1-cnt; i++) transaction(cur);
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
