Is there a solution for this problem which works correctly and fast with such constraints?
z-shortest
http://www.z-trening.com/new/www/html/forum.php?show_board=10002&ref_id=10002&view_topic=111747
here is described linear algorithm for this problem:
http://cr.yp.to/papers/powers-ams.pdf
and it is very complicated :)l
http://cr.yp.to/papers/powers-ams.pdf
and it is very complicated :)l
you can solve it with bignums
of course not( in the way you think, it's far too slow )
ok then. i will think another solution
what a solution...
definitelly one of the hardest task here in z-trening
definitelly one of the hardest task here in z-trening
Task 'Shortest-z' is an excellent learning bignum arithmetic, but ... (and how it can be without a 'but').
For most users, it is clear that the general case insoluble in real time. I hoped that the tests were such that they can be solved in a given time limit. I ask the author to change the time limit and tests, so that the task do not lose a lot of their difficulties. Also, the time limit should be such that it is possible to input a decimal number converted to a number with base 2 ^ N.
For most users, it is clear that the general case insoluble in real time. I hoped that the tests were such that they can be solved in a given time limit. I ask the author to change the time limit and tests, so that the task do not lose a lot of their difficulties. Also, the time limit should be such that it is possible to input a decimal number converted to a number with base 2 ^ N.
@halil
What do you think, how much the time limit should be for this task to be solved? Maybe I'll change the time limit, or add another task with the same test cases.
What do you think, how much the time limit should be for this task to be solved? Maybe I'll change the time limit, or add another task with the same test cases.