个人观点,受过ACM训练,有着Regional争金能力的个人,面对这个weekly contest,真的是没啥难点可言,30...
Weekly Contest 目前是北京时间每周日上午 10 点半到 12点,目前参加了 9 次。
【387】First Unique Character in a String 给了一个字符串,要求返回第一个出现只一次字符的下标,不存在这样的字符返回 -1。 题解:直接用了一个map,能过。 View Code 【388】Longest Absolute File Path Contest 2(2018年10月23日,周二) 链接:https://leetcode.com/contest/leetcode-weekly-contest-2 【3...
Given an arrayAof integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible byK. Example 1: Input: A =[4,5,0,-2,-3,1], K =5 Output:7 Explanation: There are 7 subarrays with a sum divisible by K = 5: [4, 5, 0, -2, -3, 1], [5], ...
113th LeetCode Weekly Contest Largest Time for Given Digits,Givenanarrayof4digits,returnthelargest24hourtimethatcanbemade.Thesmallest24hourtimeis00:00,andthelargestis23:59.Startingf
dsu = [i for i in range(n+1)] def union(self, x, y): xr = self.find(x) yr = self.find(y) self.dsu[yr] = xr def find(self, x): if x == self.dsu[x]: return x self.dsu[x] = self.find(self.dsu[x]) return self.dsu[x] class Solution: def areConnected(self, n...
LeetCode Biweekly Contest 132 比赛实况 (ABCD) 40:59 Codeforces Round 952 (Div. 4) 比赛实况 (ABCDEFGH1) H2没做 01:15:37 Codeforces Round 953 (Div. 2) 比赛实况 (ABC) 49:13 Codeforces Round 954 (Div. 3) 比赛实况 (ABCDE) F需要桥的模块 G想破头也不会 57:03 Codeforces Round...
1. 解题思路 这一题思路也很暴力,就是用一个动态规划直接暴力求解…… 整个的算法复杂度在 O ( N ⋅ l o g N ) O(N \cdot logN) O(N⋅logN)。 2. 代码实现 给出python代码实现如下: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 ...
116th LeetCode Weekly Contest N-Repeated Element in Size 2N Array,Inaarray A ofsize 2N,thereare N+1 uniqueelements,andexactlyoneoftheseelementsisrepeatedNtimes.Returntheelementrepeated N times.Ex
贪心经典题目讲解:贪心、思维、枚举、排序【CSP复赛辅导1】 434 -- 13:07 App Leetcode Weekly Contest 421 国服rk1 全球rk3 10分钟AK 339 -- 20:37 App Codeforces Round 982 (Div. 2) 2221 -- 1:45:52 App Meta Hacker Cup 2024 Round 2 7.6万 -- 1:31:15 App 含金量直接拉满!算法编程永...