题解列表

筛选

dfs标记路径

摘要:参考代码:import java.util.Scanner;public class Main {static int[][] g=new int[51][51];//地图static int[][]……

最长公共子序列lcs

摘要:解题思路:注意事项:参考代码:def longestCommonSubsequence(text1, text2):        # 创建一个二维数组 dp,用于存储最长公共子序列的长度      ……

最长不下降子序列的长度

摘要:解题思路:注意事项:参考代码:def lengthOfLIS(nums):    if len(nums) <= 1:        return len(nums)             dp =……

2775: 等差数列末项计算python题解

摘要:解题思路:等差数列通项公式注意事项:先算公差参考代码:a1, a2, n = map(int, input().split()) d = a2-a1 an = a1+(n-1)*d print(……