11 2022 档案

摘要:D. Range = √Sum You are given an integer n. Find a sequence of n distinct integers a1,a2,,an such that 1ai109 for all 阅读全文
posted @ 2022-11-28 20:55 onlyblues 阅读(139) 评论(0) 推荐(1) 编辑
摘要:Count Subarrays With Median K You are given an array nums of size n consisting of distinct integers from 1 to n and a positive integer k. Retu 阅读全文
posted @ 2022-11-27 14:04 onlyblues 阅读(71) 评论(0) 推荐(0) 编辑
摘要:C. Almost All Multiples Given two integers n and x, a permutation p of length n is called funny if pi is a multiple of i for 阅读全文
posted @ 2022-11-26 16:50 onlyblues 阅读(96) 评论(0) 推荐(0) 编辑
摘要:E. Binary Inversions You are given a binary array of length n. You are allowed to perform one operation on it at most once. In an operat 阅读全文
posted @ 2022-11-23 09:56 onlyblues 阅读(99) 评论(0) 推荐(0) 编辑
摘要:B. Elimination of a Ring Define a cyclic sequence of size n as an array s of length n, in which sn is adjacent to s1. Muxii has a ring rep 阅读全文
posted @ 2022-11-21 16:33 onlyblues 阅读(88) 评论(0) 推荐(0) 编辑
摘要:G. Restore the Permutation A sequence of n numbers is called permutation if it contains all numbers from 1 to n exactly once. For example, the s 阅读全文
posted @ 2022-11-20 16:59 onlyblues 阅读(123) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-11-20 15:38 onlyblues 阅读(22) 评论(0) 推荐(0) 编辑
摘要:排队 n 个小朋友排成一排,从左到右依次编号为 1n。 第 i 个小朋友的身高为 hi。 虽然队伍已经排好,但是小朋友们对此并不完全满意。 对于一个小朋友来说,如果存在其他小朋友身高比他更矮,却站在他右侧的情况,该小朋友就会感到不满。 每个小朋友的不满程度都可以量化计算 阅读全文
posted @ 2022-11-20 10:05 onlyblues 阅读(167) 评论(0) 推荐(0) 编辑
摘要:E. Hanging Hearts Pak Chanek has n blank heart-shaped cards. Card 1 is attached directly to the wall while each of the other cards is hanging onto 阅读全文
posted @ 2022-11-18 20:31 onlyblues 阅读(52) 评论(0) 推荐(0) 编辑
摘要:D. Count GCD You are given two integers n and m and an array a of n integers. For each 1in it holds that 1aim. Your t 阅读全文
posted @ 2022-11-18 11:42 onlyblues 阅读(55) 评论(4) 推荐(1) 编辑
摘要:D. Knowledge Cards Pak Chanek, a renowned scholar, invented a card puzzle using his knowledge. In the puzzle, you are given a board with n rows and 阅读全文
posted @ 2022-11-17 21:07 onlyblues 阅读(76) 评论(2) 推荐(0) 编辑
摘要: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 n×m c 阅读全文
posted @ 2022-11-16 10:10 onlyblues 阅读(60) 评论(0) 推荐(0) 编辑
摘要:D. ConstructOR You are given three integers a, b, and d. Your task is to find any integer x which satisfies all of the following conditions, o 阅读全文
posted @ 2022-11-15 20:02 onlyblues 阅读(95) 评论(4) 推荐(0) 编辑
摘要:区间最大公约数 给定一个长度为 N 的数列 A,以及 M 条指令,每条指令可能是以下两种之一: C l r d ,表示把 A[l],A[l+1],,A[r] 都加上 d。 Q l r ,表示询问 A[l],A[l+1],,A[r] 的最大公约数 阅读全文
posted @ 2022-11-15 14:38 onlyblues 阅读(360) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-11-14 21:21 onlyblues 阅读(156) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-11-14 20:38 onlyblues 阅读(30) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-11-14 20:10 onlyblues 阅读(47) 评论(0) 推荐(0) 编辑
摘要:摆放棋子 给定一个 n×m 的国际象棋棋盘(即一个 n×m 的方格矩阵)。 我们知道传统国际象棋中,主教(象)的行走规则是只能斜走,格数不限,但不可转向。 现在,我们对主教进行了修改,不妨称加强后的主教为大主教。 大主教仍然只能斜走,格数不限,但是当其走到棋盘边缘 阅读全文
posted @ 2022-11-13 20:34 onlyblues 阅读(140) 评论(0) 推荐(0) 编辑
摘要:D. Yet Another Problem You are given an array a of n integers a1,a2,a3,,an. You have to answer q independent queries, each consist 阅读全文
posted @ 2022-11-13 15:00 onlyblues 阅读(17) 评论(0) 推荐(0) 编辑
摘要:C. Swap Game Alice and Bob are playing a game on an array a of n positive integers. Alice and Bob make alternating moves with Alice going first. I 阅读全文
posted @ 2022-11-12 18:09 onlyblues 阅读(47) 评论(0) 推荐(0) 编辑
摘要:构造数组 请你构造一个长度为 n 的正整数数组 a1,a2,,an。 我们会给出一个长度为 n1 的由 <>= 组成的字符串 s1s2sn1 用于约束你的构造: 如果 si<,则表示你构造的数组需满足 阅读全文
posted @ 2022-11-12 15:22 onlyblues 阅读(22) 评论(0) 推荐(0) 编辑

Web Analytics
点击右上角即可分享
微信分享提示