上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
摘要: 很多动态规划问题都可以转化为DAG上的最长路,最短路,或路径计数问题。硬币问题:有N中硬币,面值分别为v1,v2,v3,……vn,每种都无穷多,给定非负整数S,可以选用多少个硬币,使他们的总和恰好为S。输出硬币数目的最小值和最大值。解:每种面值看作一个点,表示:还需要凑足的面值。则开始状态为S,目标... 阅读全文
posted @ 2015-02-02 20:55 daydaycode 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Boxes in a LineYou have n boxes in a line on the table numbered 1 . . . n from left to right. Your task is to simulate 4kinds of commands:? 1 X Y : mo... 阅读全文
posted @ 2015-02-01 15:02 daydaycode 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Problem BBroken Keyboard (a.k.a. Beiju Text)You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the... 阅读全文
posted @ 2015-02-01 12:09 daydaycode 阅读(248) 评论(0) 推荐(0) 编辑
摘要: B. Painting Pebblestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n piles of pebbles o... 阅读全文
posted @ 2015-02-01 00:07 daydaycode 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Urban ElevationsAn elevation of a collection of buildings is an orthogonal projection of the buildings onto a vertical plane. An external elevation of... 阅读全文
posted @ 2015-01-29 14:31 daydaycode 阅读(160) 评论(0) 推荐(0) 编辑
摘要: U - Database Time Limit:9000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 1592Appoint description:DescriptionPeter studies... 阅读全文
posted @ 2015-01-29 11:16 daydaycode 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Background from Wikipedia: \Set theory is abranch of mathematics created principally by theGerman mathematician Georg Cantor at the end ofthe 19th cen... 阅读全文
posted @ 2015-01-24 21:36 daydaycode 阅读(404) 评论(0) 推荐(0) 编辑
摘要: C. Guess Your Way Out! time limit per test 1 second memory limit per test 256 megabytes input standard input outpu... 阅读全文
posted @ 2015-01-24 16:51 daydaycode 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Spreadsheet TrackingData in spreadsheets are stored in cells, which are organized in rows (r) and columns (c). Some operations on spreadsheets can be... 阅读全文
posted @ 2015-01-23 16:24 daydaycode 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the characters o... 阅读全文
posted @ 2015-01-23 00:49 daydaycode 阅读(235) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页