题解列表

筛选

二级C语言-自定义函数

摘要:解题思路: 采用递归求解注意事项: 包含#include<iomanip>以保证输出4位小数;参考代码:#include<iostream> using namespace std; #inclu……

计算素数和(用C++)

摘要:参考代码:#include<iostream> using namespace std; bool isprime(int x) { int count = 0; for (int i ……

2^k进制数:组合数

摘要:解题思路:组合数注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; long long c(int n, int ……

dfs+判断数组解决排列

摘要:解题思路:注意事项:坑:1.题目空了一格输出,输出一个就换行2.字典序输出参考代码:#include<bits/stdc++.h>const int N=10;//题目默认字典序了strcmpint ……

最暴力的写法QwQ

摘要:#include<bits/stdc++.h> using namespace std; void solve() { int m,cnt=0; cin>>m; for(int i=……

自定义函数之整数处理,解决对一半的问题

摘要:解题思路: 定义一个含有10个元素的数组,找出其中最大值与最小值的编号,分别记为min,max;按要求进行交换,同时考虑特殊情况的处理。注意事项: 如何解决部分测试结果不正确的问题?特殊情况1:当最大……