技巧-STL使用
asdkjc
这个作者很懒,什么都没留下…
展开
-
[HDU 1512]Monkey King(并查集+启发式合并)(左偏树做法待补)
Description Once in a forest, there lived NNN aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each other. But monkeys can’t avoid quarrelling, and it ...原创 2020-01-10 16:28:33 · 103 阅读 · 0 评论 -
[HDU 6109]数据分割(启发式合并)
Description 小w来到百度之星的赛场上,准备开始实现一个程序自动分析系统。 这个程序接受一些形如xi=xj 或 xi≠xj 的相等/不等约束条件作为输入,判定是否可以通过给每个 w 赋适当的值,来满足这些条件。 输入包含多组数据。 然而粗心的小w不幸地把每组数据之间的分隔符删掉了。 他只知道每组数据都是不可满足的,且若把每组数据的最后一个约束条件去掉,则该组数据是可满足的。 请帮助他恢复...原创 2020-01-10 16:16:03 · 152 阅读 · 0 评论 -
[CodeForces 999D] Equalize the Remainders
You are given an array consisting of nnn integers aaa1,aaa2,…,aaan, and a positive integer mmm. It is guaranteed that mmm is a divisor of nnn.In a single move, you can choose any position iii between ...原创 2019-01-21 15:54:43 · 91 阅读 · 0 评论 -
STL中的rope模板(可持久化平衡树)
首先这玩意需要的预编译指令和用的命名空间有点不一样 #include<ext/rope> using namespace __gnu_cxx; 支持的操作: rope list; list.insert(p,str) //在p的位置插入str list.erase(p,c) //删除list的从p开始的c个节点 list.substr(p,c) //提取list的p位置开始的c...原创 2019-08-07 10:29:58 · 432 阅读 · 0 评论