shenmegui
文章平均质量分 80
yuhong_liu
这个作者很懒,什么都没留下…
展开
-
喷水装置(二) +区间覆盖-基础问题-贪心
数轴上有n个区间[ai,bi],选择尽量少的区间覆盖一条指定线段[s,t]。 贪心: 把各区间按照a从小到大排序,从前向后遍历,然后每次选择从当前起点S开始的最长区间,并以这个区间的右端点为新的起点,继续选择,直到找不到区间覆盖当前起点S或者S已经到达线段末端。 · #include #include #include #include #include原创 2015-07-26 20:04:44 · 483 阅读 · 0 评论 -
C. Hamburgers
C. Hamburgers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarpus loves hamburgers very much. He espe原创 2015-03-28 14:44:22 · 601 阅读 · 0 评论 -
B. Fox Dividing Cheese
B. Fox Dividing Cheese time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Two little greedy bears have found tw原创 2015-03-28 10:45:31 · 1092 阅读 · 0 评论 -
Matrix Power Series
Matrix Power Series Time Limit: 3000MS Memory Limit: 131072K Total Submissions: 16743 Accepted: 7135 Description Given a n × n matrix A and a positive integer k,原创 2015-04-11 08:45:01 · 657 阅读 · 0 评论 -
C. Magic Five
C. Magic Five time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There is a long plate s containing n digits.原创 2015-04-09 22:34:17 · 614 阅读 · 0 评论