Bear and Poker

2020 VietMX 0

Limak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There are n players (including Limak himself) and […]

Bear and Blocks

2020 VietMX 0

Limak is a little bear who loves to play. Today he is playing by destroying block towers. He built n towers in a row. The i-th tower is […]

Bear and Forgotten Tree 3

2020 VietMX 0

A tree is a connected undirected graph consisting of n vertices and n  -  1 edges. Vertices are numbered 1 through n. Limak is a little polar bear and Radewoosh is his evil enemy. […]

Bear and Contribution

2020 VietMX 0

Codeforces is a wonderful platform and one its feature shows how much someone contributes to the community. Every registered user has contribution — an integer number, not […]

Bear and Polynomials

2020 VietMX 0

Limak is a little polar bear. He doesn’t have many toys and thus he often plays with polynomials. He considers a polynomial valid if its degree is n and […]

Bear and Paradox

2020 VietMX 0

Limak is a big polar bear. He prepared n problems for an algorithmic contest. The i-th problem has initial score p i. Also, testers said that it takes t i minutes to solve the i-th problem. […]

Bear and Colors

2020 VietMX 0

Bear Limak has n colored balls, arranged in one long row. Balls are numbered 1 through n, from left to right. There are n possible colors, also numbered 1 through n. The i-th ball has color t i. […]

Bear and Two Paths

2020 VietMX 0

Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear […]