题解列表
连通图(sf14b)
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=100005;int father[N];//找……
连通图是否连通(sf14a)
摘要:解题思路:注意事项:记得压缩路径参考代码:#include<bits/stdc++.h>using namespace std;const int N=1005;int father[N]……
dfs深度(sf13e)
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n,m,cnt=0;int a[102];int visited……
题目 1010: [编程入门]利润计算
摘要:解题思路: 通过if-else if-else实现不同利润奖金的计算,但是需要注意本题要求整数,所以在计算中将*0.0x改*x/100,避免出现浮点数,不然可能精度错误导致某……
求解这简单的凯撒密码加密
摘要:解题思路:lip = input()result = ""for i in lip: i = chr(ord(i) + 4) i……
DFS深度(sf13d)
摘要:解题思路:深度:一个个遍历下去,不撞南墙不回头(南墙:前面没有可以遍历的对象,回头:回到最近的岔路口,走没有走过的其他岔路)&n……
链表合并map(sf13c)
摘要:解题思路:map<int,int>mp;//一个是键,一个是值//map有自动排序特性注意事项:注意map的输入和输出的方式参考代码:#include<bits/stdc……