码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
【转】POJ1129-Channel Allocation:DFS 四色定理 剪枝枚举
#include#include#includeusing namespace std;bool g[26][26];int used[26];int n;//id 是当下着色结点 color是限制的颜色数量bool dfs(int id, int color){ bool flag;...
分类:其他好文   时间:2015-08-13 20:00:15    阅读次数:195
hdu 5387 Clock (模拟)
#include#include#include#include#include#includeusing namespace std;int gcd(int x,int y){ return y==0?x:gcd(y,x%y);}int main(){ int h,m,s; in...
分类:其他好文   时间:2015-08-13 19:59:05    阅读次数:119
hdu 4374 单调队列
求一个最大k连续的子序列和 单调队列#include#include#includeusing namespace std;int num[201000],id[201000],sum[201000];int main(){ int n,m,i,j,T; scanf("%d",&T);...
分类:其他好文   时间:2015-08-13 19:49:09    阅读次数:189
hdu 5389 dp
写错一个地方WA了一下午... 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int MOD = 258280327; 7 const int N = 100001; 8 const int M = 10;...
分类:其他好文   时间:2015-08-13 19:48:24    阅读次数:127
网络流模板
namespace NetFlow{ const int MAXN=100000,MAXM=100000,inf=1e9; struct Edge { int v,c,f,nx; Edge() {} Edge(int v,int c,int...
分类:其他好文   时间:2015-08-13 19:37:22    阅读次数:110
hdu2222
链接:点击打开链接 题意:t组数据,给出n个单词,再给一句话,问这句话中出现过几个给出的单词 代码:#include #include #include #include #include #include #include using namespace std; struct node{ int str[26],fail; short dis; }ch[250...
分类:其他好文   时间:2015-08-13 18:17:59    阅读次数:103
【华为OJ平台练习题】求最后一个单词长度
//描述 //计算字符串最后一个单词的长度,单词以空格隔开。 //知识点 字符串,循环 //运行时间限制 0M //内存限制 0 //输入 //一行字符串,长度小于128。 //输出 //整数N,最后一个单词的长度。 //样例输入 hello world //样例输出 5 #include using namespace std; int countLastWordLength(char...
分类:其他好文   时间:2015-08-13 18:09:29    阅读次数:298
pat(A) 1062. Talent and Virtue(结构体排序)
代码: #include #include #include #define N 100005 using namespace std; struct Node { int num; int v; int t; void Set(int x,int y,int z) { num=x; v=y; t=z; ...
分类:编程语言   时间:2015-08-13 18:09:01    阅读次数:136
hdu 5387 Clock
代码: #include #include #include #include using namespace std; int f(int a) { return a>0?a:(-a); } int gcd(int a,int b) { return b>0?gcd(b,a%b):a; } int main() { int t; int hh,mm,ss;...
分类:其他好文   时间:2015-08-13 18:01:28    阅读次数:96
BZOJ 1110: [POI2007]砝码Odw( 贪心 )
ORZjcvb... 1 #include 2 3 using namespace std; 4 5 const int maxn = 100009; 6 7 int N, M, item[maxn], V[maxn]; 8 vector o, cnt, Div; 9 10 int main(...
分类:其他好文   时间:2015-08-13 17:37:40    阅读次数:115
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!