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
poj
3128——置换群(循环)
题目链接:
poj
.org/problem?id=3128—IjustboughtLeonardo'ssecretnotebook!
木每立兄豪
·
2020-08-25 04:41
组合数学——群论
Balanced Lineup
POJ
3264(线段树模板题)
BalancedLineup
POJ
-3264Forthedailymilking,FarmerJohn'sNcows(1≤N≤50,000)alwayslineupinthesameorder.OnedayFarmerJohndecidestoorganizeagameofUltimateFrisbeewithsomeofthecows.Tokeepthingssimple
vvictoryuki
·
2020-08-25 04:36
ACM_线段树
poj
-2251-Dungeon Master(三维bfs最短路)
英文原题链接Description-题目描述你被困在一个三维的空间中,现在要寻找最短路径逃生!空间由立方体单位构成你每次向上下前后左右移动一个单位需要一分钟你不能对角线移动并且四周封闭是否存在逃出生天的可能性?如果存在,则需要多少时间?Input-输入输入第一行是一个数表示空间的数量。每个空间的描述的第一行为L,R和C(皆不超过30)。L表示空间的高度。R和C分别表示每层空间的行与列的大小。随后L
李瑞豪
·
2020-08-25 04:10
POJ
ACM刷(水)题记录
搜索
数据结构
LCA 倍增模板
(x^y))returny;returnfa[x][0];}入门题:
POJ
1330复杂度为nlogn题目代码:#include#include#include#inc
子灬丶逾
·
2020-08-25 04:47
POJ
- 3264 Balanced Lineup解题报告(RMQ问题 ST算法 魔板题)
题目大意:给你一串数,50,000个,询问200,000个区间,每次询问输出该区间最大值与最小值的差分析:这个因为不用修改,只需要查询,其实用树状数组也是可以的我觉得,但是因为还是有一个log50000,说不定真的会超时,所以还是选择用他给的这个O(1)复杂度的算法吧。关于st算法:就是首先预处理:dp[i][j]表示从第i个数开始向后数2j−1个数之后这之间所有的数的最大值(最小值),既,dp[
我的程序跑快快
·
2020-08-25 04:36
数据结构
POJ
3187-Backward Digit Sums-穷竭搜索
原题链接BackwardDigitSumsTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:6887Accepted:3998DescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1#include#includeusingnamespaces
HowieMen
·
2020-08-25 03:07
▶︎算法与数据结构
solution of
POJ
:3187.Backward Digit Sums
3187.BackwardDigitSumsDescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1#include#includeusingnamespacestd;//这个位置的数被累加的次数intcount(intn,intk){intresult=1;for(inti=0;i>n>>re
风 先生
·
2020-08-25 03:34
c/c++
挑战程序设计竞赛
算法
利用第三方poi工具导出,以注解方式
———-
poj
o实体类publicclassUserChangeVoextendsBaseVOimplementsCloneable{/**@FieldsserialVersionUID:*/privatestaticfinallongserialVersionUID
pm-mybook
·
2020-08-25 03:23
excel
Backward Digit Sums
POJ
3187
BackwardDigitSumsTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:6223Accepted:3602DescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1#include#include#includeusingnamesp
neuike
·
2020-08-25 03:35
模拟
暴力
[
POJ
](3187)Backward Digit Sums ---- 穷竭搜索
DescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1#include#include#includeusingnamespacestd;intmain(){inta[15];intb[15];ios_base::sync_with_stdio(false);cin.tie(NULL),cou
WangMeow
·
2020-08-25 03:08
POJ
1845-Sumdiv
全解题报告索引目录->【北大ACM–
POJ
试题分类】转载请注明出处:http://exp-blog.com------------------------------------------------
小優YoU
·
2020-08-25 03:36
POJ解题报告
poj
1026 置换群的基础题 m次变换后的结果
题目大意。首先输入长度为n的数字串,长度少于n,不足用空格补全,设为key[i],表示第i个字符置换一次后跑到key[i]的位置。然后输入若干字符序列,设字符序列为Src(若长度不足n则后面用空格补齐),求Src中的每个字符进行m次置换后的字符序列Dst。不懂的可以先看看群论的知识:近世代数上有写。。。对于置换群对于给定的置换规则在第k次置换后有一个循环节ni,求出每个位置的循环节后对于m次变换后
luyuncheng
·
2020-08-25 03:31
数论
Poj
3264: Balanced Lineup—题解+st表解释
题来自于
poj
3264这道题其实本身不难(前提是你得掌握线段树或者st表当中的一种)那么这道题我们来讲一讲st表一般关系式dp[i][j]=min/max(dp[dp[i][j-1],dp[i+pow(
luyouqi233
·
2020-08-25 03:31
poj
dp
题目汇总
st表
数据结构
poj
3264 Balanced Lineup(线段树)
BalancedLineupTimeLimit:5000MSMemoryLimit:65536KTotalSubmissions:64371Accepted:30005CaseTimeLimit:2000MSDescriptionForthedailymilking,FarmerJohn'sNcows(1≤N≤50,000)alwayslineupinthesameorder.OnedayFarm
最爱晴天和自己
·
2020-08-25 03:03
线段树
POJ
3252 Round Numbers (数位dp)
RoundNumbersTimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:12326Accepted:4698DescriptionThecows,asyouknow,havenofingersorthumbsandthusareunabletoplayScissors,Paper,Stone'(alsoknownas'Rock,Paper,Sc
LzyRapX
·
2020-08-25 03:00
POJ
ACM_数位DP
POJ
2712:细菌繁殖
#includeintmain(){inta,b,c,d,e,f,g,i,h=0;intz[]={0,31,28,31,30,31,30,31,31,30,31,30,31};scanf("%d",&a);b=1;while(b<=a){scanf("%d",&c);scanf("%d",&d);scanf("%d",&e);scanf("%d",&f);scanf("%d",&g);for(i=
向南tray
·
2020-08-25 03:21
POJ
POJ
- 3187 Backward Digit Sums(水+全排暴搜)
点击打开题目链接BackwardDigitSumsTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:7311Accepted:4221DescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1usingnamespacestd;inta[15],
Chook_lxk
·
2020-08-25 03:21
2017省赛集训
题库_POJ
水题
搜索
ACM
POJ
1003 Hangover - 搜索算法 - 二分查找法
POJ
1003Hangover题意:寻找序列中不小于给定某数的最小数的序号。难度:1星。理清题意,我的直接反应就是用搜索算法。于是就准备写二分查找法的代码。
ChenKode
·
2020-08-25 03:11
C/C++
POJ
poj
1014——Dividing
多重背包问题。转化为01背包问题。不过需优化,否则会TLE。优化部分程序中标出。#include#include#includeusingnamespacestd;intf[60005];inta[7];intcnt;intb[60005],c[60005];intmain(){inti,sum,ca=0;intv;while(1){sum=0;for(i=1;i>a[i];sum+=a[i];}
lazy_virus
·
2020-08-25 03:10
poj
2185
与next[],相关的常用用法.1:求字符串的重复数.当while(i%i-next[i]==0),重复数为(i/i-next[len];)练习题(
poj
24061961)2:len-next[len]
iwillsucceed555
·
2020-08-25 03:49
acm---字符串
算法
优化
c
poj
2406
这个题就是用KMP算法的next数组求最小重复子串长度;这与我刚刚做的2185是一个思路;我也是应为理解那个题的解法才做这题;但是我到现在还是没有对算法正确性有很好的认识;姑且但结论记吧:对于代码中i-next[i]代表了字符串最小前缀且满足能不但的复制得到原字符串;len%(i-next[i])==0时代表字符串刚刚是子串的整数倍;若len%(i-next[i])==0匹配时每一次移动的距离i-
iwillsucceed555
·
2020-08-25 03:49
acm---字符串
算法
POJ
-3264-Balanced Lineup
POJ
-3264-BalancedLineuphttp://
poj
.org/problem?
iteye_8149
·
2020-08-25 03:18
POJ
2976--Dropping tests
题目大意:一共有N场考试,每场对a题,每场一共有b题,我们可以去掉k场的成绩,使得最后的正确率最大分析:肯定是想着贪心去掉每场正确率最小的k场,但是b有可能是0,所以排除了这种策略。换一种思路,既然无法用除法,我们就用乘法,当全局的正确率为x时,每场的a-x*b,表示就是每场额外对的题目,可正可负,很明显去掉那些拖后腿的场次,正确率就能增大。所以,可以在我们假设的正确率为x的情况下,对每场按a-x
ZeroMagic
·
2020-08-25 03:51
贪心
二分法
三分法(Ternary Search)求解凸(凹)函数的极值问题
本文来自:http://blog.csdn.net/rabia/article/details/7826144二分法作为分治中最常见的方法,在各种比赛中经常出现(如:
POJ
1434),但只适用于单调函数
fanlinqiang
·
2020-08-25 03:49
资料
Balanced Lineup
POJ
-3264DescriptionForthedailymilking,FarmerJohn’sNcows(1≤N≤50,000)alwayslineupinthesameorder.OnedayFarmerJohndecidestoorganizeagameofUltimateFrisbeewithsomeofthecows.Tokeepthingssimple
[xixi]
·
2020-08-25 03:11
c
POJ
2976 - Dropping tests - 二分+01分数规划+思维
1.题目描述:DroppingtestsTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:11338Accepted:3947DescriptionInacertaincourse,youtakentests.Ifyougetaioutofbiquestionscorrectontesti,yourcumulativeaverageisdefin
寒江雪里独钓着的蓑笠翁
·
2020-08-25 03:02
二分
思维
acm
算法
poj
POJ
2976 Dropping tests
01分数规划,看了这个博客好像懂了一点~链接在此题目大意:给出n个a和b,让选出n-k个使得(sigmaa【i】)/(sigmab【i】)最大解题思路:按照01分数规划的正常思路构造D数组,二分求值。下面是代码:#include#include#include#include#include#include#include#include#include#include#include#defin
dhn37379
·
2020-08-25 03:50
二模 (13)day1
N<=1000000解题过程:1.前几天做
poj
的时候刚好在discuss里看到有一个神奇的东东叫单调栈,正好派上用场。。。虽然本题2s的时限RMQ+二分应该也不会超时,但是容易写错。
dehs8915
·
2020-08-25 03:13
POJ
3264 Balanced Lineup 区间查询(两棵树求最大最小值)
Forthedailymilking,FarmerJohn'sNcows(1≤N≤50,000)alwayslineupinthesameorder.OnedayFarmerJohndecidestoorganizeagameofUltimateFrisbeewithsomeofthecows.Tokeepthingssimple,hewilltakeacontiguousrangeofcowsf
深海沧澜夜未央
·
2020-08-25 03:13
ACM_线段树
POJ
NOIP
=p2)fa[p1]=p2;}类别偏移:小胖的奇偶(
poj
1733)、食物链(
poj
1182)、黑帮团伙(
poj
1703)**带权并查集:**
poj
1962、银河英雄传**其他:**
complicated_world
·
2020-08-25 02:59
算法知识
poj
1568 (α-β剪枝优化搜索)
FindtheWinningMoveTimeLimit:3000MSMemoryLimit:32768KB64bitIOFormat:%lld&%lluDescription4x4tic-tac-toeisplayedonaboardwithfourrows(numbered0to3fromtoptobottom)andfourcolumns(numbered0to3fromlefttoright
Kblacksmith
·
2020-08-25 02:10
acm
极大极小搜索
alphabeta
双连通分量 模板
边双连通例题:
poj
3352。边双连通分量巧妙利用isB数组,空间换时间,也大大降低了模板的复杂度,解决了标记边难的问题。
__Lingyue__
·
2020-08-25 02:35
算法竞赛
算法竞赛模板
图论
POJ
3187 Backward Digit Sums
BackwardDigitSumsTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:7854Accepted:4518DescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1#include#includeusingnamespacestd;i
计科的男人绝不认输
·
2020-08-25 02:32
POJ
【题解】
POJ
3187 Backward Digit Sums(搜索)
POJ
3187BackwardDigitSums原题https://vjudge.net/problem/
POJ
-3187FJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN
阿尔法要撞地球
·
2020-08-25 02:32
挑战程序设计日常
poj
3264——Balanced Lineup(线段树+区间最大值与最小值)
DescriptionForthedailymilking,FarmerJohn’sNcows(1≤N≤50,000)alwayslineupinthesameorder.OnedayFarmerJohndecidestoorganizeagameofUltimateFrisbeewithsomeofthecows.Tokeepthingssimple,hewilltakeacontiguousr
BYSora
·
2020-08-25 02:59
线段树
POJ题目小练
POJ
Remmarguts' Date
题目链接->题解:次短路模板。代码:#include#includeusingnamespacestd;#defineinf1e9#defineN100005#defineS1dis[x]+e[i].v#defineS2sdis[x]+e[i].vusingnamespacestd;structnode{intto,next,v;}e[NS1){sdis[t]=dis[t];dis[t]=S1;i
bai123456888888
·
2020-08-25 02:45
数据结构与算法
The Balance
POJ
2142 扩展欧几里得
DescriptionMs.IyoKiffa-Australishasabalanceandonlytwokindsofweightstomeasureadoseofmedicine.Forexample,tomeasure200mgofaspirinusing300mgweightsand700mgweights,shecanputone700mgweightonthesideofthemedi
aocan6909
·
2020-08-25 02:36
Crashing Robots
POJ
2632 简单模拟
DescriptionInamodernizedwarehouse,robotsareusedtofetchthegoods.Carefulplanningisneededtoensurethattherobotsreachtheirdestinationswithoutcrashingintoeachother.Ofcourse,allwarehousesarerectangular,andal
aocan6909
·
2020-08-25 02:35
Luogu P2057 [SHOI2007]善意的投票|最小割
LuoguP2057[SHOI2007]善意的投票|最小割重题:[S
POJ
1693]Coconuts[JLOI2010]冠军调查题意:有\(n\)个小朋友投票,只有$01$两种选择。
aigongshi8561
·
2020-08-25 02:56
【
POJ
1733】 Parity Game
【题目链接】http://
poj
.org/problem?
a576969381
·
2020-08-25 02:18
POJ
1054--The Troublesome Frog
DescriptionInKorea,thenaughtinessofthecheonggaeguri,asmallfrog,islegendary.Thisisawell-deservedreputation,becausethefrogsjumpthroughyourricepaddyatnight,flatteningriceplants.Inthemorning,afternotingwh
SCUT_Pein
·
2020-08-25 02:18
枚举
函数
【
POJ
2481】 Cows
【题目链接】http://
poj
.org/problem?
a576969381
·
2020-08-25 02:18
【
POJ
3074】 Sudoku
【题目链接】http://
poj
.org/problem?
a576969381
·
2020-08-25 02:47
[
POJ
1417] True Liars
[题目链接]http://
poj
.org/problem?
a576969381
·
2020-08-25 02:46
poj
1505
DescriptionBeforetheinventionofbook-printing,itwasveryhardtomakeacopyofabook.Allthecontentshadtobere-writtenbyhandbysocalledscribers.Thescriberhadbeengivenabookandafterseveralmonthshefinisheditscopy.O
revstar_
·
2020-08-25 02:45
poj
(模板题)
poj
3264 Balanced Lineup(RMQ的ST算法)
BalancedLineupTimeLimit:5000MSMemoryLimit:65536KTotalSubmissions:49596Accepted:23232CaseTimeLimit:2000MSDescriptionForthedailymilking,FarmerJohn'sNcows(1≤N≤50,000)alwayslineupinthesameorder.OnedayFarm
Detective-Conan
·
2020-08-25 02:14
POJ
RMQ
---Normal
POJ
3691 DNA repair (AC自动机+dp)
题目类型AC自动机+dp题目意思给出最多50个最长20的不好的字符串问给出一个最长1000的字符串至少要修改多少个字符才可以使这个字符串不包含不好的字符串字符串只含有(A,G,C,T)这四种字符解题方法用输入的不好的字符串构造ac自动机(结点数不会超过1000)然后进行普通的匹配过程,简单地理解为在AC自动机上进行移动需要注意的地方1.不能移动到那些如果走到这里意味着已经和某不好的串匹配成功了的状
yunyouxi0
·
2020-08-25 02:09
数据结构
AC自动机
dp
POJ
3461 Oulipo (简单kmp)
题目类型kmp题目意思问一个最长10000的串在一个最长1000000的串中出现了多少次(可重叠)解题方法kmp的基本用法理解清楚失配函数的定义即可参考代码-有疑问的地方在下方留言看到会尽快回复的#include#include#includeusingnamespacestd;constintmaxn=1e4+10;intnext[maxn];charw[maxn],t[maxn*100];vo
yunyouxi0
·
2020-08-25 02:09
数据结构
POJ
2774 Long Long Message (后缀数组)
题目类型后缀数组题目意思问两个最长1e5的字符串的最长公共子串解题方法在第一个字符串后添加一个区别于输入的所有字符的字符(例如'#')后再把第二个字符串添加在后面构成一个新的字符求这个新字符串的height数组二分最长公共子串的长度然后判断是否可行假设当前判断的长度为mid判断方法是从小到大扫一次height数组对于某几个连续的且大于mid的数意味着这几个连续的数对应的公共前缀两两之间的最长公共前
yunyouxi0
·
2020-08-25 02:09
数据结构
后缀数组
poj
2976(01分数规划搜索+二分答案)
题目大意就给定n个二元组(a,b),扔掉k个二元组,使得剩下的a元素之和与b元素之和的比率最大题目求的是max(∑a[i]*x[i]/(b[i]*x[i]))其中a,b都是一一对应的。x[i]取0,1并且∑x[i]=n-k;转:那么可以转化一下。令r=∑a[i]*x[i]/(b[i]*x[i])则必然∑a[i]*x[i]-∑b[i]*x[i]*r=0;(条件1)并且任意的∑a[i]*x[i]-∑b
Weiguang_123
·
2020-08-25 02:58
poj
搜索
数论
上一页
110
111
112
113
114
115
116
117
下一页
按字母分类:
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
其他