摘要:
静态建树判一下1-n是不是为空就好了,如果有空的 就说明不是complete binary tree (和线段树建树差不多啊)Left=2*root;Right=2*root+1 #include using namespace std;typedef long long LL;struc... 阅读全文
posted @ 2017-03-24 15:30
see_you_later
阅读(148)
评论(0)
推荐(0)
摘要:
思路: 最后发现对当前列车比我大的编号的栈有没有就好了,所以开个vector存一下,然后二分一下vector找一下第一个比我大的数就好了 #include using namespace std;typedef long long LL;const int N=1e5+10;int n,a[N]... 阅读全文
posted @ 2017-03-24 14:43
see_you_later
阅读(176)
评论(0)
推荐(0)
浙公网安备 33010602011771号