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 1705. Gangster Hares

Solution
Posted by Michail Yudin 4 Apr 2009 18:17
If you want to do it "as is" you got TLE. If you are in intellectual minority you got wa2. =) But how to solve it at 1 second? 10^18 input. approx. o(n) algo needed.
please tell me an idea! Thx a lot.
Re: Solution
Posted by Валентин 4 Apr 2009 18:31
не понятен тест №2. Почему он не проходит. В процессе отладки понятно что прдлагаемые k не больше 20. Т.е. он должен проходить на ура.
правильно ли я понял что:
при k = 1 ответ 0
при k = 2 ответ 0
при k = 3 ответ 2
Re: Solution
Posted by Глащенко Никита 10 Apr 2009 20:33
NO
Re: Solution
Posted by Валентин 14 Apr 2009 17:02
В смысле NO???
Re: Solution
Posted by bsu.mmf.team 14 Apr 2009 23:48
k=1 ответ 2
k=2 ответ 3
k=3 ответ 2
k=4 ответ 3
...

Edited by author 14.04.2009 23:48

Edited by author 14.04.2009 23:48
Re: Solution
Posted by Валентин 15 Apr 2009 08:39
остроумно:))) всмысле имеется ввиду что зайцы могут получить и по 0 кочанов:))
спасибо, Вы правы.
Re: Solution
Posted by Al-Xorazmiy_Best 17 Aug 2009 11:40
What test 3#


Edited by author 17.08.2009 13:08

Edited by author 17.08.2009 13:08
Re: Solution
Posted by Partisan 19 Oct 2009 22:42
Optimal algo is O(1)
Re: Solution
Posted by bsu.mmf.team 20 Jan 2010 23:46
О(1)??? It's very interesting, because my solution is in O(log n) operations. Could you explain this algorithm?
Re: Solution
Posted by [RSU_Tash]Shavkat_Khusanov 11 Sep 2011 17:01

Edited by author 25.10.2011 17:31

Edited by author 25.10.2011 17:31