1379.RunAway模拟退火裸题[crayon-67679b7884bf1545480214/]2758.CheckingtheText暴力+哈希[crayon-67679b7884bfb784392049/]poj3156.Interconnect由于状态是满足拓扑序的,所以直接dp上,再用个hash记忆化[crayon-67679b7884c01936806367/]1837.Balancef(i,j)前i个力矩为j的方案,dp[crayon-67679b7884c08572301269/]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...
近期评论