#include <vector>
#include "messy.h"
#include<bits/stdc++.h>
using namespace std;
bool confirm[300005];
int go[300005];
std::vector<int> restore_permutation(int n, int w, int r) {
for(int i=1;i<=n;i++)
{
string temp;
for(int j=1;j<=i;j++)temp += "1";
for(int j=i+1;j<=n;j++)temp += "0";
add_element(temp);
//cout<<temp<<endl;
go[i-1] = 0;
}
compile_set();
for(int i=0;i<n;i++)
{
string test;
for(int j=0;j<n;j++)confirm[j] = false;
for(int j=0;j<n;j++)test += "0";
for(int k=0;k<n;k++)
{
if(go[k] != 0)
{
test[go[k]] = '1';
confirm[go[k]] = true;
}
}
for(int k=0;k<n;k++)
{
if(confirm[k] == true)continue;
test[k] = '1';
if(check_element(test) == true)
{
go[i] = k;
break;
}
// cout<<test<<endl;
test[k] = '0';
}
}
vector<int> ans;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)if(go[j] == i)ans.push_back(j);
}
return ans;
/*add_element("0");
compile_set();
check_element("0");
return std::vector<int>();*/
}
# |
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 |
Correct |
1 ms |
212 KB |
n = 32 |
2 |
Incorrect |
0 ms |
308 KB |
grader returned WA |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |