Submission #1099735

#TimeUsernameProblemLanguageResultExecution timeMemory
1099735model_codeMachine (IOI24_machine)C++17
59 / 100
11 ms856 KiB
// incorrect/2n-zoooma13.cpp #include <bits/stdc++.h> #include "machine.h" using namespace std; vector <int> find_permutation(int n){ vector <int> q(n) ,iq(n+n); iota(q.begin() ,q.end() ,0); iota(iq.begin() ,iq.end() ,0); int w = 1; while(w+w < n) w = w+w; q[n-1] = w+w; iq[w+w] = n-1; auto r = use_machine(q); for(int b = 0; b < 30; b++){ int t = 0; for(int&i : r) t += i>>b&1; if(t+t < n) continue; for(int&i : r) i ^= 1<<b; } vector <int> p; for(int&i : r) p.push_back(iq[i]); return p; }
#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...