上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 63 下一页
摘要: ```#include#include#include#includeusing namespace std;const int maxx = 50000 + 500;int ll,n,m;int pos[maxx];bool check(int num) //判断当最小距离为num的时候是否要拿走的石头多于M{ int cnt = 0; int last = 0; pos[0] = 0; pos... 阅读全文
posted @ 2020-05-07 01:12 晴屿 阅读(90) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#includeusing namespace std;const int maxn = 100000+5;int n,a[maxn],m;bool check(int d){ int cnt=0; for(int i = 0; i =m) return 1; else return 0;}int main(){ while(scan... 阅读全文
posted @ 2020-05-07 00:59 晴屿 阅读(68) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#include#includeconst int maxn = 1e5+10;using namespace std;long long k;int n;long long a[maxn];long long ans=0;long long maxt=0;bool check(int mid){ long long hott=0; for(i... 阅读全文
posted @ 2020-05-07 00:48 晴屿 阅读(73) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include #include #include #define pi acos(-1.0) #define ll long long int using namespace std; const int M=(int)1e5; const ll mod=(ll)1e9 + 7; const ll inf=0x3f 阅读全文
posted @ 2020-05-07 00:36 晴屿 阅读(95) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep_1(i,m,n) for(int i=m;i>re; for(int i=0; i>num[ 阅读全文
posted @ 2020-05-06 22:02 晴屿 阅读(94) 评论(0) 推荐(0) 编辑
摘要: ``` //单点修改 pushup //查询区间内的最大字段和 #include #include #include #include using namespace std; const int N = 500010; int n, m; int w[N]; struct Node { //端点 int l, r; int sum;//区间和 //最大前缀和 //分两种:没有超过mid,超过mi 阅读全文
posted @ 2020-05-06 19:09 晴屿 阅读(100) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include using namespace std; const int N=3030,INF=0x3f3f3f3f; int V,P,X[N],dp[N][N],w[N][N],d[N][N]; void init() { for(int l=1; l>1]; } } int main() { cin>>V>>P; for(in 阅读全文
posted @ 2020-05-06 15:37 晴屿 阅读(71) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include using namespace std; const int N = 30; const int dx[4] = { -1, 0, 1, 0 }; const int dy[4] = { 0, -1, 0, 1 }; int n, m; int sr, sc, er, ec; char g[N][N] 阅读全文
posted @ 2020-05-06 12:50 晴屿 阅读(82) 评论(0) 推荐(0) 编辑
摘要: ```//以u为根节点//找u的最大子树 中的最大分支//直接连到u上//看看能不能满足条件#include #include #include #include using namespace std;const int N = 400010;struct Node{ int fi, se; void insert(int x) // 向最大值和次大值中插入一个值 { if (x > fi) ... 阅读全文
posted @ 2020-05-06 01:30 晴屿 阅读(151) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include using namespace std; typedef long long ll; const int N = 15; ll f[N][2][N][2]; int num[N]; ll dfs(int len, bool limit, int sum, bool zero, int d) { ll ret = 0; if (len = 阅读全文
posted @ 2020-05-05 23:40 晴屿 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 63 下一页