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

CF1366G-Construct the String

CF1366G-Construct the String 题目: 题目描述: Let’s denote the function $ f(s) $ that takes a string $ s $ consisting of lowercase Latin letters and dots, and returns a string consisting of lowercase Latin letters as follows: let $ r $ be an empty string; process the characters of $ s $ from left to right. For each character $ c $ , do

CF1312G-Autocompletion

CF1312G-Autocompletion 题目: 题目描述: You are given a set of strings $ S $ . Each string consists of lowercase Latin letters. For each string in this set, you want to calculate the minimum number of seconds required to type this string. To type a string, you have to start with an empty string and transform it into the string you want to type using

CF1366F-Jog Around The Graph

CF1366F-Jog Around The Graph 题目: 题目描述: You are given a simple weighted connected undirected graph, consisting of $ n $ vertices and $ m $ edges. A path in the graph of length $ k $ is a sequence of $ k+1 $ vertices $ v_1, v_2, \dots, v_{k+1} $ such that for each $ i $ $ (1 \le i \le k) $

CF437D-The Child and Zoo

CF437D-The Child and Zoo 题目: 题目描述: Of course our child likes walking in a zoo. The zoo has $ n $ areas, that are numbered from $ 1 $ to $ n $ . The $ i $ -th area contains $ a_{i} $ animals in it. Also there are $ m $ roads in the zoo, and each road connects two distinct areas.