2228: 蓝桥杯算法训练-Anagrams问题 摘要: #include #include using namespace std; int main() { char a[80],b[80…… 题解列表 2024年04月08日 0 点赞 0 评论 451 浏览 评分:0.0
2221: 蓝桥杯算法训练-素因子去重 摘要: #include using namespace std; int main() { long long n; long lo…… 题解列表 2024年04月08日 0 点赞 0 评论 299 浏览 评分:0.0
2684: 蓝桥杯2022年第十三届省赛真题-数位排序-sort 摘要: #include #include using namespace std; bool cmp(int x,int y){ int sum1=0…… 题解列表 2024年04月08日 4 点赞 0 评论 525 浏览 评分:10.0
汽水瓶 简单代码 C++实现 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int n; //n表示空瓶数量 while(cin>>…… 题解列表 2024年04月08日 0 点赞 0 评论 289 浏览 评分:8.0
动态规划,用set代替list就可以跑完全部数据 摘要:解题思路:动态规划,新加的砝码和目前所得的质量可以相加,相减(两种情况,新砝码减旧质量或旧质量减新质量),将所得的结果(大于0)存入dp,供下一次使用,注意事项:中间要专门设一个列表,用于存储新称的重…… 题解列表 2024年04月08日 0 点赞 0 评论 530 浏览 评分:9.9
信息学奥赛一本通T1258- 数字金字塔 摘要:解题思路:DP, 逆推注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> using namespace std…… 题解列表 2024年04月08日 0 点赞 0 评论 288 浏览 评分:9.9
Hash无脑过,二分有点坑!!! 摘要:```python # 二分做法 n = eval(input()) ls = sorted(list(map(int, input().split()))) target = eval(in…… 题解列表 2024年04月08日 0 点赞 0 评论 451 浏览 评分:9.9
递归解法~~~~~~~~ 摘要:参考代码:def charge(n, summ): a = n // 3 b = n % 3 summ += a if (a + b) < 题解列表 2024年04月08日 0 点赞 0 评论 593 浏览 评分:6.0
2579: 蓝桥杯2020年第十一届省赛真题-网络分析 摘要:解题思路:在两个集合合并时将每个节点的当前大小保存,将时间复杂度从(nm)压到了(n2)注意事项:注意使用启发式合并,不然还是会超时参考代码:#include<bits/stdc++.h> usin…… 题解列表 2024年04月08日 0 点赞 0 评论 466 浏览 评分:9.9
3048: 抓住那头牛 摘要:解题思路: BFS: 三种移动方向 + 1, - 1, 2 * x注意事项:参考代码:#include<iostream> #include<cstring> using namespace st…… 题解列表 2024年04月08日 1 点赞 0 评论 527 浏览 评分:9.9