懵懂的菜鸟

Stay hungry,Stay foolish.

导航

2017年8月26日 #

python 求第k个最大数

摘要: 1 #coding = utf-8 2 import sys 3 def Cal_NO(a,b): 4 nums=sorted(a,reverse=True) 5 result=nums[b-1] 6 return result 7 8 if __name__=='__main__': 9 10 a=[int(i) for i in sys.... 阅读全文

posted @ 2017-08-26 16:23 懵懂的菜鸟 阅读(462) 评论(0) 推荐(0) 编辑

python 求最大子序列

摘要: 动态规划的本质,是对问题状态的定义和状态转移方程的定义。dynamic programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems 阅读全文

posted @ 2017-08-26 16:22 懵懂的菜鸟 阅读(614) 评论(0) 推荐(0) 编辑