![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
dongcl97
这个作者很懒,什么都没留下…
展开
-
二分查找学习总结
基于减而治之的思想,在有序向量的区间[lo,hi)内查找元素e二分查找版本Aint binsearch(int* A,int e,inr lo,int hi){ while(lo<hi){ int mid=(lo+hi)>>1; if(e<A[mid]) hi=mid; //深入前半段[lo,mid)继续查找 else if(A[mid]>e) l...原创 2020-04-23 11:49:18 · 818 阅读 · 0 评论 -
THOJ 祖玛(Zuma)
ProblemDescriptionLet’s play the game Zuma!There are a sequence of beads on a track at the right beginning. All the beads are colored but no three adjacent ones are allowed to be with a same color....原创 2020-04-12 12:08:20 · 277 阅读 · 0 评论