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 1494. Monobilliards

Key hint
Posted by ajay jadhav 5 May 2020 23:55
Inspector can come at any point.
  after 1 ball pocketed
  after 2 ball pocketed
  or even at the end when n balls are pocketed
Inspector can collect any number of available balls
e.g if he comes after ball 3 is pocketed he can take just 3, or 3 2 or all 3 2 1