#include <vector>
#include <bits/stdc++.h>
using namespace std;
#include "messy.h"
std::vector<int> restore_permutation(int n, int w, int r) {
string a(n, '0');
for(int i=0;i<n-1;i++){a[i]='1';add_element(a);}
compile_set();
vector<int> ans(n, n-1);
bool is_true=0;
string b(n, '0');int c=0;
for(int i=0;i<n-1;i++){
is_true=0;c=0;
while(!is_true){
if(b[c]!='1'){
b[c]='1';
is_true=check_element(b);
if(!is_true)b[c]='0';
}
c++;
}
ans[c]=i;
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
304 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
300 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |