上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 63 下一页
摘要: Subarray With Elements Greater Than Varying Threshold You are given an integer array $nums$ and an integer $threshold$. Find any subarray of $nums$ of 阅读全文
posted @ 2022-08-29 20:19 onlyblues 阅读(63) 评论(0) 推荐(0)
摘要: Build a Matrix With Conditions You are given a positive integer $k$. You are also given: a 2D integer array $rowConditions$ of size $n$ where $rowCond 阅读全文
posted @ 2022-08-28 15:41 onlyblues 阅读(105) 评论(0) 推荐(0)
摘要: 整数分组 给定一个包含 $n$ 个整数 $s_1,s_2, \dots ,s_n$ 的集合 $S$。 我们规定,如果某个整数在一个集合中恰好出现一次,则称该整数为超级数。 例如,集合 $\{1,1,2,3,3,3,4\}$ 中包含两个超级数 $2,4$。 现在,请你将 $S$ 分成两个集合 $A$ 阅读全文
posted @ 2022-08-28 09:06 onlyblues 阅读(73) 评论(0) 推荐(0)
摘要: 吃水果 $n$ 个小朋友站成一排,等着吃水果。 一共有 $m$ 种水果,每种水果的数量都足够多。 现在,要给每个小朋友都发一个水果,要求:在所有小朋友都拿到水果后,恰好有 $k$ 个小朋友拿到的水果和其左边相邻小朋友拿到的水果不同(最左边的小朋友当然不算数,即最左边的小朋友不包含在 $k$ 个小朋友 阅读全文
posted @ 2022-08-27 16:10 onlyblues 阅读(96) 评论(0) 推荐(0)
摘要: 在一个有向图中,每一个点都有唯一的一个出边,那么这个图就是一棵基环树。 因为每个点都有一个出边,因此会一直指向下一个结点。又因为点数有限,因此不可能一直指下去,因此必然存在一个结点会指向之前已经存在过的结点(抽屉原理),所以就一定会形成一个环。又因为这个点只有一条出边,因此它不会再指向其他的结点,环 阅读全文
posted @ 2022-08-26 15:35 onlyblues 阅读(125) 评论(0) 推荐(1)
摘要: 序列 给定 $m$ 个序列,每个包含 $n$ 个非负整数。 现在我们可以从每个序列中选择一个数字以形成具有 $m$ 个整数的序列。 很明显,我们一共可以得到 $n^m$ 个这种序列,然后我们可以计算每个序列中的数字之和,并得到 $n^m$ 个值。 现在请你求出这些序列和之中最小的 $n$ 个值。 输 阅读全文
posted @ 2022-08-23 21:58 onlyblues 阅读(158) 评论(0) 推荐(0)
摘要: Largest Palindromic Number You are given a string $num$ consisting of digits only. Return the largest palindromic integer (in the form of a string) th 阅读全文
posted @ 2022-08-21 22:00 onlyblues 阅读(44) 评论(0) 推荐(0)
摘要: Maximum Segment Sum After Removals You are given two 0-indexed integer arrays $nums$ and $removeQueries$, both of length $n$. For the $i^{th}$ query, 阅读全文
posted @ 2022-08-21 19:07 onlyblues 阅读(90) 评论(0) 推荐(0)
摘要: Time Needed to Rearrange a Binary String You are given a binary string $s$. In one second, all occurrences of 01 are simultaneously replaced with 10 . 阅读全文
posted @ 2022-08-21 16:19 onlyblues 阅读(78) 评论(0) 推荐(0)
摘要: 最大周长 给定二维平面上的 $n$ 个不共线的点,这 $n$ 个点组成的多边形是凸多边形 。 这些点按顺时针顺序依次编号为 $1 \sim n$。 我们将两点 $p_1(x_1,y_1)$ 和 $p_2(x_2,y_2)$ 之间的距离定义为它们的曼哈顿距离:$d(p_1,p_2)=|x_1−x_2| 阅读全文
posted @ 2022-08-21 13:20 onlyblues 阅读(293) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 63 下一页
Web Analytics