题解列表

筛选

最长上升子序列(python)

摘要:解题思路:时间复杂度O(n^2),详解可以去看我的另一篇:最长不下降子序列注意事项:参考代码:n=int(input()) b=list(map(int,input().split())) dp=……

动态规划——求最长不下降子序列(python详解)

摘要:解题思路:吐槽官方,写了一大堆,然后说我的题目太短,结果写的全没了!!! dp【i】的含义为,以b【i】结尾的最长不下降子序列是多少然后我们要确定上一状态,首先如果我们以b【i】结尾,那么我们得上一个……

题解 2903: 不高兴的津津

摘要:解题思路:注意事项:参考代码:hour_max = day = 0 for i in range(1, 7 + 1):     hour1, hour2 = map(int, input().sp……

题解 1099: 校门外的树

摘要:解题思路:注意事项:参考代码:L, M = map(int, input().split()) trees = [1 for x in range(L+1)] for x in range(M):……

2855: 简单密码

摘要:参考代码:s = input() s1 = {     "A": "V",     "B": "W",     "C": "X",     &q

2854: 密码翻译

摘要:参考代码:s = list(input()) for i in range(len(s)):     if s[i] == 'z':         s[i] = 'a&……

2853: 字符替换

摘要:参考代码:s, a, b = map(str, input().split()) print(s.replace(a, b))……

2852: 配对碱基链

摘要:参考代码:s = input() for i in s:     if i == 'A':         print('T', end='') ……

2851: 合法C标识符

摘要:参考代码:s = input() for i in s:     if s[0].isdigit():         print('no')         quit() ……

2850: 输出亲朋字符串

摘要:参考代码:s = input() s1 = '' for i in range(len(s) - 1):     s1 += chr(ord(s[i]) + ord(s[i + ……