题解列表

筛选

c语言3010: 奇偶数之和

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i = 1; int n; int sum1 = 0; int sum2 = 0; scanf("%d"……

三角形判断(C++)

摘要:解题思路:双边和必须大于一边注意事项:参考代码:#include<cstdio> using namespace std; int main(){ int a,b,c; scanf("%d……

递归(C语言)

摘要:观察到第一年为一头,第二年为两头。。。第五年为六头 以此类推,可以得到递推公式f(n)=f(n-1)+f(n-3)则可创建递归函数 ------------ #include……

题解 2900: 螺旋加密

摘要:解题思路:用a数组螺旋填写,b数组记录字符串代表的数字,d数组表示数字对应的五位二进制,c数组用来标记是否填写过。注意事项:利用了位运算参考代码:#include <algorithm>#includ……

2914: 铺地毯

摘要:```cpp #include using namespace std; struct Tan { int g,k,a,b,c,d; }; bool In_tan(struct ……

2912: 最长平台

摘要:```cpp #include using namespace std; int main() { int n,count=1,max=1,a[1001]; cin>>n;……

2924: 明明的随机数

摘要:```cpp #include using namespace std; void QS(int a[],int l,int r) { if(l>=r) retur……

2922: 合影效果

摘要:```cpp #include #include #include using namespace std; typedef struct M { string s; ……

2751: 超级玛丽游戏

摘要:先别走,不妨试一下代码有没有打错 ```cpp #include using namespace std; int main() { cout……