D. Subway A subway scheme, classic for all Berland cities is represented by a set of n stations connected by n passages, each of which connects exactly two stations and does not pass through any others. Besides, in the classic scheme one can get from…
D. Subway A subway scheme, classic for all Berland cities is represented by a set of n stations connected by n passages, each of which connects exactly two stations and does not pass through any others. Besides, in the classic scheme one can get fr…
C. The World is a Theatre There are n boys and m girls attending a theatre club. To set a play "The Big Bang Theory", they need to choose a group containing exactly t actors containing no less than 4 boys and no less than one girl. How many ways…
C. The World is a Theatre time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n boys and m girls attending a theatre club. To set a play "The Big Bang Theory", they need to choo…
C. Statues time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In this task Anna and Maria play a game with a very unpleasant rival. Anna and Maria are in the opposite squares of a chessboard…