#include <bits/stdc++.h>
using namespace std;
const int N = 1<< 18;
int n,k,t,s;
string ss;
bool used[N];
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> k >> t >> ss;
for(int i = 0;i < n;i++) if(ss[i]=='1') s+=(1 << i);
cout << (1 << n) << '\n' << ss << '\n';
used[s] = true;
for(int i = 1;i < (1 << n);i++)
{
for(int j = 0;j < n;j++)
{
int t = s^(1 << j);
if(!used[t]){ s = t; break; }
}
used[s] = true;
for(int j = 0;j < n;j++) cout << (bool)((1 << j)&s);
cout << '\n';
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
384 KB |
Ok |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
308 KB |
Fail, not exactly k bits are different: line = 0 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
512 KB |
Found solution while it does not exist |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
276 ms |
5752 KB |
Ok |
2 |
Correct |
132 ms |
2936 KB |
Ok |
3 |
Correct |
1 ms |
384 KB |
Ok |
4 |
Correct |
0 ms |
384 KB |
Ok |
5 |
Correct |
1 ms |
384 KB |
Ok |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Fail, not exactly k bits are different: line = 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
280 ms |
5728 KB |
Fail, not exactly k bits are different: line = 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
276 ms |
5752 KB |
Ok |
2 |
Correct |
132 ms |
2936 KB |
Ok |
3 |
Correct |
1 ms |
384 KB |
Ok |
4 |
Correct |
0 ms |
384 KB |
Ok |
5 |
Correct |
1 ms |
384 KB |
Ok |
6 |
Incorrect |
1 ms |
384 KB |
Fail, not exactly k bits are different: line = 0 |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
130 ms |
2912 KB |
Fail, not exactly k bits are different: line = 0 |
2 |
Halted |
0 ms |
0 KB |
- |