题解列表

筛选

分解质因子并保存

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void isWanshu(int n){    int sum=0,k = 0; ……

数组递归--------简单方法

摘要:解题思路:用一个数组存储数,然后通过变换将式子变换形式,最后输出注意事项:要用longlong定义参考代码:#include<bits/stdc++.h>using namespace std;int……

C朴素思路(易理解)+简单递归。

摘要:解题思路:用全局变量r[100][100],模拟房间;全局变量n代表天数。第一天的感染人数为输入的“@”数目。第一天以外的感染人数为上一天的感染人数+新增感染人数。即infect_r(n,::r)=i……

c++水仙花数判断

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a = 0; for(int i=100;i<=……

STL解法 vector<pair<int ,int>> 然后再 sort

摘要:解题思路:    前两个数相加即vector元素个数,pair将两个数据组合成一个元素,v.push_back后 sort注意:    make_pair()是函数 别写成<>参考代码:/******……

c++求和训练

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a,b,c,sum=0,sqrt=0,s……