11 2022 档案
摘要:D. Range = √Sum You are given an integer . Find a sequence of distinct integers such that for all
阅读全文
摘要:Count Subarrays With Median K You are given an array nums of size consisting of distinct integers from to and a positive integer . Retu
阅读全文
摘要:C. Almost All Multiples Given two integers and , a permutation of length is called funny if is a multiple of for
阅读全文
摘要:E. Binary Inversions You are given a binary array of length . You are allowed to perform one operation on it at most once. In an operat
阅读全文
摘要:B. Elimination of a Ring Define a cyclic sequence of size as an array of length , in which is adjacent to . Muxii has a ring rep
阅读全文
摘要:G. Restore the Permutation A sequence of numbers is called permutation if it contains all numbers from to exactly once. For example, the s
阅读全文
摘要:Number of Beautiful Partitions You are given a string s that consists of the digits '1' to '9' and two integers k and minLength. A partition of s is c
阅读全文
摘要:排队 个小朋友排成一排,从左到右依次编号为 。 第 个小朋友的身高为 。 虽然队伍已经排好,但是小朋友们对此并不完全满意。 对于一个小朋友来说,如果存在其他小朋友身高比他更矮,却站在他右侧的情况,该小朋友就会感到不满。 每个小朋友的不满程度都可以量化计算
阅读全文
摘要:E. Hanging Hearts Pak Chanek has blank heart-shaped cards. Card is attached directly to the wall while each of the other cards is hanging onto
阅读全文
摘要:D. Count GCD You are given two integers and and an array of integers. For each it holds that . Your t
阅读全文
摘要:D. Knowledge Cards Pak Chanek, a renowned scholar, invented a card puzzle using his knowledge. In the puzzle, you are given a board with rows and
阅读全文
摘要:E. Cactus Wall Monocarp is playing Minecraft and wants to build a wall of cacti. He wants to build it on a field of sand of the size of c
阅读全文
摘要:D. ConstructOR You are given three integers , , and . Your task is to find any integer which satisfies all of the following conditions, o
阅读全文
摘要:B. Diverse Substrings A non-empty digit string is diverse if the number of occurrences of each character in it doesn't exceed the number of distinct c
阅读全文
摘要:Maximum Number of Non-overlapping Palindrome Substrings You are given a string s and a positive integer k . Select a set of non-overlapping substrings
阅读全文
摘要:Minimum Number of Operations to Sort a Binary Tree by Level You are given the root of a binary tree with unique values. In one operation, you can choo
阅读全文
摘要:摆放棋子 给定一个 的国际象棋棋盘(即一个 的方格矩阵)。 我们知道传统国际象棋中,主教(象)的行走规则是只能斜走,格数不限,但不可转向。 现在,我们对主教进行了修改,不妨称加强后的主教为大主教。 大主教仍然只能斜走,格数不限,但是当其走到棋盘边缘
阅读全文
摘要:D. Yet Another Problem You are given an array of integers . You have to answer independent queries, each consist
阅读全文
摘要:C. Swap Game Alice and Bob are playing a game on an array of positive integers. Alice and Bob make alternating moves with Alice going first. I
阅读全文