编写题解 2788: 晶晶赴约会python 摘要:解题思路:注意事项:参考代码:n = int(input()) if n <= 5: if n % 2 == 0: print("YES") else:   题解列表 2024年03月06日 0 点赞 0 评论 714 浏览 评分:0.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:判断语句注意事项:判断他是否恰好有一门课不及格参考代码:ch, ma = map(int, input().split()) if ch < 60 and ma >= 60 : …… 题解列表 2024年03月06日 1 点赞 0 评论 878 浏览 评分:4.0
最长不下降子序列的长度 摘要:解题思路:注意事项:参考代码:def lengthOfLIS(nums): if len(nums) <= 1: return len(nums) dp =…… 题解列表 2024年03月06日 0 点赞 0 评论 591 浏览 评分:0.0
编写题解 2845: 求10000以内n的阶乘 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; import java.math.BigInteger; public class Main { …… 题解列表 2024年03月06日 0 点赞 0 评论 599 浏览 评分:9.9
2775: 等差数列末项计算python题解 摘要:解题思路:等差数列通项公式注意事项:先算公差参考代码:a1, a2, n = map(int, input().split()) d = a2-a1 an = a1+(n-1)*d print(…… 题解列表 2024年03月06日 0 点赞 0 评论 761 浏览 评分:9.9
三角形最大路径和 摘要:解题思路:注意事项:参考代码:def maximumTotal(triangle): n = len(triangle) dp = [[0] * n for _ in range(n)] …… 题解列表 2024年03月06日 0 点赞 0 评论 522 浏览 评分:0.0
奖学金,结构体,冒泡排序,有注释 #includetypedefstructdate{intnumber;intchin;intmath;inteng;inttot;}Date;intmain(){intn,i,j;scanf("%d",&n);//输入学生个数Datestu[n];//n个学生的数据Datetemp;//用于交换数据 题解列表 2024年03月06日 0 点赞 0 评论 538 浏览 评分:9.9
题目 1177: 三角形(动态规划) 解题思路:题目可能有问题,每一步只能由当前位置向左下或右下,而是每一步只能由当前位置向正下下或右下。注意事项:因此可以写出动态规划的函数:dp[i][j]=max(dp[i-1][j-1],dp[i-1][j])+a[i][j];参考代码:#includeusingnam 题解列表 2024年03月06日 1 点赞 0 评论 556 浏览 评分:0.0
3061: 公共子序列-动态规划 #include#include#includeusingnamespacestd;intdp[205][205];intmain(){stringa,b;while(cin>>a>>b){memset(dp,0,sizeof(dp));intlena=a.size();intlenb=b.size( 题解列表 2024年03月05日 0 点赞 0 评论 464 浏览 评分:0.0