1379.RunAway模拟退火裸题[crayon-673fb3c67887b908134363/]2758.CheckingtheText暴力+哈希[crayon-673fb3c678885188421253/]poj3156.Interconnect由于状态是满足拓扑序的,所以直接dp上,再用个hash记忆化[crayon-673fb3c67888c469706686/]1837.Balancef(i,j)前i个力矩为j的方案,dp[crayon-673fb3c678892689451571/]3609.ResetSequence状压+bfs初始集合是0-n-1每个指令会使得集合中的一些元素消失,目标状态是只有一个0[c...
Useraintadecidedtopaintawall.Thewallconsistsofn2tiles,thatarearrangedinann × ntable.Sometilesarepainted,andtheothersarenot.Ashewantstopaintitbeautifully,hewillfollowtherulesbelow.Firstlyuseraintalooksatthewall.Ifthereisatleastonepaintedcelloneachrowandatleastonepaintedcelloneachcolumn,hestopscoloring.Otherwise,hegoestostep2.Useraintachooseanytileonthewallwithuniformprobability.Ifthetil...
ItturnsoutthatyouareagreatfanofrockbandAC/PE.Peterlearnedthatandstartedthefollowinggame:heplaysthefirstsongofthelistofnsongsofthegroup,andyouhavetofindoutthenameofthesong.Afteryoutellthesongname,Peterimmediatelyplaysthefollowingsonginorder,andsoon.Thei-thsongofAC/PEhasitsrecognizabilitypi.Thismeansthatifthesonghasnotyetbeenrecognizedbyyou,youlistentoitforexactlyonemoresecondandwithpr...
近期评论