Last year, the Infinite House of Pancakes introduced a new kind of pancake. It has a happy face made of chocolate chips on one side (the “happy side”), and nothing on the other side (the “blank side”).
The latest hit on TV is a jumping game played on a giant rectangular chessboard. Each participant dresses up in a green frog suit and starts at the top left corner of the board.
Adarsh and Saurabh are playing a Game in Winter Vacation. The game consists of \(N\) piles where each pile has some \(P_i\) marbles. At each step one player can search for pile with minimum number of marbles and removes it and all elements present to its right from list.
A computer does two things, and two things only. It performs calculations and it remembers the results of those calculations. But it does those two things extremely well.