← Back to topics
Topic

z-shortest

f
frost_nova
Is there a solution for this problem which works correctly and fast with such constraints?
p
picsel
http://www.z-trening.com/new/www/html/forum.php?show_board=10002&ref_id=10002&view_topic=111747
g
gates
here is described linear algorithm for this problem:
http://cr.yp.to/papers/powers-ams.pdf


and it is very complicated :)l
m
matteo123
you can solve it with bignums
g
gates
of course not( in the way you think, it's far too slow )
m
matteo123
ok then. i will think another solution
M
MilosRadic
what a solution...
definitelly one of the hardest task here in z-trening
h
halil
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.
d
dejandenib
@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.