![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++ STL
codertcm
这个作者很懒,什么都没留下…
展开
-
bind1st bind2nd
bind1st bind2ndtemplate< class F, class T >std::binder1st bind1st( const F& f, const T& x );template< class F, class T >std::binder2nd bind2nd( const F& f, const T& x );bindiiist: 将x与函数f的第iii个参数绑定...原创 2021-10-18 15:37:23 · 112 阅读 · 0 评论 -
STL中的二分查找--lower_bound/upper_bound/binary_search
转载于该大佬的博客:https://blog.csdn.net/u012878643/article/details/46723609 前言: STL中关于二分查找的函数主要有三个,分别是lower_bound/upper_bound/binary_search。这三个函数都运用于有序区间,当然这也是二分查找思想运用的前提,下面逐一对这三个函数进行剖析。在深入剖析之前,首先给出...转载 2018-07-29 19:43:00 · 172 阅读 · 0 评论 -
c++ STL容器 vector 的使用
vector容器用法详解vector类称作向量类,它实现了动态数组,用于元素数量变化的对象数组。像数组一样,vector类也用从0开始的下标表示元素的位置;但和数组不同的是,当vector对象创建后,数组的元素个数会随着vector对象元素个数的增大和缩小而自动变化。 vector类常用的函数如下所示: 1.构造函数vector():创建一个空vector ve...转载 2018-07-27 11:21:10 · 177 阅读 · 0 评论 -
map 容器的说明和使用技巧
Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据 处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一 种非严格意义上的平衡二叉树),这颗树具有对数据自动排序的功能,所以在map内部所有的数据都是有序的,后边我们...转载 2018-07-27 16:17:02 · 12750 阅读 · 1 评论 -
Coins and Queries
You are given three integers a, b and x. Your task is to construct a binary string s of length n=a+b such that there are exactly a zeroes, exactly b ones and exactly x indices i (where 1≤i<n) such ...原创 2018-07-27 16:29:14 · 177 阅读 · 0 评论 -
CodeForces 1004C Sonya and Robots
Since Sonya is interested in robotics too, she decided to construct robots that will read and recognize numbers.Sonya has drawn n numbers in a row, ai is located in the i-th position. She also has p...原创 2018-08-10 10:51:05 · 175 阅读 · 0 评论