码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
【HDOJ】2222 Keywords Search
AC自动机基础题。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 #define MAXL 1000005 9 #define TRIEN 26 10...
分类:其他好文   时间:2014-07-07 17:12:08    阅读次数:242
数据结构2-队列
队列是可以在它的两端可以进行操作,一端入队列,一端出队列。 队列中用两个标志来表示队列头和队列尾,front和rear,front指向队列头元素的前一个位置,rear指向队列尾的那个元素。 用C++实现如下: //定义一个队列#includeusing namespace std;const...
分类:其他好文   时间:2014-07-07 16:42:38    阅读次数:291
一个N*M的矩阵,找出这个矩阵中所有元素的和不小于K的面积最小的子矩阵
题目描述:一个N*M的矩阵,找出这个矩阵中所有元素的和不小于K的面积最小的子矩阵(矩阵中元素个数为矩阵面积)输入:每个案例第一行三个正整数N,M 5 #include 6 #include 7 using namespace std; 8 int main() 9 {10 //freopen...
分类:其他好文   时间:2014-07-07 16:29:44    阅读次数:431
畅通工程&&How Many Tables
http://acm.hdu.edu.cn/showproblem.php?pid=1232 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int n,m; 7 int bin[2005]; 8 in...
分类:其他好文   时间:2014-07-07 16:14:33    阅读次数:145
回文词
#include #include #include #include using namespace std;const char *rev = "A 3 HIL JM O 2TUVWXY51SE Z 8 ";//字符A-9的镜像字符,没有镜像则为空格const char * msg[...
分类:其他好文   时间:2014-07-07 13:49:37    阅读次数:157
临接表
(2)邻接表邻接表的C语言描述基本运算的算法——建立无向网的邻接表、求图中与顶点i邻接的第一个顶点、求图中顶点i相对于顶点j的下一个邻接点、若图G中存在顶点u,则返回该顶点在图中的位置、图的广度优先遍历、图的深度优先遍历2.#include#includeusing namespace std;cl...
分类:其他好文   时间:2014-07-03 11:29:43    阅读次数:311
环状DNA序列
大意:一个DNA序列是环状的,这意味着有N个碱基的序列有N种表示方法(假设无重复)。而这N个序列有一种最小的表示,这个最小表示的意思是这个序列的字典序最小(字典序的意思是在字典中的大小 比如ABCusing namespace std;#define MAX 105int lessthan(char...
分类:其他好文   时间:2014-07-02 00:46:31    阅读次数:372
【HDOJ】2896 病毒侵袭
AC自动机模板题。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define TRIEN 128 8 #define MAXN 505 9 10 typedef str...
分类:其他好文   时间:2014-07-01 00:07:22    阅读次数:257
staitc_cast,const_cast....
#include using namespace std;int main(){ //1.const_cast //const int a = 10; //int* ptr = const_cast(&a);//将const属性去除 //*ptr = 100; //2....
分类:其他好文   时间:2014-06-30 15:38:28    阅读次数:160
poj 2723 Get Luffy Out 2-SAT
两个钥匙a,b是一对,隐含矛盾a->!b,b->!a 一个门上的两个钥匙a,b,隐含矛盾!a->b,!b->a(看数据不大,我是直接枚举水的,要打开当前门,没选a的话就一定要选b打开,没选b的话,就一定要选a打开) #include #include #include #include #include #include using namespace std; #define max...
分类:其他好文   时间:2014-06-30 09:41:26    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!