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 1430. Crime and Punishment

limitation for the full search
Posted by luckysundog 24 Sep 2011 23:02
Suppose:
1) A>B
2) gcd(A,B)=1
Need to find maximal A*x + B*y
I try all 0 <= x <= (N-B) / A + 1
This upper limit gives AC, but is it optimal?
Re: limitation for the full search
Posted by -XraY- 18 Nov 2011 23:34


Edited by author 18.11.2011 23:48