time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Roman planted a tree consisting of n vertices. Each vertex contains a lowercase English letter. Vertex 1 is the root of the tree, each of the n …
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output As you have noticed, there are lovely girls in Arpa's land. People in Arpa's land are numbered from 1 to n. Everyone has exactly one crush, i-th…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Bash wants to become a Pokemon master one day. Although he liked a lot of Pokemon, he has always been fascinated by Bulbasaur the most. Soon, thi…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Ilya is an experienced player in tic-tac-toe on the 4 × 4 field. He always starts and plays with Xs. He played a lot of games today with his fri…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output After overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n whi…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output After overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n whi…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mahmoud wrote a message s of length n. He wants to send it as a birthday present to his friend Moaz who likes strings. He wrote it on a magical…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarp is mad about coding, that is why he writes Sveta encoded messages. He calls the median letter in a word the letter which is in the middl…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The process of mammoth's genome decoding in Berland comes to its end! One of the few remaining tasks is to restore unrecognized nucleotides in a…