| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1363443 | hollow_breeze | 선물 (IOI25_souvenirs) | C++20 | 8 ms | 344 KiB |
#include "souvenirs.h"
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
void buy_souvenirs(int N, long long P0)
{
long long i,cnt,j;
pair<vector<int>, long long> res;
if(N==2)
{
res = transaction(P0-1);
return ;
}
else if(N==3)
{
res = transaction(P0-1);
if(res.first.size()==1)
{
cnt=P0-1-res.second;
transaction(cnt-1);
}
else
{
cnt=P0-1-res.second;
if(cnt%2==0)
cnt=cnt/2+1;
else
cnt=(cnt+1)/2;
transaction(cnt-1);
transaction(cnt-1);
}
return ;
}
for(i=0;i<N;i++)
{
cnt=N-i;
for(j=0;j<i;j++)
{
res = transaction(cnt);
}
}
return ;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
