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

CF1398D-Colored Rectangles

CF1398D-Colored Rectangles 题目: 题目描述: You are given three multisets of pairs of colored sticks: $ R $ pairs of red sticks, the first pair has length $ r_1 $ , the second pair has length $ r_2 $ , $ \dots $ , the $ R $ -th pair has length $ r_R $ ; $ G $ pairs of green sticks, the first

CF1398C-Good Subarrays

CF1398C-Good Subarrays 题目: 题目描述: You are given an array $ a_1, a_2, \dots , a_n $ consisting of integers from $ 0 $ to $ 9 $ . A subarray $ a_l, a_{l+1}, a_{l+2}, \dots , a_{r-1}, a_r $ is good if the sum of elements of this subarray is equal to the length of this subarray ( $ \sum\limits_{i=l}^{r} a_i = r -

CF1398B-Substring Removal Game

CF1398B-Substring Removal Game 题目: 题目描述: Alice and Bob play a game. They have a binary string $ s $ (a string such that each character in it is either $ 0 $ or $ 1 $ ). Alice moves first, then Bob, then Alice again, and so on. During their move, the player can choose any number (not less than one) of consecutive equal

CF1398A-Bad Triangle

CF1398A-Bad Triangle 题目: 题目描述: You are given an array $ a_1, a_2, \dots , a_n $ , which is sorted in non-decreasing order ( $ a_i \le a_{i + 1}) $ . Find three indices $ i $ , $ j $ , $ k $ such that $ 1 \le i < j < k \le n $ and it is impossible to

CF1394B-Boboniu Walks on Graph

CF1394B-Boboniu Walks on Graph 题目: 题目描述: Boboniu has a directed graph with $ n $ vertices and $ m $ edges. The out-degree of each vertex is at most $ k $ . Each edge has an integer weight between $ 1 $ and $ m $ . No two edges have equal weights. Boboniu likes to walk on the graph with some specific