这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《为什么不是背包问题?》回复:
[codec ] ```cpp #include #include #include using namespace std; typedef struct Cpet { int s, e; Cpet(int s, int e) :s(s), e(e){}; }; int N; vector best; vector…
```cpp #include #include #include using namespace std; typedef struct Cpet { int s, e; Cpet(int s, int e) :s(s), e(e){}; }; int N; vector best; vector cps; bool…
在讨论《神奇的数据》回复:
居然踢了同一个人不止两次,这也太残酷了
不用树链剖分的方法,而是在树上直接用类似线段树的方法。 树上记录当前结点的子节点install的数量cnt和uninstall的lazytag。 install的时候先从根节点update到当前结点,然后再返回根节点0,沿路计算install个数。 uninstall的时候从当前结点到根节点0,判断是否存在lazyta…