摘要:
G. Sakurako and Chefir Given a tree with $n$ vertices rooted at vertex $1$. While walking through it with her cat Chefir, Sakurako got distracted, and 阅读全文
摘要:
E. Card Game In the most popular card game in Berland, a deck of $n \times m$ cards is used. Each card has two parameters: suit and rank. Suits in the 阅读全文
摘要:
E. Expected Power You are given an array of $n$ integers $a_1,a_2,\ldots,a_n$. You are also given an array $p_1, p_2, \ldots, p_n$. Let $S$ denote the 阅读全文
摘要:
C2. Adjust The Presentation (Hard Version) This is the hard version of the problem. In the two versions, the constraints on $q$ and the time limit are 阅读全文