贪心盾神与积木游戏(超时有点烦) 摘要:解题思路: 贪心点:先帮差值最小的完成积木作品注意事项:参考代码:# 时间超限: 64 分 运行时间: 6803ms m = int(input()) for _ in …… 题解列表 2023年10月16日 0 点赞 0 评论 313 浏览 评分:9.9
天才的两种解法 摘要:while True: try: # 从输入中读取一个6位的正整数,表示金币的总重量 k = int(input()) - 265716 # 减去初始值…… 题解列表 2023年10月17日 0 点赞 0 评论 481 浏览 评分:9.9
1099: 校门外的树(C++) 摘要:解题思路:先对区间的起始点进行顺序排序,方便直接讨论区间终点的大小情况,根据情况对重复的区间进行去除,对衔接的区间进行拼接另外有先对整段区间赋值,再根据区间改变赋值,简化区间情况讨论的作法。参考代码:…… 题解列表 2023年10月17日 0 点赞 0 评论 405 浏览 评分:9.9
发工资咯 (一往直前!贪心法) 摘要:###贪心法就是遵循某种规则,不断贪心地选取当前最优策略 解题思路: 题目问最少需要多少张人民币,每次都先选面值最大的,当剩余的钱不够一张最大的面值时再用次大的人民币 依次类推就找到了最优解。 …… 题解列表 2023年10月17日 0 点赞 0 评论 522 浏览 评分:9.9
1989: 奇数个数 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> #include<cmath> using namespace std; int mai…… 题解列表 2023年10月17日 0 点赞 0 评论 341 浏览 评分:9.9
字符串距离:一种典型动态规划 摘要:解题思路:在这个题目中,要求求两个字符串之间的最小距离,在初始化字符串的时候先分别考虑两个字符串为空的情况,当其中一个为空时,另外一个字符串对应的每一个字符的位置上都是加k(空字符与任意字符的距离),…… 题解列表 2023年10月17日 0 点赞 0 评论 501 浏览 评分:9.9
我来告诉你高手怎么解题 摘要:from itertools import permutations options = [7, 6, 5, 4, 3, 2, 1] for perm in permutations(option…… 题解列表 2023年10月17日 0 点赞 0 评论 663 浏览 评分:9.9
绝对是这道题最短代码,轻松解决 摘要:import math def is_jx(n): return sum(math.factorial(int(digit)) for digit in str(n)) == n jx_…… 题解列表 2023年10月17日 0 点赞 0 评论 562 浏览 评分:9.9
要加EOF,这是满分 摘要:while True: try: line = input().strip() if line == 'END': 题解列表 2023年10月18日 0 点赞 0 评论 425 浏览 评分:9.9
蓝桥杯算法提高VIP-复数求和 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;typedef struct Lnode{ int date1; int date2; …… 题解列表 2023年10月18日 0 点赞 0 评论 397 浏览 评分:9.9