| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1285530 | lizi14 | Souvenirs (IOI25_souvenirs) | C++20 | 0 ms | 0 KiB |
#include "souvenirs.h"
#include <utility>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
void buy_souvenirs(int N, long long P0) {
//int ans=P0-1-a;
//res=transaction(ans);
if(N==3){
pair<vector<int>, long long> res = transaction(P0-1);
int a=res.second;
vector<int> b=res.first;
//cout<<b[0]<<" "<<a<<endl;
res=transaction((P0/2);
// a=res.second;
// b=res.first;
// if(b[0]==2){
// }
// else{
// }
//cout<<b[0]<<" "<<a<<endl;
//if(a>0)transaction((P0-1)/2);
}
else{
for(int i=0; i<N; i++){
for(int j=1; j<=i; j++){
transaction(P0-1);
}
P0--;
}
}
return;
}
