Rope用法

rope 可持续化平衡数

// 头文件
#include <ext/rope>
using namespace __gnu_cxx;
rope<int> a;
rope<char> a;
a.push_back(x)  // 在末尾插入
a.pop_back(x)   // 删除最后一个元素
a.size()    // 返回长度
a.insert(int pos, x)    // 在pos插入x
a.erase(int pos, int sum)   // 在pos删除sum个元素
a.replace(int pos, x)   // 将pos替换为x
a.substr(int pos, int sum)  // 在pos处截取sum个元素
a.at(x) a[x]    //访问第x个元素

猜你喜欢

转载自blog.csdn.net/henuyh/article/details/81231034