|
|
вернуться в форумI got AC on this problem with normal solution, when 0<m/n<2, and with search when 2<=m/n<=3. Is there some smart solution in that case? Hm... Now the main problem is constraint of v<100000... Hm... Now the main problem is constraint of v<100000... My brute-force solution process any test with constraint v < 5000. So, in you algo you can also assume that v <= 5000. Amazingly, but this will speed up your algo dramatically... In case of my algo decreasing the limit slows things down (fair AC w/o tables as it meets TL for every pair or M/N) |
|
|