deque
------------------------------------------------------------------------
??一直看不懂 operator->() ,不明白它为什么不用接受参数,直接 return &(operator*())
好像我们用迭代器的时候也不没怎么用到这个函数,甚至我都不会用
1.概述
vector 是单向开口的连续线性空间,deque 则是一种双向开口的连续线性空间
允许常数时间内对起头端进行元素的插入和移除操作
没有容量概念,因为它是动...
分类:
其他好文 时间:
2014-07-22 00:32:34
阅读次数:
225
Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not co...
分类:
其他好文 时间:
2014-07-21 14:11:16
阅读次数:
151
{pc:get sql="SELECT * FROM v9_news WHERE catid IN (61,62,63,64,65) order by id DESC" num="10"? return="data" } {loop $data $n $r} ?<LI><SPAN><a href="{$CATEGORYS[$r[catid]][url]}">[{$CATEGORYS...
分类:
其他好文 时间:
2014-07-21 14:08:55
阅读次数:
246
题意就是一颗星星的左下方有多少颗星星就是几级;
把每级的星星个数统计好输出就ok;
但不能用二维树状数组,会超内存,,
#include
#include
#include
#define maxn 32001
using namespace std;
int a;
int arr[maxn];
int low(int x)
{
return x&(-x);
}
void u...
分类:
其他好文 时间:
2014-07-21 13:38:26
阅读次数:
213
jQuery强大的链式操作,有时候一行代码能解决一系列的问题<scripttype="text/javascript">
//等待dom元素加载完毕.
$(document).ready(function(){
$(".level1>a").click(function(){
$(this).addClass("current")//给当前元素添加"current"样式
.next().show()//下一..
分类:
Web程序 时间:
2014-07-21 12:47:35
阅读次数:
259
functionlog(msg){
vari=newImage();
i.src="http://127.0.0.1/log?msg="+msg;
}@RequestMapping(value={"/log"},produces={"application/json"},method={RequestMethod.GET},params={"msg"})
publicModellog(Modelmodel,Stringmsg){
System.out.println(msg);
model.addA..
分类:
其他好文 时间:
2014-07-21 12:18:33
阅读次数:
212
#include
#include
#include
#include
using namespace std;
double a[100000];
double vol[100000];
int m,n;
double v1,v2;
bool cmp(double aa,double bb)
{
if(aa>bb) return true;
}
int main()
{
int...
分类:
其他好文 时间:
2014-07-21 11:43:45
阅读次数:
226
# include
# include
# include
using namespace std;
struct node
{
int pos;
int d;
int num;
friend bool operator n2.d;//仍的距离从小到大
return...
分类:
其他好文 时间:
2014-07-21 11:43:44
阅读次数:
180
# include
# include
# include
using namespace std;
struct node
{
int y;
int val;
int num;
friend bool operatorn2.num;//从小到大
return...
分类:
其他好文 时间:
2014-07-21 11:36:44
阅读次数:
203
#include
int add(int a,int b)
{
return a+b;
}
int sub(int a,int b)
{
return a-b;
}
int mul(int a,int b)
{
return a*b;
}
int div(int a,int b)
{
return a/b;
}
void resul...
分类:
其他好文 时间:
2014-07-21 11:14:15
阅读次数:
173