上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 50 下一页
摘要: problemsolutioncodes#include#includeusing namespace std;int n, m, a[1010][1010], book[1010][1010], x, y, ans;const int dx[] = {0,0,-1,... 阅读全文
posted @ 2018-06-03 10:32 gwj1139177410 阅读(92) 评论(0) 推荐(0) 编辑
摘要: problem给你一个长为n的序列求一个长不超过m的连续子段,使子段和最大solution如果n#include#define maxn 300010using namespace std;int a[maxn], q[maxn];long long s[maxn],... 阅读全文
posted @ 2018-06-03 10:25 gwj1139177410 阅读(105) 评论(0) 推荐(0) 编辑
摘要: problem给定n个点,m条边的有向图求源点s到汇点的最大流solution最大流模板,,不会看笔记吧。。。codes#include#include#include#includeusing namespace std;typedef long long LL;c... 阅读全文
posted @ 2018-06-02 21:37 gwj1139177410 阅读(108) 评论(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) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 50 下一页
选择