码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
算法题:链表的递归逆序
#include using namespace std;struct Node { int data; Node *next; Node(int d = int()) :data(d), next(NULL){} };class Clist { public: Clist(int a[], int n) :first(NULL) {...
分类:编程语言   时间:2015-07-31 10:35:13    阅读次数:128
hdu5328
题意:求最长的连续的等差 或者 等比序列 思路: 暴力,输入的时候将它们的差和比分别存在两个数组中 ps:此题动不动就超时 很无语, 必须用传统的输入输出, 不能加mem, 如果wrong了 考虑下n==2时答案是否为2; 代码: #include #include #include #include #include #include #include #include ...
分类:其他好文   时间:2015-07-31 10:35:11    阅读次数:131
点修改区间查询 HDU1541
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 struct Node 8 { 9 int l,r;10 int num;11 }bn[16000000];12 13 void build(int...
分类:其他好文   时间:2015-07-31 10:31:15    阅读次数:135
Blue Jeans - poj 3080(后缀数组)
大致题意: 给出n个长度为60的DNA基因(A腺嘌呤 G鸟嘌呤 T胸腺嘧啶 C胞嘧啶)序列,求出他们的最长公共子序列使用后缀数组解决 1 #include 2 #include 3 char str[6200],res[6200]; 4 int num[6200],loc[6200]; ...
分类:编程语言   时间:2015-07-31 10:29:22    阅读次数:155
线段树区间修改 HDU 1698
1 #include 2 #include 3 4 using namespace std; 5 6 struct Node 7 { 8 int l; 9 int r;10 int sum;11 int lz;12 }bn[400000];13 14 voi...
分类:其他好文   时间:2015-07-31 10:28:57    阅读次数:110
点修改区间查询 HDU1754
1 #include 2 #include 3 4 using namespace std; 5 6 int an[200010]; 7 struct Node 8 { 9 int l;10 int r;11 int ma;12 }bn[800010];13 14 ...
分类:其他好文   时间:2015-07-31 10:22:53    阅读次数:106
南阳 oj 擅长排列的小明 题目19
?? next  以及pre  函数的用法 http://blog.csdn.net/yueloveme/article/details/47164529 #include   #include   #include   char a[10]={'1','2','3','4','5','6','7','8','9','\0'};//给定一个已排列的数组  using name...
分类:其他好文   时间:2015-07-31 09:09:20    阅读次数:107
南阳 oj D的小L 题目366
?? next  以及pre  函数的用法 http://blog.csdn.net/yueloveme/article/details/47164529 #include #include #include char a[10]={'1','2','3','4','5','6','7','8','9'}; using namespace std; int main() {  ...
分类:其他好文   时间:2015-07-31 09:07:45    阅读次数:124
字典树 HDU 1251 统计难题
http://acm.hdu.edu.cn/showproblem.php?pid=1251#include#include#includeusing namespace std;struct node{ int sum; node *next[26];};void buildtriet...
分类:其他好文   时间:2015-07-31 09:02:37    阅读次数:117
【转】POJ-1703-Find them, Catch them:集合内的元素具有某种关系,集合间的关系不确定
和昨天晚上做的 A Bug‘s Life是一样思路的题···开始做的时候还是有些小问题,就在各种问题中进步吧。#include#define Size 100000int N, M;int Rel[Size+1], Pre[Size+1];void Init(){ for( int i...
分类:其他好文   时间:2015-07-31 09:00:01    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!