map是C++的一个标准容器,key-record的关系。1. map的构造函数map mapstring;map mapint;map mapstring;map mapchar;map mapchar;map mapint;2. map添加数据map maplive;maplive.insert... Read More
posted @ 2015-04-14 20:24 yiyi_xuechen Views(157) Comments(0) Diggs(0) Edit
1. 头文件#include2. 数组习惯用法vector iVec(10);//定义10个整数iVec[0] = 10;//第一个元素赋值为10vector iVec(10, -1);// 定义10个整数,每个整数被初始化为-1int ia[ 6 ] = { -2, -1, 0, 1, 2, 10... Read More
posted @ 2015-04-14 18:03 yiyi_xuechen Views(141) Comments(0) Diggs(0) Edit
问题描述Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the tw... Read More
posted @ 2015-04-14 16:41 yiyi_xuechen Views(117) Comments(0) Diggs(0) Edit