随笔分类 - 基础:贪心
摘要:链接:https://www.lydsy.com/JudgeOnline/problem.php?id=1029 思路: 按结束时间排序,优先选结束时间短的,选完后扔到优先队列里(大的优先),如果选到某个点不能在规定时间内完成,我们就将优先队列的队首元素与当前点所需时间比较下,如果队首元素所需时间大
阅读全文
摘要:A. Petya and Catacombs time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A very brave explo
阅读全文
摘要:给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的) 例如:5 1 6 8 2 4 5 10,最长递增子序列是1 2 4 5 10。 给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的) 例如:5 1 6 8 2 4 5 1
阅读全文
摘要:Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they
阅读全文
摘要:Current work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area h
阅读全文
摘要:A. Arya and Bran time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Bran and his older siste
阅读全文