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

CF1389B-Array Walk

CF1389B-Array Walk 题目: 题目描述: You are given an array $ a_1, a_2, \dots, a_n $ , consisting of $ n $ positive integers. Initially you are standing at index $ 1 $ and have a score equal to $ a_1 $ . You can perform two kinds of moves: move right — go from your current index $ x $ to $ x+1 $

CF1389A-LCM Problem

CF1389A-LCM Problem 题目: 题目描述: Let $ LCM(x, y) $ be the minimum positive integer that is divisible by both $ x $ and $ y $ . For example, $ LCM(13, 37) = 481 $ , $ LCM(9, 6) = 18 $ . You are given two integers $ l $ and $ r $ . Find two integers $ x $ and $

CF1179D-Fedor Runs for President

CF1179D-Fedor Runs for President 题目: 题目描述: Fedor runs for president of Byteland! In the debates, he will be asked how to solve Byteland’s transport problem. It’s a really hard problem because of Byteland’s transport system is now a tree (connected graph without cycles). Fedor’s team has found out in the ministry of transport of Byteland that there is money in the budget only for

CF1388E-Uncle Bogdan and Projections

CF1388E-Uncle Bogdan and Projections 题目: 题目描述: After returning to shore, uncle Bogdan usually visits the computer club “The Rock”, to solve tasks in a pleasant company. One day, uncle Bogdan met his good old friend who told him one unusual task… There are $ n $ non-intersecting horizontal segments with ends in integers points on the plane with the standard cartesian coordinate system. All

CF1388D-Captain Flint and Treasure

CF1388D-Captain Flint and Treasure 题目: 题目描述: Captain Fint is involved in another treasure hunt, but have found only one strange problem. The problem may be connected to the treasure’s location or may not. That’s why captain Flint decided to leave the solving the problem to his crew and offered an absurdly high reward: one day off. The problem itself sounds like this… There are

CF1388C-Uncle Bogdan and Country Happiness

CF1388C-Uncle Bogdan and Country Happiness 题目: 题目描述: Uncle Bogdan is in captain Flint’s crew for a long time and sometimes gets nostalgic for his homeland. Today he told you how his country introduced a happiness index. There are $ n $ cities and $ n−1 $ undirected roads connecting pairs of cities. Citizens of any city can reach any other city traveling