ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1081. Binary Lexicographic Sequence

i solved, but my algo so slow, how can i solve this problem faster,
sorry for my english.
thx!
Lets consider the sequence for n=4:
0000
0001
0010
0100
0101
1000
1001
1010

Try to find a connection between the number of all sequences with length 4, those which begin with 0 and those which begin with 1. After that look "deeper" and "deeper" into each sequence and try to find a way to generate the k-th sequence. Sorry that I'm not telling you the algorithm directly, but the feeling when you discover it yourself is great :) (it's even greater when you get Acc from 1-st submition :P). I hope that you find this helpful.
thanks a lot, i think i can find it!!
Bobur now, i've AC too!! [1] // Problem 1081. Binary Lexicographic Sequence 8 May 2008 18:49
wow
i feel good ¬¬_.'[smoke]
ty for the idea
† SiriuS † [TWYT Union] Re: TLE#5, how can i solv this with fibonachchi, // Problem 1081. Binary Lexicographic Sequence 18 May 2014 16:12
Tnk u. Ur hint is very helpful. I got AC!
PersonalJesus wrote 17 April 2008 17:16
Lets consider the sequence for n=4:
0000
0001
0010
0100
0101
1000
1001
1010

Try to find a connection between the number of all sequences with length 4, those which begin with 0 and those which begin with 1. After that look "deeper" and "deeper" into each sequence and try to find a way to generate the k-th sequence. Sorry that I'm not telling you the algorithm directly, but the feeling when you discover it yourself is great :) (it's even greater when you get Acc from 1-st submition :P). I hope that you find this helpful.  




Thank u so much.... :)
It really feels wow... :D