priyansh_max's blog

By priyansh_max, history, 13 months ago, In English

I tried so many combinations and permutations of what could be answer the description does not help me much and the solutions does not help me understand why is that working...

Can somebody help me? problem link --> https://mirror.codeforces.com/contest/2095/problem/B

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Think outside the box : )

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

There is no standard logic to solve this it is a simple but tricky observation drop the ball outside of the box-limits and it will hit the ground for sure! Thus guaranteeing victory in every round. If you print any number within limits of the box the simulation is then random and it could end up any way, mostly a loss.