Submission #291031

# Submission time Handle Problem Language Result Execution time Memory
291031 2020-09-04T15:44:20 Z Autoratch "The Lyuboyn" code (IZhO19_lyuboyn) C++14
20 / 100
292 ms 5880 KB
#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++)
	{
		bool br = false;
		for(int j = 0;j < n;j++) if(!br) for(int k = j+1;k < n;k++) if(!br) for(int l = k+1;l < n;l++)
		{
			int t = s^(1 << j)^(1 << k)^(1 << l);
			if(!used[t]){ br = true; s = t; break; }
		}
		used[s] = true;
		for(int j = 0;j < n;j++) cout << (bool)((1 << j)&s);
		cout << '\n';
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB The values in the output sequence are not pairwise distinct!
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Ok
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 512 KB Found solution while it does not exist
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 292 ms 5880 KB Fail, not exactly k bits are different: line = 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Ok
2 Correct 7 ms 512 KB Ok
3 Correct 142 ms 3064 KB Ok
4 Correct 62 ms 1528 KB Ok
5 Correct 1 ms 288 KB Ok
6 Correct 3 ms 416 KB Ok
7 Correct 30 ms 888 KB Ok
8 Correct 1 ms 384 KB Ok
# Verdict Execution time Memory Grader output
1 Incorrect 278 ms 5752 KB Fail, not exactly k bits are different: line = 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 292 ms 5880 KB Fail, not exactly k bits are different: line = 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 130 ms 2872 KB Fail, not exactly k bits are different: line = 0
2 Halted 0 ms 0 KB -