题解列表

筛选

鸡兔同笼 (C++代码)

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

三位数反转 (C++代码)

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

Hanoi双塔问题 (C++代码)

摘要:解题思路: 规律为  A(n)=A(n-1)*2+2;#include "iostream" #include "algorithm" #include "string" using names……

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

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

Hanoi双塔问题 (C++代码)

摘要:解题思路:        原来的公式是 2^n - 1,双塔就是双倍,2^( n+1 ) - 2。数据大需要高精度。参考代码:#include<bits/stdc++.h> using namesp……

筛排处理 (C++代码)

摘要:解题思路: 利用C++的STL中的set进行去重和排序注意事项: 输出两个空行#include "iostream" #include "algorithm" #include "set" us……

字符排列问题 (C++代码)

摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int count,n,book[21]; char str[21]; int ……