如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
11210-ChineseMahjongTimelimit:3.000secondsProblemCChineseMahjongMahjong()isagameofChineseoriginusuallyplayedbyfourpersonswithtilesresemblingdominoesandbearingvariousdesigns,whicharedrawnanddiscardeduntiloneplayerwinswithahandoffourcombinationsofthreetileseachandapairofmatchingtiles.AsetofMahjongtileswillusuallydifferfromplacetoplace.Itusuallyhasatleast136tiles,mostcommonly144,althoughsetsoriginatingfromAmericaorJapanwillhavemore.The136-tileMahjongincludes:Dots:namedaseachtileconsistsofanumberofcircles.Eachcircleissaidtorepresentcopper(tong)coinswithasquareholeinthemiddle.Inthisproblem,they'rerepresentedby1T,2T,3T,4T,5T,6T,7T,8Tand9T.Bams:namedaseachtile(exceptthe1Bamboo)consistsofanumberofbamboosticks.Eachstickissaidtorepresentastring(suo)thatholdsahundredcoins.Inthisproblem,they'rerepresentedby1S,2S,3S,4S,5S,6S,7S,8Sand9S.Craks:namedaseachtilerepresentstenthousand(wan)coins,oronehundredstringsofonehundredcoins.Inthisproblem,they'rerepresentedby1W,2W,3W,4W,5W,6W,7W,8Wand9W.Windtiles:East,South,West,andNorth.Inthisproblem,they'rerepresentedbyDONG,NAN,XI,BEI.Dragontiles:red,green,andwhite.ThetermdragontileisawesternconventionintroducedbyJosephParkBabcockinhis1920bookintroducingMahjongtoAmerica.Originally,thesetilesaresaidtohavesomethingtodowiththeChineseImperialExamination.Theredtilemeansyoupasstheexaminationandthuswillbeappointedagovernmentofficial.Thegreentilemeans,consequentlyyouwillbecomefinanciallywelloff.Thewhitetile(acleanboard)meanssinceyouarenowdoingwellyoushouldactlikeagood,incorruptofficial.Inthisproblem,they'rerepresentedbyZHONG,FA,BAI.Thereare9*3+4+3=34kinds,withexactly4tilesofeachkind,sothereare136tilesintotal.Towhomaybeinterested,the144-tileMahjongalsoincludes:Flowertiles:typicallyoptionalcomponentstoasetofmahjongtiles,oftencontainartworkontheirtiles.Thereareexactlyonetileofeachkind,so136+8=144tilesintotal.Inthisproblem,wedontconsiderthesetiles.ChineseMahjongisverycomplicated.However,weonlyneedtoknowveryfewoftherulesinordertosolveth