题目链接:https://www.nowcoder.com/acm/contest/207/G 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5988 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 A coding contest will be held in this university, in a huge playground. Th…
Coding Contest Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1751    Accepted Submission(s): 374 Problem Description A coding contest will be held in this university, in a huge playground. The…
Problem DescriptionA coding contest will be held in this university, in a huge playground. The whole playground would be divided into N blocks, and there would be M directed paths linking these blocks. The i-th path goes from the ui-th block to the v…
题目链接:https://www.nowcoder.com/acm/contest/206/A 题目描述 恬恬的生日临近了.宇扬给她准备了一个蛋糕.正如往常一样,宇扬在蛋糕上插了n支蜡烛,并把蛋糕分为m个区域.因为某种原因,他必须把第i根蜡烛插在第ai个区域或第bi个区域.区域之间是不相交的.宇扬在一个区域内同时摆放x支蜡烛就要花费x2的时间.宇扬布置蛋糕所用的总时间是他在每个区域花的时间的和.宇扬想快些见到恬恬,你能告诉他布置蛋糕最少需要多少时间吗?输入描述:第一行包含两个整数n,m(1 ≤…
Coding Contest Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2653    Accepted Submission(s): 579 Problem Description A coding contest will be held in this university, in a huge playground. The…
题意:M个影片,其属性有开始时间S,结束时间T,类型op和权值val.有K个人,每个人可以看若干个时间不相交的影片,其获得的收益是这个影片的权值val,但如果观看的影片相邻为相同的属性,那么收益要减少W.每个影片只能被一个人看.求所有人能获得的收益值之和的最大值. 分析:因为人数不定,所以贪心和dp的思路被否定了.1对多的带权匹配,求最大权,这种问题显然KM是解决不了的,那么只能是最小费用最大流了.而这题要求的是最大收益,那么建负权边即可. 为了保证每个影片只被一个人观看,将其拆为入点和出点,入…
题目链接:https://www.nowcoder.com/acm/contest/143/E 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 Nowcoder University has 4n students and n dormitories ( Four students per dormitory). Students numbered from 1 to 4n. And i…
Matrix Again Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 4255    Accepted Submission(s): 1233 Problem Description Starvae very like play a number game in the n*n Matrix. A positive integer…
Matrix Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2350    Accepted Submission(s): 1241 Problem Description Yifenfei very like play a number game in the n*n Matrix. A positive integer number…
Cyclic Tour Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/65535 K (Java/Others)Total Submission(s): 1197    Accepted Submission(s): 626 Problem Description There are N cities in our country, and M one-way roads connecting them. Now Li…