题解列表

筛选

1108: 守望者的逃离 贪心

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

1159: 偶数求和的一种解决方法

摘要:解题思路:题目对数列的定义是长度为n,公差为2的一个等差数列,那么可以这样理解数列中的每个元素值都是k=2*i(i=1,2,3.....n),这样每次求和只需要变量sum加上2*i即可。当i等于m的倍……

计算2的N次方

摘要:解题思路:高精度乘法注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; const int N = 1e3……

Hanoi双塔问题

摘要:解题思路:高精度 2 * (2 ^ n - 1)注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; const i……

老弟,包懂的

摘要:```c #include int main() { int n,num=0; char ch; scanf("%d %c",&n,&ch); if(n1……

最暴力的写法QwQ

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

dfs+判断数组解决排列

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