Submission #1246254

#TimeUsernameProblemLanguageResultExecution timeMemory
1246254adam17Art Collections (BOI22_art)C++20
5 / 100
22 ms396 KiB
#include "art.h" using namespace std; void f(int N, vector<int> V) { if (V.size() == N) { if (publish(V) == 0) { answer(V); } } else { for (int i = 1; i <= N; i++) { bool ok = true; for (int x: V) { if (x == i) { ok = false; } } if (ok) { V.push_back(i); f(N, V); V.pop_back(); } } } } void solve(int N) { f(N, vector<int>(0)); }
#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...