#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++;}
}
if(c>=n)is_true=1;
}
ans[c]=i;
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2069 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2059 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2066 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2080 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2059 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |