题目 Source http://codeforces.com/contest/467/problem/C Description The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn't have enough money, so George was going to work as a programmer. Now he faced t…
DP.... C. George and Job time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn't have enoug…
题目描述 新款手机 iTone6 近期上市,George 很想买一只.不幸地,George 没有足够的钱,所以 George 打算当一名程序猿去打工.现在George遇到了一个问题. 给出一组有 n 个整数的数列p_1,p_2,-,p_n ,你需要挑出 k 组长度为 m 的数,要求这些数互不重叠 即 [l_{1},r_{1}],[l_{2},r_{2}],-,[l_{k},r_{k}] (1<=l_{1}<=r_{1}<l_{2}<=r_{2}<-<l_{k}<=…
题目链接:http://codeforces.com/contest/387/problem/B 题目意思:给出1-n个问题,以及要满足是good rounde条件下这n个问题分别需要达到的complexity,最后还有George已经准备好的关于这些问题的m个complexity.问George要come up with的问题最少有多少个. 很明显要使问题最少,那么满足每个问题的complexity为一个即可.解决这个问题的关键是要理解这句话:He can simplify any alrea…
George and Cards 我们找到每个要被删的数字左边和右边第一个比它小的没被删的数字的位置.然后从小到大枚举要被删的数, 求答案. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PLL pair<LL, LL> #define PLI pair<LL, int> #define PII pa…