码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
HDU 1010
经典搜索 1 #include 2 #include 3 using namespace std; 4 5 const int MAX=10; 6 7 int step[MAX][MAX]; 8 char maze[MAX][MAX]; 9 int n,m,t;10 struct {11 ...
分类:其他好文   时间:2014-06-21 07:12:00    阅读次数:218
hdu 1239
首先,p,q>=2,所以p,q=10000时,p 2 #include 3 4 using namespace std; 5 6 bool num[10005]; 7 int m,a,b; 8 int pnum[10000]; int n; 9 void type_table(){10 ...
分类:其他好文   时间:2014-06-21 06:52:28    阅读次数:236
HDU 1242
简单题 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int MAX=205; 7 const int inf=1000000; 8 int tim[MAX][MAX]; 9 char maze[MAX][...
分类:其他好文   时间:2014-06-21 00:34:49    阅读次数:226
HDU 1241
1 #include 2 #include 3 using namespace std; 4 5 const int MAX=105; 6 7 bool vis[MAX][MAX]; 8 char maze[MAX][MAX]; 9 int n,m;10 int dir[8][2]={0,...
分类:其他好文   时间:2014-06-21 00:14:01    阅读次数:275
HDU 1466
经典DP,这样的递推确实有点难。 把所有直线分成两组,可以知道m条直线的交点方案数=(m-r)条平行线与r条直线交叉的交点数+ r条直线本身的交点方案亦就是 =(m-r)*r+r条之间本身的交点方案数(0 2 #include 3 using namespace std; 4 5 bool an.....
分类:其他好文   时间:2014-06-20 19:56:33    阅读次数:173
SPOJ_LCS2
和上个题目差不多,这次是找若干个串的LCS,若干#include #define maxn 200100using namespace std;int next[maxn][26],pre[maxn],step[maxn];int f[13][maxn];int N=0,last=0,n=1;int...
分类:其他好文   时间:2014-06-20 18:49:21    阅读次数:153
[Noi2010]Plane 航空管制 贪心
#include#include#include#includeusing namespace std;#define N 2100#define M 11000int t[N];int n,m;int dp[N];int ru[N],op[N];int e[N],ne[M],v[M];int nn...
分类:其他好文   时间:2014-06-20 18:25:47    阅读次数:191
matlab中如何求某一个矩阵的标准差和均值
方法:先reshape成行向量或者列向量然后,利用mean函数,std函数。构造测试数据,可以利用random函数,就好。利用这个函数,可以构造不同分布的随机数列(或 矩阵)。如:>> y =random('norm',2,0.3,3,4)y = 2.1391 2.2945 2.0...
分类:其他好文   时间:2014-06-20 17:18:28    阅读次数:221
boost::thread之while(true)型线程终结方法
我们的程序中经常会用到线程来执行某些异步操作,而有些时候我们的线程执行的函数是这个样子的:[cpp]view plaincopyprint?voidThreadBody(){while(true){std::cout#include/**注意,windows操作系统下若要编译此程序需要建立的是WIN...
分类:编程语言   时间:2014-06-20 17:13:19    阅读次数:217
HDU 1240
1 #include 2 #include 3 using namespace std; 4 5 const int MAX=13; 6 7 char maze[MAX][MAX][MAX]; 8 9 struct {10 int i,j,k;11 }beg,des,que[11...
分类:其他好文   时间:2014-06-20 14:04:37    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!