pid=5647">[HDU 5647]DZY Loves Connecting(树DP) DZY Loves Connecting Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 332 Accepted Submission(s): 112 Problem Description DZY has an unroote…
pid=5145">[HDU 5145] NPY and girls(组合+莫队) NPY and girls Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 593 Accepted Submission(s): 179 Problem Description NPY's girlfriend blew him out!H…
[题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=4699 [算法] 维护两个栈,一个栈放光标之前的数,另外一个放光标之后的数 在维护栈的同时求最大前缀和,即可 [代码] #include<bits/stdc++.h> using namespace std; ; const int INF = 2e9; class mstack { private : int tot; int s[MAXN]; public : inline void cle…