Tidying Up

2020 VietMX 4

Smart Beaver is careful about his appearance and pays special attention to shoes so he has a huge number of pairs of shoes from the […]

Good Substrings

2020 VietMX 0

Smart Beaver recently got interested in a new word game. The point is as follows: count the number of distinct good substrings of some string s. […]

Summer Homework

2020 VietMX 0

By the age of three Smart Beaver mastered all arithmetic operations and got this summer homework from the amazed teacher: You are given a sequence […]

Suns and Rays

2020 VietMX 0

Smart Beaver became interested in drawing. He draws suns. However, at some point, Smart Beaver realized that simply drawing suns is boring. So he decided […]

Perfect Pair

2020 VietMX 0

Let us call a pair of integer numbers m-perfect, if at least one number in the pair is greater than or equal to m. Thus, the pairs […]

Ants

2020 VietMX 0

It has been noted that if some ants are put in the junctions of the graphene integer lattice then they will act in the following […]

Game with Powers

2020 VietMX 0

Vasya and Petya wrote down all integers from 1 to n to play the “powers” game ( n can be quite large; however, Vasya and Petya are not confused by this […]

Oh Sweet Beaverette

2020 VietMX 0

— Oh my sweet Beaverette, would you fancy a walk along a wonderful woodland belt with me? — Of course, my Smart Beaver! Let us […]

Shave Beaver!

2020 VietMX 0

The Smart Beaver has recently designed and built an innovative nanotechnologic all-purpose beaver mass shaving machine, “Beavershave 5000”. Beavershave 5000 can shave beavers by families! […]

Escaping on Beaveractor

2020 VietMX 0

Don’t put up with what you’re sick of! The Smart Beaver decided to escape from the campus of Beaver Science Academy (BSA). BSA is a b × b square […]

Purification

2020 VietMX 0

You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of […]

Biridian Forest

2020 VietMX 0

You’re a mikemon breeder currently in the middle of your journey to become a mikemon master. Your current obstacle is go through the infamous Biridian […]

Graph Reconstruction

2020 VietMX 0

I have an undirected graph consisting of n nodes, numbered 1 through n. Each node has at most two incident edges. For each pair of nodes, there is […]

Banana

2020 VietMX 0

Piegirl is buying stickers for a project. Stickers come on sheets, and each sheet of stickers contains exactly n stickers. Each sticker has exactly one character printed […]

More Reclamation

2020 VietMX 0

In a far away land, there are two cities near a river. One day, the cities decide that they have too little space and would […]

Palindrome

2020 VietMX 0

Given a string s, determine if it contains any palindrome of length exactly 100 as a subsequence. If it has any, print any one of them. If it doesn’t […]

Rectangles and Square

2020 VietMX 0

You are given n rectangles, labeled 1 through n. The corners of rectangles have integer coordinates and their edges are parallel to the Ox and Oy axes. The rectangles may touch each […]

Counting Skyscrapers

2020 VietMX 0

A number of skyscrapers have been built in a line. The number of skyscrapers was chosen uniformly at random between 2 and 314! (314 factorial, a very large number). […]