规划+构造
信仰..
学无止境
展开
-
POJ 2976-Dropping tests(01分数规划)
Dropping tests Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13941 Accepted: 4874 Description In a certain course, you take n tests. If you get ai out of原创 2017-10-31 09:22:14 · 338 阅读 · 0 评论 -
BZOJ 1486: [HNOI2009]最小圈(01分数规划:最优比例环)
1486: [HNOI2009]最小圈 Time Limit: 10 Sec Memory Limit: 64 MB Submit: 2675 Solved: 1279 [Submit][Status][Discuss] Description Input Output Sample Input 4 5 1 2 5 2 3 5 3 1 5原创 2017-11-01 22:22:33 · 382 阅读 · 0 评论 -
Codeforces Round #467 (Div. 2)-E-Lock Puzzle(瞎搞)
E. Lock Puzzletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWelcome to another task about breaking the code lock! Explorers Whitfield and Martin...原创 2018-02-27 16:09:40 · 347 阅读 · 0 评论 -
Educational Codeforces Round 30-D-Merge Sort(瞎搞)
题意:给你n和k,问你能否构造出一个长为n的全排列,使得按照归并排序的执行规则,正好调动k次归并排序函数使得原排列变成递增排列。题解:我们知道对于递减的排列,需要调用归并函数最多次,因此我们可以初始化数组为递减全排列,然后调用归并函数即可,每次让k减2(除了第一次),直到k为0,然后,让剩下的顺序即可。当然k一定要是奇数,因为除了第一次是调用一次归并函数,。其他都是2的倍数,还有就是k过大也不行。...原创 2018-02-21 17:30:40 · 343 阅读 · 0 评论