#include <bits/stdc++.h>
using namespace std;
std::pair<std::vector<int>, long long> transaction(long long M);
void buy_souvenirs(int N, long long P0){
auto a=transaction(P0-1);
if(a.first.size()==2){
long long sum=(P0-1)-a.second;
/* cout<<sum<<endl; */
transaction(sum/2);
}else{
long long b=(P0-1)-a.second-1;
/* cout<<b<<endl; */
transaction(b);
transaction(b);
}
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |