Cooking Schedule Problem Code: SCHEDULE Chef is a well-known chef, and everyone wishes to taste his dishes. As you might know, cooking is not an easy job at all and cooking everyday makes the chef very tired. So, Chef has decided to give himself some…
Schedule Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1085 Accepted Submission(s): 448Special Judge Problem Description A project can be divided into several parts. Each part shoul…
差分约数: 求满足不等式条件的尽量小的值---->求最长路---->a-b>=c----> b->a (c) Schedule Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1503 Accepted Submission(s): 647 Special Judge Problem Descr…
Task schedule Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 515 Accepted: 309 Special Judge Description There are n preemptive jobs to be processed on a single machine. Each job j has a processing time pj and deadline dj. Preemptive cons…
题意:有n个任务,给出完成n个任务所需时间,以及一些任务安排.任务安排有四种: FAS a b:任务a需在任务b开始后完成. FAF a b:任务a需在任务b完成后完成. SAF a b:任务a需在任务b完成后开始. SAS a b:任务a需在任务b开始后开始. 求在这些任务安排下各个任务的最早开始时间,若任务安排为不可能安排则输出impossible.每组数据结束需要输出一个空行. 思路:四种任务安排可以得到四种不等式如下:(dis[]表示任务开始时间,x[]表示任务完成所需时间) FAS a…
import sys def count_holes(letter): hole_2 = ['A', 'D', 'O', 'P', 'Q', 'R'] if letter == 'B': return 2 elif letter in hole_2: return 1 else: return 0 def main(): n = int(sys.stdin.readline()) for t in sys.stdin: num = 0 for l in t[:-1]: num += count_…