TASK 2.3. CODES

We define the distance dH(X, Y) between two strings X and Y of equal length to be the usual Hamming distance, i.e. the number of positions in which  X  and Y  differ. 
For example, dH(1001, 0010)=3 and dH(1001111, 0010101)=4. 
Let n ≥ 1 and suppose C = W1, W2, . . . , WM  is a list of  M binary strings of length n. 
We consider C as a circular list and define the distance dC(Wi , Wj) between two strings Wi  and Wj  in the list as  dC(Wi , Wj) = min{abs(i–j), M–abs(i–j)}.
Suppose k satisfies 1 ≤ k < n. We say that C is a circular code of length n and spread k if for every i, j,  1 ≤ i, j ≤ M the following hold
	(1)  If  dC(Wi , Wj) ≤ k,   then  dH(Wi , Wj) = dC(Wi , Wj);
	(2)  If  dC(Wi , Wj) > k,   then  dH(Wi , Wj) > k.      
A central problem in the study of circular codes is to determine the maximum number of strings in a circular code of length n and spread k. The exact value of this number is known only for some small values of parameters n and k. Your task is for a given pair n, k to construct a circular code containing as many as possible strings. 

Test #	1	2	3	4	5	6	7	8	9	10	
n	5	6	6	7	7	8	8	9	10	10	
k	1	1	2	1	2	1	2	2	2	3	

You have to submit 10 files containing your codes with parameters from the table above.    Do not submit any program! 
The first line of your file should contain
#FILE code t
where t is the test number. 
The next M lines should contain the successive strings of the constructed code of length n and spread k.
For each test case, the best solutions among all competitors will get 10 points. If the best solution is a code with B strings, and you have submitted a correct solution with M strings your score will be 10M/B. The score will be rounded to the first decimal digit for each case. The total score will be rounded to the nearest integer.	EXAMPLE

#FILE code 0
1101
1100
1110
1010
1011
0011
0001
0101

n=4,  k=1,  M=8