3051: 登山 DP 摘要:解题思路:双向DP 从左至右上升, 从右至左下降注意事项:重复计算一个顶点, 结果减一参考代码:#include<iostream> #include<algorithm> using names…… 题解列表 2024年04月17日 0 点赞 0 评论 173 浏览 评分:9.9
母牛的故事 摘要:解题思路:此题可以参考斐波拉契数列思想,对母牛进行递归,算出n年后的母牛数量注意事项:此题需要注意当输入0时表示结束数据,所以要用到while的循环参考代码:#include<stdio.h>int …… 题解列表 2024年04月17日 0 点赞 0 评论 194 浏览 评分:9.9
第一个HelloWord程序 摘要:解题思路:这题是大家入门C语言的简单题目注意事项:注意分行输出参考代码:#include<stdio.h>int main(){ printf("*************************…… 题解列表 2024年04月17日 0 点赞 0 评论 473 浏览 评分:9.9
编写题解 1126: C语言训练-字符串正反连接 摘要:解题思路:注意事项:strcat 连接两个字符串。参考代码:#include<string.h>#include<stdio.h>int main(){ char arr[102] = { 0 }, …… 题解列表 2024年04月17日 0 点赞 0 评论 221 浏览 评分:0.0
python--study||O.o 摘要:参考代码:column = int(input()) s = input() row = len(s) // column arr = [list(s[i * column: (i + 1) *…… 题解列表 2024年04月17日 0 点赞 0 评论 238 浏览 评分:0.0
封闭图形个数(结构体排序) 摘要:解题思路:先对图形个数进行排序,再对数字本身大小进行排序注意事项:参考代码:#include<iostream>#include<algorithm>#include<cstring>using na…… 题解列表 2024年04月17日 0 点赞 1 评论 720 浏览 评分:9.9
九行简便 编写题解 1022: [编程入门]筛选N以内的素数 摘要:解题思路:f=0,f=1注意事项:for i in range(2,n+1):参考代码:n=int(input())for i in range(2,n+1): f=0 for j in …… 题解列表 2024年04月17日 0 点赞 0 评论 417 浏览 评分:0.0
快速排序_模板(C++代码) 摘要:参考代码:2024-04-17 20:50:53#include<iostream> using namespace std; const int N=100000; int a[N]; vo…… 题解列表 2024年04月17日 0 点赞 0 评论 247 浏览 评分:9.9
六行简便 编写题解 1020: [编程入门]猴子吃桃的问题 摘要:解题思路:利用递归的思想注意事项:最后一天亦包括参考代码:n=int(input())s=1while n>1: s=(s+1)*2 n=n-1print(s)…… 题解列表 2024年04月17日 0 点赞 0 评论 190 浏览 评分:0.0
十行简便 有规律的数列求和 摘要:解题思路:利用列表的方式注意事项:注意两位小数参考代码:n=int(input())a=[2]b=[1]s=0for i in range(n): a.append(a[i]+b[i]) …… 题解列表 2024年04月17日 0 点赞 0 评论 202 浏览 评分:0.0