1694.AnOldStoneGamef[x]表示x为根的树至少需要的石头,把子树按f排序后贪心即可[crayon-673faf09cf1a8677779993/]poj1738.AnoldStoneGame参见discuss的神算法,据说是knuth提出的?[crayon-673faf09cf1b3629570362/]1737.ConnectedGraph跪大爷http://blog.csdn.net/PoPoQQQ/article/details/43525019[crayon-673faf09cf1ba726658396/]1742.Coins二进制拆分+bitset竟然过不了...我被题解骗了突然一想这不是以前做过...
DescriptionFarmerJohngoestoDollarDaysatTheCowStoreanddiscoversanunlimitednumberoftoolsonsale.Duringhisfirstvisit,thetoolsaresellingvariouslyfor$1,$2,and$3.FarmerJohnhasexactly$5tospend.Hecanbuy5toolsat$1eachor1toolat$3andanadditional1toolat$2.Ofcourse,thereareothercombinationsforatotalof5differentwaysFJcanspendallhismoneyontools.Heretheyare:1@US$3+1@US$21@US$3+2@US$11@US$...
近期评论