码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
Hdoj 1014 Uniform Generator
题目:点击打开链接 分析:题目要求均匀产生随机数,有两种方法:1 对产生的数进行标记 2 要产生随机数STEP和MOD的最大公约数不能超过1 代码一: #include #include int a1[100010]; int main() { int STEP,MOD; while(~scanf("%d%d",&STEP,&MOD)) { int i; in...
分类:其他好文   时间:2015-08-12 11:39:17    阅读次数:74
hdu5371
题意:找三个连续子序列a b c,满足a b对称且b c对称 思路:先求出序列中以每个位置为中心的回文串长度存在p[i]数组里,用manacher算法,O(n)的时间,然后遍历p数组,如果在当前位置的回文串范围内,与之后的位置上的回文串范围能覆盖彼此任意一个的至少一半,就说明满足条件,依此找出最优解 还在wa的同学可以试试我代码下面的数据 代码: #include #include #...
分类:其他好文   时间:2015-08-12 11:38:09    阅读次数:128
UVA 567 Risk【floyd】
题目链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=508题意:20个点的任意最短路。floyd代码:#include #include #include #include #...
分类:其他好文   时间:2015-08-12 11:35:41    阅读次数:120
UVA 10034 Freckles 【最小生成树】
题目链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=975题意:裸的最小生成树代码:#include #include #include #include #i...
分类:其他好文   时间:2015-08-12 11:33:15    阅读次数:108
C++ 数据结构学习二(单链表)
//LinkList.h 单链表#ifndef LINK_LIST_HXX#define LINK_LIST_HXX#include using namespace std;templatestruct Node{ T data; Node * next;};templateclass Li...
分类:编程语言   时间:2015-08-12 11:25:35    阅读次数:154
360编程题:挑选镇长
#include using namespace std; typedef struct Relation_ { int first; int end; }Re; typedef struct Leader_ { int mun; int*pResult; }Le; Le GetLeader(int Sum,int M,Re*pRelation) { int i=0; int*p1...
分类:其他好文   时间:2015-08-12 10:14:04    阅读次数:137
一级指针以及二级指针
我想不大理解二级指针的根源是我对程序对堆栈的用法还不够深入了解。 采用一级指针最好是方便修改指针对象的值,采用二级指针最好是方便修改指针的值。#include #include using namespace std;class haha { }; void main() { haha *p(new haha); printf("%p\n",...
分类:其他好文   时间:2015-08-12 10:11:56    阅读次数:113
POJ 2186 Popular Cows
强连通分量+缩点#include#include#include#include#includeusing namespace std;const int maxn=10000+10;vectorG[maxn];vectorFG[maxn];int Flag[maxn];int n,m,tot;in...
分类:其他好文   时间:2015-08-12 10:11:27    阅读次数:116
关于use-default-filters的一个问题
use-default-filters=true 默认行为会自动扫描所有注解com.fleet下的包及其子包注解都会扫描到,这就会有一个问题,就是对于include-filter标签不会起作用只有当use-default-filters=false才会有用,,但是,exclude-filter会起作...
分类:其他好文   时间:2015-08-12 10:11:24    阅读次数:159
结构体,联合体,内存分配
#include struct a{ char x[6]; int y; char z[6]; }; struct b{ int y; char x[6]; char z[6]; }; union c{ char x[6]; int y; char z[6]; }; int main() { printf("%d,%d,%d\n",sizeof(struct a),sizeof...
分类:其他好文   时间:2015-08-12 09:05:04    阅读次数:81
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!