https://www.gravatar.com/avatar/8f3abece0f8608ce4b9c1e3212fd1b72?s=240&d=mp

CF280C-Game on Tree

CF280C-Game on Tree 题目: 题目描述: Momiji has got a rooted tree, consisting of $ n $ nodes. The tree nodes are numbered by integers from $ 1 $ to $ n $ . The root has number $ 1 $ . Momiji decided to play a game on this tree. The game consists of several steps. On each step, Momiji chooses one of the

CF455D-Serega and Fun

CF455D-Serega and Fun 题目: 题目描述: Serega loves fun. However, everyone has fun in the unique manner. Serega has fun by solving query problems. One day Fedor came up with such a problem. You are given an array $ a $ consisting of $ n $ positive integers and queries to it. The queries can be of two types: Make a unit cyclic shift to