Dima and Staircase

2020 VietMX 0

Dima’s got a staircase that consists of n stairs. The first stair is at height a 1, the second one is at a 2, the last one is at a n (1 ≤ a 1 ≤ a 2 ≤ … ≤ a n). Dima decided […]

Dima and Two Sequences

2020 VietMX 0

Little Dima has two sequences of points with integer coordinates: sequence (a 1, 1), (a 2, 2), …, (a n, n) and sequence (b 1, 1), (b 2, 2), …, (b n, n). Now Dima wants to count the number of distinct sequences of points of […]

Dima and Figure

2020 VietMX 0

Dima loves making pictures on a piece of squared paper. And yet more than that Dima loves the pictures that depict one of his favorite […]

Dima and Game

2020 VietMX 0

Dima and Anya love playing different games. Now Dima has imagined a new game that he wants to play with Anya. Dima writes n pairs of integers […]

Dima and Horses

2020 VietMX 0

Dima came to the horse land. There are n horses living in the land. Each horse in the horse land has several enemies (enmity is a symmetric […]