- 博客(18)
- 资源 (5)
- 收藏
- 关注
转载 北大ACM试题分类 - 实时更新我所有的解题报告链接
zhuang優YoU http://blog.csdn.net/lyy289065406/article/details/6642573 最近AC题:2528 更新时间:2011.09.22 已AC题数:146 初级题已在2011.06.30全部完成 部分解题报告添加新内容,除了原有的“大致题意”和“解题思路”外, 新增“Source修正”,因为原
2014-08-27 16:11:17 417
原创 hdu 1166敌兵布阵 线段树 树状数组
#include #include #include using namespace std; #define MAX 50005 int tree[MAX*4]; void build(int s,int e,int n) { if(e==s) { scanf("%d",&tree[n]); return ; } int mid
2014-08-26 09:46:30 443
原创 poj2388
Who's in the Middle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 31815 Accepted: 18521 Description FJ is surveying his herd to find the most average cow
2014-08-20 16:39:05 400
原创 poj 1936 All in All
水题#include #include #include #include using namespace std; int main(){ char a[100005],b[100005]; int n,m,i,j; while(scanf("%s%s",a,b)!=EOF) { i=0;j=0; n=strlen(a
2014-08-20 15:26:28 344
原创 poj 3461 Oulipo kmp
#include/// kmp myseif #include #include using namespace std; char a[1000001]; char b[10001]; int next[10001]; void getnext() /// 获得 next 数组 { next[0]=-1; int k=-1; int j=0; int bl=
2014-08-16 20:35:48 388
原创 next_permutation与prev_permutation
next_permutation()函数功能是输出所有比当前排列大的排列,顺序是从小到大。 prev_permutation()函数功能是输出所有比当前排列小的排列,顺序是从大到小。
2014-08-13 09:55:42 616
原创 hdu1285 简单拓扑排序
确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12329 Accepted Submission(s): 4917 Problem Description 有N个比赛队(1
2014-08-12 19:53:21 437
原创 zoj 1655 最短路 Transport Goods
Transport Goods Time Limit: 2 Seconds Memory Limit: 65536 KB The HERO country is attacked by other country. The intruder is attacking the capital so other cities must send supports to the c
2014-08-11 20:00:15 548
转载 拓扑排序
一、概述 对一个有向无环图(Directed Acyclic Graph简称DAG)G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任意一对顶点u和v,若 ∈E(G),则u在线性序列中出现在v之前。 通常,这样的线性序列称为满足拓扑次序(TopoiSicai Order)的序列,简称拓扑序列。 注意: ①若将图中顶点按拓扑次序排成一行,则图中所有的有向边均
2014-08-10 08:40:36 453
原创 poj 1789 prim 最小生成树
Truck History Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 18257 Accepted: 7065 Description Advanced Cargo Movement, Ltd. uses trucks of different types
2014-08-09 21:57:10 446
原创 poj 2349 最小生成树
Arctic Network Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10183 Accepted: 3366 Description The Department of National Defence (DND) wishes to connect
2014-08-09 20:44:51 442
原创 hdu 3308 线段树
LCIS Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4082 Accepted Submission(s): 1842 Problem Description Given n integers. Yo
2014-08-08 14:54:40 449
原创 POJ 1562
#include ///AC #include using namespace std; int m,n; char a[101][101]; int b[8][2]={ {1,0},{1,1},{0,1},{-1,1}, {-1,0},{-1,-1},{0,-1},{1,-1 } }; /// 八个fang void dfs(int x,int y){ i
2014-08-02 23:17:34 442
转载 KMP算法 bf
KMP算法 KMP算法 在介绍KMP算法之前,先介绍一下BF算法。 一.BF算法 BF算法是普通的模式匹配算法,BF算法的思想就是将目标串S的第一个字符与模式串P的第一个字符进行匹配,若相等,则继续比较S的第二个字符和P的第二个字符;
2014-08-01 09:24:09 498
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人