Submission #1130582

#TimeUsernameProblemLanguageResultExecution timeMemory
1130582lopkusArt Collections (BOI22_art)C++20
5 / 100
25 ms408 KiB
#include "art.h" #include <bits/stdc++.h> using namespace std; void solve(int n) { vector<int> p(n); iota(p.begin(), p.end(), 1); while(1) { int u = publish(p); if(!u) { answer(p); break; } for(int i = 0; i < n; i++) { for(int j = i + 1; j < n; j++) { swap(p[i], p[j]); int k = publish(p); if(k < u) { // stay } else { swap(p[i], p[j]); } } } } }
#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...