Weekly Contest 291 EndedMay 1, 2022 Weekly Contest 290 EndedApr 24, 2022 Biweekly Contest 85 EndedAug 20, 2022 Past Contests My Contests What's a Virtual Contest? Biweekly Contest 155 Apr 26, 2025 10:30 PM GMT+8 Virtual Weekly Contest 446 Apr 20, 2025 10:30 AM GMT+8 Virtual Weekly...
关联问题 换一批 LeetCode Biweekly Contest 36 中有哪些有趣的题目? 在LeetCode Biweekly Contest 36 中,有哪些题目涉及到数据结构的应用? LeetCode Biweekly Contest 36 的时间限制是多少? 0. 赛后总结 昨天本来身体有点不舒服,就借口颓废了一整天,除了看剧啥事没干,想着比赛就算了吧,结果晚上还是没能逃过...
vector<vector<int>> dp(n, vector<int>(n, -1));intmyBest = utill(nums, dp,0, n-1);return2*myBest >= accumulate(nums.begin(), nums.end(),0); }intutill(vector<int>& v, vector<vector<int>> &dp,inti,intj){if(i > j)return0;if(dp[i][j] != -1)returndp[i][j];int...
由于选择次序在第二位,因此,我们无法控制上位(即Alice)的选择,她的选择永远会比我们大,但是,为了让我们最终的结果更优,我们可以强行安排Bob,让他每次取的都是全局最小的数字。 如此一来,我们的最优策略就是取第 3 × i + 2 ( i = 0 , . . . , n − 1 ) 3\times i + 2 (i = 0, ...,...
每周参加weekly contest,发现前几名都会在半小时左右完成4题,我感觉对于一道陌生的MEDIUM题目,理解+思考...
【leetcode】Weekly Contest 94 题目不难,被第二题卡了半个多小时QAQ,另一个就是以后能用Hashmap和Hashset的绝不遍历。 1. Leaf-Similar Trees dfs、层次遍历把叶子节点遍历然后对比即可,只要是先遍历左节点后遍历右节点就行。 1classSolution {2publicbooleanleafSimilar(TreeNode root1, TreeNode root2) {3...
https://leetcode.cn/contest/weekly-contest-397/problems/permutation-difference-between-two-strings/ 题意 直接模拟 思路 直接模拟即可,每个字符的索引进行相减即可。 复杂度分析: 时间复杂度:$O(n)$。 空间复杂度:$O(1)$。 代码 class Solution: ...
Welcome toBiweekly Contest 43! Feel free to share and post your contest experience here! You can also view the rankings for the contesthere. Links to the individual problems are included below: Calculate Money in Leetcode Bank(3 points) ...
RLE Iterator https://leetcode.com/contest/weekly-contest-101/problems/rle-iterator/ 这道题目就是,2个数字为一组,告诉你有几个几。 然后NEXT,就根据翻译出来的数来取。 比...Leetcode Weekly Contest 128 做出来三个 第一题: Leetcode 1012. Complement of Base 10 Integer 题目: Every non-negative...
Algorithms Exercise: LeetCode Problems, LeetCode Weekly Contest etc. github.com/caipengbo/LeetCode-CPP Resources Readme Activity Stars 56 stars Watchers 6 watching Forks 17 forks Report repository Releases No releases published Packages No packages published Languages Java 99.9% C++ 0.1...