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

CF1451B-Non-Substring Subsequence

CF1451B-Non-Substring Subsequence 题目: 题目描述: Hr0d1y has $ q $ queries on a binary string $ s $ of length $ n $ . A binary string is a string containing only characters ‘0’ and ‘1’. A query is described by a pair of integers $ l_i $ , $ r_i $ $ (1 \leq l_i \lt r_i \leq n) $ . For each query,

CF1451A-Subtract or Divide

CF1451A-Subtract or Divide 题目: 题目描述: Ridbit starts with an integer $ n $ . In one move, he can perform one of the following operations: divide $ n $ by one of its proper divisors, or subtract $ 1 $ from $ n $ if $ n $ is greater than $ 1 $ . A proper divisor is a divisor of a number,

CF915F-Imbalance Value of a Tree

CF915F-Imbalance Value of a Tree 题目: 题目描述: You are given a tree $ T $ consisting of $ n $ vertices. A number is written on each vertex; the number written on vertex $ i $ is $ a_{i} $ . Let’s denote the function $ I(x,y) $ as the difference between maximum and minimum value of $ a_{i} $ on a simple path