函数
张有钱2828282828
究竟啥时候能有钱???
展开
-
关于lower_bound( )和upper_bound( )的常见用法
lower_bound( )和upper_bound( )都是利用二分查找的方法在一个排好序的数组中进行查找的。 1.在从小到大的排序数组中, lower_bound( begin,end,num):从数组的begin位置到end-1位置二分查找第一个大于或等于num的数字,找到返回该数字的地址,不存在则返回end。通过返回的地址减去起始地址begin,得到找到数字在数组中的下标。 upper_b...转载 2018-12-09 16:41:33 · 525 阅读 · 0 评论 -
unique() [c++去重函数]
原文地址 https://blog.csdn.net/tomorrowtodie/article/details/51907471 CF上的代码是开放的,常常就能看到本渣与大神们的差距 比如去重。。。 这是本鶸代码。。。。。。。 #include<iostream> #include<cstdio> #include<algorithm> using names...转载 2018-12-09 21:38:58 · 987 阅读 · 2 评论