笔记
upup小飞侠
这个作者很懒,什么都没留下…
展开
-
Nastya and Door(CF1341B)-暴力&前缀和
Nastya and Door题目链接Time limit 1000 ms -------- Memory limit 262144 kBOn February 14 Denis decided to give Valentine to Nastya and did not come up with anything better than to...原创 2020-05-01 23:06:30 · 268 阅读 · 0 评论 -
二分搜索与STL二分查找
二分搜索与STL二分查找一丶二分搜索用法:搜索非递减数列中是否包含某个元素当数据量比较大的时候,二分比线性搜索高效得多。流程:查找36代码实现:对象是非递减序列,如果当数据无序时,需要预先进行一次排序。int binarysearch(int A[],int key,int n)//n为数组长度{ int left=0,right=n,mid; while( left &l...原创 2020-03-10 23:18:13 · 144 阅读 · 0 评论