10 2017 档案

摘要:转载:http://www.cnblogs.com/hxer/p/5675149.html 题意:有一个长度为n(n < 5e4)的字符串,Q(Q<=2e5)次操作;操作分为:在末尾插入一个字符ch和查询不同子串出现次数不小于K的数量; 思路1:SAM在线求解; 对于每次找到将一个字符x插入到SAM 阅读全文
posted @ 2017-10-19 23:24 抓不住Jerry的Tom 阅读(189) 评论(0) 推荐(0)
摘要:题意:给定一个字符串,多组询问,每个询问给一个区间,求出该区间内共有多少个不同的子串。 这题就是查询一个区间内的不同子串的个数。 如果单单是求一个字符串的不同子串个数,无论是后缀数组还是后缀自动机都非常容易实现。 N<=2000. 我是用后缀自动机预处理出所有区间的不同子串个数。 建立n次后缀自动机 阅读全文
posted @ 2017-10-19 23:21 抓不住Jerry的Tom 阅读(293) 评论(0) 推荐(0)
摘要:转载:http://hzwer.com/4492.html 给一个长度不超过90000的串S,每次询问它的所有不同子串中,字典序第K小的,询问不超过500个。 搞出后缀自动机 dp处理出每个点往下走能够走出多少个串。f[i]=sigma(f[ch[i][c])+1这个可以按Max排序之后倒着推就好了 阅读全文
posted @ 2017-10-19 23:19 抓不住Jerry的Tom 阅读(427) 评论(0) 推荐(0)
摘要:转载:http://hzwer.com/4420.html 给一个字符串S,令F(x)表示S的所有长度为x的子串中,出现次数的最大值。 求F(1)..F(Length(S)) Length(S) <= 250000 我们构造S的后缀自动机(SAM),那么对于一个节点s,它的长度范围是 [Min(s) 阅读全文
posted @ 2017-10-19 23:17 抓不住Jerry的Tom 阅读(244) 评论(0) 推荐(0)
摘要:求若干个串的最长公共子串。 SAM+DP 先拿个串建个SAM,然后用后面的串匹配,每次将所有的匹配长度记录在状态上取min,然后对所有状态取max即答案。 需要更新fa,因为fa[p]一定比p更优,但匹配的时候可能只更新了p而没有更新fa[p],所以还需要递推一边。 注意mn[p]初始化为l[p] 阅读全文
posted @ 2017-10-19 23:14 抓不住Jerry的Tom 阅读(181) 评论(0) 推荐(0)
摘要:转载:http://blog.csdn.net/acdreamers/article/details/10746023 题意:给两个串A和B,求这两个串的最长公共子串。 分析:其实本题用后缀数组的DC3已经能很好的解决,这里我们来说说利用后缀自动机如何实现。 对于串A和B,我们先构造出串A的后缀自动 阅读全文
posted @ 2017-10-19 23:06 抓不住Jerry的Tom 阅读(273) 评论(0) 推荐(0)
摘要:题意:一个字符串可以将第一个字符放到最后一位,然后问不断这样做可以得到的字典序最小的字符串 阅读全文
posted @ 2017-10-19 22:59 抓不住Jerry的Tom 阅读(189) 评论(0) 推荐(0)
摘要:在三维坐标中,给定一个点光源,一个凸多面体,以及一个平面作为地面。 求该凸多面体在地面上阴影的面积。 这三个点共同确定了一个平面,这个平面就是地面。保证这三个点坐标互异且不共线。前三行每行三个实数,每行表示一个点。这三个点共同确定了一个平面,这个平面就是地面。保证这三个点坐标互异且不共线。接下来一行 阅读全文
posted @ 2017-10-19 22:49 抓不住Jerry的Tom 阅读(375) 评论(0) 推荐(0)
摘要:题目描述 村子间的小路年久失修,为了保障村子之间的往来,AAA君决定带领大家修路。 村子可以看做是一个边带权的无向图GGG, GGG 由 nnn 个点与 mmm 条边组成,图中的点从 1∼n1 \sim n1∼n 进行编号。现在请你选择图中的一些边,使得 ∀1≤i≤d\forall 1 \leq i 阅读全文
posted @ 2017-10-18 22:58 抓不住Jerry的Tom 阅读(254) 评论(0) 推荐(0)
摘要:转载:http://blog.csdn.net/dan__ge/article/details/51207951 题意:n个节点,m条路径,接下来m行a,b,c,d,如果d等于1,则a到b的流量必须为c,如果d等于0,流量可以为0到c,问如果有可行流,最小流量和每条边的流量 思路:最小流的解法与其他 阅读全文
posted @ 2017-10-18 22:40 抓不住Jerry的Tom 阅读(224) 评论(0) 推荐(0)
摘要:题目大意:文文要给幻想乡的女♂孩子们拍照,一共n天,m个女♂孩子,每天文文至多拍D[i]张照片,每个女♂孩子总共要被文文至少拍G[i]次。在第i天,文文可以拍c[i]个女♂孩子,c[i]个女♂孩子中每个女♂孩子在当天被拍的次数是[li,ri],求最多可以拍多少张照片,以及每天每个可以拍的女♂孩子被拍 阅读全文
posted @ 2017-10-18 22:34 抓不住Jerry的Tom 阅读(259) 评论(0) 推荐(0)
摘要:转载 http://hzwer.com/2963.html Description 有一个M * N的棋盘,有的格子是障碍。现在你要选择一些格子来放置一些士兵,一个格子里最多可以放置一个士兵,障碍格里不能放置士兵。 我们称这些士兵占领了整个棋盘当满足第i行至少放置了Li个士兵, 第j列至少放置了Cj 阅读全文
posted @ 2017-10-18 21:40 抓不住Jerry的Tom 阅读(192) 评论(0) 推荐(0)
摘要:给你一些点,让你用最小的矩形覆盖这些点 首先有一个结论,矩形的一条边一定在凸包上!!! 枚举凸包上的边 用旋转卡壳在凸包上找矩形另外三点。。。 注意精度问题 1 #include<cstdio> 2 #include<cmath> 3 #include<ctime> 4 #include<cstri 阅读全文
posted @ 2017-10-18 21:22 抓不住Jerry的Tom 阅读(173) 评论(0) 推荐(0)
摘要:转载:http://www.hankcs.com/program/algorithm/poj-3608-bridge-across-islands.html 跨岛大桥:在两个凸包小岛之间造桥,求最小距离? 阅读全文
posted @ 2017-10-18 21:17 抓不住Jerry的Tom 阅读(174) 评论(0) 推荐(0)
摘要:题意:给你一些点,求最远点对 思路:先求凸包,然后旋转卡壳模板,不断枚举边,找凸包上的最远点,更新答案 感谢:http://hzwer.com/4224.html 阅读全文
posted @ 2017-10-17 21:47 抓不住Jerry的Tom 阅读(162) 评论(0) 推荐(0)
摘要:感谢: http://blog.csdn.net/he11oworld/article/details/7912511 阅读全文
posted @ 2017-10-16 21:32 抓不住Jerry的Tom 阅读(687) 评论(0) 推荐(0)
摘要:转载: http://blog.csdn.net/axuan_k/article/details/47297395 题目描述: 现在要针对多赛区竞赛制定一个预算,该预算是一个行代表不同种类支出、列代表不同赛区支出的矩阵。组委会曾经开会讨论过各类支出的总和,以及各赛区所需支出的总和。 另外,组委会还讨 阅读全文
posted @ 2017-10-16 21:11 抓不住Jerry的Tom 阅读(404) 评论(0) 推荐(0)
摘要:The terrorist group leaded by a well known international terrorist Ben Bladen is buliding a nuclear reactor to produce plutonium for the nuclear bomb 阅读全文
posted @ 2017-10-16 20:29 抓不住Jerry的Tom 阅读(174) 评论(0) 推荐(0)
摘要:Problem Description Math is important!! Many students failed in 2+2’s mathematical test, so let's AC this problem to mourn for our lost youth..Look th 阅读全文
posted @ 2017-10-15 22:18 抓不住Jerry的Tom 阅读(246) 评论(0) 推荐(0)
摘要:Description The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment pro 阅读全文
posted @ 2017-10-15 17:14 抓不住Jerry的Tom 阅读(210) 评论(0) 推荐(0)
摘要:ne hundred years from now, in 21172117, the International Collegiate Programming Contest (of which the NCPC is a part) has expanded significantly and 阅读全文
posted @ 2017-10-15 15:52 抓不住Jerry的Tom 阅读(651) 评论(0) 推荐(0)
摘要:Description The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the 阅读全文
posted @ 2017-10-13 11:05 抓不住Jerry的Tom 阅读(197) 评论(0) 推荐(0)
摘要:Description After counting so many stars in the sky in his childhood, Isaac, now an astronomer and a mathematician uses a big astronomical telescope a 阅读全文
posted @ 2017-10-13 10:51 抓不住Jerry的Tom 阅读(217) 评论(0) 推荐(0)
摘要:Hie with the Pie Description The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbac 阅读全文
posted @ 2017-10-11 21:30 抓不住Jerry的Tom 阅读(179) 评论(0) 推荐(0)
摘要:Problem Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally 阅读全文
posted @ 2017-10-11 17:27 抓不住Jerry的Tom 阅读(277) 评论(0) 推荐(0)
摘要:Input 第一行包含两个整数N和 M, 表示该无向图中点的数目与边的数目。 接下来M 行描述 M 条边,每行三个整数Si,Ti ,Di,表示 Si 与Ti之间存在 一条权值为 Di的无向边。 图中可能有重边或自环。 第一行包含两个整数N和 M, 表示该无向图中点的数目与边的数目。 接下来M 行描述 阅读全文
posted @ 2017-10-10 21:33 抓不住Jerry的Tom 阅读(210) 评论(0) 推荐(0)
摘要:Problem Description Matt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous exam 阅读全文
posted @ 2017-10-09 23:08 抓不住Jerry的Tom 阅读(268) 评论(0) 推荐(0)
摘要:Description 相传,在远古时期,位于西方大陆的 Magic Land 上,人们已经掌握了用魔法矿石炼制法杖的技术。那时人们就认识到,一个法杖的法力取决于使用的矿石。一般地,矿石越多则法力越强,但物极必反:有时,人们为了获取更强的法力而使用了很多矿石,却在炼制过程中发现魔法矿石全部消失了,从 阅读全文
posted @ 2017-10-09 22:18 抓不住Jerry的Tom 阅读(162) 评论(0) 推荐(0)
摘要:Description Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure 阅读全文
posted @ 2017-10-08 21:24 抓不住Jerry的Tom 阅读(282) 评论(0) 推荐(0)
摘要:题目描述 E.T. Inc. employs Maryanna as alien signal researcher. To identify possible alien signals and background noise, she develops a method to evaluate 阅读全文
posted @ 2017-10-08 20:14 抓不住Jerry的Tom 阅读(280) 评论(0) 推荐(0)
摘要:题目描述 输入一个点 P 和一条圆弧(圆周的一部分),你的任务是计算 P 到圆弧的最短距离。换句话 说,你需要在圆弧上找一个点,到 P点的距离最小。 提示:请尽量使用精确算法。相比之下,近似算法更难通过本题的数据。 输入 输入包含最多 10000组数据。每组数据包含 8个整数 x1, y1, x2, 阅读全文
posted @ 2017-10-07 17:31 抓不住Jerry的Tom 阅读(1424) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示