
c语言
文章平均质量分 69
NeQrhk
这个作者很懒,什么都没留下…
展开
-
c语言----高位舍弃的左旋和右旋操作
#include //Perform left and right rotations unsigned char rol(unsigned char val) { int highbit; if (val & 0x80) highbit = 1; else highbit = 0; val <<= 1; val != highbit; return val; } unsign原创 2016-11-16 13:23:02 · 923 阅读 · 0 评论 -
splay树的一些基本操作 c语言代码
#include #include using namespace std; const int maxn=10001; int lc[maxn],rc[maxn],data[maxn],pr[maxn], size[maxn],tot=0,root; void zig(int x){ //左旋 int y=pr[x],z=py[y]; if(lc[z]==y){ lc[z]=x;原创 2016-07-19 16:40:05 · 976 阅读 · 0 评论