
状压DP
KetchupZ
退役acmer一名,CCPC银+ICPC铜(欢迎大家访问我的Github地址:https://github.com/LieLieLiekey)
展开
-
1243E - Sum Balance(状压DP,图)
1243E - Sum Balance(状压DP,图)题目链接:1243E - Sum Balance题意:给一个K,代表有K个箱子。第 iii 个箱子有 nin_ini 个物品,价值分别为ai,1,ai,2...ai,nia_{i,1},a_{i,2}...a_{i,n_i}ai,1,ai,2...ai,ni。现在分别从K个箱子中取精确的一个物品,并放回K个箱子(每个箱子精确放...原创 2019-11-09 10:57:20 · 300 阅读 · 1 评论 -
M - God of War
M - God of WarAt 184~280 A.D ,there were many kingdoms in China. Three strongest among them are “Wei”, “Shu”, “Wu”. People call this period as “Three Kingdoms”.HH is a super “Three Kingdoms” fan, be...原创 2019-01-23 08:56:10 · 255 阅读 · 0 评论 -
L - Tiling Dominoes
L - Tiling Dominoes闲聊在大白书上383383383页,上面有详细讲解这道题的dpdpdp方法,第一次做这类状压dp的题时,用的dp的时间复杂度是O(2m∗2m∗n)O(2^m*2^m*n)O(2m∗2m∗n) 可以过另一个一模一样的题,当时是把每一行的放置情况当作状态进行转移,但是那个算法在这道题上过不去,于是开始寻找博客,网上说大白书上有一道一模一样的题,正好旁边就有...原创 2019-01-23 08:55:58 · 252 阅读 · 0 评论 -
J - Hie with the Pie
J - Hie with the PieThe Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can afford to hire only one driver to do the deli...原创 2019-01-23 08:55:41 · 151 阅读 · 0 评论 -
H - Imperishable Night(曼哈顿类似回路的时间复杂度O(2^n))
H - Imperishable NightAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does no...原创 2019-01-22 18:01:28 · 294 阅读 · 0 评论 -
G - Corn Fields
G - Corn FieldsFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares...原创 2019-01-22 17:59:16 · 198 阅读 · 0 评论 -
E - Mondriaan's Dream
E - Mondriaan’s DreamSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his ‘toilet series’ (where he had to use his toilet paper to...原创 2019-01-22 17:58:52 · 213 阅读 · 0 评论 -
D - Relocation
D - Relocationmma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they only...原创 2019-01-22 17:58:13 · 224 阅读 · 0 评论 -
A - LianLianKan
A - LianLianKanI like playing game with my friend, although sometimes looks pretty naive. Today I invent a new game called LianLianKan. The game is about playing on a number stack.Now we have a numb...原创 2019-01-22 17:57:27 · 178 阅读 · 0 评论