摘要: problem给定n个点,m条边的有向图求源点s到汇点的最大流solution最大流模板,,不会看笔记吧。。。codes#include#include#include#includeusing namespace std;typedef long long LL;c... 阅读全文
posted @ 2018-06-02 21:37 gwj1139177410 阅读(109) 评论(0) 推荐(0) 编辑
摘要: problem给出n个正整数,然后有m个询问询问该整数是否在n个正整数中出现过solution哈希表? 当然是set水洛codes#include#includeusing namespace std;sets;int main(){ int n, m; ... 阅读全文
posted @ 2018-06-02 21:12 gwj1139177410 阅读(102) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;const int maxn = 100010;#define lch p>1; sgt[lch].addmark += t; sgt[rch].addmark... 阅读全文
posted @ 2018-06-02 21:10 gwj1139177410 阅读(94) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;const int maxn = 100010;#define lch p>1; sgt[lch].addmark += t; sgt[rch].addmark... 阅读全文
posted @ 2018-06-02 21:08 gwj1139177410 阅读(107) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//不好玩#includeusing namespace std;int n, m, a[30010], r, p;int main(){ cin>>n>>m; for(int i = 1; i 1){ ... 阅读全文
posted @ 2018-06-02 21:07 gwj1139177410 阅读(114) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#includeusing namespace std;struct peo{ int w, id; }hum[50010];bool cmp(peo a, peo b){ return a.w==b.w?a.i... 阅读全文
posted @ 2018-06-02 21:04 gwj1139177410 阅读(172) 评论(0) 推荐(0) 编辑
摘要: problem给定n个点,m条边的有向图求源点s到汇点的最大流solution最大流模板,,不会看笔记吧。。。codes//Edmonds-Karp#include#include#include#includeusing namespace std;typedef ... 阅读全文
posted @ 2018-06-02 20:39 gwj1139177410 阅读(153) 评论(0) 推荐(0) 编辑
摘要: problem将n个罪犯分别关押进2座监狱每2个罪犯之间有一个冲突值,当他们在同一监狱时就会爆发让爆发的冲突值(最大的那个)最小,求那个最小值solution考虑判定:是否存在一种分配方案,使最大的冲突值不超过mid。当mid较小时的可行方案对于更大的mid一定可行(... 阅读全文
posted @ 2018-06-02 19:38 gwj1139177410 阅读(245) 评论(0) 推荐(0) 编辑
摘要: problem给出一个n*n的矩阵,每一格有一个非负整数A[i][j],(Aij #include#include#includeusing namespace std;const int N = 5050, M = 200010;//AddEdgeint tot=1... 阅读全文
posted @ 2018-06-02 13:30 gwj1139177410 阅读(152) 评论(0) 推荐(0) 编辑
摘要: problem(= =、可读版本)最近,佳佳迷上了一款好玩的小游戏:antbuster。 游戏规则非常简单:在一张地图上,左上角是蚂蚁窝,右下角是蛋糕,蚂蚁会源源不断地从窝里爬出来,试图把蛋糕搬回蚂蚁窝。而你的任务,就是用原始资金以及杀蚂蚁获得的奖金造防御塔,杀掉这些... 阅读全文
posted @ 2018-06-02 12:27 gwj1139177410 阅读(173) 评论(0) 推荐(0) 编辑
选择