码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
hdu 2151 Worm
最简单的动归,当然,我也只会最简单的,不开心心塞中 #include #include using namespace std; int dp[100+5][100+5]; int main() { int n,p,m,t; while(cin>>n>>p>>m>>t) { memset(dp,0,sizeof(dp)); dp[0][p]=1; for(int i=1;i<=...
分类:其他好文   时间:2015-04-11 17:59:41    阅读次数:109
Curling 2.0(POJ-3009)
典型DFS搜索。  #include #include #include #include #include using namespace std; int w,h,maxn; bool ok ; int board[25][25]; int dx[] = {1,0,-1,0} ; int dy[] = {0,1,0,-1} ; struct pa{ int x,y; pa(i...
分类:Web程序   时间:2015-04-11 17:57:27    阅读次数:151
Red and Black.(POJ-1979)
DFS水题。 #include #include #include #include #include using namespace std; int dx[] = {0,1,0,-1} ; int dy[] = {1,0,-1,0} ; int n,m,maxn; int vis[25][25]; char s[25][25]; struct pa{ int r,c; }; voi...
分类:其他好文   时间:2015-04-11 17:56:41    阅读次数:118
POJ 2436 USACO silver
题意: 总共最多有15种疾病 有n头牛,每头牛有di种疾病,分别用1-15之间的数字来表示 要求选择最多头牛 使他们的疾病种数不超过K 思路: 枚举状态,状态是当前有哪几种病,然后判断每头牛是否能选择即可 code: #include #include #include using namespace std; const int maxn = 40000; int cow[10...
分类:其他好文   时间:2015-04-11 17:54:38    阅读次数:104
【包容】一个类可以包含另一个类的对象
当一个类中出现了另一个类的对象,这种现象我们叫做包容!#include using namespace std;class A{public: A(){x=0;} A(int i){x=i;} void get(){cout<<x<<endl;;} ~A(){}private...
分类:其他好文   时间:2015-04-11 17:48:33    阅读次数:96
排序八:鸡尾酒排序
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace Cocktail.....
分类:编程语言   时间:2015-04-11 17:37:30    阅读次数:157
顺序统计量
顺序统计量有关算法得与快速排序的分割联系起来#include #include using namespace std;typedef int index;index Rand_Partition(int *a, index p, index r);index Partition(int *a, i...
分类:其他好文   时间:2015-04-11 17:36:05    阅读次数:142
排序七:基数排序
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace R...
分类:编程语言   时间:2015-04-11 17:34:16    阅读次数:163
hdu3951Coin Game 博弈
//如果在第一个人拿完以后,第二个人能使得局面是对称的,那么第二个人赢 #include #include #include using namespace std ; int main() {     int n  , k;     int T ;     scanf("%d",&T) ;     int cas = 0;     while(T--)     {   ...
分类:其他好文   时间:2015-04-11 16:26:23    阅读次数:131
排序六:希尔排序
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace ShellSor.....
分类:编程语言   时间:2015-04-11 16:18:04    阅读次数:109
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!