摘要:
DescriptionAliceandBobmeetagain.ThistimetheyplayagamenamedMATRIXTRANSFORMER.Theygotann*nboard.Everygridhastwopositions,UPandDOWN.Inthisgameyoucanpushsomeamazingbuttonstoexchangeanytworowsoranytwocolumns.AlicewillwinifshegotthegridsinthemaindiagonallineallUP.ButAlicefindsthatforsomeboard,nomatterhowm 阅读全文
摘要:
ProblemDescription传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才会有钱.由于老百姓都比较富裕,他们都能对每一间房子在他们的经济范围内出一定的价格,比如有3间房子,一家老百姓可以对第一间出10万,对第2间出2万,对第3间出20万.(当然是在他们的经济范围内).现在这个问题就是村领导怎样分配房子才能 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3618ProblemDescriptionFJhastwosamehousesforrant.Nowhehasn(1≤n≤1000)pieceoforder,theordersaregiveninthef... 阅读全文
摘要:
ProblemDescriptionAgroupofthievesisapproachingamuseuminthecountryofzjsxzy,nowtheyareincityA,andthemuseumisincityB,wherekeepsmanybrokenlegsofzjsxzy.Luckily,GWlearnedtheconspiracywhenheiswatchingstarsandtoldittozjsxzy.Zjsxzydecidedtocaughtthesethieves,andheletthepolicetodothis,thepolicetrytocatchthemo 阅读全文
摘要:
在二分图中,最大匹配数 = 最大流 = 最小割 = 最小点集覆盖 = 总点数 - 最大独立集 Knig定理的证明:(还是matrix67讲得清楚:http://www.matrix67.com/blog/archives/116) 假如我们已经通过匈牙利算法求出了最大匹配(假设它等于M),下面给出的 阅读全文
摘要:
Arobothasbeensenttoexplorearemoteplanet.Tospecifythepaththerobotshouldtake,aprogramissenteachday.Theprogramconsistsofasequenceofthefollowingcommands:F... 阅读全文
摘要:
DescriptionInacity,busisthemostpopularvehicleforcitizenstogofromoneplacetoanother.Unfortunately,sometimesonepersoncannottravelfromonebusstationtoanotherdirectly,becausethereisnobuslinethroughthesetwostations.Sohehadtogotoamedialstationfromthestartingstation,thenchangestoabuswhichgofromthisintermedia 阅读全文
摘要:
DescriptionArectangleisspecifiedbyapairofcoordinates(x1,y1)and(x2,y2)indicatingitslower-leftandupper-rightcorners(x1 #include #include #include ... 阅读全文
摘要:
D.ColorfulGraphtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYou'vegotanundirectedgraph,consistingofnverticesandmedges.Wewillconsiderthegraph'sverticesnumberedwithintegersfrom1ton.Eachvertexofthegraphhasacolor.Thecolorofthei-thvertexisanintegerci 阅读全文
摘要:
DescriptionAlicehasapianowhichcanplaysnicemusic,butit'sdifferentfromotherpianos.Ithastworowsofkeys,andthemethodofplayingitisalsoquitespecial.WhenAlice... 阅读全文