伸展树
yjt9299
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
uva 11922 (伸展树模板题)
给你一个长度为n 的序列(初始值为1到n)。有m 次操作,每次操作有l r 你需要将l 到 r 的数字翻转。然后放到最后m次操作后输出答案。代码:#include<bits/stdc++.h>using namespace std;const int inf =0x3f3f3f3f; struct Node{ Node *ch[2]; int s,v,f...原创 2018-07-27 14:00:34 · 441 阅读 · 2 评论 -
牛客第三场c题(伸展树)
题意: 给你n 张卡牌分别为1到n 1 在顶 n在尾,每次给你l len 你要将 l 处一下的len 个(包括l) 挪到顶上。问你m次操作后的序列。代码: #include<bits/stdc++.h>using namespace std;const int inf =0x3f3f3f3f;struct Node{ Node *ch[2]; i...原创 2018-07-27 15:30:05 · 251 阅读 · 0 评论
分享