题解列表

筛选

P1005 (C++代码)

摘要:解题思路:动态规划注意事项:参考代码:#include <cstdlib>#include<iostream>using namespace std;int s[1001];int main(int ……
优质题解

Manchester- 简单选择排序

摘要:解题思路:1):n个数的选择排序,排序趟数为n-1,最后一个数不需要进行2):第一趟排序从第一个数开始遍历到最后,第二趟排序从第二个数开始遍历到最后,依次类推3):每一趟排序选择一个这次遍历中的最小(……

换硬币 (C++代码)

摘要:解题思路:        简单搜素。参考代码:#include<bits/stdc++.h> using namespace std; int total, num; void OPT(in……

取石子游戏 (C++代码)

摘要:解题思路:        威佐夫博弈,奇异局势先手必败,非奇异局势后手必败。参考代码:#include<bits/stdc++.h> using namespace std; int main……

连通图 (C++代码)(并查集)

摘要:解题思路:                判断连通图,构建并查集即可注意事项:参考代码:#include <iostream> #include <cstring> using namespace……

内部收益率 (C++代码)

摘要:注意一次循环后,x,y要返回初始值,不然第二次循环会出错#include <stdio.h>#include<iostream>#include<math.h>#include<iomanip>usi……

统计字符数 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int n,m; cin>>n;……