07 2015 档案

摘要:#归并排序defmergeSort(a,L,R):if(L>=R):returnmid=((L+R)>>1)mergeSort(a,L,mid)mergeSort(a,mid+1,R)p=Lq=mid+1t=[]while(pa[q]:t.append(a[q])q+=1while(pval])a=... 阅读全文
posted @ 2015-07-20 11:19 acvc 阅读(444) 评论(0) 推荐(0)
摘要:voidQsort(int*a,intL,intR){if(L>=R)return;intp=L,q=R;intval=a[L];while(p!=q){while(pval)q--;if(p=R)return;intmid=(L+R)>>1;mergeSort(a,t,L,mid);mergeSo... 阅读全文
posted @ 2015-07-14 14:57 acvc 阅读(207) 评论(0) 推荐(0)
摘要:solution : 就按题解敲了一遍,好久没写这种dp1#include2#include3#include4#include5#include6#include7usingnamespacestd;8typedeflonglongLL;9constintMAX=1e3+10;10constint... 阅读全文
posted @ 2015-07-12 11:46 acvc 阅读(212) 评论(0) 推荐(0)
摘要:#includeusingnamespacestd;constintMAX=1e5+10;vectorfilter(constvector&vec,intval,less&lt){vectornvec;vector::const_iteratoriter=vec.begin();while((ite... 阅读全文
posted @ 2015-07-04 14:25 acvc 阅读(277) 评论(0) 推荐(0)