码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
C++中vector容器
在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结。1、 基本操作(1)头文件 #include.(2)创建vector对象 vector vec;(3)尾部插入数字 vec.push_back(a);(4)使用下标访问元素 cout::iterator it;for(i...
分类:编程语言   时间:2015-07-09 16:05:04    阅读次数:114
codeforces 339E Three Swaps 搜索
题目链接 题意: 给定一个1-n的排列 可以选择一个区间将其翻转。至多翻转三次。 问能不能变成单调递增的序列,并输出方案。 题目保证3次翻转一定有解。 思路: 爆搜,每次翻转一段最长的连续区间。 #include #include #include #include #include template inline bool rd(T &ret) { char...
分类:其他好文   时间:2015-07-09 14:39:44    阅读次数:121
C++ Primer(第五版)学习笔记_4_标准模板库string(1)
C++ Primer(第五版)学习笔记_4_标准模板库string(1) 1、创建string对象 创建一个空字符串,其长度为0 #include #include using namespace std; int main(int argc, char* argv[]) { string s; cout << s.length() << endl; re...
分类:编程语言   时间:2015-07-09 14:33:32    阅读次数:122
DSP EPWM学习笔记1 - EPWM定时中断
DSP EPWM学习笔记1 - EPWM定时中断彭会锋 75 #include "DSP28x_Project.h" // Device Headerfile and Examples Include File 77 78 // Select the example to compile ...
分类:其他好文   时间:2015-07-09 14:28:44    阅读次数:2170
二叉搜索树(C++)
#include using namespace std; typedef struct BiTNode{ int data; struct BiTNode *lchild, *rchild; }BiTNode,*BiTree; class solution{ public: bool searchBst(BiTree root, int key, BiTree f, BiTree ...
分类:编程语言   时间:2015-07-09 13:15:23    阅读次数:104
map的erase()释放内存
STL中的map调用erase(it),当value值为指针时,释放内存: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 struct value{ 7 int i; 8 std::string te...
分类:其他好文   时间:2015-07-09 13:05:32    阅读次数:179
uva 11582 Colossal Fibonacci Numbers!
//为啥循环节一定要是0 1开头 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 13 using n...
分类:其他好文   时间:2015-07-09 13:02:56    阅读次数:94
map的erase()释放内存
STL中的map调用erase(it),当value值为指针时,释放内存: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 struct value{ 7 int i; 8 std::string te...
分类:其他好文   时间:2015-07-09 12:50:43    阅读次数:99
map的erase()释放内存
STL中的map调用erase(it),当value值为指针时,释放内存: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 struct value{ 7 int i; 8 std::string te...
分类:其他好文   时间:2015-07-09 12:47:46    阅读次数:84
map的erase()释放内存
STL中的map调用erase(it),当value值为指针时,释放内存: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 struct value{ 7 int i; 8 std::string te...
分类:其他好文   时间:2015-07-09 12:45:14    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!