上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 63 下一页
摘要: Count Pairs With XOR in a Range Given a (0-indexed) integer array nums and two integers low and high , return the number of nice pairs. A nice pair is 阅读全文
posted @ 2023-01-12 16:45 onlyblues 阅读(66) 评论(0) 推荐(0)
摘要: Maximum Number of Points From Grid Queries You are given an $m \times n$ integer matrix grid and an array queries of size $k$. Find an array answer of 阅读全文
posted @ 2023-01-11 17:24 onlyblues 阅读(174) 评论(0) 推荐(0)
摘要: Frog Jump II You are given a 0-indexed integer array stones sorted in strictly increasing order representing the positions of stones in a river. A fro 阅读全文
posted @ 2023-01-11 10:15 onlyblues 阅读(87) 评论(0) 推荐(0)
摘要: 技能升级 小蓝最近正在玩一款 $RPG$ 游戏。 他的角色一共有 $N$ 个可以加攻击力的技能。 其中第 $i$ 个技能首次升级可以提升 $A_i$ 点攻击力,以后每次升级增加的点数都会减少 $B_i$。 $\left\lceil \frac{A_i}{B_i} \right\rceil$(上取整) 阅读全文
posted @ 2023-01-10 17:07 onlyblues 阅读(82) 评论(0) 推荐(0)
摘要: 选数异或 给定一个长度为 $n$ 的数列 $A_1,A_2,\ldots,A_n$ 和一个非负整数 $x$,给定 $m$ 次查询,每次询问能否从某个区间 $[l,r]$ 中选择两个下标不同的数使得他们的异或等于 $x$。 输入格式 输入的第一行包含三个整数 $n,m,x$。 第二行包含 $n$ 个整 阅读全文
posted @ 2023-01-09 11:54 onlyblues 阅读(130) 评论(0) 推荐(0)
摘要: 上课睡觉 有 $N$ 堆石子,每堆的石子数量分别为 $a_1,a_2, \ldots, a_N$。 你可以对石子堆进行合并操作,将两个相邻的石子堆合并为一个石子堆,例如,如果 $a=[1,2,3,4,5]$,合并第 $2,3$ 堆石子,则石子堆集合变为 $a=[1,5,4,5]$。 我们希望通过尽可 阅读全文
posted @ 2023-01-05 19:11 onlyblues 阅读(57) 评论(0) 推荐(0)
摘要: Add Edges to Make Degrees of All Nodes Even There is an undirected graph consisting of $n$ nodes numbered from $1$ to $n$. You are given the integer $ 阅读全文
posted @ 2022-12-18 17:31 onlyblues 阅读(56) 评论(0) 推荐(0)
摘要: 打地鼠 欢迎各位勇者来到力扣城,本次试炼主题为「打地鼠」。 勇者面前有一个大小为 3*3 的打地鼠游戏机,地鼠将随机出现在各个位置,moles[i] = [t,x,y] 表示在第 t 秒会有地鼠出现在 (x,y) 位置上,并于第 t+1 秒该地鼠消失。 勇者有一把可敲打地鼠的锤子,初始时刻(即第 0 阅读全文
posted @ 2022-12-16 17:45 onlyblues 阅读(163) 评论(0) 推荐(0)
摘要: D. Range = √Sum You are given an integer $n$. Find a sequence of $n$ distinct integers $a_1, a_2, \dots, a_n$ such that $1 \leq a_i \leq 10^9$ for all 阅读全文
posted @ 2022-11-28 20:55 onlyblues 阅读(183) 评论(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 阅读(82) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 63 下一页
Web Analytics