摘要: 神贪心。。。b[i]=a[1]-(n-1)*d;每次找价值最大的k使b[k]~b[n]都++#include#include#include#includeusing namespace std;#define maxn 6000 #define ll long longinline long long min(long long x, long long y) {return xy?x:y;}; inline long long ABS(long long x) {return x=2;j--){if(b[j]>=a[j])now--;else now++,up=min(up,a[j] 阅读全文
posted @ 2014-03-31 21:17 wangyucheng 阅读(349) 评论(0) 推荐(0) 编辑
摘要: D. Hill Climbingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis problem has nothing to do with Little Chris. It is about hill climbers instead (and Chris definitely isn't one).There arenhills arranged on a line, each in the form of a vert 阅读全文
posted @ 2014-03-31 16:36 wangyucheng 阅读(336) 评论(0) 推荐(0) 编辑