
5.贪心
文章平均质量分 76
DTL66
细节决定成败
展开
-
E - Doing Homework again hd 1789
E - Doing Homework againTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description zichen has just come back school from the 30th ACM/ ICPC. Now he has a l原创 2016-07-23 11:11:30 · 379 阅读 · 0 评论 -
F - TIANKENG’s restaurant hd 4886
F - TIANKENG’s restaurantTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description TIANKENG manages a restaurant after graduating from ZCMU, and tens of t原创 2016-07-23 00:31:09 · 368 阅读 · 0 评论 -
LIGHT OJ 1189 - Sum of Factorials【贪心+递归】
1189 - Sum of Factorials PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBGiven an integer n, you have to find whether it can b原创 2016-08-26 22:18:12 · 771 阅读 · 1 评论 -
CodeForces - 337 C. Quiz【贪心】
C. Quiztime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputManao is taking part in a quiz. The quiz consists of原创 2016-10-22 22:15:16 · 452 阅读 · 0 评论 -
HDU 3183 A Magic Lamp【RMQ区间取数(贪心)】
A Magic Lamp 题意:给出一个大数,然后给出N,输出大数去除N个数之后的最小数,不输出前导0; 思路:反向想一下就是从大数中取strlen(str)-N个数使取出的数最小,枚举每一个区间右端点,计算区间左端点即可,每次查询需要得到查找区间范围内最小值的位置(多个最小值时反回位置最小者),所以d[][]保存的应该是最小值的位置而不是最小值;*AC代码:#include<cstdio>原创 2016-12-11 15:40:16 · 732 阅读 · 0 评论