链接:
http://acm.hdu.edu.cn/showproblem.php?pid=1272
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=82830#problem/M
代码:
#include#include #include #include #include #include #include using namespace std;#define N 105000#define INF 0xfffffff#define max(a,b) (a>b?a:b)int f[N];void Inn(){ int i; for(i=0; i