摘要: 简单DPdp[i][j]表示的是i到j这段区间获得的a[i]*(j-i)+... ...+a[j-1]*(n-1)+a[j]*n最大值那么[i,j]这个区间的最大值肯定是由[i+1,j]与[i,j-1]区间加上端点的较大值推过来的。#include#include#include#include#i... 阅读全文
posted @ 2016-01-19 21:28 Fighting_Heart 阅读(154) 评论(0) 推荐(0)
摘要: 排序+枚举+二分最大的那些变成A,小的那部分提高最小值#include#include#include#includeusing namespace std;const int maxn=100000+10;int n;long long A,cf,cm,m;struct X{ long lo... 阅读全文
posted @ 2016-01-19 12:33 Fighting_Heart 阅读(255) 评论(0) 推荐(0)
摘要: 简单计算几何,只要算出圆心到多边形上的最短距离和最长距离即可#include#include#include#includeusing namespace std;const int maxn=100000+10;struct Point{ double x,y;} p[maxn];doubl... 阅读全文
posted @ 2016-01-19 12:31 Fighting_Heart 阅读(372) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#include#include#includeusing namespace std;long long L,R,K;long long POW(long long m,long long n){ long lo... 阅读全文
posted @ 2016-01-19 12:30 Fighting_Heart 阅读(211) 评论(0) 推荐(0)
摘要: #include #include #include #include #include using namespace std;int flag;char s[100000+10];int zero;char q[100000+10];bool Perfect(){ int len=strl... 阅读全文
posted @ 2016-01-19 12:30 Fighting_Heart 阅读(265) 评论(0) 推荐(0)