#include <bits/stdc++.h>
using namespace std;
// как ты меня заебал
pair<vector<int>, long long> transaction(long long M);
void buy_souvenirs(int N, long long P0) {
vector<int> bought(N, 0);
for (int32_t type = 1; type < N; type++) {
while (bought[type] < type) {
for (int64_t M = 1; M < P0; M++) {
auto res = transaction(M);
auto &L = res.first;
if ((int32_t)L.size() == 1 && L[0] == type) {
bought[type]++;
break;
}
}
}
}
}
| # | 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... |