| 
 | 
back to boardA hint ? Can someone give me a little hint, please ? Re: A hint ? make 2 sequences (s1 and s2) such that s1[i]+s2[i]<>2 Re: A hint ? My solution is based on a greedy approach. Re: A hint ? Thank you both ! :-) Re: A hint ? Posted by  svr 21 Feb 2007 09:04 I think that an algorithm has many special cases. Main rool:to correct firstly s2[i] from 1 to 0 in pair s1[i]=1 and s2[i]=1 diminishing B but have pair 0, 0 in older position correcting it to 0, 1 for final increasing lexiographicly of B Who can find all cases he solve the problem Re: A hint ? Posted by  svr 21 Feb 2007 13:57 After getting AC i have counted 6 cases next tests correspong each of cases 4 1011 0011   1011 0100   4 1010 0111   1011 0000   4 1011 0110   1100 0000   4 1111 0101   0000 0000   4 1010 0101 1011 0000   4 1011 0100   1100 0000   Edited by author 21.02.2007 13:58 Re: A hint ? My program successfully passed all of your test cases, but I still WA3... What can it be??? Re: A hint ? Posted by  svr 20 Mar 2007 08:26 You are need in additional tests Best if you will create them yourself Re: A hint ? I have only 3 cases 1) attempt to build a >b 2) attempt to build a+1 0 3) build 0 0  |  
  | 
|