Submission #1321030

#TimeUsernameProblemLanguageResultExecution timeMemory
1321030sadixSouvenirs (IOI25_souvenirs)C++20
0 / 100
13 ms332 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...