笔记
upup小飞侠
这个作者很懒,什么都没留下…
展开
-
Nastya and Door(CF1341B)-暴力&前缀和
Nastya and Door 题目链接 Time limit 1000 ms -------- Memory limit 262144 kB On 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 · 285 阅读 · 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 · 149 阅读 · 0 评论