#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 (int type = 1; type < N; type++) {
for (int need = 0; need < type; need++) {
bool ok = false;
for (long long M = 1; M < P0; M++) {
auto res = transaction(M);
auto &L = res.first;
if ((int)L.size() == 1 && L[0] == type) {
ok = true;
break;
}
}
if (!ok) 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... |