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
LightOj
lightoj
1283 1283 - Shelving Books(dp)
Youarealibrarian.Youkeepthebooksinawellorganizedformsuchthatitbecomessimplerforyoutofindabookandeventheylookbetterintheshelves.Onedayyougetnnewbooksfromoneofthelibrarysponsors.Andunfortunatelytheyarec
To_be_strong
·
2016-05-20 23:29
dp
LightOJ
1372 (枚举 + 树状数组)
题目Link输出序列中有多少个组合{a1,a2,a3,a4,a5,a6}可以构成一个六边形。分析序列每个数都不相等。所以可以设a1a6:a1+a2+a3>a6−a5−a4。在a4固定的情况下,a3可以取[a3,a4)之间所以我们枚举,用树状数组维护。Code#includeusingnamespacestd;constintmaxn=5000000+131;intC[maxn];intlowbit
Aoxuets
·
2016-05-17 21:10
Light
OJ
数据结构-树状数组
LightOJ
1372 (枚举 + 树状数组)
题目Link输出序列中有多少个组合{a1,a2,a3,a4,a5,a6}可以构成一个六边形。分析序列每个数都不相等。所以可以设a1a6:a1+a2+a3>a6−a5−a4。在a4固定的情况下,a3可以取[a3,a4)之间所以我们枚举,用树状数组维护。Code#includeusingnamespacestd;constintmaxn=5000000+131;intC[maxn];intlowbit
Aoxuets
·
2016-05-17 21:00
LightOJ
1348 (树链剖分 + 线段树(树状数组))
题目Link分析典型的树链剖分题,树链剖分学习资料Code#includeusingnamespacestd;constintmaxn=30000+131;structEdge{intNext;intTo;}edge[maxn>1;Build(lson);Build(rson);PushUp(rt);}voidUpdate(intpos,intval,intl,intr,intrt){if(l==
Aoxuets
·
2016-05-17 20:00
Aladdin and the Flying Carpet(算术基本定理)
AladdinandtheFlyingCarpetTimeLimit:3000MS MemoryLimit:32768KB 64bitIOFormat:%lld&%lluSubmit Status Practice
LightOJ
1341DescriptionIt'ssaidthatAladdinhadtosolvesevenmysteriesbeforegettingtheMa
u014665013
·
2016-05-13 22:00
Prime Independence(质因子分解+二分图最大独立集)
PrimeIndependenceTimeLimit:3000MS MemoryLimit:32768KB 64bitIOFormat:%lld&%lluSubmit Status Practice
LightOJ
1356DescriptionAsetofintegersiscalledprimeindependentifnoneofitsmemberisaprimemultip
u014665013
·
2016-05-13 20:00
Bi-shoe and Phi-shoe(欧拉函数变形)
Bi-shoeandPhi-shoeTimeLimit:2000MS MemoryLimit:32768KB 64bitIOFormat:%lld&%lluSubmit Status Practice
LightOJ
1370DescriptionBambooPole-vaultisamassivelypopularsportinXzhiland.AndMasterPhi-shoei
u014665013
·
2016-05-13 12:00
lightoj
1224 DNA Prefix
题意:给定n个字符串,求拥有前缀a[0…l]的字符串个数x乘上这个字符串长度,求这个最大值。思路:建立棵字典树,每个节点纪录上经过这个节点的字符串个数,然后dfs求解。structnode{ intcnt; node*nxt[4]; node(){ for(inti=0;inxt[idx]==NULL)p->nxt[idx]=newnode(); p=p->nxt[idx]; p->cnt++;
KIJamesQi
·
2016-05-12 16:00
字典树基础
lightoj
1022&&1072&&1107&&1118&&1178&&1216【基础计算几何】
1022-CircleinSquare PDF(English)StatisticsForumTimeLimit: 0.5second(s)MemoryLimit: 32MBAcircleisplacedperfectlyintoasquare.Thetermperfectlyplacedmeansthateachsideofthesquareistouchedbythecircle,butt
R1986799047
·
2016-05-10 22:00
lightoj
1385 - Kingdom Division
1385-KingdomDivision PDF(English)StatisticsForumTimeLimit: 1second(s)MemoryLimit: 32MBThekingof Geometry-Land wasindeeptrouble.Histhreesonsquarrelallthetime.Thekingtriedalotbutinvain."Howaboutdividi
R1986799047
·
2016-05-10 18:00
-
lightoj1385
Kingdo
Lightoj
1038 概率dp + 因数分解
Problem:给你一个数n(n #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; typedefpairpii; typedeflonglongll; typedefunsignedlonglo
jibancanyang
·
2016-05-10 18:00
dp
LightOJ
1385 Kingdom Division (几何推导)
题目链接:http://www.
lightoj
.com/volume_showproblem.php?
helloiamclh
·
2016-05-10 17:00
lightoj
Lightoj
1062 Crossed Ladders (二分)
题目链接:http://www.
lightoj
.com/volume_showproblem.php?
helloiamclh
·
2016-05-10 17:00
Lightoj
1030 概率dp
Problem:Analyse:dp[i]为i开始走到结尾的价值,那么dp[i]是从后面的6个转移过来的.这样我们就倒着递推就好了(后面的要先算好).注意后面不足六个的时候的处理情况./**********************jibancanyang***************************Author*:jibancanyang*CreatedTime*:一5/920:38:59
jibancanyang
·
2016-05-09 21:00
A - Rooks
简单组合数A- RooksTimeLimit:1000MS MemoryLimit:32768KB 64bitIOFormat:%lld&%lluSubmit Status Practice
LightOJ
1005DescriptionArook
glu_cky
·
2016-05-09 17:00
Lightoj
1027 概率期望
Problem:概率期望Analyse:非常经典的带有递归实现,的方程期望式子.E为期望,z为正数个数,zp为正数平均值,f为负数个数,fp为负数平均值.z∗zpn+f∗fp+En=E/**********************jibancanyang***************************Author*:jibancanyang*CreatedTime*:五5/623:58:46
jibancanyang
·
2016-05-07 00:00
Bi-shoe and Phi-shoe【
lightoj
1370】——欧拉数
BambooPole-vaultisamassivelypopularsportinXzhiland.AndMasterPhi-shoeisaverypopularcoachforhissuccess.Heneedssomebamboosforhisstudents,soheaskedhisassistantBi-Shoetogotothemarketandbuythem.PlentyofBamb
huayunhualuo
·
2016-05-05 17:00
lightoj
1030 Discovering Gold
1030-DiscoveringGold PDF(English)StatisticsForumTimeLimit: 2second(s)MemoryLimit: 32MBYouareinacave,alongcave!Thecavecanberepresentedbya 1xN grid.Eachcellofthecavecancontainanyamountofgold.Initially
LeeHolmes
·
2016-05-04 23:00
dp
lightoj
lightoj
1282 Leading and Trailing
Youaregiventwointegers: n and k,yourtaskistofindthemostsignificantthreedigits,andleastsignificantthreedigitsof nk.InputInputstartswithaninteger T(≤1000),denotingthenumberoftestcases.Eachcasestartswith
qq_33638791
·
2016-05-04 17:00
LightOJ
1241- Pinocchio【模拟】
1241-Pinocchio PDF(English)StatisticsForumTimeLimit: 0.5second(s)MemoryLimit: 32MBYoumusthaveheardthenameofPinocchio.Ifyouneverheardofhim,don'tpanic,Iamheretohelpyou.ButwhyIamintroducingyoutoPinocch
qq_29600137
·
2016-05-04 14:00
模拟
lightoj
LightOJ
1305-Area of a Parallelogram【几何】
1305-AreaofaParallelogram PDF(English)StatisticsForumTimeLimit: 1second(s)MemoryLimit: 32MBAparallelogramisaquadrilateralwithtwopairsofparallelsides.Seethepicturebelow:Fig:aparallelogramNowyouaregiv
qq_29600137
·
2016-05-03 16:00
几何
LightOJ
1433-Minimum Arc Distance【几何】
1433-MinimumArcDistance PDF(English)StatisticsForumTimeLimit: 2second(s)MemoryLimit: 32MBYouallprobablyknowhowtocalculatethedistancebetweentwopointsintwodimensionalcartesianplane.Butinthisproblemyou
qq_29600137
·
2016-05-03 16:00
几何
lightoj
LightOJ
1338-Hidden Secret!【模拟】
1338-HiddenSecret! PDF(English)StatisticsForumTimeLimit: 1second(s)MemoryLimit: 32MBInthisproblemyouaregiventwonames,youhavetofindwhetheronenameishiddenintoanother.Therestrictionsare:1. Youcanc
qq_29600137
·
2016-05-03 13:00
模拟
lightoj
1011 - Marriage Ceremonies
http://
lightoj
.com/volume_showproblem.php?
glu_cky
·
2016-05-03 09:00
LightOJ
- 1328 A Gift from the Setter (数学)
LightOJ
-1328AGiftfromtheSetterTimeLimit: 2000MS
yanghui07216
·
2016-05-02 11:00
LightOJ
- 1198 Karate Competition (贪心)
LightOJ
-1198KarateCompetitionTimeLimit: 2000MS
yanghui07216
·
2016-05-02 11:00
lightoj
1045 - Digits of Factorial 【数学】
题目链接:
lightoj
1045-DigitsofFactorial1045-DigitsofFactorialPDF(English)StatisticsForumTimeLimit:2second(
chenzhenyu123456
·
2016-05-01 17:00
lightoj
1042 - Secret Origins 【数学】
题目链接:
lightoj
1042-SecretOrigins1042-SecretOriginsPDF(English)StatisticsForumTimeLimit:0.5second(s)MemoryLimit
chenzhenyu123456
·
2016-05-01 12:00
周赛题
LightOJ
-1331AgentJTimeLimit: 1000MS
yanghui07216
·
2016-04-30 22:00
lightOj
--1261--K-SAT Problem(STL)
K-SATProblemTimeLimit: 2000MS MemoryLimit: 32768KB 64bitIOFormat: %lld&%lluSubmit StatusDescriptionSAT wasthefirstknownNP-completeproblem.TheproblemremainsNP-completeevenifallexpressionsarewrittenin
qq_29963431
·
2016-04-30 21:00
Lightoj
--1338--Hidden Secret!(模拟)
HiddenSecret!TimeLimit: 1000MS MemoryLimit: 32768KB 64bitIOFormat: %lld&%lluSubmit StatusDescriptionInthisproblemyouaregiventwonames,youhavetofindwhetheronenameishiddenintoanother.Therestrictionsare
qq_29963431
·
2016-04-30 21:00
LIGHTOJ
1048_Conquering Keokradong
这个题也是一开始的思路不对。链接:戳我刷题题意:给定n+1个数,分成k+1个组,每个组中的数需要是连续的要求各组数求和的最大值最小。两个最值的理解,求最大是说,在某一种分组情况中,k+1个组中,每个组求和后的k+1个数取最大求最小是说,在所有的k+1个组的方法分配中,各个最大数比较的最小的方案由于n和k都比较小,n最大1000,k最大300,一看就是典型的dp【i】【j】的结构,数组也可以开,想得
kevin66654
·
2016-04-30 19:00
ACM
LightOJ
- 1236 Pairs Forming LCM 合数分解
LightOJ
-1236PairsFormingLCM合数分解一、题目
LightOJ
-1236PairsFormingLCMDescriptionFindtheresultofthefollowingcode
Summer_via
·
2016-04-30 18:00
数学
LightOJ
- 1261 K-SAT Problem (模拟)
LightOJ
-1261K-SATProblemTimeLimit: 2000MS
yanghui07216
·
2016-04-30 18:00
LightOJ
- 1249 Chocolate Thief (模拟)
LightOJ
-1249ChocolateThiefTimeLimit: 1000MS
yanghui07216
·
2016-04-30 18:00
LightOJ
- 1241 Pinocchio (模拟)
LightOJ
-1241PinocchioTimeLimit: 500MS
yanghui07216
·
2016-04-30 18:00
LightOJ
- 1305 Area of a Parallelogram (数学几何)水
LightOJ
-1305AreaofaParallelogramTimeLimit: 1000MS
yanghui07216
·
2016-04-30 18:00
LightOJ
- 1433 Minimum Arc Distance (数学几何)求圆上两点间的弧长
LightOJ
-1433MinimumArcDistanceTimeLimit: 2000MS
yanghui07216
·
2016-04-30 17:00
LightOJ
- 1414 February 29 (日期模拟)有多少个2月29
LightOJ
-1414February29TimeLimit: 1000MS
yanghui07216
·
2016-04-30 17:00
LightOJ
- 1387 Setu (模拟)水
LightOJ
-1387SetuTimeLimit: 2000MS
yanghui07216
·
2016-04-30 17:00
LightOJ
- 1338(Crawling in process...) Hidden Secret! (模拟)
LightOJ
-1338(Crawlinginprocess...)HiddenSecret!
yanghui07216
·
2016-04-30 17:00
LightOJ
- 1331 Agent J (数学几何)求3圆之间的面积
LightOJ
-1331AgentJTimeLimit: 1000MS
yanghui07216
·
2016-04-30 17:00
LightOJ
1076 Get the Containers(二分经典)
1076-GettheContainersPDF(English)StatisticsForumTimeLimit: 2second(s)MemoryLimit: 32MBAconveyorbelthasanumberofvesselsofdifferentcapacitieseachfilledtobrimwithmilk.Themilkfromconveyorbeltistobefilledi
yao1373446012
·
2016-04-30 08:00
lightoj
1207Posters_For_Election&&POJ2528
线段树怎么学?刷题!(每个专题都是这种方法咯)为什么要用线段树?因为暴力会超时:n最大是1e5,从后往前枚举的话,需要枚举当前这个点是不是被之后的所有点覆盖过,如果覆盖过就不是当前颜色;否则,ans++这种方法是肯定超时的为什么要用lazy标记?因为很有可能出现第2次涂色2-8区间,第3、4、5、6、7、……一直涂色2-8区间的,那么只需要改那个标记就好,什么时候需要改子区间了,再把lazy标记下
kevin66654
·
2016-04-30 00:00
ACM
lightoj
LightOJ
1042 Secret Origins【位运算】
1042-SecretOrigins PDF(English)StatisticsForumTimeLimit: 0.5second(s)MemoryLimit: 32MBThisisthetaleofZephyr,thegreatesttimetravelertheworldwillneverknow.EventhosewhoareawareofZephyr'sexistenceknowve
liuke19950717
·
2016-04-29 21:00
LightOJ
- 1425 The Monkey and the Oiled Bamboo (水)
LightOJ
-1425TheMonkeyandtheOiledBambooTimeLimit: 3000MSMemoryLimit: 32768KB64bitIOFormat: %lld&%lluSubmit
yanghui07216
·
2016-04-29 19:00
LightOJ
- 1374 Confusion in the Problemset (模拟)
LightOJ
-1374ConfusionintheProblemsetTimeLimit: 2000MSMemoryLimit: 32768KB64bitIOFormat: %lld&%lluSubmit
yanghui07216
·
2016-04-29 19:00
LightOJ
- 1042 Secret Origins (模拟)水
LightOJ
-1042SecretOriginsTimeLimit: 500MSMemoryLimit: 32768KB64bitIOFormat: %lld&%lluSubmit StatusDescriptionThisisthetaleofZephyr
yanghui07216
·
2016-04-29 13:00
LightOJ
- 1389 Scarecrow (水模拟)
LightOJ
-1389ScarecrowTimeLimit: 2000MSMemoryLimit: 32768KB64bitIOFormat: %lld&%lluSubmit StatusDescriptionTasoownsaverylongfield.Heplanstogrowdifferenttypesofcropsintheupcominggrowingseason.Thearea
yanghui07216
·
2016-04-29 13:00
LightOJ
- 1045 Digits of Factorial (数学公式) 对数换低公式
LightOJ
-1045DigitsofFactorialTimeLimit: 2000MSMemoryLimit: 32768KB64bitIOFormat: %lld&%lluSubmit StatusDescriptionFactorialofanintegerisdefinedbythefollowingfunctionf
yanghui07216
·
2016-04-29 13:00
上一页
3
4
5
6
7
8
9
10
下一页
按字母分类:
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
其他