- 博客(30)
- 资源 (7)
- 收藏
- 关注
原创 joj 3760 JLUCPC 树状DP
#include#include#include#includeusing namespace std;const int maxn=210000;struct Node{ int t,w; int next;};int p[maxn];Node G[maxn];in
2011-07-29 14:12:28 465
原创 hdu 3893 Drawing Pictures 求一串字符中不包含某些字串的个数 AC自动机+矩阵乘法
Problem DescriptionDr. Skywind is drawing a picture, using his favorite six colors, namely red, orange, yellow, green, blue, and violet.The
2011-07-29 13:44:50 568
原创 hdu 3874 Necklace 求数组任意区间和(相同元素只算一次) 树状数组+离线算法
Problem DescriptionMery has a beautiful necklace. The necklace is made up of N magic balls. Each ball has a beautiful value. The balls with
2011-07-28 17:04:54 634
原创 hdu 3868 The Triangle ransmitter 给N个平面上的点,找三个点,使两两距离之和最小,可以不是三角形
Problem DescriptionThe Kingdom of Silence is a beautiful country. There are N cities in the kingdom. There are several highways so that peop
2011-07-28 16:11:44 1006
原创 hdu 3866 Moonfang's Birthday
Problem DescriptionIt's Moonfang's birthday,and his friends decided to buy him a copy of XianJianQiXiaZhuan V. Since some of friends have m
2011-07-28 15:33:17 611
原创 bupt 204 Palindrome 求字符串任意区间的最长回文子串 二分答案+后缀数组
Description Given a string S,you are asked to find the longest palindrome in the substring [l,r].Input The first line is
2011-07-28 14:57:47 599
原创 hdu 3887 Counting Offspring 树上求所有节点的子树上比当前节点小的个数 树状数组
Problem DescriptionYou are given a tree, it’s root is p, and the node is numbered from 1 to n. Now define f(i) as the number of nodes whose
2011-07-26 16:54:32 586
转载 hdu 3854 Glorious Array
Problem DescriptionYou are given a array with N nodes. The array nodes are numbered from 1 to N ( represented by a_i ). In the start, the co
2011-07-26 10:26:11 525
原创 hdu 3853 LOOPS
he planform of the LOOPS is a rectangle of R*C grids. There is a portal in each grid except the exit grid. It costs Homura 2 magic power to
2011-07-26 09:29:53 512
原创 zoj 3511 Cake Robbery 给一个N个点的环(就当它是个正多边形好了),每次沿着两个点切下去一刀,一共切M刀,刀与刀之间不会交叉,问切完以后边长最多的多边形的边长是多少
As usual, Alice finishes her delicious cake at noon. Unfortunately, the smell of cake beckoned hungry Bob, and he decided to rob one piece o
2011-07-25 17:06:26 959
原创 zoj 3512 Financial Fraud 给定一个整数序列a1, a2, … , an,求一个不下降序列b1 ≤ b2 ≤ … ≤ bn,使得数列{ai}和{bi}的各项之差的绝对值之和 |
In every quarter of these years, the two programmers would receive a data sheet, which provided a series of profit records a1 a2 ... aN in t
2011-07-25 14:58:33 2687 2
原创 poj 3691 DNA repair 最少修改几处,使S不含任何模板DNA(可重叠)
DescriptionBiologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the sake of
2011-07-25 11:25:10 724
原创 hdu 2243 长度为1~N的串中包含了模式串的串总共有几个
Problem Description背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。于是Lele想,如果背了N个词根,那
2011-07-25 09:12:15 893
原创 hdu 2851 Beat It 单调队列+DP
Problem DescriptionThere's a monster-attacking game on the Renren's open platform, and the game's background are showing below.Where lies a
2011-07-23 21:16:09 713
原创 hdu 3474 Necklace 单调队列 DP
Problem DescriptionYou are given a necklace consists of N beads linked as a circle. Each bead is either crystal or jade.Now, your task is:1.
2011-07-23 19:55:56 710
原创 uestc 1558 Charitable Exchange 最少时间将价值交换到M以上 DP+线段树
DescriptionHave you ever heard a star charity show called Charitable Exchange? In this show, a famous star starts with a small item which va
2011-07-23 16:53:18 703 1
原创 zoj 3228 Searching the String 母串共包含多少子串(重叠和不重叠)
Little jay really hates to deal with string. But moondy likes it very much, and she's so mischievous that she often gives jay some dull prob
2011-07-22 17:27:04 686
原创 zoj 1540 Censored! AC自动机+DP 长度为len的字符串不包含病毒串的个数
The alphabet of Freeland consists of exactly N letters. Each sentence of Freeland language (also known as Freish) consists of exactly M lett
2011-07-22 15:38:44 532
原创 poj 2778 DNA Sequence AC自动机+DP+矩阵乘法 检测所有可能的n位DNA串有多少个DNA串中不含有指定的病毒片段
It's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For e
2011-07-21 11:36:54 621
原创 joj 2607: Last time see you again 求1->n路上的必经之地(点)
大学的时光是值得怀念的,有多少事情珍藏在我们的记忆里,又有多少人我们一辈子都忘不掉。 123abc是一个不起眼的小男孩,他曾经在很多方面努力过,也经历了很多失败,在这些努力和失败中,他收获了自己的人生。 whx是123abc认识的一个女生,123abc很喜欢她,总是用各种方法想见
2011-07-18 13:57:48 892
原创 2528 Mayor's posters 线段树的覆盖问题 判断一段区间是否被覆盖
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13937 Accepted: 3875DescriptionThe citizens of Bytetown, AB, coul
2011-07-18 10:53:15 368
原创 joj 2737 狼与羊的故事 求任意两点之间的必经之路
村长要召开羊族大会,讨论羊族未来的发展,要求羊羊们到指定地点集合。小羊们收到通知后从家里出发到达指定地点。每个羊的家都是与其他羊的家连通的,可以互相访问。 比如说可以从1到3,同样也可以从3到1 。灰太郎听到这个消息后,准备有所行动(你懂的)。但他不知道应该在哪条路上等羊。但他知
2011-07-14 15:18:56 875
原创 poj 3694 Network 求加边后还剩多少桥
http://poj.org/problem?id=3694A network administrator manages a large network. The network consists of N computers and M links between pairs
2011-07-08 18:01:41 692
原创 poj 1470 Closest Common Ancestors 离线算法Tarjan求LCA
DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the
2011-07-08 17:53:45 511 1
原创 poj 1330 Nearest Common Ancestors 朴素LCA算法
Nearest Common AncestorsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9213 Accepted: 4883DescriptionA rooted tree is a well-know
2011-07-08 16:31:50 731
原创 poj 3713 Transferring Sylla 判断无向图是否每两个点之间都能至少有3点不同的路径可达 是否3-连通
After recapturing Sylla, the Company plans to establish a new secure system, a transferring net! The new system is designed as follows:The C
2011-07-08 14:48:03 1998
原创 poj 3177 Redundant Paths 加入最少的边,使得无向图为一个双连通分支 有重边
In order to get from one of the F (1 Given a description of the current set of R (F-1 There might already be more than one paths between the
2011-07-08 11:12:49 533
原创 poj 3352 Road Construction 加入最少的边,使得无向图为一个双连通分支 没有重边
It's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads
2011-07-08 11:01:46 859
原创 poj 2117 Electricity 求无向图中去掉一个点后最大的联通分支数 无向图有可能不联通 tarjan求割点模板
Blackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company owns several power plants, each of them
2011-07-07 11:42:06 1135
原创 poj 1716 Integer Intervals 差分约束
Integer IntervalsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9285 Accepted: 3898DescriptionAn integer interval [a,
2011-07-06 11:18:23 445
acm动态规划总结
2011-12-29
拓展 KMP edtend MP
2011-04-14
joj 部分题目答案 自己做的 仅供参考
2010-07-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人