#include <bits/stdc++.h>
using namespace std;
#include "messy.h"
//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
bool vis[130];
std::vector<int> restore_permutation(int n, int w, int r) {
vector <int> ans;
ans.resize(n);
for(int i=0;i<n;i++){
string tmp = "";
for(int j=0;j<=i;j++)tmp += "1";
for(int j=i+1;j<n;j++)tmp += "0";
add_element(tmp);
}
compile_set();
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(vis[j])continue;
string tmp = "";
for(int k=0;k<n;k++){
if(k == j || vis[k])tmp += "1";
else tmp += "0";
}
if(check_element(tmp)){
vis[j] = 1;
ans[j] = i;
break;
}
}
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
n = 8 |
2 |
Correct |
0 ms |
212 KB |
n = 8 |
3 |
Correct |
1 ms |
304 KB |
n = 8 |
4 |
Correct |
0 ms |
212 KB |
n = 8 |
5 |
Correct |
1 ms |
232 KB |
n = 8 |
6 |
Correct |
1 ms |
212 KB |
n = 8 |
7 |
Correct |
1 ms |
292 KB |
n = 8 |
8 |
Correct |
1 ms |
212 KB |
n = 8 |
9 |
Correct |
1 ms |
212 KB |
n = 8 |
10 |
Correct |
0 ms |
212 KB |
n = 8 |
11 |
Correct |
1 ms |
212 KB |
n = 8 |
12 |
Correct |
0 ms |
212 KB |
n = 8 |
13 |
Correct |
0 ms |
212 KB |
n = 8 |
14 |
Correct |
1 ms |
212 KB |
n = 8 |
15 |
Correct |
1 ms |
212 KB |
n = 8 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
n = 32 |
2 |
Correct |
1 ms |
212 KB |
n = 32 |
3 |
Correct |
1 ms |
328 KB |
n = 32 |
4 |
Correct |
1 ms |
212 KB |
n = 32 |
5 |
Correct |
1 ms |
212 KB |
n = 32 |
6 |
Correct |
1 ms |
212 KB |
n = 32 |
7 |
Correct |
1 ms |
212 KB |
n = 32 |
8 |
Correct |
1 ms |
304 KB |
n = 32 |
9 |
Correct |
1 ms |
212 KB |
n = 32 |
10 |
Correct |
1 ms |
212 KB |
n = 32 |
11 |
Correct |
1 ms |
300 KB |
n = 32 |
12 |
Correct |
1 ms |
212 KB |
n = 32 |
13 |
Correct |
1 ms |
212 KB |
n = 32 |
14 |
Correct |
1 ms |
212 KB |
n = 32 |
15 |
Correct |
1 ms |
212 KB |
n = 32 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
n = 32 |
2 |
Correct |
1 ms |
212 KB |
n = 32 |
3 |
Incorrect |
1 ms |
300 KB |
grader returned WA |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
300 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
304 KB |
grader returned WA |
2 |
Halted |
0 ms |
0 KB |
- |