10 2022 档案
摘要:Next Greater Element IV You are given a 0-indexed array of non-negative integers nums . For each integer in nums , you must find its respective second
阅读全文
摘要:C1. Sheikh (Easy version) This is the easy version of the problem. The only difference is that in this version . You are given an array of intege
阅读全文
摘要:D. Factorial Divisibility You are given an integer and an array of integers . You have to determine if the number $a_1!+a_2!+
阅读全文
摘要:F. MEX vs MED You are given a permutation of length of numbers . Count the number of subsegments $1 \leq l \l
阅读全文
摘要:E. FTL Monocarp is playing a video game. In the game, he controls a spaceship and has to destroy an enemy spaceship. Monocarp has two lasers installed
阅读全文
摘要:C1. Make Nonzero Sum (easy version) This is the easy version of the problem. The difference is that in this version the array can not contain zeros. Y
阅读全文
摘要:D1. Balance (Easy version) This is the easy version of the problem. The only difference is that in this version there are no "remove" queries. Initial
阅读全文
摘要:B. Ugu A binary string is a string consisting only of the characters and . You are given a binary string . It is necessary t
阅读全文
摘要:A. Bestie You are given an array consisting of integers . Friends asked you to make the greatest common divisor (GCD) of
阅读全文
摘要:D. Problem with Random Tests You are given a string consisting of characters. Each character of is either or . A substring of i
阅读全文
摘要:C. Save the Magazines Monocarp has been collecting rare magazines for quite a while, and now he has decided to sell them. He distributed the magazines
阅读全文
摘要:E2. Divisible Numbers (hard version) This is an hard version of the problem. The only difference between an easy and a hard version is the constraints
阅读全文
摘要:E1. Divisible Numbers (easy version) This is an easy version of the problem. The only difference between an easy and a hard version is the constraints
阅读全文
摘要:Count Subarrays With Fixed Bounds You are given an integer array nums and two integers minK and maxK . A fixed-bound subarray of nums is a subarray th
阅读全文
摘要:Minimize Maximum of Array You are given a 0-indexed array nums comprising of non-negative integers. In one operation, you must: Choose an integer
阅读全文
摘要:最短路程 给定一个 个节点的树。 节点编号为 。 树中所有边均为双向边,且长度均已知。 你需要从 号点出发,沿着一条路径遍历树中所有点,路径中可以包含重复的点和边。 要求,你的行程总长度应尽可能短。 请你计算,你所需的行程总长度的最小可能值。 注意,你可以在任意点
阅读全文
摘要:F. Multi-Colored Segments Dmitry has segments of different colors on the coordinate axis . Each segment is characterized by three integers $l_
阅读全文
摘要:E. Sending a Sequence Over the Network The sequence is sent over the network as follows: sequence is split into segments (each element of the
阅读全文
摘要:D. Equal Binary Subsequences Everool has a binary string of length . Note that a binary string is a string consisting of only characters a
阅读全文
摘要:C1. Good Subarrays (Easy Version) This is the easy version of this problem. In this version, we do not have queries. Note that we have multiple test c
阅读全文
摘要:B. Playing with GCD You are given an integer array of length . Does there exist an array consisting of positive integers such that $a
阅读全文
摘要:Minimum Swaps To Make Sequences Increasing You are given two integer arrays of the same length nums1 and nums2 . In one operation, you are allowed to
阅读全文
摘要:Using a Robot to Print the Lexicographically Smallest String You are given a string s and a robot that currently holds an empty string t . Apply one o
阅读全文
摘要:Maximum Deletions on a String You are given a string s consisting of only lowercase English letters. In one operation, you can: Delete the entire stri
阅读全文
摘要:买糖果 个糖果店,围成一圈。 店铺按顺时针顺序从 到 编号, 号店铺与 号店铺相邻。 第 号店铺的单个糖果售价为 元。 李华拿着 元钱去购买糖果,具体购买过程如下: 初始时,他位于 号店铺。 如果他现有的钱足够在当前店铺购买一
阅读全文