#C++1208——孤独的骑士(递归) 摘要:解题思路: 用递归遍历骑士所有可能的情况;注意事项: 国际象棋64个格子,8行8列分布(哈哈,自行脑补),注意递归终止条件 ; 参考代码:#include <iostream> #includ…… 题解列表 2022年08月03日 0 点赞 0 评论 352 浏览 评分:0.0
题解 1023: [编程入门]选择排序(C) 摘要:出现问题:1.输入a直接printf时,窗口显示为一串方框(因为输入和输出的数据类型不一致)2.k = a[0];语句执行后,打印出的k值不是a[0](因为k与a的数据类型不一致)3.只有b[0]是正…… 题解列表 2022年08月04日 0 点赞 0 评论 332 浏览 评分:0.0
数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<math.h>//因为要用到pow(a,b) using namespace std; int main(…… 题解列表 2022年08月04日 0 点赞 0 评论 266 浏览 评分:0.0
简单选择排序改动 摘要:解题思路:① 将if(a[j]<a[k]) 改成if(fabs(a[j])>fabs(a[k]))参考代码:#include<stdio.h> #include<math.h> void sele…… 题解列表 2022年08月04日 0 点赞 0 评论 259 浏览 评分:0.0
#C++1240——生日日数 摘要:思路参考注释参考代码:#include <iostream> using namespace std; int arr[]={0,31,28,31,30,31,30,31,31,30,31,30,…… 题解列表 2022年08月04日 0 点赞 0 评论 382 浏览 评分:0.0
蓝桥杯2013年第四届真题-核桃的数量,比较好懂 摘要:解题思路:这个是根据两个数求最小公倍数,演化成的注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,r,d,o,i,m,t,e,f; scanf("%d%…… 题解列表 2022年08月04日 0 点赞 0 评论 339 浏览 评分:0.0
C# 1268: 第K极值 摘要:```cpp #include using namespace std; int n,k,a[10005]; int m; bool fun(int x){ int j=0; if …… 题解列表 2022年08月04日 0 点赞 0 评论 406 浏览 评分:0.0
自定义函数,使字符串反序存放,在主函数中输入并输出反序后的字符串(不包含空格)。 摘要:解题思路:字符串进行输入再进行反序输出,首先想到的是用字符数组来存放和反序输出。定义一个一维字符数组用于存放字符型数据。用gets()函数读取字符串,然后再自定义函数中进行反序存放和输出。自定义函数 …… 题解列表 2022年08月04日 0 点赞 0 评论 428 浏览 评分:0.0
应该算是比较简单的方法了 摘要:```cpp #include #include using namespace std; //输入三个字符串,按由小到大的顺序输出 int main() { string arr[3…… 题解列表 2022年08月05日 0 点赞 0 评论 364 浏览 评分:0.0
111111111111111111111111111111 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ long long n=0; for(long long i=0;i<=200000;i++) { n…… 题解列表 2022年08月05日 0 点赞 0 评论 943 浏览 评分:0.0