递归问题,类似于斐波那契问题 摘要:解题思路:小母牛四年生一头小母牛,所以下一个数会等于其前面一个数和其前面第三个数之和注意事项:当n=0时,要退出,不能让其输出结果参考代码:while True: try: n =…… 题解列表 2023年03月13日 0 点赞 0 评论 358 浏览 评分:0.0
1138: C语言训练-求矩阵的两对角线上的元素之和 摘要:#include<stdio.h> int main() { int p,q; scanf("%d",&q); p=q; int a[p][p]; …… 题解列表 2023年03月13日 0 点赞 0 评论 205 浏览 评分:0.0
有规律的数列求和 摘要:解题思路:先将分子分母先用列表分开,然后采用类似递归的思想注意事项:参考代码:n = int(input())fz = [2]fm = [1]for i in range(1,n+1): fz.…… 题解列表 2023年03月13日 0 点赞 0 评论 250 浏览 评分:0.0
1708: 数据结构-Dijskra(迪杰斯特拉)最短路径算法 摘要:解题思路:看了优质题解的代码,感觉有点复杂,我的代码52行解决注意事项:不存在要输出-1参考代码:#include<iostream> #include<cstring> #include<cma…… 题解列表 2023年03月13日 0 点赞 0 评论 356 浏览 评分:0.0
蓝桥杯2013年第四届真题-买不到的数目 新手代码,极易理解!!! 摘要:解题思路:dp[i]=0代表当钱数为i时没有办法得到dp[i]=1代表可以得到注意事项: 为啥dp[]后面存放数字全是1呢?因为当dp连续出现>=最小面额的1时之后的dp数组全为1了如 4 7连续出现…… 题解列表 2023年03月13日 0 点赞 0 评论 418 浏览 评分:0.0
1853: 蓝桥杯基础练习-数列排序 摘要:#include<stdio.h> int main() { int m,n; scanf("%d",&m); n=m; int a[n]; in…… 题解列表 2023年03月13日 0 点赞 0 评论 235 浏览 评分:0.0
第一次写题解,我觉得应该还是比较清晰 摘要:解题思路:解题思路简单,一个循环就搞定了;注意事项:主要要注意那个最后一段路程不用加(其实就是这个题目出的不严谨)参考代码:#include<iostream>#include<iomanip>usi…… 题解列表 2023年03月14日 0 点赞 0 评论 299 浏览 评分:0.0
和八皇后很类似,不过八皇后的想法更简单(判断合法性繁琐),这个题多了一个有:可能这一行不放棋子 摘要: import java.math.BigInteger; import java.util.*; public class Main { static Scanner sc = ne…… 题解列表 2023年03月14日 0 点赞 0 评论 519 浏览 评分:0.0
新手最能看懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char ch[1000]; int sum=0; get…… 题解列表 2023年03月14日 0 点赞 0 评论 253 浏览 评分:0.0
外出旅行,python 摘要:解题思路:注意事项:参考代码:f,m,x,p=map(int,input().split())count=0while m>x+p: if f!=0: f-=1 m-…… 题解列表 2023年03月14日 0 点赞 0 评论 328 浏览 评分:0.0