2579: 蓝桥杯2020年第十一届省赛真题-网络分析 摘要:解题思路:在两个集合合并时将每个节点的当前大小保存,将时间复杂度从(nm)压到了(n2)注意事项:注意使用启发式合并,不然还是会超时参考代码:#include<bits/stdc++.h> usin…… 题解列表 2024年04月08日 0 点赞 0 评论 351 浏览 评分:9.9
3048: 抓住那头牛 摘要:解题思路: BFS: 三种移动方向 + 1, - 1, 2 * x注意事项:参考代码:#include<iostream> #include<cstring> using namespace st…… 题解列表 2024年04月08日 1 点赞 0 评论 353 浏览 评分:9.9
特殊的质数肋骨(c语言) 摘要:解题思路:首位只能是{2,3,5,7}这四个数字,后面每一位都只能是{1,3,7,9},因此我从前往后的判断,比如2头,然后我循环判断2*10+1,2*10+3,2*10+7,2*10+9是否为质数,…… 题解列表 2024年04月08日 1 点赞 0 评论 419 浏览 评分:10.0
只用if_else不用循环,注释详细 摘要:解题思路:用总刷题数除以一周的刷题总数,从而将天数问题转化为一个周期内的分段问题注意事项:注意分段做到不重不漏参考代码:#include<bits/stdc++.h> #define ll long…… 题解列表 2024年04月08日 2 点赞 0 评论 471 浏览 评分:10.0
图像旋转,非常规的简单方法 摘要:解题思路:注意事项:参考代码:m,n = map(int,input().split()) num = [list(map(int,input().split())) for _ in range(…… 题解列表 2024年04月08日 0 点赞 0 评论 163 浏览 评分:0.0
蓝桥杯2020年第十一届国赛真题-答疑 C++ 排序 贪心 摘要:解题思路:在前面都选择花费总时间最少的 最后的答案一定是花费时间最少的注意事项:记得开 long long参考代码:#include<bits/stdc++.h>#define int long lo…… 题解列表 2024年04月08日 0 点赞 0 评论 333 浏览 评分:0.0
矩阵转置,非常规的简单方法 摘要:解题思路:注意事项:参考代码:m,n = map(int,input().split()) num = [list(map(int,input().split())) for _ in range(…… 题解列表 2024年04月08日 0 点赞 0 评论 241 浏览 评分:0.0
题解 2701 取模C语言 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> in…… 题解列表 2024年04月08日 3 点赞 0 评论 360 浏览 评分:0.0
2835: 计算书费 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;double a[10]= { 28.9,32.7,45.6,78,35,86.2…… 题解列表 2024年04月08日 0 点赞 0 评论 697 浏览 评分:9.9
蓝桥杯算法提高-能量项链 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n, i, k, left, right; int arr[200], min; l…… 题解列表 2024年04月08日 0 点赞 0 评论 290 浏览 评分:0.0