纯数学递归解法,真的超简单 摘要:解题思路:当我们看到这题时,可能可以想到很多办法,对我而言先想到的是我在概率论学到的知识。例如7位十进制数 x1 x2 x3 x4 x5 x6 x7根据题意,第一位数不可能是0,所以x1的选取可以有K…… 题解列表 2022年03月02日 0 点赞 0 评论 339 浏览 评分:0.0
选择排序的一种解法 摘要:解题思路:把10个数放到数组中,然后用循环比较大小,前面的数如果大于后面的数,就交换,最后把这个数组输出参考代码:#include<stdio.h>int main(){ int i,j,t; …… 题解列表 2022年03月02日 0 点赞 0 评论 350 浏览 评分:0.0
特殊的数字四十解答 摘要:解题思路:对1000-9999所有数依次计算各位数之和即可注意事项:在temp处理时需要使用temp//10,不然无法得到正确结果参考代码:up=9999down=1000for i in range…… 题解列表 2022年03月02日 0 点赞 0 评论 416 浏览 评分:0.0
三角形c++动态规划 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>…… 题解列表 2022年03月02日 0 点赞 0 评论 380 浏览 评分:0.0
python-项链项链 摘要:解题思路:注意事项:参考代码:def cal(temp): r_index = temp.index('r') b_index = temp.index('…… 题解列表 2022年03月02日 0 点赞 0 评论 568 浏览 评分:0.0
记忆化数组 摘要:解题思路:用一个数组存储值,要是存在,直接输出,不然就计算。节省时间和空间。注意事项:小心一点参考代码:#include<iostream>#include<cstdio>using namespac…… 题解列表 2022年03月03日 0 点赞 0 评论 435 浏览 评分:0.0
保留一串字符里面的字母 摘要:解题思路:定义一个数组,判定是否在字母范围内,是就输出,不是就舍去注意事项:输入不能直接套入到循环里。参考代码:#include <stdio.h>main() { char c[80], i; ge…… 题解列表 2022年03月03日 0 点赞 0 评论 388 浏览 评分:0.0
Hifipsysta-2056-汉诺塔(C++代码) 摘要:```cpp #include using namespace std; void hanoi(int n, int A, int B, int C){ if(n==1){ …… 题解列表 2022年03月03日 0 点赞 0 评论 550 浏览 评分:0.0
蓝桥杯基础练习VIP-2n皇后问题(N皇后问题之上再嵌套一个n皇后就行!) 摘要:#include<iostream>using namespace std;int a[100][100],n,ans=0;bool vis1[100],vis2[100];bool x1[100],…… 题解列表 2022年03月03日 0 点赞 0 评论 481 浏览 评分:0.0
题目 1668: printf基础练习2 摘要:解题思路:注意事项:无前缀方式:printf("%o",num) //无前缀o的8进制数printf("%d",num) //无前缀0d的10进制数printf("%x",num) //无前缀0…… 题解列表 2022年03月03日 0 点赞 0 评论 470 浏览 评分:0.0