# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1104485 | aaaaaarroz | Machine (IOI24_machine) | C++17 | 106 ms | 764 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "machine.h"
#include <bits/stdc++.h>
using namespace std;
vector<int>use_machine(vector<int> A);
vector<int> find_permutation(int N) {
map<int,int>pos;
vector<int> A(N);
for(int i=0;i<N-1;i++){
A[i]=i;
pos[i]=i;
}
A[N-1]=2*N;
pos[2*N]=N-1;
vector<int>P(N);
vector<int>B=use_machine(A);
int x;
for(x=0;x<=255;x++){
set<int>numeros;
for(int numero:B){
numeros.insert(numero^x);
}
if(numeros.size()==N&&*numeros.begin()==0&&*numeros.rbegin()==2*(N)){
break;
}
}
for(int i=0;i<N;i++){
P[i]=pos[B[i]^x];
}
return P;
}
Compilation message (stderr)
# | 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... |