题目: 题解:
class Solution:def lengthLongestPath(self, input: str) -> int:ans, i, n 0, 0, len(input)level [0] * (n 1)while i < n:# 检测当前文件的深度depth 1while i < n and input[i] \t:depth 1i 1# 统计当前文件名的长度l…
文章目录 1. 题目来源2. 题目解析 1. 题目来源
链接:3273. 对 Bob 造成的最少伤害
题单:
na na
2. 题目解析
略低于正常难度的 T4。
显然我们应该尽可能的将伤害高的先消掉,然后写完代码就会发现 WA 了。想太简单了,那就推…