[闲聊] LeetCode Weekly Contest 326

楼主: fxfxxxfxx (爱丽丝)   2023-01-01 12:00:09
哭了 这礼拜一题 hard 都没有
阿我打字就很慢阿 烂死了
https://i.imgur.com/VEQUBRJ.png
22:46 排 344 名 :((((
1. Count the Digits That Divide a Number
对每个 digit 检查
2. Distinct Prime Factors of Product of Array
对每个 <= 1000 的质数检查 nums 内有没有人被他整除
<= 1000 的质数只有 168 个,时间还是绰绰有余
3. Partition String Into Substrings With Values at Most K
DP[i] = min_j(DP[i-j] + 1) 对所有 int(s[i-j:i+1]) >= k
因为 k <= 10^9,长度最多 10,时间很够
4. Closest Prime Numbers in Range
直接检查 [left, right] 内相邻的质数找距离最短的
作者: SecondRun (雨夜琴声)   2023-01-01 12:04:00
大师
作者: NTHUlagka (拉卡)   2023-01-01 12:43:00
大师

Links booklink

Contact Us: admin [ a t ] ucptt.com