
Mischievous Mess Makers
It is a balmy spring afternoon, and Farmer John’s n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, are arranged so that the i-th […]
It is a balmy spring afternoon, and Farmer John’s n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, are arranged so that the i-th […]
Bessie the cow and her best friend Elsie each received a sliding puzzle on Pi Day. Their puzzles consist of a 2 × 2 grid and three tiles labeled […]
In an attempt to escape the Mischievous Mess Makers’ antics, Farmer John has abandoned his farm and is traveling to the other side of Bovinia. […]
While Farmer John rebuilds his farm in an unfamiliar portion of Bovinia, Bessie is out trying some alternative jobs. In her new gig as a […]
After getting kicked out of her reporting job for not knowing the alphabet, Bessie has decided to attend school at the Fillet and Eggs Eater […]
In an attempt to make peace with the Mischievious Mess Makers, Bessie and Farmer John are planning to plant some flower gardens to complement the […]
Limak is a little polar bear. He loves connecting with other bears via social networks. He has n friends and his relation with the i-th of them is […]
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. […]
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 […]
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 […]
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. […]
As you know, the game of “Nim” is played with n piles of stones, where the i-th pile initially contains a i stones. Two players alternate the turns. During a turn […]
You are given an undirected graph that consists of n vertices and m edges. Initially, each edge is colored either red or blue. Each turn a player picks a […]
Consider a regular Codeforces round consisting of three problems that uses dynamic scoring. You are given an almost final scoreboard. For each participant (including yourself), […]
International Abbreviation Olympiad takes place annually starting from 1989. Each year the competition receives an abbreviation of form IAO’y, where y stands for some number of consequent last […]
Little Artem found a grasshopper. He brought it to his house and constructed a jumping area for him. The area looks like a strip of […]
Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control […]
Little Artem has invented a time machine! He could go anywhere in time, but all his thoughts of course are with computer science. He wants […]
Little Artem is fond of dancing. Most of all dances Artem likes rueda — Cuban dance that is danced by pairs of boys and girls forming […]
Little Artyom decided to study probability theory. He found a book with a lot of nice exercises and now wants you to help him with […]