Doing Homework Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3958 Accepted Submission(s): 1577 Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a l…
题目大意: 有 n 项作业需要完成,每项作业有上交的期限和需完成的天数,若某项作业晚交一天则扣一分.输入每项作业时包括三部分,作业名称,上交期限,完成所需要的天数.求出完成所有作业时所扣掉的分数最少,同时输出完成作业的顺序(若有多组结果,输出按字典序排列最小的那组).(输入时,按名称的字典序输入) 思路 :题目中给出的 n 的范围很小,很明显是用状态压缩来求解.将一个整数分解成二进制形式.从左往右数起,第 i 位代表第 i 项作业的完成情况,1 代表完成,0代表未完成. #include<ios…
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 the homework after the deadline, the teacher will reduce his score of t…
Doing Homework Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8756 Accepted Submission(s): 4065 Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lo…
Doing Homework Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7070 Accepted Submission(s): 3104 Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lo…
问题: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 the homework after the deadline, the teacher will reduce his score o…