小白随便写的,记录一下,python开荒 摘要:```python """ 树形dp吧这题,这题很经典,但大多写法都是c/c++ 写了一下python 然后大部分思路都是dfs深搜 这里写了一下层次遍历的思路 其实和dfs的差不多 但还是提…… 题解列表 2024年04月09日 0 点赞 0 评论 682 浏览 评分:0.0
动态规划,用set代替list就可以跑完全部数据 摘要:解题思路:动态规划,新加的砝码和目前所得的质量可以相加,相减(两种情况,新砝码减旧质量或旧质量减新质量),将所得的结果(大于0)存入dp,供下一次使用,注意事项:中间要专门设一个列表,用于存储新称的重…… 题解列表 2024年04月08日 0 点赞 0 评论 606 浏览 评分:9.9
Hash无脑过,二分有点坑!!! 摘要:```python # 二分做法 n = eval(input()) ls = sorted(list(map(int, input().split()))) target = eval(in…… 题解列表 2024年04月08日 0 点赞 0 评论 500 浏览 评分:9.9
递归解法~~~~~~~~ 摘要:参考代码:def charge(n, summ): a = n // 3 b = n % 3 summ += a if (a + b) < 题解列表 2024年04月08日 0 点赞 0 评论 636 浏览 评分:6.0
图像旋转,非常规的简单方法 摘要:解题思路:注意事项:参考代码:m,n = map(int,input().split()) num = [list(map(int,input().split())) for _ in range(…… 题解列表 2024年04月08日 0 点赞 0 评论 322 浏览 评分:0.0
矩阵转置,非常规的简单方法 摘要:解题思路:注意事项:参考代码:m,n = map(int,input().split()) num = [list(map(int,input().split())) for _ in range(…… 题解列表 2024年04月08日 0 点赞 0 评论 349 浏览 评分:0.0
1227: 日期排序 摘要:解题思路:注意事项:参考代码:arr = [] while True: try: arr.append(list(map(str, input().split('…… 题解列表 2024年04月08日 0 点赞 0 评论 526 浏览 评分:0.0
计算鞍点,简单易懂 摘要:解题思路:注意事项:参考代码:num = [list(map(int,input().split())) for _ in range(5)] row,col = [],[] sum = floa…… 题解列表 2024年04月08日 0 点赞 0 评论 474 浏览 评分:0.0
1219: 数列排序 摘要:解题思路:注意事项:参考代码:N = int(input()) for _ in range(N): arr = list(map(int, input().split())) …… 题解列表 2024年04月08日 0 点赞 1 评论 445 浏览 评分:0.0
1169: 绝对值排序 摘要:解题思路:注意事项:参考代码:while True: try: n = list(map(int, input().split())) a = n[1:]…… 题解列表 2024年04月08日 0 点赞 0 评论 392 浏览 评分:0.0