随笔分类 -  动态规划

摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array aa consisting of  阅读全文
posted @ 2019-04-23 10:21 行远山 阅读(553) 评论(0) 推荐(0)
摘要:题目描述 今年是国际数学联盟确定的“2000――世界数学年”,又恰逢我国著名数学家华罗庚先生诞辰90周年。在华罗庚先生的家乡江苏金坛,组织了一场别开生面的数学智力竞赛的活动,你的一个好朋友XZ也有幸得以参加。活动中,主持人给所有参加活动的选手出了这样一道题目: 设有一个长度为N的数字串,要求选手使用 阅读全文
posted @ 2018-03-21 17:03 行远山 阅读(501) 评论(0) 推荐(0)
摘要:问题 J: 【动态规划】选数统计 题目描述 现在从1 ~ M里可以让你从小到大选出n个数,设这些数为A1到An,要求每个数至少为它前一项的2倍,比如说当M = 10,n = 4时,下面是几种可能的选法: 1 2 4 8 1 2 4 9 1 2 4 10 1 2 5 10 求一共可以选出多少不同的数列 阅读全文
posted @ 2018-03-21 16:29 行远山 阅读(238) 评论(0) 推荐(0)
摘要:Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,00 阅读全文
posted @ 2018-01-30 11:27 行远山 阅读(120) 评论(0) 推荐(0)