2015-2016 ACM ICPC Baltic Selection Contest
I. Shell Game
time limit per test:1 second
memory limit per test:256 megabytes
Bob has discovered a new quality in himself — he likes to trick people a lot! In particular, Bob wants to try his tricking skills in the shell game.
The shell game involves three identical cups and a single ball. In the beginning the host (that's Bob!) puts the cups upside down and places the ball inside one of the cups. Then he shuffles the cups and the player has to guess where the ball is. The host then lifts that cup, revealing whether the ball was inside or not. The player wins if he makes a correct guess, otherwise the host wins.
The form of each cup is a sliced cone. Formal