- 博客(6)
- 资源 (12)
- 问答 (1)
- 收藏
- 关注
原创 leetcode 5687. 执行乘法运算的最大分数
给你两个长度分别 n 和 m 的整数数组 nums 和 multipliers ,其中 n >= m ,数组下标 从 1 开始 计数。初始时,你的分数为 0 。你需要执行恰好 m 步操作。在第 i 步操作(从 1 开始 计数)中,需要:选择数组 nums 开头处或者末尾处 的整数 x 。你获得 multipliers[i] * x 分,并累加到你的分数中。将 x 从数组 nums 中移除。在执行 m 步操作后,返回 最大 分数。示例 1:输入:nums = [1,2,3], multip
2021-02-21 22:49:36 237
原创 leetcode 5686. 移动所有球到每个盒子所需的最小操作数
有 n 个盒子。给你一个长度为 n 的二进制字符串 boxes ,其中 boxes[i] 的值为 ‘0’ 表示第 i 个盒子是 空 的,而 boxes[i] 的值为 ‘1’ 表示盒子里有 一个 小球。在一步操作中,你可以将 一个 小球从某个盒子移动到一个与之相邻的盒子中。第 i 个盒子和第 j 个盒子相邻需满足 abs(i - j) == 1 。注意,操作执行后,某些盒子中可能会存在不止一个小球。返回一个长度为 n 的数组 answer ,其中 answer[i] 是将所有小球移动到第 i 个盒子所需的
2021-02-21 12:40:17 375 2
原创 leetcode 5685. 交替合并字符串
给你两个字符串 word1 和 word2 。请你从 word1 开始,通过交替添加字母来合并字符串。如果一个字符串比另一个字符串长,就将多出来的字母追加到合并后字符串的末尾。返回 合并后的字符串 。示例 1:输入:word1 = "abc", word2 = "pqr"输出:"apbqcr"解释:字符串合并情况如下所示:word1: a b cword2: p q r合并后: a p b q c r示例 2:输入:word1 = "ab", word2 =
2021-02-21 12:32:58 409 1
转载 leetcode 1423. 可获得的最大点数
几张卡牌 排成一行,每张卡牌都有一个对应的点数。点数由整数数组 cardPoints 给出。每次行动,你可以从行的开头或者末尾拿一张卡牌,最终你必须正好拿 k 张卡牌。你的点数就是你拿到手中的所有卡牌的点数之和。给你一个整数数组 cardPoints 和整数 k,请你返回可以获得的最大点数。示例 1:输入:cardPoints = [1,2,3,4,5,6,1], k = 3输出:12解释:第一次行动,不管拿哪张牌,你的点数总是 1 。但是,先拿最右边的卡牌将会最大化你的可获得点数。最优策略是
2021-02-06 14:49:48 182
原创 leetcode 1208. 尽可能使字符串相等
给你两个长度相同的字符串,s 和 t。将 s 中的第 i 个字符变到 t 中的第 i 个字符需要 |s[i] - t[i]| 的开销(开销可能为 0),也就是两个字符的 ASCII 码值的差的绝对值。用于变更字符串的最大预算是 maxCost。在转化字符串时,总开销应当小于等于该预算,这也意味着字符串的转化可能是不完全的。如果你可以将 s 的子字符串转化为它在 t 中对应的子字符串,则返回可以转化的最大长度。如果 s 中没有子字符串可以转化成 t 中对应的子字符串,则返回 0。示例 1:输入:s
2021-02-06 10:29:51 222
原创 leetcode 643. 子数组最大平均数 I
给定 n 个整数,找出平均数最大且长度为 k 的连续子数组,并输出该最大平均数。示例:输入:[1,12,-5,-6,50,3], k = 4输出:12.75解释:最大平均数 (12-5-6+50)/4 = 51/4 = 12.75提示:1 <= k <= n <= 30,000。所给数据范围 [-10,000,10,000]。来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/maximum-average-subar
2021-02-04 21:13:46 172
CoAP_rfc7252.pdf
2020-12-04
openocd-2020-12-23.pdf
2020-11-24
_install.tar.gz
2020-07-08
busybox-1.31.0.tar.bz2
2020-07-08
Real-Time Embedded Multithreading--Using ThreadX.7z
2019-08-20
简明 Python 教程_cn_en
2018-09-04
Inside the C++ Object Model_english&chinese;
2018-07-27
See mips run
2018-03-17
nand操作时page_size = 2048;
2014-11-25
TA创建的收藏夹 TA关注的收藏夹
TA关注的人