摘要:
很多动态规划问题都可以转化为DAG上的最长路,最短路,或路径计数问题。硬币问题:有N中硬币,面值分别为v1,v2,v3,……vn,每种都无穷多,给定非负整数S,可以选用多少个硬币,使他们的总和恰好为S。输出硬币数目的最小值和最大值。解:每种面值看作一个点,表示:还需要凑足的面值。则开始状态为S,目标... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
B. Painting Pebblestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n piles of pebbles o... 阅读全文
摘要:
Urban ElevationsAn elevation of a collection of buildings is an orthogonal projection of the buildings onto a vertical plane. An external elevation of... 阅读全文
摘要:
U - Database Time Limit:9000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 1592Appoint description:DescriptionPeter studies... 阅读全文
摘要:
Background from Wikipedia: \Set theory is abranch of mathematics created principally by theGerman mathematician Georg Cantor at the end ofthe 19th cen... 阅读全文
摘要:
C. Guess Your Way Out! time limit per test 1 second memory limit per test 256 megabytes input standard input outpu... 阅读全文
摘要:
Spreadsheet TrackingData in spreadsheets are stored in cells, which are organized in rows (r) and columns (c). Some operations on spreadsheets can be... 阅读全文
摘要:
Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the characters o... 阅读全文