pat 1057. Stack (30)

利用树状数组来作,树状节点储存该区间内的数字个数 树状数组每一个节点x负责的区间为[x - 2^k + 1,x] 其中k为x用二进制表示中末尾0的个数web #include<stdio.h> #include<stack> #include<algorithm> #include<string.h> using namespace std; #define SIZE 100001 struct
相关文章
相关标签/搜索