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 1023. Buttons

Please HELP ME! HERE IS CODE!!!!!! I GET TLE 12!!!!!THANK!!!!!
Posted by CHIDEMYAN SERGEY 22 Mar 2007 18:24


Edited by author 09.04.2007 20:21
Re: Please HELP ME! HERE IS CODE!!!!!! I GET TLE 12!!!!!THANK!!!!!
Posted by Orlangur [KievNU] 23 Mar 2007 02:31
Try some prime number near to 100 000 000 :P

Yours is O(k), you can do O(sqrt(k)) with the same idea, just think a bit :PPP
Re: Please HELP ME! HERE IS CODE!!!!!! I GET TLE 12!!!!!THANK!!!!!
Posted by AlMag 23 Mar 2007 13:06
What's wrong? WA#11

[code deleted]

I thought, it's correct.

Edited by author 23.03.2007 13:21
Re: Please HELP ME! HERE IS CODE!!!!!! I GET TLE 12!!!!!THANK!!!!!
Posted by AlMag 23 Mar 2007 13:22
Oh, I've found my mistake...
AC now.
P. S. Try test 116882
Re: Please HELP ME! HERE IS CODE!!!!!! I GET TLE 12!!!!!THANK!!!!!
Posted by CHIDEMYAN SERGEY 23 Mar 2007 16:59
Sorry!!!!HOW I can do BY O(sqrt(k))?
P.S.ANSWER FOR test 116882 IS 58440?

Edited by author 23.03.2007 17:16
Re: Please HELP ME! HERE IS CODE!!!!!! I GET TLE 12!!!!!THANK!!!!!
Posted by CHIDEMYAN SERGEY 9 Apr 2007 20:21
THANK TO KIRILL(ArcSTU) FOR PASCAL VERSION OF THIS PROBLEM!!!!!

Edited by author 14.04.2007 23:18

Edited by author 14.04.2007 23:20