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
1038 - Race to 1 Again 【DP】
题目链接:http://www.
lightoj
.com/volume_showproblem.php?problem=1038题意:题目很短,不叙述了。
u014427196
·
2015-06-09 20:00
LightOJ
1020(博弈)
AliceandBobareplayingagamewithmarbles;youmayhaveplayedthisgameinchildhood.Thegameisplayingbyalternatingturns.Ineachturnaplayercantakeexactlyoneortwomarbles.BothAliceandBobknowthenumberofmarblesinitial
tokers
·
2015-06-09 19:30
博弈
LightOJ
LightOJ
1020(博弈)
AliceandBobareplayingagamewithmarbles;youmayhaveplayedthisgameinchildhood.Thegameisplayingbyalternatingturns.Ineachturnaplayercantakeexactlyoneortwomarbles.BothAliceandBobknowthenumberofmarblesinitial
Guard_Mine
·
2015-06-09 19:00
博弈
LightOJ
1030 Discovering Gold【概率】
题目链接:http://www.
lightoj
.com/volume_showproblem.php?problem=1030题意:基础概率题。
u014427196
·
2015-06-08 20:00
LightOJ
1017---Brush (III) (dp)
Samirreturnedhomefromthecontestandgotangryafterseeinghisroomdusty.Wholikestoseeadustyroomafterabrainstormingprogrammingcontest?Aftercheckingabithefoundabrushinhisroomwhichhaswidthw.Dustsaredefinedas2D
tokers
·
2015-06-08 19:52
DP
LightOJ
LightOJ
1017---Brush (III) (dp)
Samirreturnedhomefromthecontestandgotangryafterseeinghisroomdusty.Wholikestoseeadustyroomafterabrainstormingprogrammingcontest?Aftercheckingabithefoundabrushinhisroomwhichhaswidthw.Dustsaredefinedas2D
Guard_Mine
·
2015-06-08 19:00
dp
LightOJ
1016---Brush (II) (贪心)
Afterthelongcontest,Sameereturnedhomeandgotangryafterseeinghisroomdusty.Wholikestoseeadustyroomafterabrainstormingprogrammingcontest?Aftercheckingabithefoundabrushinhisroomwhichhaswidthw.Dustsaredefin
tokers
·
2015-06-08 18:47
LightOJ
LightOJ
1016---Brush (II) (贪心)
Afterthelongcontest,Sameereturnedhomeandgotangryafterseeinghisroomdusty.Wholikestoseeadustyroomafterabrainstormingprogrammingcontest?Aftercheckingabithefoundabrushinhisroomwhichhaswidthw.Dustsaredefin
Guard_Mine
·
2015-06-08 18:00
贪心
LightOJ
1010---Knights in Chessboard (规律题)
Givenanmxnchessboardwhereyouwanttoplacechessknights.Youhavetofindthenumberofmaximumknightsthatcanbeplacedinthechessboardsuchthatnotwoknightsattackeachother.Thosewhoarenotfamiliarwithchessknights,notet
Guard_Mine
·
2015-06-08 15:00
规律题
LightOJ
1013---Love Calculator (dp)
Yes,youaredevelopinga‘Lovecalculator’.Thesoftwarewouldbequitecomplexsuchthatnobodycouldcracktheexactbehaviorofthesoftware.So,giventwonamesyoursoftwarewillgeneratethepercentageoftheir‘love’accordingtot
Guard_Mine
·
2015-06-07 22:00
dp
LightOJ
1012---Guilty Prince (并查集)
OncetherewasakingnamedAkbar.HehadasonnamedShahjahan.Foranunforgivablereasonthekingwantedhimtoleavethekingdom.Sincehelovedhissonhedecidedhissonwouldbebanishedinanewplace.Theprincebecamesad,buthefollowe
Guard_Mine
·
2015-06-07 18:00
并查集
LightOJ
1011---Marriage Ceremonies (状压dp)
Youworkinacompanywhichorganizesmarriages.Marriagesarenotthateasytobemade,so,thejobisquitehardforyou.Thejobgetsmoredifficultwhenpeoplecomehereandgivetheirbio-datawiththeirpreferenceaboutoppositegender.
Guard_Mine
·
2015-06-06 11:00
dp
LightOJ
1008---Fibsieve`s Fantabulous Birthday (规律)
Fibsievehadafantabulous(yes,it’sanactualword)birthdaypartythisyear.Hehadsomanygiftsthathewasactuallythinkingofnothavingapartynextyear.AmongthesegiftstherewasanNxNglasschessboardthathadalightineachofit
Guard_Mine
·
2015-06-05 12:00
规律
LightOJ
1007---Mathematically Hard (欧拉函数)
Mathematicallysomeproblemslookhard.Butwiththehelpofthecomputer,someproblemscanbeeasilysolvable.Inthisproblem,youwillbegiventwointegersaandb.Youhavetofindthesummationofthescoresofthenumbersfromatob(inc
Guard_Mine
·
2015-06-04 17:00
欧拉函数
LightOJ
1006---Hex-a-bonacci(矩阵快速幂)
Givenacode(notoptimized),andnecessaryinputs,youhavetofindtheoutputofthecodefortheinputs.Thecodeisasfollows:inta,b,c,d,e,f; intfn(intn){ if(n==0)returna; if(n==1)returnb; if(n==2)returnc; if(n==3)retur
Guard_Mine
·
2015-06-03 21:00
矩阵快速幂
LightOJ
1005---Rooks(简单组合数学)
Arookisapieceusedinthegameofchesswhichisplayedonaboardofsquaregrids.Arookcanonlymoveverticallyorhorizontallyfromitscurrentpositionandtworooksattackeachotherifoneisonthepathoftheother.Inthefollowingfig
Guard_Mine
·
2015-06-03 21:00
组合数学
LightOJ
1003---Drunk(拓扑排序判环)
Oneofmyfriendsisalwaysdrunk.So,sometimesIgetabitconfusedwhetherheisdrunkornot.So,onedayIwastalkingtohim,abouthisdrinks!Hebegantodescribehiswayofdrinking.So,letmesharehisideasabit.Iamexpressinginmyword
Guard_Mine
·
2015-06-03 10:00
拓扑排序
LightOJ
1002---Country Roads (最短路变形)
Iamgoingtomyhome.Therearemanycitiesandmanybi-directionalroadsbetweenthem.Thecitiesarenumberedfrom0ton-1andeachroadhasacost.Therearemroads.YouaregiventhenumberofmycitytwhereIbelong.Nowfromeachcityyouha
Guard_Mine
·
2015-06-02 20:00
最短路
LightOJ
1356 Prime Independence (素数 二分图)
PrimeIndependenceTimeLimit:3000MS MemoryLimit:32768KB 64bitIOFormat:%lld&%lluSubmit Status Practice
LightOJ
1356DescriptionAsetofintegersiscalledprimeindependentifnoneofitsmemberisaprimemultip
u010228612
·
2015-06-01 23:00
light oj 1348 树链剖分(单点更新区间求值)
http://
lightoj
.com/volume_showproblem.php?
u013573047
·
2015-05-29 14:00
LightOJ
1408---Batting Practice (期望,推公式)
Afterbeingalloutfor58and78intwomatchesinthemostprestigioustournamentintheworld,thecoachofacertainnationalcricketteamwasveryupset.Hedecidedtomakethebatsmenpracticealot.Buthewaswonderinghowtomakethempra
Guard_Mine
·
2015-05-26 20:00
期望
LightOJ
1348 Aladdin and the Return Journey (树链剖分)
树链剖分模板题。最近一直有比赛。。好长时间没写了。明显生疏了。。找个模板题熟悉一下。代码如下:#include #include #include #include #include #include #include #include #include usingnamespacestd; #defineLL__int64 #definepiacos(-1.0) #defineroot1,n,1
u013013910
·
2015-05-26 17:00
算法
代码
ACM
树链剖分
区间dp
LightOj
1422 Halloween Costumes
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=27130题意:一个人赶几场舞会,每场舞会穿的衣服不一样。规定衣服可脱,重新穿时算新的一件。因为可以几件衣服套在一起,问最少用几件新衣服。思路:在解释中理清思路。dp[i][j]为第i到第j场需要穿的最少衣服数目。对于每个dp,初始化为dp[i][j]=1+dp[i+1
beihai2013
·
2015-05-20 15:00
LightOJ
1287---Where to Run (概率dp)
Lastnightyourobbedabankbutcouldn’tescapeandwhenyoujustgotoutsidetoday,thepolicestartedchasingyou.Thecity,whereyoulivein,consistsofsomejunctionswhichareconnectedbysomebidirectionalroads.Sincepoliceisbe
Guard_Mine
·
2015-05-18 20:00
dp
LightOJ
1274---Beating the Dataset (概率dp)
Youareinacontest,andunfortunatelyyoudon’thavemuchtime.Youhaveoneprobleminhand;youjustglancedatthesampleoutputandfoundthatitjustwants‘YES’or‘NO’.So,youhavemadeanotherplaninsteadofsolvingtheproblemasyou
Guard_Mine
·
2015-05-18 16:00
dp
LightOJ
1364---Expected Cards(概率dp+三进制状压)
Tahahasgotastandarddeckofcardswithhim.Inadditiontothe52regularones,thereare2jokercards.Everyregularcardhasarankandasuit.Theranksinascendingorderare:A,2,3,4,5,6,7,8,9,T,J,QandK.Thesuitofacardcanbeclubs
Guard_Mine
·
2015-05-17 21:00
dp
LightOJ
1317---Throwing Balls into the Baskets (概率dp)
Youprobablyhaveplayedthegame“ThrowingBallsintotheBasket”.Itisasimplegame.Youhavetothrowaballintoabasketfromacertaindistance.Onedaywe(theAIUBACMMER)wereplayingthegame.Butitwasslightlydifferentfromthema
Guard_Mine
·
2015-05-17 16:00
dp
LightOJ
1027---A Dangerous Maze (期望)
Youareinamaze;seeingndoorsinfrontofyouinbeginning.Youcanchooseanydooryoulike.Theprobabilityforchoosingadoorisequalforalldoors.Ifyouchoosetheithdoor,itcaneithertakeyoubacktothesamepositionwhereyoubegun
Guard_Mine
·
2015-05-17 15:00
数学
期望
LightOJ
1422---Halloween Costumes (区间dp)
Gappuhasaverybusyweekendaheadofhim.Because,nextweekendisHalloween,andheisplanningtoattendasmanypartiesashecan.Sinceit’sHalloween,thesepartiesareallcostumeparties,Gappualwaysselectshiscostumesinsuchawa
Guard_Mine
·
2015-05-15 16:00
dp
LightOJ
1356 &&
LightOJ
1336
LightOJ
1356如果把不独立的两个数a和b建立关系,那么问题就是找到一个最大的集合,使得集合中的任意两个数不相关,这有点像二分图中最大独立集的概念。然后问题就是建立二分图。
u013007900
·
2015-05-07 22:00
LightOJ
1265---Island of Survival (概率dp)
Youareinarealityshow,andtheshowiswaytoorealthattheythrewintoanisland.Onlytwokindsofanimalsareintheisland,thetigersandthedeer.Thoughunfortunatebutthetruthisthat,eachdayexactlytwoanimalsmeeteachother.So
Guard_Mine
·
2015-05-05 16:00
dp
LightOJ
- 1220
Mysterious Bacteria Time Limit: 500MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Description Dr. Mob has just discovered a Deathly Bacteria. He named it RC-01
·
2015-05-03 21:00
li
LightOJ
- 1234
Harmonic Number Time Limit: 3000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Description In mathematics, the nth harmonic number is the sum of the reciprocal
·
2015-05-03 21:00
li
LightOJ
1151---Snakes and Ladders (高斯消元+概率dp)
‘SnakesandLadders’or‘Shap-Ludu’isagamecommonlyplayedinBangladesh.Thegameissocommonthatitwouldbetoughtofindapersonwhohasn’tplayedit.Butthosewhohaven’tplayedit(unluckyofcourse!)therulesareasfollows.Ther
Guard_Mine
·
2015-04-30 22:00
dp
高斯消元法
LightOJ
1104---Birthday Paradox (概率)
Sometimessomemathematicalresultsarehardtobelieve.Oneofthecommonproblemsisthebirthdayparadox.Supposeyouareinapartywherethereare23peopleincludingyou.Whatistheprobabilitythatatleasttwopeopleinthepartyhav
Guard_Mine
·
2015-04-30 19:00
概率
LightOJ
1248---Dice (III)(概率dp)
Givenadicewithnsides,youhavetofindtheexpectednumberoftimesyouhavetothrowthatdicetoseeallitsfacesatleastonce.Assumethatthediceisfair,thatmeanswhenyouthrowthedice,theprobabilityofoccurringanyfaceisequal
Guard_Mine
·
2015-04-30 16:00
dp
LightOJ
1079---Just another Robbery (概率做01背包)
AsHarryPotterseriesisover,Harryhasnojob.Sincehewantstomakequickmoney,(hewantseverythingquick!)sohedecidedtorobbanks.Hewantstomakeacalculatedrisk,andgrabasmuchmoneyaspossible.Buthisfriends-HermioneandR
Guard_Mine
·
2015-04-29 20:00
dp
LIghtOJ
1038---Race to 1 Again(概率dp)
Rimilearnedanewthingaboutintegers,whichis-anypositiveintegergreaterthan1canbedividedbyitsdivisors.So,heisnowplayingwiththisproperty.HeselectsanumberN.AndhecallsthisD.Ineachturnherandomlychoosesadiviso
Guard_Mine
·
2015-04-29 20:00
dp
LightOJ
1030---Discovering Gold(概率dp)
Youareinacave,alongcave!Thecavecanberepresentedbya1xNgrid.Eachcellofthecavecancontainanyamountofgold.Initiallyyouareinposition1.Noweachturnyouthrowaperfect6sideddice.IfyougetXinthediceafterthrowing,yo
Guard_Mine
·
2015-04-29 19:00
dp
LightOJ
1282
Leading and Trailing Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description You are given two integers: n and k, your task
·
2015-04-21 21:00
li
LightOJ
- 1370
Bi-shoe and Phi-shoe Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description Bamboo Pole-vault is a massively popular sport
·
2015-04-21 21:00
li
LightOJ
- 1245
Harmonic Number (II) Time Limit: 3000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description I was trying to solve problem '1234 - Harmonic
·
2015-04-21 21:00
li
Back to Underworld
CrawlingfailedTimeLimit:4000MS MemoryLimit:32768KB 64bitIOFormat:%lld&%lluSubmitStatusPractice
LightOJ
1009DescriptionTheVampiresandLykansarefightingeachother
qq_18661257
·
2015-04-16 16:00
LightOJ
1236 Pairs Forming LCM(唯一分解定理)
大致题意:求thenumberofpairs(i,j)forwhichlcm(i,j)=nand(i≤j).数据范围: T(≤200)denotingthenumberoftestcases.Eachcasestartswithalinecontaininganintegern(1≤n≤1014).思路:把n分解成素因数的形式n=p1^c1+p2^c2+...pm^cm假设已找到一对(a,b)的l
kalilili
·
2015-04-12 11:00
LightOJ
1314---Names for Babies
1314-NamesforBabiesPDF(English)StatisticsForumTimeLimit:4second(s)MemoryLimit:32MBLongtimeago,therewasastrangekingdom.Peoplesofdifferentreligions,differentculturesusedtolivethere.Butastheyweredifferen
Guard_Mine
·
2015-04-09 20:00
后缀数组
LightOJ
1348 - Aladdin and the Return Journey 树链剖分 点权
1348-AladdinandtheReturnJourneyPDF(English)StatisticsForumTimeLimit: 2second(s)MemoryLimit: 32MBFinallytheGreatMagicalLampwasinAladdin'shand.Nowhewantedtoreturnhome.Buthedidn'twanttotakeanyhelpfromthe
u013532224
·
2015-04-07 19:00
树链剖分
lightoj
1349 - Aladdin and the Optimal Invitation 贪心 中位数
1349-AladdinandtheOptimalInvitationPDF(English)StatisticsForumTimeLimit: 4second(s)MemoryLimit: 32MBFinallyAladdinreachedhome,withthegreatmagicallamp.Hewashappierthanever.Ashewasaniceboy,hewantedtosha
u013532224
·
2015-04-07 18:00
数学
LightOJ
1422 Halloween Costumes (区间dp 好题)
1422-HalloweenCostumesPDF(English)StatisticsForumTimeLimit:2second(s)MemoryLimit:32MBGappuhasaverybusyweekendaheadofhim.Because,nextweekendisHalloween,andheisplanningtoattendasmanypartiesashecan.Since
_TCgogogo_
·
2015-04-03 20:47
动态规划
ACM
lightoj
1326 - Race dp+预处理
1326-RacePDF(English)StatisticsForumTimeLimit: 1second(s)MemoryLimit: 32MBDiskyandSooma,twoofthebiggestmegamindsofBangladeshwenttoafarcountry.Theyate,codedandwanderedaround,evenintheirholidays.Theypas
u013532224
·
2015-03-29 10:00
dp
lightoj
1164 - Horrible Queries 线段树入门
1164-HorribleQueriesPDF(English)StatisticsForumTimeLimit: 2second(s)MemoryLimit: 64MBWorldisgettingmoreevilandit'sgettingtoughertogetintotheEvilLeagueofEvil.SincethelegendaryBadHorsehasretired,nowyouh
u013532224
·
2015-03-29 10:00
线段树
上一页
15
16
17
18
19
20
21
22
下一页
按字母分类:
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
其他