D - Doing Homework
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit Status Practice HDU 1074
Description
Ignatius has just come back school from the 30th ACM/ICPC. Now...
分类:
其他好文 时间:
2015-04-23 09:46:23
阅读次数:
208
Doing Homework题目抽象:给出n个task的name,deadline,need。 每个任务的罚时penalty=finish-deadline; task不可以同时做。问按怎样的顺序做使得penalty最小。同时输出顺序。如果有多个满足条...
分类:
其他好文 时间:
2015-04-09 23:36:12
阅读次数:
157
YY's Minions
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Despite YY's so much homework, she would like to take some time to play with her minions first.
YY lines her minions up to an...
分类:
其他好文 时间:
2015-04-05 22:00:47
阅读次数:
262
题目:给你一些加减法计算式,判断有几个是正确的。
分析:简单题。直接模拟即可。
说明:╮(╯▽╰)╭。
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
int a,b,count = 0;
char c,d,e[10];
while (~sca...
分类:
其他好文 时间:
2015-04-02 10:32:53
阅读次数:
125
DescriptionMr. O'Cruel is teaching Math to ninth grade students. Students of course are very lazy, so they do not like to do their homework. On the ot...
分类:
其他好文 时间:
2015-04-02 09:02:14
阅读次数:
176
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789 1 /* 2 Doing Homework again 3 扣分最多的先安排,安排在没有任务的那天 4 */ 5 #include 6 #include //void sort( Random.....
分类:
其他好文 时间:
2015-03-30 12:56:21
阅读次数:
98
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789/*Doing Homework againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/O...
分类:
编程语言 时间:
2015-03-29 18:03:41
阅读次数:
214
题目大意:根据完成任务的截止时间,超时一天罚1分,求完成所有任务后的最小罚时这里n最大为15,可以利用状态压缩来解决问题 1 /* 2 首先要明白的一点是状态1/0分别表示这件事做了还是没做 3 而1/0的位置表示这是哪一件事 4 比如说 5 可以表示为101,那么表示第一个和第三个任务已经完成 5...
分类:
其他好文 时间:
2015-03-18 06:20:49
阅读次数:
142
Problem Description:
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in...
分类:
其他好文 时间:
2015-03-14 15:29:51
阅读次数:
171
这道题是道简单的贪心题,题目中要的是最少要扣去的分数,那么我们要尽量得到最多的分数。首先将数据按照分数从大到小的顺序排序(如果相同就要deadline的从小到大排),然后每次取最大分数的将其安排在截至期限的最后一天,如果此天已安排,则一直向前一天安排,直到不能安排,则加入sum。#include"i...
分类:
其他好文 时间:
2015-03-14 15:15:20
阅读次数:
87