返回顶部
摘要: POJ2955 匹配则加一,不需要初始化 1 //#include<bits/stdc++.h> 2 #include<iostream> 3 #include<cstdio> 4 #include<algorithm> 5 #include<vector> 6 #include<cstring> 阅读全文
posted @ 2018-10-19 19:48 牛奶加咖啡~ 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Uberwatch 题意:一个人打一群敌人,每间隔时间m能释放一次大招,消灭这个时刻上的所有敌人,起始时刻开始计算冷却时间 solution: dp[i]=max(dp[i],dp[i-m]); 1 /************************************************* 阅读全文
posted @ 2018-10-19 11:36 牛奶加咖啡~ 阅读(269) 评论(0) 推荐(0) 编辑
摘要: /************************************************************************* > File Name: a.cpp > Author: QWX > Mail: > Created Time: 2018/10/16 16:47:07 *****************************... 阅读全文
posted @ 2018-10-16 20:21 牛奶加咖啡~ 阅读(109) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef long double db; typedef pair pii; type... 阅读全文
posted @ 2018-10-16 15:50 牛奶加咖啡~ 阅读(105) 评论(0) 推荐(0) 编辑
摘要: https://cn.vjudge.net/contest/260665#problem/E 题意: 给你一个n个点m条边的无向无环图,在尽量少的节点上放灯,使得所有边都被照亮。每盏灯将照亮以它为一个端点的所有边。 在灯的总数最小的前提下,被两盏灯同时被照亮的边数应该尽量大。 solution: 这 阅读全文
posted @ 2018-10-16 15:46 牛奶加咖啡~ 阅读(232) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; const int maxn = 5e5+7; struct node{int l,r;}p[maxn]; int n,m,pos,a[maxn],d[maxn],len,now=0; char s1[maxn 阅读全文
posted @ 2018-10-15 19:20 牛奶加咖啡~ 阅读(254) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/group/aUVPeyEnI2/contest/230300/problem/E 参考自:https://blog.csdn.net/u013508213/article/details/49594691 题意: 给n个内存读取指针头,m个需要访问的内存 阅读全文
posted @ 2018-10-11 19:41 牛奶加咖啡~ 阅读(236) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/group/aUVPeyEnI2/contest/229670 1 /************************************************************************* 2 > File Name: 可持久化 阅读全文
posted @ 2018-10-08 20:47 牛奶加咖啡~ 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 2013-2014 ACM-ICPC, NEERC, Eastern Subregional Contest 1 /************************************************************************* 2 > File Name: a.c 阅读全文
posted @ 2018-10-07 21:42 牛奶加咖啡~ 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题意: 给你n个插座,m个设备,每台设备都有对应的插座,有k个转接器。 要求:求满足不能插上插座的用电器最少个数 solution: HINT:每种适配器都有无限个,所以建图的时候要改为INF。 答案为m-idnic() 1 #include<iostream> 2 #include<cstdio> 阅读全文
posted @ 2018-09-29 20:37 牛奶加咖啡~ 阅读(283) 评论(0) 推荐(0) 编辑