码迷,mamicode.com
首页 >  
搜索关键字:push_back    ( 578个结果
P3939 数颜色
[TOC] 题目 "P3939 数颜色" 思路1(待修莫队) 思路2(vector+二分) 代码1 代码2 cpp include include include include include include define pb(x) push_back(x) define ll long lon ...
分类:其他好文   时间:2018-11-04 19:46:23    阅读次数:188
AVL模板
感谢 "此博客" include define pb push_back define mp make_pair define de(x) cout t[x].val ], v ); } void init() { cnt = 1; rt = 0; node( t[rt], 0, 0, 0 ); } ...
分类:其他好文   时间:2018-11-02 00:06:18    阅读次数:228
list源码2(参考STL源码--侯捷):constructor、push_back、insert
list的push_back、insert的使用如下: #include<bits/stdc++.h> using namespace std; int main() { int i; list<int> l; cout<<l.size()<<endl; //0 l.push_back(1); l. ...
分类:其他好文   时间:2018-11-01 21:07:30    阅读次数:185
练习一下
#include #include #include //#define DEBUG #ifdef DEBUG #include #include #endif int main(void) { int x,y; std::vector msg; msg.push_back("Hello Ncurs... ...
分类:其他好文   时间:2018-10-20 23:45:39    阅读次数:151
HDU 6441 费马大定理+勾股数
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second #define all(a) (a).begin(), (a).end() #define fi ...
分类:其他好文   时间:2018-10-18 01:11:02    阅读次数:215
【全网最高端?】中缀表达式转为后缀表达式以及求值(可用于负数,阶乘)
代码里有注释。。。直接上代码。。。 include define rep(i,k,n) for(int i=k;i=k;i ) define pii pair define pb push_back define mp make_pair define re return define se sec ...
分类:其他好文   时间:2018-10-17 11:07:18    阅读次数:550
使用emplace操作
C++ 11新标准中引入了三个新成员——emplace_front、emplace和emplace_back,这些操作构造而不是拷贝元素。这些操作分别对应push_front、insert和push_back,允许我们将元素放置在容器头部、一个指定位置之前或容器尾部。 当调用push和insert成 ...
分类:其他好文   时间:2018-10-14 00:12:31    阅读次数:299
继承的特点
例,父类为Car 子类为Trush_Car 父类可以出现的地方子类就可以出现 Car acar = new Trash_Car(); 如acar不能调用fill_trush()方法 因为Car父类里面没有该方法 push_back()是 父类定义且子类继承的方法; acar.push_back(); ...
分类:其他好文   时间:2018-10-08 00:44:35    阅读次数:167
C++设计模式之观察者模式
//观察者模式 class Observer{ public: virtual void Updata() = 0; }; class Subject{ public: void Attach(Observer* in){ m_list.push_back(in); } void Detach(Ob... ...
分类:编程语言   时间:2018-10-01 17:10:41    阅读次数:215
「日常训练」Woodcutters(Codeforces Round 303 Div.2 C)
这题惨遭被卡。。卡了一个小时,太真实了。 题意与分析 (Codeforces 545C) 代码 cpp include define MP make_pair define PB push_back define fi first define se second define ZERO(x) me ...
分类:其他好文   时间:2018-10-01 00:07:30    阅读次数:177
578条   上一页 1 ... 16 17 18 19 20 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!