E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
poj
ACM
POJ
2001 (Shortest Prefixes)
题目链接http://
poj
.org/problem?
CathayPoplar
·
2020-08-24 23:35
字典树
ACM
字符串
POJ
-2484 A Funny Game (对称博弈)
AFunnyGameTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:3843Accepted:2298DescriptionAliceandBobdecidetoplayafunnygame.Atthebeginningofthegametheypickn(13,weusec1,c2,...,cntodenotethecoinsclockwis
tbl00c
·
2020-08-24 23:33
博弈
poj
2406 Power Strings(KMP求循环次数)
题目链接:http://
poj
.org/problem?
田益铭
·
2020-08-24 23:03
KMP
poj
3461_kmp模版
模版题。。其实我本来还是喜欢用string的但是尽然超时了所以只好改用字符型数组。。。。。现在重新复习kmp,感觉有些遗忘了所以补充一些。。kmp大概就是有两个字符串a和b,然后问b是否是a的子串当然通常的方法就是每位比较,然后kmp算法就是通过在b串上建立next数组来改进他的所以kmp适合的一个问题就是:给很多的a串和一个b串,问b是那些a串的子串#include#include#includ
wbysr
·
2020-08-24 23:58
水题
poj
字符串
POJ
1625 ac自动机+高精度dp
Censored!TimeLimit:5000MSMemoryLimit:10000KTotalSubmissions:7469Accepted:2023DescriptionThealphabetofFreelandconsistsofexactlyNletters.EachsentenceofFreelandlanguage(alsoknownasFreish)consistsofexactl
_rabbit
·
2020-08-24 23:56
字符串杂题
POJ
O是什么
举例1
POJ
O有一些private的参数作为对象的属性。然后针对每个参数定义了get和set方法作为访问的接口。
绝地反击T
·
2020-08-24 23:24
舆情分析
[
POJ
1625] Censored! (AC自动机+DP+大整数)
DescriptionThealphabetofFreelandconsistsofexactlyNletters.EachsentenceofFreelandlanguage(alsoknownasFreish)consistsofexactlyMletterswithoutwordbreaks.So,thereexistexactlyN^MdifferentFreishsentences.Bu
mis_deer
·
2020-08-24 23:24
AC自动机
DP
大整数
Seek the Name, Seek the Fame(
POJ
-2752)
ProblemDescriptionThelittlecatissofamous,thatmanycouplestrampoverhillanddaletoByteland,andaskedthelittlecattogivenamestotheirnewly-bornbabies.Theyseekthename,andatthesametimeseekthefame.Inordertoescap
Alex_McAvoy
·
2020-08-24 23:51
#
POJ
poj
1625 Censored! 高精度+ac机+dp
Language:DefaultCensored!TimeLimit:5000MSMemoryLimit:10000KTotalSubmissions:7712Accepted:2095DescriptionThealphabetofFreelandconsistsofexactlyNletters.EachsentenceofFreelandlanguage(alsoknownasFreish)
Excelsior_kereo
·
2020-08-24 23:19
高精度
ac自动机
POJ
2752 Seek the Name, Seek the Fame / KMP
做了HDU3336这题小casek=next[n]是最长的前缀这题还要求不是最长的前缀那么就k=next[k]#include#includeconstintmaxn=400010;constintmod=10007;chara[maxn];intf[maxn];intdp[maxn];intn,flag;voidprint(intk){if(!k)return;print(f[k]);if(fl
芋智波佐助
·
2020-08-24 23:19
KMP
POJ
1459 Power Network Dinic最大流当前弧优化
参考:https://blog.csdn.net/Floatiy/article/details/80961870PowerNetworkTimeLimit:2000MSMemoryLimit:32768KTotalSubmissions:30761Accepted:15835DescriptionApowernetworkconsistsofnodes(powerstations,consume
三级头不怕通
·
2020-08-24 23:46
poj
dinic
poj
——1496——Equations
ProblemDescriptionConsiderequationshavingthefollowingform:a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a,b,c,dareintegersfromtheinterval[-50,50]andanyofthemcannotbe0.Itisconsiderasolutionasystem(x1,x2,x3,x4)thatverif
清溪浅水
·
2020-08-24 23:45
哈希表
哈希表入门题目总结(HDU 1280、1425、2027、3833、1496、2648
POJ
1200)
今天做了一天的哈希表题目,虽然不是哈希算法,但是感觉先把这哈希表搞定了,再学哈希算法的时候会快一些,所以今天搞得现在都有点头痛了,看了一天的电脑……快要睡觉了,整理一下今天的成果。整理一下题目与思想,明天学哈希算法的时候应该会有些帮助。先推荐一个哈希入门网站,还没做题之前,我把这网站关于哈希的都看了个遍,有些明白了才开始做题的:http://wenku.baidu.com/view/98383d3
潇洒走一回LW
·
2020-08-24 23:45
S
POJ
IM -- Intergalactic Map
代码实现:#include#include#include#include#include#defineMin(a,b)((a)(b)?(a):(b))#defineINF0x3f3f3f3f#defineIN640x3f3f3f3f3f3f3f3fllusingnamespacestd;constintN=60032,M=460032;intn,m,s,t,top;inthead[N],gap[
Ac-try
·
2020-08-24 23:13
网络流
POJ
1961_Peroid_KMP_求最多的子串重复次数
/*吐槽君又来吐槽了,额==这就是我两天来学习KMP的成果,水了一道水题,还是照着模版,看着题解写的=i=唯一的成就就是我植物大战僵尸的水平又更上一层楼,对自己无语了,暑假集训俨然要过半了,自己期待的蜕变却越来越远,希望明天能有新变化,今晚早睡*/言归正传:题意:给一个字符串长为n,i从1到n,对与每一个i,找出从str[0]到str[i-1]内的一个最短子串s,使得当前串是由子串s循环k次组成的
成诚tbf
·
2020-08-24 23:12
KMP
poj
1625 Censored!(AC自动机+DP+高精度)
题目链接:
poj
1625Censored!题目大意:给定N,M,K,然后给定一个N字符的字符集和,现在要用这些字符组成一个长度为M的字符串,要求不包括K个子字符串。解题思路:AC自动机+DP+高精度。
JeraKrs
·
2020-08-24 23:12
POJ
GRADE:D
数据结构-AC自动机
动态规划-基础
数据结构-高精度
POJ
3461_Oulipo_KMP_求重复子串的个数_可重叠
题意:给母串str,和子串w,求在str中最多有几个w,w可以相互重叠比如str:ABABABAw:ABAans=3题解:裸的KMP算法,只是这时候不是返回子串的位置,而是重复KMP遍历完整个串求个数原题:OulipoTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:16626Accepted:6656DescriptionTheFrenchau
成诚tbf
·
2020-08-24 23:12
KMP
poj
1816 Wild Words(字典树+DFS)
题目链接:
poj
1816WildWords题目大意:给定N个模板,即正则表达式,然后每次有一个询问串,输出能被哪些模板匹配。
JeraKrs
·
2020-08-24 23:42
POJ
数据结构-字典树
GRADE:D
POJ
2039:To and Fro
ToandFroTimeLimit:1000MSMemoryLimit:30000KTotalSubmissions:8632Accepted:5797DescriptionMoandLarryhavedevisedawayofencryptingmessages.Theyfirstdecidesecretlyonthenumberofcolumnsandwritethemessage(lette
2997ms
·
2020-08-24 23:36
水题
POJ
AC自动机+DP+大数
poj
1625
Language:DefaultCensored!TimeLimit:5000MSMemoryLimit:10000KTotalSubmissions:8102Accepted:2191DescriptionThealphabetofFreelandconsistsofexactlyNletters.EachsentenceofFreelandlanguage(alsoknownasFreish)
u010660276
·
2020-08-24 23:03
数学
AC自动机
动态规划
后缀数组(不可重叠重复子串)
poj
1743
思路:二分答案,然后遍历height数组,看能不能找到符合条件的我写的一直wa,求大神指导#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;constintmaxn=20010;constintINF=10000000;intn,x[ma
u010660276
·
2020-08-24 23:03
后缀数组
字符串
二维线段树(二维树状数组)
poj
2155
以前写过一个二维线段树,现在忘得差不多了,又想了一遍,就是把一维的每一个节点再抽象成一维的线段树。这个题查询的时候,每一个x维都要进行y维查询,只要经过的是1的都要加上,因为这样经过的肯定都包含要查询的点#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;
u010660276
·
2020-08-24 23:03
树状数组/线段树
究竟什么是
POJ
O?
POJ
O(PlainOldJavaObject)这种叫法是MartinFowler、RebeccaParsons和JoshMacKenzie在2000年的一次演讲的时候提出来的。
tony关东升
·
2020-08-24 23:51
java中的
POJ
O是什么意思?
简单的Java对象(PlainOrdinaryJavaObjects)实际就是普通JavaBeans,使用
POJ
O名称是为了避免和EJB混淆起来,而且简称比较直接.其中有一些属性及其gettersetter
Java高知社区
·
2020-08-24 23:19
POJ
2752 Seek the Name, Seek the Fame【字符串匹配+KMP】
SeektheName,SeektheFameTimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:21528Accepted:11246DescriptionThelittlecatissofamous,thatmanycouplestrampoverhillanddaletoByteland,andaskedthelittlecattogiven
海岛Blog
·
2020-08-24 23:47
#
ICPC-备用二
#
ICPC-字符串
#
ICPC-POJ
二维树状数组模板(区间更新,单点查询)(以
POJ
2155为例)
题目:点击打开链接题意:n*n坐标图起初都为0,C:翻转左下和右上两个坐标围成的矩阵中所有点,Q:查询此点的01状态。分析:利用差分的思想,推广到二维,一维单点查询就是前缀和,即query(x)。区间修改先让s-n都加num,再让t+1-n减去num,即update(s,num),update(t+1,-num)。二维的单点查询变成二维就好了query(x,y)。区间修改update(x1,y1,
Self-Discipline
·
2020-08-24 23:45
树状数组
差分
模板
POJ
O对象(一)简介
学习过程中一直不明白
poj
o对象是什么?后来终于决定好好了解一下。(*@ο@*)哇~原来soeasy!
sxdxcj
·
2020-08-24 23:36
poj
2155-二维线段树(树套树)
//先确定x线段树再确定y线段树#include#includeintn,ans,x1,x2,y1,y2;structnode{intl,r;structnode1{intl,r,s;}treey[4010];}treex[4010];voidhome2(intl,intr,intd,intp){treex[p].treey[d].l=l;treex[p].treey[d].r=r;treex[p
struct_liao
·
2020-08-24 23:30
POJ
O式开发
POJ
O
POJ
O就是简单java对象,不实现任何特殊接口。
GaoY
·
2020-08-24 23:24
java
POJ
2752 Seek the Name Seek the Fame
//4_7_19:SeektheNameSeektheFameCat给婴儿取名字
POJ
2752#include#include#includeusingnamespacestd;constintmaxc
smaracoon
·
2020-08-24 23:19
数据结构编程实验04
poj
3468 线段树
#include#defineMAX_N101000#definelsonl,m,rt>1;d[rt>1;build(lson);build(rson);pushup(rt);}voidupdate(inta,intb,intv,intl,intr,intrt){if(a>r||b>1;pushdown(l,r,rt);update(a,b,v,lson);update(a,b,v,rson);p
sky_zdk
·
2020-08-24 23:18
ACM
poj
线段树&&树状数组
poj
3276 Face The Right Way 反转
http://
poj
.org/problem?
rvlt1
·
2020-08-24 23:18
poj
2752 Seek the Name, Seek the Fame(理解KMP的失配函数!)
链接:http://
poj
.org/problem?id=2752题目大意:给一个字符串S,求出所有前缀pre,使得这个前缀也正好是S的后缀。输出所有前缀的结束位置。
shuangde800
·
2020-08-24 23:38
解题报告
数据结构__字符串
POJ
2155
题目是说对一个01矩形区间有两种操作:一是置反某一块区间[a][b]--->[c][d](0变1,1变0),二是询问[i][j]位置处的当前值是0还是1。转化为树状数组的方法便是:01矩阵初始化为0,对于置反操作,等价于将小矩形块的四角置反(以此表示这四角代表的矩形块被执行置反),于是我们对于置反操作,只操作四角的即可(可以累加操作次数,也可以单纯的模拟置反操作,此时可利用bool数组),然后对于
shifuwawa
·
2020-08-24 23:35
解题报告【ACM】
Seek the Name, Seek the Fame
POJ
- 2752 (KMP 失配指针数组)
题意:给定一个串T,找出串T的子串,该串即既是T的前缀也是T的后缀.从小到大输出所有符合要求的子串的长度.分析:把答案就是f[m]f[f[m]]...依次下去.理解f数组的前缀后缀思想这道题就迎刃而解了.#includeusingnamespacestd;constintmaxn=1e7;chart[maxn],p[maxn];intf[maxn];intn,m;voidgetfail(){f[0
Soar-
·
2020-08-24 23:33
字符串-------KMP
poj
1625 Censored! AC自动机+dp+高精度
代码://
poj
1625#include#includeusingnamespacestd;intmap[300];intn,m,p,len;chars[64];intalph
sepNINE
·
2020-08-24 23:02
AC自动机
poj
2406 Power Strings
DescriptionGiventwostringsaandbwedefinea*btobetheirconcatenation.Forexample,ifa=“abc”andb=“def”thena*b=“abcdef”.Ifwethinkofconcatenationasmultiplication,exponentiationbyanon-negativeintegerisdefinedin
sdfzyhx
·
2020-08-24 23:01
字符串
poj
poj
2155 二维树状数组
//现在知道的树状数组有两种写法,一个适用擦边查点,一种适用擦点查边//擦点查边的写法比较普通,arr[i]存的就是i管辖范围内的sum//擦边查点反过来写,此时,插入t到[a,b]相当于插入-t到[0,a-1]插入t到[0,b]//插入时,arr[i]表示管辖范围内的影响值,当不是全部,实际上查询要不断+lowbit加到暴//二维的也只是插入一个大矩形,恢复三个小矩形的过程#include#in
rptotal
·
2020-08-24 23:25
ACM
poj
-2195-Going Home最小费用最大流
重新切一遍最小费用最大流~~~这到题目的数据范围有问题,尽量开大就好了~~#include#include#include#include#includeusingnamespacestd;#defineINF999999structlist{intu;intv;intnext;}node[1000001];intnum;inthead[1001];intcost[1001][1001];void
青竹梦
·
2020-08-24 23:54
模板总汇
poj
2406 Power Strings 哈希
PowerStringsTimeLimit:3000MSMemoryLimit:65536KTotalSubmissions:61612Accepted:25463DescriptionGiventwostringsaandbwedefinea*btobetheirconcatenation.Forexample,ifa="abc"andb="def"thena*b="abcdef".Ifweth
任小喵r
·
2020-08-24 23:21
ACM
AC自动机+dp+大数
poj
1625
传送门:点击打开链接题意:告诉你有哪些字符可以用,然后再告诉你哪些单词不能出现,要你求长度为m的字符串只由给你的字符组成,但是不能出现那些单词的种类数。思路:..一分析就发现,,貌似爆longlong了,,醉了。。总的思路和那个DNA的思路是一样的,用AC自动机完成了矩阵的转移,很逆天的压缩了状态。。除了大数其他和那题基本一样的可以去看看那题..#include#include#include#i
逍遥丶綦
·
2020-08-24 23:48
ACM_模拟
ACM_DP
ACM_自动机
POJ
- 1741 Tree(点分治模板题)
题目链接:点击查看题目大意:给出一棵n个节点的树,现在定义dis(x,y)为点x和点y之间的路径长度,现在问dis(x,y)#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;typedefl
Frozen_Guardian
·
2020-08-24 23:15
分治
数据结构
Catch That Cow
POJ
- 3278(一维bfs)
FarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100,000)onanumberlineandthecowisatapointK(0≤K≤100,000)onthesamenumberline.FarmerJohnhastwomodeso
发型睡姿决定
·
2020-08-24 23:11
搜索
Dungeon Master
POJ
- 2251(bfs搜索)
Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannotmovediagona
发型睡姿决定
·
2020-08-24 23:11
搜索
TOYS
POJ
- 2318(计算几何向量叉乘)
POJ
—2318Calculatethenumberoftoysthatlandineachbinofapartitionedtoybox.Momanddadhaveaproblem-theirchildJohnneverputshistoysawaywhenheisfinishedplayingwiththem.TheygaveJohnarectangularboxtoputhistoysin
发型睡姿决定
·
2020-08-24 23:11
计算几何
Wormholes
POJ
- 3259(最短路,求是否存在负环)
POJ
—3259Whileexploringhismanyfarms,FarmerJohnhasdiscoveredanumberofamazingwormholes.Awormholeisverypeculiarbecauseitisaone-waypaththatdeliversyoutoitsdestinationatatimethatisBEFOREyouenteredthewormhol
发型睡姿决定
·
2020-08-24 23:11
最短路
poj
1006、2891(中国剩余定理 及扩展 模板)
中国剩余定理来源及推导:https://www.cnblogs.com/MashiroSky/p/5918158.html中国剩余定理(CRT)表述及模板:https://blog.csdn.net/acdreamers/article/details/8050018中国剩余定理——求解一次同余式组x≡ai(modmi)x\equiva_i(mod\m_i)x≡ai(modmi)的方法:注:要求所
小鱼yn
·
2020-08-24 23:09
其他数学内容
欧拉函数
欧几里得算法
树的重心&&树的直径
实际上树的重心在树的点分治中有重要的作用,可以避免N^2的极端复杂度(从退化链的一端出发),保证NlogN的复杂度,利用树型dp可以很好地求树的重心.求树的重心模板:https://vjudge.net/problem/
POJ
小鱼yn
·
2020-08-24 23:39
A - Seek the Name, Seek the Fame
POJ
- 2752---KMP前缀与后缀
第二天叫醒我的不是闹钟,是梦想!Thelittlecatissofamous,thatmanycouplestrampoverhillanddaletoByteland,andaskedthelittlecattogivenamestotheirnewly-bornbabies.Theyseekthename,andatthesametimeseekthefame.Inordertoescapef
AKone123456
·
2020-08-24 23:38
KMP
POJ
2752 Seek the Name, Seek the Fame (next数组)
题目链接题意:给定若干只含小写字母的字符串(这些字符串总长≤400000),在每个字符串中求出所有既是前缀又是后缀的子串长度。例如:ababcababababcabab,既是前缀又是后缀的子串:ab,abab,ababcabab,ababcababababcabab。分析:根据next数组的定义求解。注意串本身是一个,可以单独输出。#include#include#include#include#
爱吃猫的鱼
·
2020-08-24 23:37
#
KMP
上一页
113
114
115
116
117
118
119
120
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他