码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
深拷贝举例
1 //DeepCopy.cpp 2 #include 3 using namespace std; 4 5 template 6 class ObjectCell { 7 public: 8 explicit ObjectCell(object initValue ...
分类:其他好文   时间:2014-07-22 22:52:57    阅读次数:255
HDU 1711 Number Sequence
经典kmp 1 #include 2 #include 3 using namespace std; 4 5 int n,m; 6 int a[1000010],b[10010],next[10010]; 7 8 void getnext (int *s,int *next)...
分类:其他好文   时间:2014-07-22 22:52:33    阅读次数:182
HDU 1358 Period
经典kmpps:poj 2046Power Strings 是这题的简化版 ←_←太水就不贴代码了。。。#include #include #include using namespace std;const int maxn=1000010;char s[maxn];int next[maxn];...
分类:其他好文   时间:2014-07-22 22:52:16    阅读次数:209
findmax的实现
1 #include 2 #include 3 #include "printCollection.h" 4 5 using namespace std; 6 7 /** 8 * Return the maximum item in array a. 9 *Assume a.size(...
分类:其他好文   时间:2014-07-22 22:51:38    阅读次数:203
function object用法
1 // Generic findMax, with a function object, version #1 2 // Precondition, a.size() > 0 3 #include 4 #include 5 #include 6 using namespace std; ...
分类:其他好文   时间:2014-07-22 22:51:36    阅读次数:209
Hdu1002 大数加法
#include #include #include #include using namespace std;const int MAX = 1010;char s1[MAX],s2[MAX];int s[MAX];int main(){ int n, c, m, count = 1; ...
分类:其他好文   时间:2014-07-22 22:51:16    阅读次数:145
全排列的实现
#include using namespace std; int n=0; template void Swap(T *a,T *b) {  T temp=*a;  *a=*b;  *b=temp; } template void Perm(T A[],int k,int m) {  if(k>m)  {   for(int i=0;i   {    cou...
分类:其他好文   时间:2014-07-20 00:12:42    阅读次数:250
hdu 1009--greedy
/** \brief hdu 1009--greedy * * \param date 2014/7/18 * \param state AC * \return * */ #include #include #include #include using namespace std; const int MAXN=1001; struct Data { int...
分类:其他好文   时间:2014-07-19 23:41:49    阅读次数:237
C++中如何split字符串(转)
#include #include #include using namespace std;int main(){ string s("Somewhere down the road"); istringstream iss(s); while (iss) ...
分类:编程语言   时间:2014-07-19 23:13:54    阅读次数:248
Codeforces Round #FF(255) (Div. 2)
A题/*ID: neverchanjePROG:LANG: C++11*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define INF 0...
分类:其他好文   时间:2014-07-19 22:39:30    阅读次数:314
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!