上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 18 下一页
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2063 因为要补某一道cf题特意来学一下。。。 匈牙利算法关键在于在能“反悔”的时候尽量“反悔”进行新的匹配以获得更多的匹配数。具体建议看代码很好看懂~ 阅读全文
posted @ 2019-09-11 16:53 Venux 阅读(170) 评论(0) 推荐(0) 编辑
摘要: C. Removing Columns https://codeforc.es/contest/496/problem/C 从前往后标记那些前面已经确定字典序合法的行,对于字典序不合法又没被标记的直接删除该列。 D. Tennis Game https://codeforc.es/contest/4 阅读全文
posted @ 2019-09-11 12:03 Venux 阅读(203) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/contest/1217/problem/E 建立9棵数位线段树维护区间最小值和次小值,建议用struct建树方便进行区间合并 阅读全文
posted @ 2019-09-08 21:22 Venux 阅读(195) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/gym/100342 bitset存边搞一搞 阅读全文
posted @ 2019-09-05 22:27 Venux 阅读(308) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/contest/1214/problem/E 借鉴自dls的做法:先把奇数号从长到短连接起来然后连剩下的偶数号。 阅读全文
posted @ 2019-09-05 19:09 Venux 阅读(258) 评论(0) 推荐(0) 编辑
摘要: https://ac.2333.moe/Problem/view.xhtml?id=1646 本来想用主席树来着,一看内存直接劝退。 貌似只能用vector或map搞一搞了。 阅读全文
posted @ 2019-09-02 23:13 Venux 阅读(181) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/contest/1208/problem/D 线段树维护从1到n的前缀和,从后往前查询第一个前缀和大于ai的位置,线段树简单操作我竟然没当场写出来555 阅读全文
posted @ 2019-08-28 15:03 Venux 阅读(254) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2036 阅读全文
posted @ 2019-08-28 14:47 Venux 阅读(261) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6703 题意 给定一个长度为n的排列(1-n),要你实现操作两种, 1 x:给第x个数加上1e7; 2 x y:查询最小的且不小于y的且不在区间[1,x]里出现过的数。 题解 对权值建主席树,维护区间最小值,插入一 阅读全文
posted @ 2019-08-24 21:32 Venux 阅读(311) 评论(0) 推荐(1) 编辑
摘要: https://ac.nowcoder.com/acm/contest/889#question 题意 n个竹子排成一排,每次选一个高度切竹子,每次切下的总长度必须相等。 q次查询,每次查询一个区间[l,r],x,y,表示在这个区间里切竹子, 要保证一共切y次切完,问第x次切竹子的高度。 题解 一共 阅读全文
posted @ 2019-08-20 15:08 Venux 阅读(195) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 18 下一页