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

CF1389G-Directing Edges

CF1389G-Directing Edges 题目: 题目描述: You are given an undirected connected graph consisting of $ n $ vertices and $ m $ edges. $ k $ vertices of this graph are special. You have to direct each edge of this graph or leave it undirected. If you leave the $ i $ -th edge undirected, you pay $ w_i $ coins, and if you direct

CF1389F-Bicolored Segments

CF1389F-Bicolored Segments 题目: 题目描述: You are given $ n $ segments $ [l_1, r_1], [l_2, r_2], \dots, [l_n, r_n] $ . Each segment has one of two colors: the $ i $ -th segment’s color is $ t_i $ . Let’s call a pair of segments $ i $ and $ j $ bad if the following two conditions are met: $ t_i \ne

CF1389D-Segment Intersections

CF1389D-Segment Intersections 题目: 题目描述: You are given two lists of segments $ [al_1, ar_1], [al_2, ar_2], \dots, [al_n, ar_n] $ and $ [bl_1, br_1], [bl_2, br_2], \dots, [bl_n, br_n] $ . Initially, all segments $ [al_i, ar_i] $ are equal to $ [l_1, r_1] $ and all segments $ [bl_i, br_i] $ are equal to $ [l_2, r_2] $ . In one step, you

CF1389E-Calendar Ambiguity

CF1389E-Calendar Ambiguity 题目: 题目描述: Berland year consists of $ m $ months with $ d $ days each. Months are numbered from $ 1 $ to $ m $ . Berland week consists of $ w $ days. The first day of the year is also the first day of the week. Note that the last week of the year might be shorter than

CF1389C-Good String

CF1389C-Good String 题目: 题目描述: Let’s call left cyclic shift of some string $ t_1 t_2 t_3 \dots t_{n - 1} t_n $ as string $ t_2 t_3 \dots t_{n - 1} t_n t_1 $ . Analogically, let’s call right cyclic shift of string $ t $ as string $ t_n t_1 t_2 t_3 \dots t_{n - 1} $ . Let’s say string $ t