2013年7月25日

[置顶] 【专题】单调队列/斜率优化DP

摘要: 一、单调队列志愿者选拔O(n)struct STU{ char name[7]; int rp; }; int que[2111111]; int idx[2111111]; int main() { int T,head,tail; char gs[111]; scanf("%d",&T); while (T--) { int cas,cnt; head=tail=0; cas=cnt=0; while (scanf("%s",gs)) { ... 阅读全文

posted @ 2013-07-25 11:04 电子幼体 阅读(128) 评论(0) 推荐(0) 编辑

【专题】单调队列/斜率优化DP

摘要: 一、单调队列志愿者选拔O(n)struct STU{ char name[7]; int rp;};int que[2111111];int idx[2111111];int main(){ int T,head,tail; char gs[111]; scanf("%d",&T); while (T--) { int cas,cnt; head=tail=0; cas=cnt=0; while (scanf("%s",gs)) { if (strcmp(gs,... 阅读全文

posted @ 2013-07-25 11:04 电子幼体 阅读(181) 评论(0) 推荐(0) 编辑

MUTC8 E- One hundred layer 单调队列dp

摘要: One hundred layerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1257Accepted Submission(s): 467Problem DescriptionNow there is a game called the new man down 100th floor. The rules of this game is: 1.At first you are at the 1st floor. And the flo. 阅读全文

posted @ 2013-07-25 10:55 电子幼体 阅读(164) 评论(0) 推荐(0) 编辑

MUTC8 J-The More The Better

摘要: The More The BetterTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2568Accepted Submission(s): 668Problem DescriptionGiven an sequence of numbers {X1, X2, ... , Xn}, where Xk= (A * k + B) % mod. Your task is to find the maximum sub sequence {Y1, Y2 阅读全文

posted @ 2013-07-25 10:53 电子幼体 阅读(188) 评论(0) 推荐(0) 编辑

导航