Hatena::Grouptopcoder

yuyarinのtopcoder記

TopCoder, Google Code JamPKU JudgeOnlineICPC などのアルゴリズム系プログラミングコンテストの参加や練習の記録を残していきます.

アルゴリズムやテーマで分類した目次はこちら

2011/01/27

「5×5のマス目に6個の○を次の条件を満たすように全部書く」を解いてみた

00:03

404 Blog Not Found:Math - 5×5のマス目に6個の○を次の条件を満たすように全部書く

5×5のマス目に6個の○を次の条件を満たすように書きます。

条件:各行・各列に少なくとも1個は○を書く。同じマスには2個以上の○を書くことはできない。

このとき、6個の○を書く方法は全部で何通りありますか。

RSS を眺めているときにこの記事を見つけて dankogai ならきっと...!と思って「続きを読む」を押したら総当り6重 for ループでがっかりしたので,変数を可変にして自分で書いてみた.combination 関数をちゃんと書いてないのででかい数を渡すとオーバーフローします.

典型的な DP ですよね.20分ぐらいで書けました.間違ってたら指摘お願いします.

弾さんも書いている通り総当りでも 25_P_6 = 127,512,000 なんで TopCoder でもなければ総当たったほうが楽で,時と場合と目的に依ってはそれもベストなコードの1つですね(TopCoderだとTLEする).

/Users/yuyarin% time ./a.out       
n=5 m=5 c=6
answer: 4200
./a.out  0.00s user 0.00s system 18% cpu 0.012 total
/Users/yuyarin% time ./a.out 7 7 9 
n=7 m=7 c=9
answer: 13003620
./a.out 7 7 9  0.00s user 0.00s system 17% cpu 0.013 total
/Users/yuyarin% time ./a.out 9 7 13
n=9 m=7 c=13
answer: 1016446631327
./a.out 9 7 13  0.00s user 0.00s system 31% cpu 0.008 total

どっかでオーバーフローしてるかもしれない.

イカソース

続きを読む

DeandreDeandre2011/07/22 14:58This site is like a classroom, eecxpt I don't hate it. lol

zxvhpdyvzazxvhpdyvza2011/07/23 22:369w6OE2 , [url=http://enhrpdbgcmdg.com/]enhrpdbgcmdg[/url], [link=http://lpzrrvhelrkj.com/]lpzrrvhelrkj[/link], http://jokklpgtygzh.com/

zevawpmjzevawpmj2011/07/24 21:51YPOmgY <a href="http://pcdropmnzimz.com/">pcdropmnzimz</a>

bacbrkenswbacbrkensw2011/07/26 01:48df0FdI , [url=http://ttrsfridzjtd.com/]ttrsfridzjtd[/url], [link=http://utvyqfhdxaie.com/]utvyqfhdxaie[/link], http://kytqpktiamcy.com/

JuliezHycleJuliezHycle2017/11/25 07:58このメッセージは、XRumer + XEvil 4.0を使用してここに掲載されています
XEvil 4.0は革命的なアプリケーションで、ほとんどのアンチボットネット保護をバイパスできます。
Captcha Recognition Google (ReCaptcha-1, ReCaptcha-2)、Facebook、Yandex、VKontakte、Captcha Comなど、8400万種類以上の他の種類があります!
あなたはこれを読む - それは動作することを意味します! ;)

MashaRaTMashaRaT2017/12/08 18:28このメッセージは、XRumer + XEvil 4.0を使用してここに掲載されています
XEvil 4.0は革命的なアプリケーションで、ほとんどのアンチボットネット保護をバイパスできます。
Captcha Recognition Google (ReCaptcha-1, ReCaptcha-2)、Facebook、Yandex、VKontakte、Captcha Comなど、8400万種類以上の他の種類があります!
あなたはこれを読む - それは動作することを意味します! ;)

HaiidoxickHaiidoxick2017/12/27 12:24i http://zithromaxjinn.com buy azithromycin 1 g <a href= http://zithromaxjinn.com >zithromax drug classification infections</a> you <a href=http://zithromaxjinn.com>online azithromycin 250mg</a> azithromycin medicine zithromax generic

RimxxCatRimxxCat2017/12/27 13:06m http://propeciajinn.com will propecia cost forever <a href= http://propeciajinn.com >cheap propecia</a> stand <a href=http://propeciajinn.com>propecia</a> buy propecia hytrin

RicnoCatRicnoCat2017/12/27 19:53i http://modafiniljinn.com order modafinil <a href= http://modafiniljinn.com >modafinil generic</a> they <a href=http://modafiniljinn.com>buy generic provigil</a> provigil for adhd

HanxkoxickHanxkoxick2017/12/27 20:02z http://cialisjinn.com when to take cialis for best results <a href= http://cialisjinn.com >cialis official site</a> steps <a href=http://cialisjinn.com>cialis generic</a> best place to buy cialis online

HafuxoxickHafuxoxick2017/12/28 00:20s http://cialisjinn.com cialis 5 mg <a href= http://cialisjinn.com >buy cialis</a> girls <a href=http://cialisjinn.com>read full article</a> tadalafil dosage

KefxypouffKefxypouff2017/12/28 02:15z http://modafiniljinn.com modafinil price <a href= http://modafiniljinn.com >read full article</a> broken <a href=http://modafiniljinn.com>modafinil provigil</a> modafinil and alcohol

RiyivCatRiyivCat2017/12/28 03:04p https://viagrajinn.com cheap viagra online <a href= https://viagrajinn.com >sildenafil</a> hold <a href=https://viagrajinn.com>generic viagra</a> what does viagra do to women

HanhroxickHanhroxick2017/12/28 03:55e http://prednisonejinn.com buy prednisone online canada no script <a href= http://prednisonejinn.com >buy prednisone online canada no script</a> around <a href=http://prednisonejinn.com>prednisone generic</a> buy prednisone online without a script

HapyeoxickHapyeoxick2017/12/28 05:06n http://propeciajinn.com finasteride 5mg without prescription <a href= http://propeciajinn.com >propecia generic</a> in <a href=http://propeciajinn.com>buy cheap propecia</a> dr reddy's finasteride generic propecia

KegwjpouffKegwjpouff2017/12/28 12:10h http://propeciajinn.com propecia finasteride pharmacy <a href= http://propeciajinn.com >find out more</a> myself <a href=http://propeciajinn.com>proscar finasteride 5mg</a> the cost of vicodin generic propecia

HafpwoxickHafpwoxick2017/12/28 12:37q http://modafiniljinn.com modafinil review <a href= http://modafiniljinn.com >modafinil</a> cannot <a href=http://modafiniljinn.com>modafinil</a> modafinil reddit

RoxalPlubsRoxalPlubs2017/12/28 14:15z http://canadapharmacyeos.com/canadian-pharmacy-levitra best canadian pharmacy <a href= http://canadapharmacyeos.com >canada pharmacy</a> oh <a href=http://canadapharmacyeos.com/canadian-pharmacy-online>best canadian pharmacy</a> canada pharmacy

KejxfpouffKejxfpouff2017/12/28 15:36h http://prednisonejinn.com buy prednisone cheap <a href= http://prednisonejinn.com >check this out</a> letter <a href=http://prednisonejinn.com>buy prednisone from canada</a> buy prednisone online canada no script

RoivqPlubsRoivqPlubs2017/12/28 17:33k http://canadapharmacyeos.com/canadian-pharmacy-online canadian pharmacy <a href= http://canadapharmacyeos.com/canadian-pharmacy-viagra >here i found it</a> able <a href=http://canadapharmacyeos.com>canadian pharmacy viagra</a> canadian pharmacy

RouvmPlubsRouvmPlubs2017/12/28 17:55k http://canadapharmacyeos.com/canadian-pharmacy-cialis canada pharmacy <a href= http://canadapharmacyeos.com/canadian-pharmacy-cialis >canadian pharmacy cialis</a> frightened <a href=http://canadapharmacyeos.com>canadian pharmacy cialis</a> canadian pharmacy levitra

RonaxPlubsRonaxPlubs2017/12/28 18:19n http://canadapharmacyeos.com/canadian-pharmacy-cialis best canadian pharmacy <a href= http://canadapharmacyeos.com >canadian pharmacy viagra</a> cause <a href=http://canadapharmacyeos.com/canadian-pharmacy>best canadian pharmacy</a> canadian pharmacy levitra

HaswxoxickHaswxoxick2017/12/28 18:45g http://viagrabits.com is there a generic for viagra <a href= http://viagrabits.com >viagra for sale</a> ran <a href=http://viagrabits.com>buy generic viagra</a> viagra free trial

RifniCatRifniCat2017/12/28 18:45t <a href= http://cialisbits.com >cialis canada</a> my
brother <a href=http://cialisbits.com>cialis coupon</a>
cialis generic http://cialisxtl.com

CublzbetlyCublzbetly2017/12/28 18:46m http://viagrabits.com women taking viagra <a href= http://viagrabits.com >buy generic viagra</a> sit <a href=http://viagrabits.com>viagra coupons</a> active ingredient in viagra

RoaudPlubsRoaudPlubs2017/12/28 18:51ljaurc <a href=>payday personal loan</a>

KersmpouffKersmpouff2017/12/28 18:57c <a href= http://paydayloansbits.com >payday loans online</a> front
opened <a href=http://paydayloansbits.com>apply for payday loans</a>
fast payday loans online http://paydayloansbits.com

HadocoxickHadocoxick2017/12/28 19:05o http://paydayloansbits.com payday loans fast <a href= http://paydayloansbits.com >home page</a> the <a href=http://paydayloansbits.com>payday personal loan</a> laser lending payday loans

RicsmCatRicsmCat2017/12/28 19:07o <a href= http://viagrabits.com >viagra coupons</a> god
thee <a href=http://viagrabits.com>viagra for sale</a>
buy real viagra online http://viagrabits.com

RijadCatRijadCat2017/12/28 19:25t <a href= http://viagrabits.com >generic viagra</a> whole
paper <a href=http://viagrabits.com>find out more</a>
buy viagra online http://viagrabits.com

RotrcPlubsRotrcPlubs2017/12/28 19:35tejzia <a href=>buy viagra online</a>

RirziCatRirziCat2017/12/28 19:45p <a href= http://paydayloansbits.com/payday-loans-with-debit-card >payday loans</a> I
before <a href=http://paydayloansbits.com/payday-loans-bakersfield-ca>payday loans online</a>
payday loans in albuquerque http://paydayloansbits.com

HatqmoxickHatqmoxick2017/12/28 19:54f http://paydayloansbits.com advance america payday loans <a href= http://paydayloansbits.com >payday loans no credit check</a> king <a href=http://paydayloansbits.com>payday loans cash advance</a> payday loans near me

RodncPlubsRodncPlubs2017/12/28 20:01dksaoo <a href=http://cialisbits.com>cialis</a>

RitmtCatRitmtCat2017/12/28 20:05n <a href= http://viagrabits.com >buy generic viagra</a> lose
she <a href=http://viagrabits.com>generic viagra</a>
viagra online no prior prescription http://viagrabits.com

RobskPlubsRobskPlubs2017/12/28 20:20agmpwy <a href=>viagra</a>

RijodCatRijodCat2017/12/28 20:21g <a href= http://viagrabits.com >buy viagra</a> nature
line <a href=http://viagrabits.com>buy generic viagra</a>
canada viagra http://viagrabits.com

CudaobetlyCudaobetly2017/12/28 20:29i http://cialisbits.com how to use cialis <a href= http://cialisbits.com >buy cialis online</a> sat <a href=http://cialisbits.com>cialis lowest price</a> cialis free sample

RirgiCatRirgiCat2017/12/28 20:39i <a href= http://viagrabits.com >viagra for sale</a> another
slowly <a href=http://viagrabits.com>generic viagra</a>
best place to buy generic viagra online http://viagrabits.com

HabxcoxickHabxcoxick2017/12/28 20:39e http://viagrabits.com female viagra <a href= http://viagrabits.com >more info</a> loss <a href=http://viagrabits.com>buy viagra</a> revatio vs viagra

KebcypouffKebcypouff2017/12/28 20:52r <a href= http://paydayloansbits.com >apply for payday loans</a> felt
soon <a href=http://paydayloansbits.com>payday loans cash advance</a>
payday loans huntsville al http://paydayloansbits.com

HaniqoxickHaniqoxick2017/12/28 20:53z http://viagrabits.com best place to buy viagra online <a href= http://viagrabits.com >generic viagra</a> resolved <a href=http://viagrabits.com>viagra</a> how to take viagra

RieziCatRieziCat2017/12/28 20:53a <a href= http://cialisbits.com >cialis from india</a> house
write <a href=http://cialisbits.com>tadalafil 20 mg</a>
tadalafil generic http://cialisxtl.com

RifhfCatRifhfCat2017/12/28 21:11y <a href= http://cialisbits.com >cialis lowest price</a> in
boys <a href=http://cialisbits.com>cialis lowest price</a>
which is better viagra or cialis http://cialisxtl.com

HawvpoxickHawvpoxick2017/12/28 21:16i http://viagrabits.com liquid viagra <a href= http://viagrabits.com >buy generic viagra</a> single <a href=http://viagrabits.com>viagra for sale</a> cheap viagra 100mg

RiavlCatRiavlCat2017/12/28 21:26f <a href= http://viagrabits.com >generic viagra</a> we
journey <a href=http://viagrabits.com>viagra 100mg price</a>
viagra overdose http://viagrabits.com

HaccqoxickHaccqoxick2017/12/28 21:30b http://paydayloansbits.com payday loans bakersfield ca <a href= http://paydayloansbits.com/payday-loans-no-checking-account-or-savings-account >no credit check payday loans instant approval</a> talk <a href=http://paydayloansbits.com/payday-loans-with-no-checking-account-required>apply for payday loans</a> payday loans online in ga

RikdpCatRikdpCat2017/12/28 21:40z <a href= http://paydayloansbits.com/payday-loans-hattiesburg-ms >payday loans online</a> entirely
would <a href=http://paydayloansbits.com>payday loans online</a>
payday loans and cash advance http://paydayloansbits.com

HakbboxickHakbboxick2017/12/28 21:44n http://paydayloansbits.com same day payday loans direct lender <a href= http://paydayloansbits.com >united kingdom payday loans</a> safe <a href=http://paydayloansbits.com/payday-loans-jacksonville-fl>payday loans</a> interest free payday loans

RiyrrCatRiyrrCat2017/12/28 21:55x <a href= http://cialisbits.com >cialis lowest price</a> offered
sir <a href=http://cialisbits.com>cialis coupon</a>
which is better viagra or cialis http://cialisxtl.com

HawproxickHawproxick2017/12/28 22:05l http://cialisbits.com prices of cialis <a href= http://cialisbits.com >cialis lowest price</a> fancy <a href=http://cialisbits.com>cialis</a> cialis free trial once per year

RikbuCatRikbuCat2017/12/28 22:08f <a href= http://viagrabits.com >generic viagra</a> saying
happy <a href=http://viagrabits.com>buy generic viagra</a>
levitra vs viagra http://viagrabits.com

KezbdpouffKezbdpouff2017/12/28 22:19o <a href= http://viagrabits.com >viagra for sale</a> liked
filled <a href=http://viagrabits.com>buy generic viagra</a>
viagra 100mg http://viagrabits.com

HaksboxickHaksboxick2017/12/28 22:27q http://viagrabits.com is viagra covered by insurance <a href= http://viagrabits.com >buy viagra</a> kept <a href=http://viagrabits.com>generic viagra</a> viagra substitute

RisvmCatRisvmCat2017/12/28 22:28h <a href= http://paydayloansbits.com >payday loans</a> love
pretty <a href=http://paydayloansbits.com>payday loans</a>
payday loans in texas http://paydayloansbits.com

RozahPlubsRozahPlubs2017/12/28 22:44gymwqj <a href=>guaranteed payday loans direct lenders</a>

HafydoxickHafydoxick2017/12/28 22:46o http://viagrabits.com viagra single packs <a href= http://viagrabits.com >generic viagra</a> finished <a href=http://viagrabits.com>buy viagra</a> viagra side effects

RogebPlubsRogebPlubs2017/12/28 23:03efckhd <a href=>payday loans no credit check</a>

HacaioxickHacaioxick2017/12/28 23:15w http://paydayloansbits.com cardinal management payday loans <a href= http://paydayloansbits.com/payday-loans-hampton-va >payday loans no credit check</a> society <a href=http://paydayloansbits.com>payday loans no credit check</a> payday loans baton rouge

RicknCatRicknCat2017/12/28 23:18s <a href= http://cialisbits.com >cialis online</a> left
country <a href=http://cialisbits.com>visit your url</a>
tadalafil online http://cialisxtl.com

HalxdoxickHalxdoxick2017/12/28 23:35k http://viagrabits.com best over the counter viagra <a href= http://viagrabits.com >buy viagra online</a> herself <a href=http://viagrabits.com>generic viagra</a> viagra side effects

RiuvrCatRiuvrCat2017/12/28 23:46t <a href= http://cialisbits.com >cialis</a> exclaimed
seemed <a href=http://cialisbits.com>cialis 5mg price</a>
cialis online http://cialisxtl.com

HaghaoxickHaghaoxick2017/12/29 00:00b http://paydayloansbits.com payday loans bismarck nd <a href= http://paydayloansbits.com/payday-loans-with-debit-cards >apply for payday loans</a> blood <a href=http://paydayloansbits.com>payday loans no credit check</a> online payday loans direct lenders only no credit check

HaqsooxickHaqsooxick2017/12/29 00:18v http://paydayloansbits.com payday loans bad credit <a href= http://paydayloansbits.com >payday loans no credit check</a> again <a href=http://paydayloansbits.com>no credit check payday loans instant approval</a> what is payday loans

KesyypouffKesyypouff2017/12/29 00:21i <a href= http://paydayloansbits.com >payday loans online</a> us
arrived <a href=http://paydayloansbits.com>payday loans no credit check</a>
payday loans sioux falls sd http://paydayloansbits.com

RibexCatRibexCat2017/12/29 00:22i <a href= http://paydayloansbits.com/payday-loans-for-veterans >payday loans no credit check</a> how
such <a href=http://paydayloansbits.com>payday loans no credit check</a>
payday loans san angelo tx http://paydayloansbits.com

HayqyoxickHayqyoxick2017/12/29 00:42h http://cialisbits.com free cialis <a href= http://cialisbits.com >buy cialis</a> others <a href=http://cialisbits.com>cialis lowest price</a> how much does cialis cost

RiijwCatRiijwCat2017/12/29 00:50d <a href= http://paydayloansbits.com >payday loans san diego ca</a> the
hall <a href=http://paydayloansbits.com/payday-loans-dover-de>apply for payday loans</a>
payday loans kent wa http://paydayloansbits.com

RiczsCatRiczsCat2017/12/29 01:00v <a href= http://paydayloansbits.com/faxless-payday-loans-no-credit-check >apply for payday loans</a> family
both <a href=http://paydayloansbits.com/laser-lending-payday-loans>no credit check payday loans instant approval</a>
payday loans greeley co http://paydayloansbits.com

RivovCatRivovCat2017/12/29 01:18c <a href= http://viagrabits.com >generic viagra</a> clothes
manner <a href=http://viagrabits.com>viagra for sale</a>
viagra definition http://viagrabits.com

HaawpoxickHaawpoxick2017/12/29 01:20s http://cialisbits.com viagra vs cialis vs levitra <a href= http://cialisbits.com >cialis canada</a> business <a href=http://cialisbits.com>buy cialis online</a> cialis 20 mg

HahqjoxickHahqjoxick2017/12/29 01:31r http://paydayloansbits.com payday loans green bay wi <a href= http://paydayloansbits.com >payday loans cash advance</a> garden <a href=http://paydayloansbits.com>payday loans no credit check</a> indian tribe payday loans

HahhcoxickHahhcoxick2017/12/29 01:43x http://viagrabits.com sildenafil price <a href= http://viagrabits.com >is viagra over the counter</a> though <a href=http://viagrabits.com>buy viagra online</a> buying viagra online

KeuhipouffKeuhipouff2017/12/29 01:48k <a href= http://viagrabits.com >where can i buy viagra</a> followed
wind <a href=http://viagrabits.com>viagra</a>
viagra samples http://viagrabits.com

HaktloxickHaktloxick2017/12/29 01:59w http://paydayloansbits.com payday loans consolidation <a href= http://paydayloansbits.com >payday personal loan</a> three <a href=http://paydayloansbits.com/payday-loans-joplin-mo>quick and easy payday loans</a> direct lenders payday loans

RiwcpCatRiwcpCat2017/12/29 02:01a <a href= http://cialisbits.com >buy cialis online</a> obliged
waiting <a href=http://cialisbits.com>cialis</a>
daily cialis http://cialisxtl.com

RijkvCatRijkvCat2017/12/29 02:12z <a href= http://paydayloansbits.com/payday-loans-texarkana >45 payday loans</a> sister
seen <a href=http://paydayloansbits.com>payday loans no credit check</a>
payday loans online no credit check instant approval http://paydayloansbits.com

RivsiCatRivsiCat2017/12/29 02:27m <a href= http://paydayloansbits.com/faxless-payday-loans >payday loans online</a> offer
ought <a href=http://paydayloansbits.com>payday loans</a>
carolina payday loans http://paydayloansbits.com

RihzaCatRihzaCat2017/12/29 02:40v <a href= http://viagrabits.com >viagra for sale</a> felt
money <a href=http://viagrabits.com>buy viagra online</a>
liquid viagra http://viagrabits.com

RiqehCatRiqehCat2017/12/29 02:51w <a href= http://paydayloansbits.com >apply for payday loans</a> field
just <a href=http://paydayloansbits.com/rise-payday-loans>visit website</a>
best payday loans online http://paydayloansbits.com

RishfCatRishfCat2017/12/29 03:19t <a href= http://viagrabits.com >buy viagra</a> circumstances
immediately <a href=http://viagrabits.com>bonuses</a>
viagra from india http://viagrabits.com

RiajzCatRiajzCat2017/12/29 03:57a <a href= http://paydayloansbits.com >view web page</a> green
leave <a href=http://paydayloansbits.com>site here</a>
payday loans in lancaster ca http://paydayloansbits.com

RiwnlCatRiwnlCat2017/12/29 04:45e <a href= http://paydayloansbits.com >payday loans online</a> manners
thought <a href=http://paydayloansbits.com/payday-loans-anaheim-ca>apply for payday loans</a>
payday loans no credit checks http://paydayloansbits.com

RiciyCatRiciyCat2017/12/29 04:59e <a href= http://paydayloansbits.com >cash taxi payday loans</a> earth
man's <a href=http://paydayloansbits.com/payday-loans-lawrence-ks>payday loans using debit card</a>
payday loans charlotte nc http://paydayloansbits.com

RilieCatRilieCat2017/12/29 05:13l <a href= http://viagrabits.com >viagra</a> act
affection <a href=http://viagrabits.com>generic viagra</a>
alternatives to viagra http://viagrabits.com

RiyhtCatRiyhtCat2017/12/29 05:27g <a href= http://viagrabits.com >viagra for sale</a> before
continued <a href=http://viagrabits.com>viagra coupons</a>
revatio vs viagra http://viagrabits.com

RiykdCatRiykdCat2017/12/29 05:39z <a href= http://viagrabits.com >viagra for sale</a> pay
matter <a href=http://viagrabits.com>generic viagra</a>
order viagra online http://viagrabits.com

RisumCatRisumCat2017/12/29 06:18z <a href= http://viagrabits.com >buy viagra online</a> sea
neck <a href=http://viagrabits.com>buy viagra online</a>
free viagra samples before buying http://viagrabits.com

RinutCatRinutCat2017/12/29 06:53y <a href= http://viagrabits.com >buy viagra</a> glass
kept <a href=http://viagrabits.com>viagra</a>
where to buy viagra online http://viagrabits.com

RiprqCatRiprqCat2017/12/29 07:03v <a href= http://paydayloansbits.com >payday loans</a> dare
five <a href=http://paydayloansbits.com/same-day-payday-loans-direct-lender>no credit check payday loans instant approval</a>
checkcity payday loans http://paydayloansbits.com

RiicrCatRiicrCat2017/12/29 07:13g <a href= http://cialisbits.com >cialis canada</a> quarter
another <a href=http://cialisbits.com>buy cialis</a>
difference between viagra and cialis http://cialisxtl.com

RiczfCatRiczfCat2017/12/29 07:23q <a href= http://cialisbits.com >buy cialis online</a> worthy
all <a href=http://cialisbits.com>cialis canada</a>
what is tadalafil http://cialisxtl.com

RivwxCatRivwxCat2017/12/29 07:37x <a href= http://paydayloansbits.com/payday-loans-without-a-check >no credit check payday loans instant approval</a> turning
wall <a href=http://paydayloansbits.com>payday personal loan</a>
payday loans portland or http://paydayloansbits.com

RibufCatRibufCat2017/12/29 07:48s <a href= http://cialisbits.com >related site</a> easy
watch <a href=http://cialisbits.com>cialis</a>
which is better viagra or cialis http://cialisxtl.com

RizwaCatRizwaCat2017/12/29 07:58d <a href= http://cialisbits.com >buy cialis online</a> often
home <a href=http://cialisbits.com>buy cialis</a>
cialis for women http://cialisxtl.com

RiwhqCatRiwhqCat2017/12/29 08:15b <a href= http://viagrabits.com >generic viagra</a> fit
hall <a href=http://viagrabits.com>generic viagra</a>
how long does viagra last http://viagrabits.com

RiyyfCatRiyyfCat2017/12/29 08:27l <a href= http://paydayloansbits.com >bonuses</a> used
sake <a href=http://paydayloansbits.com/payday-loans-direct-lenders-only-bad-credit>payday loans</a>
payday loans garland tx http://paydayloansbits.com

RolandtrenoRolandtreno2017/12/29 08:38Hello!
Watch my video compilation:
<a href=https://goo.gl/QHH2b3><img>http://mypovarhouse.ru/youtube.jpg</img></a>
 
If cool - put your finger up!
 
Everyone cheerful viewing!

RirqnCatRirqnCat2017/12/29 09:03o <a href= http://viagrabits.com >more</a> boys
sake <a href=http://viagrabits.com>buy viagra online</a>
viagra walmart http://viagrabits.com

HawzioxickHawzioxick2017/12/29 09:30b http://paydayloansbits.com on line payday loans <a href= http://paydayloansbits.com >visit your url</a> man's <a href=http://paydayloansbits.com/payday-loans-in-gulfport-ms>payday loans cash advance</a> best payday loans direct lender

RojbfPlubsRojbfPlubs2017/12/29 09:33killvi <a href=>payday loans</a>

HaaaboxickHaaaboxick2017/12/29 09:48w http://viagrabits.com sildenafil online <a href= http://viagrabits.com >buy generic viagra</a> youth <a href=http://viagrabits.com>viagra coupons</a> viagra porn

RotwxPlubsRotwxPlubs2017/12/29 09:52wyapsr <a href=http://cialisbits.com>cialis</a>

RojfdPlubsRojfdPlubs2017/12/29 10:06tkkcvm <a href=http://cialisbits.com>related site</a>

HaclqoxickHaclqoxick2017/12/29 10:11z http://cialisbits.com cialis coupon free trial <a href= http://cialisbits.com >cialis lowest price</a> taste <a href=http://cialisbits.com>buy cialis</a> discount cialis

RinndCatRinndCat2017/12/29 10:23q <a href= http://viagrabits.com >generic viagra</a> sake
like <a href=http://viagrabits.com>generic viagra</a>
is there a generic for viagra http://viagrabits.com

HaamroxickHaamroxick2017/12/29 10:25b http://paydayloansbits.com fast payday loans online direct lenders <a href= http://paydayloansbits.com/payday-loans-on-line >no credit check payday loans instant approval</a> afterwards <a href=http://paydayloansbits.com>payday personal loan</a> payday loans south carolina

RoffmPlubsRoffmPlubs2017/12/29 10:38ajgmxm <a href=http://cialisbits.com>view web page</a>

CuqubbetlyCuqubbetly2017/12/29 10:40o http://paydayloansbits.com online payday loans <a href= http://paydayloansbits.com >apply for payday loans</a> would <a href=http://paydayloansbits.com/bad-credit-payday-loans-direct-lenders>payday loans online</a> payday loans west monroe la

RibmjCatRibmjCat2017/12/29 10:46l <a href= http://viagrabits.com >viagra</a> ay
sad [url=http://viagrabits.com]viagra[/url]
female viagra http://viagrabits.com

KeocmpouffKeocmpouff2017/12/29 10:53w <a href= http://paydayloansbits.com >apply for payday loans</a> trouble
alone [url=http://paydayloansbits.com/no-teletrack-payday-loans]no credit check payday loans instant approval[/url]
payday loans in nashville tn http://paydayloansbits.com

RieyyCatRieyyCat2017/12/29 10:56e <a href= http://cialisbits.com >buy cialis online</a> turned
sharp [url=http://cialisbits.com]cialis canada[/url]
how does cialis work http://cialisxtl.com

RiieyCatRiieyCat2017/12/29 11:06x <a href= http://viagrabits.com >viagra</a> five
like [url=http://viagrabits.com]how long does viagra take to work[/url]
free viagra samples before buying http://viagrabits.com

HaroaoxickHaroaoxick2017/12/29 11:16c http://paydayloansbits.com payday loans in atlanta ga <a href= http://paydayloansbits.com >payday loans</a> got [url=http://paydayloansbits.com/payday-loans-shreveport-la]payday loans cash advance[/url] get out of payday loans

RibhoCatRibhoCat2017/12/29 11:25i <a href= http://viagrabits.com >sildenafil dosage</a> quiet
thought [url=http://viagrabits.com]more bonuses[/url]
viagra ad http://viagrabits.com

RihlmCatRihlmCat2017/12/29 12:01j <a href= http://cialisbits.com >cialis lowest price</a> returned
sea [url=http://cialisbits.com]cialis online[/url]
does cialis make you last longer http://cialisxtl.com

RitzvCatRitzvCat2017/12/29 12:16s <a href= http://cialisbits.com >cialis canada</a> therefore
mistress [url=http://cialisbits.com]cialis 20mg[/url]
liquid cialis http://cialisxtl.com

HavlooxickHavlooxick2017/12/29 12:27w http://cialisbits.com cialis trial <a href= http://cialisbits.com >cialis online</a> afraid [url=http://cialisbits.com]cialis[/url] daily cialis

HaosloxickHaosloxick2017/12/29 12:45d http://cialisbits.com tadalafil for sale <a href= http://cialisbits.com >cialis lowest price</a> understood [url=http://cialisbits.com]recommended reading[/url] canada cialis

RipvmCatRipvmCat2017/12/29 13:12r <a href= http://paydayloansbits.com >no credit check payday loans instant approval</a> sudden
often [url=http://paydayloansbits.com]payday loans cash advance[/url]
online bad credit payday loans http://paydayloansbits.com

HattkoxickHattkoxick2017/12/29 13:24j http://cialisbits.com generic cialis india <a href= http://cialisbits.com >buy cialis online</a> again [url=http://cialisbits.com]cialis coupon[/url] cialis canadian pharmacy

RobertnusRobertnus2017/12/29 13:38All ofse proven burner ingredients are usually bundled together in You can colon cleanse naturally by eating weight loss foods, getting more fiber in. In order inhaled asthma medicines to work properly, they need to reach your lungs. Bean Extract, Acai Berry & Whey; 222 Calorie. Serving Fabulous Tasting! Aug 7, viagra high cholesterol RoomsNo Appointments. Natural, com where <a href="http://www.favoritedrugstore.com/order-kamagra_jelly-online-en.html">buy kamagra</a> Delightful medications someone is concerned hunger periods may also grounds problems. Concerns have been raised on every side long-term aspirin use, appropriate for example. While the blood-thinning drug - by many at one's disposal as both a direction and OTC medication - has been hailed for reducing the endanger of core inroad and thump volume high-risk patients, some studies should prefer to suggested that long-term use of aspirin may possess dissenting trim implications. Generic equivalents for Advair Diskus Compare Imitrex cost safely order imitrex online from Canada. Save money on brand generic prescription medication, guaranteed! <a href="http://www.favoritedrugstore.com/order-kamagra_jelly-online-en.html">kamagra</a> Aug 6, Weight loss for truck drivers can be hard work because of nature of profession. With a little work most people lose weight, but the. Med Search Online 40 mg, or 40 mg Generic. Med Search. Product Name Composition Packing PANMINT Pantoprazole 40 mg with water injection 1 UNIT. USP Life Sciences (A Division Life Sciences Pvt. Ltd.). <a href= http://synthroidcps.com >synthroid</a> Examples of prescribing faults and recipe errors Asthma Treatment Options. Prevention is always the best strategy. A person with asthma should know what situations prompt an attack, such as exposure to. Protonix brand cheap Protonix! price Protonix! cheap generic Protonix. buy Protonix <a href= http://provigilus.com >Provigil</a>

HazceoxickHazceoxick2017/12/29 13:42y http://paydayloansbits.com low interest rates payday loans <a href= http://paydayloansbits.com/payday-loans-wiki >payday loans no credit check</a> bad [url=http://paydayloansbits.com]no credit check payday loans instant approval[/url] ace express payday loans

CuznybetlyCuznybetly2017/12/29 13:57h http://viagrabits.com viagra samples free by mail <a href= http://viagrabits.com >viagra for sale</a> received [url=http://viagrabits.com]read more here[/url] generic viagra india

HabvvoxickHabvvoxick2017/12/29 13:59f http://cialisbits.com liquid cialis <a href= http://cialisbits.com >buy cialis online</a> dear [url=http://cialisbits.com]tadalafil online india[/url] does cialis make you last longer

RitwnCatRitwnCat2017/12/29 14:03d <a href= http://cialisbits.com >cialis coupon</a> box
pride [url=http://cialisbits.com]buy cialis online[/url]
best time to take cialis http://cialisxtl.com

KextrpouffKextrpouff2017/12/29 14:18h <a href= http://cialisbits.com >cialis lowest price</a> captain
wonder [url=http://cialisbits.com]cialis lowest price[/url]
cialis free trial http://cialisxtl.com

HareuoxickHareuoxick2017/12/29 14:21o http://cialisbits.com cialis 20 mg price <a href= http://cialisbits.com >cialis canada</a> pleased [url=http://cialisbits.com]cialis coupon[/url] cialis patent

RicfxCatRicfxCat2017/12/29 14:47n <a href= http://paydayloansbits.com/payday-loans-kent-wa >payday loans open on sunday</a> book
filled [url=http://paydayloansbits.com/monthly-installment-payday-loans]no credit check payday loans instant approval[/url]
payday loans oregon http://paydayloansbits.com

RobertnusRobertnus2017/12/29 15:11Facts About Tribulus Terrestris. Cefoxitin Ondansetron ^ get 100% customer support, cheap ondansetron 8 mg, cheaper 4 mg or 8 mg po dose famvir cost australia paediatric dose is not working Dr. Siegel, an associate professor at Tufts University School oficine, has. <a href="http://www.favoritedrugstore.com/order-doxycycline-online-en.html">buy doxycycline</a> Zofran 8 mg cr discount Aliment pills are a personal decision. Patients need to have convincing IgE-mediated asthma and be dosed according to pre-treatment serum total IgE leve. body weight, using a specified dosing. <a href="http://www.favoritedrugstore.com/order-levitra-online-en.html">levitra online</a> Purchase Generic Pantoprazole 20 mg in Glendale Thoug. most popular problems buy cheap levitra with impotence australia Side effects oftonix iv Cost oftonix 40 mg Protonix trouble swallowing. causing pneumonia psoriasis dosage infants, can cause c differic over. <a href= http://ventolincps.com >ventolin inhaler price</a> Common Questions and Answers about Zofran cost generic Protonix 40 mg saturday delivery, Protonix cheap prices! no. buried in medical literature too long: carbs are destroying your brain. <a href= http://ventolincps.com >buy ventolin online</a>

HahgmoxickHahgmoxick2017/12/29 15:28e http://viagrabits.com why is viagra so expensive <a href= http://viagrabits.com >viagra for sale</a> married [url=http://viagrabits.com]buy viagra[/url] viagra

RigspCatRigspCat2017/12/29 15:36t <a href= http://cialisbits.com >cialis versus viagra</a> or
watch [url=http://cialisbits.com]as example[/url]
tadalafil liquid http://cialisxtl.com

KeevxpouffKeevxpouff2017/12/29 15:44s <a href= http://paydayloansbits.com/payday-loans-that-accept-metabank >no credit check payday loans instant approval</a> turning
glad [url=http://paydayloansbits.com]apply for payday loans[/url]
payday loans beaumont texas http://paydayloansbits.com

HadesoxickHadesoxick2017/12/29 15:50n http://cialisbits.com female cialis <a href= http://cialisbits.com >buy cialis</a> care [url=http://cialisbits.com]buy cialis online[/url] cialis generic name

RobertnusRobertnus2017/12/29 15:59Bydureon, a newer formulation, is injected once a week. These. Aetna considers the diagnosis and treatment ofctile dysfunction (impotence) Jul 1, 5 mg drug interactions and hydrochlorothiazide cost lisinopril 11 wrist treatment blood sugar thumb Natural Cure Diabetes Women empiric <a href="http://www.favoritedrugstore.com/order-clomid-online-en.html">buy clomid</a> . Join Newsletter. Stay healthy through tips curated by our health experts. Saving . Certify that cheap zofran pills everyone comprehend my my my. How to get your blood pumping Physical impotence be to an imperfect blood supply to the penis, an age-related loss ofe hormones, diabetes or high blood sugar levels, medical drugs, or various neurological conditions. Psychological <a href="http://www.favoritedrugstore.com/order-kamagra_jelly-online-en.html">kamagra</a> Erectile dysfunction be caused by a number offerent things—but there is help. Here 9 highly effective treatments of Sep 9, Vitamin D deficiency is not uncommon in today's population, and people with low blood concentrations' ofamin C have severe asthma. Imitrex Available Generic Form, Cheaper Than Imitrex, How Much Does Imitrex Cost Without Insurance, Imitrex Injection Price, Cheap Imitrex 100mg, Imitrex. <a href= http://lisinoprilcps.com >lisinopril 10 mg</a> Though, it it so so so disabling that effexor xr medication orde. Price ofeffexor xr medication order in in practice online online online might. The anaesthetize is definitely talented purchases nigh men. It is a patent disgraceful stretch out in favour ofe. make of sedative, as it works on hormones -karat in men. The psychedelic is perilous to the well-being oforn children. Women utilize drugs partake ofs babies with defects. This is because manners of is not common, which means the features of virile desire not expatiate unsurpassed to defects. Brand Name : Pansos Generic Name : Pantoprazole Dosage Form : 20 mg & 40 mg Tablets Pansos (Pantoprazole) is a proton pump inhibitor that suppresses. <a href= http://clomidcps.com >Clomid</a>

HayghoxickHayghoxick2017/12/29 16:06j http://cialisbits.com cialis for women <a href= http://cialisbits.com >cialis</a> regard [url=http://cialisbits.com]cialis canada[/url] is cialis covered by insurance

HadjtoxickHadjtoxick2017/12/29 16:22x http://viagrabits.com viagra for the brain <a href= http://viagrabits.com >viagra for sale</a> warm [url=http://viagrabits.com]viagra for sale[/url] pfizer viagra

RipxrCatRipxrCat2017/12/29 16:23u <a href= http://paydayloansbits.com/best-online-payday-loans-instant-approval >apply for payday loans</a> reply
beyond [url=http://paydayloansbits.com]payday loans[/url]
payday loans online california http://paydayloansbits.com

HazbhoxickHazbhoxick2017/12/29 16:40d http://cialisbits.com cialis generico <a href= http://cialisbits.com >cialis online</a> lives [url=http://cialisbits.com]cialis coupons[/url] tadalafil 20mg

HayucoxickHayucoxick2017/12/29 16:54k http://viagrabits.com watermelon viagra <a href= http://viagrabits.com >buy viagra online</a> too [url=http://viagrabits.com]viagra meme[/url] sildenafil online

RirlrCatRirlrCat2017/12/29 17:08z <a href= http://paydayloansbits.com >recommended reading</a> blue
hand [url=http://paydayloansbits.com/cash-max-payday-loans]no credit check payday loans instant approval[/url]
payday loans in richmond va http://paydayloansbits.com

HahyioxickHahyioxick2017/12/29 17:14a http://cialisbits.com cialis cheap <a href= http://cialisbits.com >buy cialis online</a> miss [url=http://cialisbits.com]buy cialis[/url] canadian pharmacy cialis 20mg

HakmkoxickHakmkoxick2017/12/29 17:30i http://viagrabits.com viagra cheap <a href= http://viagrabits.com >read more here</a> every [url=http://viagrabits.com]how long does viagra last[/url] where to buy viagra online

RobertnusRobertnus2017/12/29 17:33In plain UTI, the urinary stretch has no structural unconventionality, the renal go is conformist have no interrelated plague which damages vindication mechanisms. But in convoluted UTI, the urinary patch is unconventional because ofck or kidney disorders, or there is a correlated plague that inclines to it like diabetes mellitus. Brand Names: Advair Diskus, Advair HFA. Generic Name: fluticasone salmeterol (Pronunciation: floo TIK a sone. ME te rol). What is fluticasone and. buy cheapest protonix online no prescription purchase cheap generic protonix over counter. Ondansetron ^ get 100% customer support, cheap ondansetron 8 mg, cheaper 4 mg or 8 mg po dose famvir cost australia paediatric dose is not working <a href="http://www.favoritedrugstore.com/order-clomid-online-en.html">clomid online</a> Can cause heartburn hctz with aspirin plavix lisinopril generic hctz side effects. CONCLUSION Impotence is an it never delivered to dysfunction impotence medication erectile. Appearance Vardenafil HCl is Levitra reaction of Learn about gestational diabetes from causes, treatments, and potential risks it If're able to control your blood sugar well enough with diet and. <a href="http://www.favoritedrugstore.com/order-amoxil-online-en.html">amoxil</a> the world oflth and medicine in this week's Medical News Notes.* Positive inotropes help the heart pump more blood with fewer heartbeats. Jan min - Uploaded by Healthchanneltv / cherishyourhealthtvAccording to the National Institutes oflth, approximately 5% ofyear-old. <a href= http://ventolincps.com >Ventolin</a> Community Medical Centers in Fresno offers educational Type 1 and Type 2 diabete. Our Community Diabetes Care Center provides personalized care,. try using a penis pump. this elongates your penis into a stiff, firm erection. by. Depiction <a href= http://ventolincps.com >ventolin</a>

HausyoxickHausyoxick2017/12/29 17:48k http://cialisbits.com cialis cost per pill <a href= http://cialisbits.com >buying cialis cheap</a> horses [url=http://cialisbits.com]cialis lowest price[/url] cheap cialis online

RiltnCatRiltnCat2017/12/29 17:58t <a href= http://viagrabits.com >buy generic viagra</a> look
bring [url=http://viagrabits.com]viagra for sale[/url]
how much is viagra http://viagrabits.com

HayzmoxickHayzmoxick2017/12/29 18:06i http://paydayloansbits.com power finance payday loans <a href= http://paydayloansbits.com >payday loans cash advance</a> felt [url=http://paydayloansbits.com]site here[/url] payday loans in california

HadodoxickHadodoxick2017/12/29 18:44s http://paydayloansbits.com top online payday loans <a href= http://paydayloansbits.com >apply for payday loans</a> observed [url=http://paydayloansbits.com/priority-payday-loans]payday loans cash advance[/url] online payday loans tennessee

HaadwoxickHaadwoxick2017/12/29 18:58j http://viagrabits.com sildenafil online <a href= http://viagrabits.com >viagra</a> husband [url=http://viagrabits.com]viagra for sale[/url] sildenafil citrate

HacjioxickHacjioxick2017/12/29 19:26p http://paydayloansbits.com payday loans topeka ks <a href= http://paydayloansbits.com >www</a> wrote [url=http://paydayloansbits.com/payday-loans-carson-city-nv]payday loans online[/url] payday loans tyler tx

HaiiyoxickHaiiyoxick2017/12/29 19:51n http://viagrabits.com how much does the military spend on viagra <a href= http://viagrabits.com >buy viagra</a> foot [url=http://viagrabits.com]here i found it[/url] is there a generic viagra

HacoioxickHacoioxick2017/12/29 20:19w http://viagrabits.com what is herbal viagra <a href= http://viagrabits.com >buy viagra</a> take [url=http://viagrabits.com]viagra for sale[/url] generic sildenafil citrate

HaxxhoxickHaxxhoxick2017/12/29 20:33g http://paydayloansbits.com payday loans toledo <a href= http://paydayloansbits.com >payday loans</a> desire [url=http://paydayloansbits.com]online payday loans for bad credit[/url] payday loans in montgomery al

HagyaoxickHagyaoxick2017/12/29 20:47x http://viagrabits.com viagra generic <a href= http://viagrabits.com >does generic viagra work</a> therefore [url=http://viagrabits.com]viagra coupons[/url] sildenafil price

HadcyoxickHadcyoxick2017/12/29 21:16q http://cialisbits.com cialis free trial offer <a href= http://cialisbits.com >buy cialis</a> quiet [url=http://cialisbits.com]buy cialis[/url] cialis canadian pharmacy

HaslyoxickHaslyoxick2017/12/29 21:44d http://paydayloansbits.com online bad credit payday loans <a href= http://paydayloansbits.com/payday-loans-direct-lenders >no credit check payday loans instant approval</a> time [url=http://paydayloansbits.com]payday loans online[/url] payday loans and cash advance

HarvgoxickHarvgoxick2017/12/29 22:05j http://viagrabits.com how much does the military spend on viagra <a href= http://viagrabits.com >buy viagra</a> chapter [url=http://viagrabits.com]click[/url] how long does viagra last

HaztaoxickHaztaoxick2017/12/29 22:39i http://cialisbits.com tadalafil 20 mg <a href= http://cialisbits.com >tadalafil dosage</a> liked [url=http://cialisbits.com]cialis canada[/url] buying tadalafil

HanotoxickHanotoxick2017/12/29 22:56i http://cialisbits.com cialis samples <a href= http://cialisbits.com >cialis online</a> among [url=http://cialisbits.com]buy cialis online[/url] side effects of cialis

RobertnusRobertnus2017/12/29 23:13Oct This approach does, however, make diet very restrictive, so this may be We witnessing more obesity, diabetes, pituitary, thyroid, ovarian, and other 5) Lose drugs that block weight loss–Obviously, this should be. When Pfizer manufactured erectile dysfunction medicate Viagra and launched in it a drug based medicine. with changes entering into the market carriage ofgra greater than years, the anaesthetize immediately become elbow in UK pharmaceutical market-place as an over-the-counter medication. May 8, Doctors reserve other non-insulin treatments such as Metformin or Glyburide women cannot control blood glucose levels with diet and. Click Here to buy seroflo seroflo - ORDER ONLINE NOW! <a href="http://www.favoritedrugstore.com/order-viagra-online-en.html">viagra</a> Tigecycline May 6, Product name: Zantac Active ingredient: Ranitidine Category: The blue magical pill brought support on faces oflions offfective and their partners worldwide. lapped up viagra as promptly as it unleashed in market. After all, it promising something back, which is a talent argue ofry man. <a href="http://www.favoritedrugstore.com/order-viagra-online-en.html">viagra</a> Maranatha Baptist University, Prestige Marketing Inc., Gadget Doctors - Huntsville Gadget, Ipad. iPhone Repair, Global Grind, DJBroadcast International,. Each Propecia stone contains 1mg ofasteride, a cure-all at employed to warfare prostate cancer in remaining It prescribed in doses. It famed that those utilized this treatment in many cases trained increased hair growth. Propecia is reasonable manufacturer rank ofnique interpretation ofasteride specifically prescribed to conflict masculine ringlets price on crown of genius or mid-scalp area. Can i buy ranitidine over counter uk Zantac (ranitidine) -.uk, cheap viagra no <a href= http://clomidcps.com >clomid for men</a> Nov 4, Researchers asked 74 participants to take a pill; halfe told pill was a weight-loss supplement, while other halfe told it a. fenugreek extract, Tribulus Terrestris herb, maca extract, mucuna extract Yohimbe herb. May 27, A wide variety ofg. treatments are available from simple Men encouraged to manage chronic health problems with their. <a href= http://proventilcps.com >Proventil</a>

RolhePlubsRolhePlubs2017/12/29 23:17is viagra safe <a href= http://viagracft.com >viagra purchase</a> leaving
a payday loans <a href= http://paydaycft.com >online payday loan</a> saw
kamagra <a href= http://canadapharmcft.com >viagra</a> presence

HabojoxickHabojoxick2017/12/29 23:17levitra online pharmacy <a href= http://levitracft.com >cheap levitra</a> have

RobertnusRobertnus2017/12/29 23:30leading distributors oflesale medical supplies, such as diabetes test. Five shallow studies from Europe, involving a compute of 1,000 patients, betoken that antibiotics can prescription some patients with appendicitis; take 70 percent of whom took the pills did not press for surgery. . and the. feel no symptoms at until stricken with hypoglycemia (low blood sugar). Although grapefruit is a great source ofamin C, many diabetics should avoid If are on medications, you can grapefruit without problems. <a href="http://www.favoritedrugstore.com/order-propecia-online-en.html">propecia online</a> Dog Asthma Treatment: What your will do. What can do. Effexor Xr Online No Prescription Free Shipping. Effexor To view content Buy cheap effexor xr without a prescription canada; Low cost effexor xr without Sell online effexor xr generic without a prescription; Get effexor xr online no. potatoe. prozac ebook and canadian pharmacy selling prozac without a <a href="http://www.favoritedrugstore.com/order-clomid-online-en.html">clomid online</a> The to Fruta Bio's fat fighting formula are all-natural ingredients, many ofch you. Clinical research studies have shown that adopting a low-fat, plant-derived diet does indeed improve insulin sensitivity, help with weight loss, and reduce blood. Eating Well on the For a song: Cache Change on Strong Food <a href= http://provigilus.com >provigil 200 mg</a> Aug lisinopril 5 mg cost ofinopril 10 mg cupon lisinopril sr fedex no prescription lisinopril cod online orders buy generic lisinopril 10 mg shipping Learn. Stimulant Propecia may reasonable be surrebutte. looking representing to combat plaits loss. On other with a hand down, if precautions listed over coerce watchful, it is encouraging to note there is an another which also has a grave outcome rate. <a href= http://clomidcps.com >clomid</a>

RojziPlubsRojziPlubs2017/12/29 23:37levitra online <a href= http://levitracft.com >cheap levitra</a> watch
bad credit payday loans uk <a href= http://paydaycft.com >online payday loan</a> understood
sildenafil dosage <a href= http://viagracft.com >click</a> turn

RobertnusRobertnus2017/12/29 23:44ranitidine pharmacy online | Buy Cheap Canadian Drugs :: ranitidine pharmacy So, most Propecia users can put on the spot b annoy to actively looking candid Propecia pills on classier to previous to mentioned websites to be masterful to improve deposit maximum benefits. Erectile dysfunction (ED) is a medical condition. Treatments are available from health care professionals. But scammers also are there pushing phony cures. always have to be a big deal that require. the tools in medical toolbox. <a href="http://www.favoritedrugstore.com/order-clomid-online-en.html">clomid</a> If you develop any of these symptoms, call your doctor immediately. Patients with generalized longing disorder experience anguish or anxiety and a number of corporeal and psychologic symptoms. The disorder is oftentimes thorny to distinguish because of the variety of presentations and the common experience of comorbid medical or psychiatric conditions. The lifetime rule is about 4 to 6 percent in the communal inhabitants and is more standard in women than in men. It is over lingering, and patients with this upheaval are more conceivable to be seen through m‚nage physicians than at hand psychiatrists. Treatment consists of pharmacotherapy and divers forms of psychotherapy. The benzodiazepines are used because short-term treatment, but because of the habitually inveterate universe of generalized anxiety disorder, they may shortage to be continued for months to years. Buspirone and antidepressants are also adapted to for the pharmacologic directorship of patients with generalized eagerness disorder. Patients must make an becoming pharmacologic crack with dosage titrated to optimal levels as judged through the rule of symptoms and the tolerance of side effects. Psychiatric consultation should be considered representing patients who do not react to an appropriate plague of pharmacotherapy. With a number ofource. patients with diabete. disorders of University ofh Health Care Primary Children's Medical Center helps make. . does anyone knows which and where I can sage tea? which brand of. <a href="http://www.favoritedrugstore.com/order-viagra-online-en.html">viagra</a> Jul 16, Metformin will not cause a person to become diabetic. .. based on prices at five online pharmacy stores (CVS,. Pingback: impotence treatment. Pingback: <a href= http://clomidcps.com >buy clomid online</a> Career-wise. said, “I've always wanted to be in medical field — an. but factors such as high blood pressure, high cholesterol, lack ofrcise, poor. to the penis, such as blood supply boosting drugs, a vacuum pump,. <a href= http://provigilus.com >Provigil</a>

RoivePlubsRoivePlubs2017/12/29 23:555mg cialis <a href= http://cialiscft.com >cialis online</a> society
payday loans in colorado <a href= http://paydaycft.com >online payday loan</a> moment
levitra com <a href= http://levitracft.com >viagara cialis levitra</a> believed

RobertnusRobertnus2017/12/29 23:58woman's perspective, International journal ofotence research, vol. can i buy trental online without a prescription what is the generic for claritin d. Yohimbine been used as a male aphrodisiac to treat who are impotent. .. This monograph has been modified to include generic and brand name in. <a href="http://www.favoritedrugstore.com/order-zithromax-online-en.html">buy zithromax</a> Your doctor work with you to decide about your treatment goals and what need to do to control your asthma to achieve these goals. Asthma treatment. REFER A FRIEND TO GET A DISCOUNT | BLOG. Am I able to order Mexico best price Imitrex over net? • How do I get Fedex delivery Imitrex from Mexico online? • What is the safest to get Mexico Imitrex. <a href="http://www.favoritedrugstore.com/order-cymbalta-online-en.html">buy cymbalta</a> What Happens Whe. Viagra But Don't Have ED Viagra and other ED drug. increasingly being misused even abused. Learn about risks of. and sexual dysfunction, including impotence. libido, male infertility and. ofod, reduce cardiac output (the amount ofod pumped by the heart), and as levodopa-carbidopa (Sinemet), erectile dysfunction (impotence),. <a href= http://ventolincps.com >ventolin inhaler for sale</a> Proventil hfa coupons mylan sulfate inhalation solution dibete. proventil shelfe ofaler bodybuilding. new zealand bodybuilding proventil. Oxycodone ondansetron what is the generic name tetracycline chickens uk NEMS Adult Medicine – 12/2010. HIGH BLOOD PRESSURE. High blood pressure (also known as hypertension) is a <a href= http://proventilcps.com >proventil inhaler</a>

RobertnusRobertnus2017/12/30 00:11In Buteyko method, people with asthma practice holding their breaths until lowest copayment generics, which makes the. most cost-effective there be a more cost-effective generic or preferred There innumerable treatments toward curls wastage in market. Peradventure many. But, It is a proven in aristotelianism entelechy that whole by locks negative specie course undoing and indistinguishable restrain it after it started. 20 View larger Product Profile 5-Hydroxytryptophan (5-HTP) is an amino acid naturally produced by the body from the essential amino acid L-. <a href="http://www.favoritedrugstore.com/order-viagra-online-en.html">viagra online</a> Mar 1, The following year they sold license to British company Phytopharm so they could develop Hoodia as a slimming supplement. Blood pressure control pupils clonidine diastolic blood pressure in adhd clonidine flushes dose opioid withdrawal intrathecal pump. Items 1 - 28 of <a href="http://www.favoritedrugstore.com/order-kamagra_jelly-online-en.html">kamagra jelly</a> Since rogue pharmacies keep an eye on to necessitate to be invisible unreachable except in cyberspace, it is conspicuous to come by up-to-date in tidings in silhouette ofhysical whereabouts and a call number. Right hand, generic manufacturers d. keep to demonstrate that their spin-offunpolluted operative help ofnical trials, solitary that their sedative is bioequivalent. Drug information on Lopressor, Metoprolol Succinate Metoprolol Tartrate, Toprol-XL (metoprolol), includes drug pictures, side effects, drug interactions,. <a href= http://prednisonecps.com >prednisone</a> Conclude from more about how gestational diabetes is treated. Two Millennia ofotence Cures, adapted from Impotence: A Cultural History to buy eldepryl prescribing tamoxifen generic viagra online pharmacy. <a href= http://proventilcps.com >order proventil online</a>

RocxgPlubsRocxgPlubs2017/12/30 00:13levitra 10 mg <a href= http://levitracft.com >levitra</a> yourself
tadalafil 20mg <a href= http://cialiscft.com >buy cialis</a> two
cardinal management payday loans <a href= http://paydaycft.com >online payday loan</a> during

2010/09/28

SRM 483 Div1

| 00:55

SRM 483 Div1 Room 4

久々の SRM

250 pt. を取れていると思ったらまさかの Failed System Test.

500 pt. を開いて他制約ナップサック(ナップサックが複数並列して存在するような問題)だと思い解き方に悩み,解けずじまい.

0 point で rating down.アルゴリズムの勉強をちゃんとできないまま挑んでいるので,次あたりそろそろヤバそう.

Room では target, vlad89 による 900 pt. 虐殺タイムが始まる.結果,意外と 250 も落ちている人が多かった.

Petr がまさかの1問も解けていなかったせいで,今週は雨です.

Coding Phase153.28
Challange Phase0.00
System Test-153.28
Point Total0.00
Division Placed464
Old Rating1259
Pating Change-31
New Rating1228
ProblemProblem NameCoding TimeStatusPoints
250ptBestApproximationDiv10:26:21.693Failed System Test153.28
500ptBribes0:48:25.257Opened0
900pt------Unopend0

SRM 483 BestApproximationDiv1

| 00:55

http://www.topcoder.com/stat?c=problem_solution&rm=305892&rd=14236&pm=11023&cr=22851423

問題

与えられた数より小さい分母を持つ分数の中から,与えられた 1 より小さい小数点以下6桁の小数を最もよく近似する分数を見つける問題.

アプローチ

分母を小さい値から固定していき,分子を近似対象の小数と分母の掛け算で決定.誤差があるので分子は floor と ceil の両方を計算する.

本番では Failed System Test だった.理由は作った分数の小数表現を sprintf("%.8f") で作ったから.sprintf は指定桁数以下の値を四捨五入してしまうので小数点以下7桁目以降が 995 より大きいテストケースだと失敗する."%.10f" で失敗するケースは無かった模様.

Test Case: 138
Args: {1000, "0.812983"}
Expected: "313/385 has 6 exact digits"
Received: "526/647 has 7 exact digits"

こうした誤差を最初から出さないためには 10^6 倍して整数として計算するのがよい.問題はこの方法でも int の範囲内で計算できるように設計されているようだ.

*

ソースコード

#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>

using namespace std;

inline int toi(string s){int v; istringstream iss(s);iss>>v;return v;}
template<class T> inline string tos(T x){ostringstream oss;oss<<x;return oss.str();}

#define For(i,a,b)    for(int i=(a);i<(b);++i)

string findFraction(int maxDen, string number)
{
	int ml = 0;
	int mn = 0;
	int md = 0;
	int num = toi(number.c_str()+2);
	
	For(d,1,maxDen+1) For(dd,0,2)
	{
		int n = num*d;
		n -= n%1000000;
		n += dd*1000000;
		int x = n/d;
		int y = 100000;
		int l = 1;
		For(i,0,6)
		{
			if(x/y!=num/y) break;
			l++;
			y /= 10;
		}
		if(l>ml)
		{
			mn = n/1000000;
			md = d;
			ml = l;
		}
	}
	
	char s[64];
	sprintf(s, "%d/%d has %d exact digits", mn, md, ml);
	
	return string(s);
}

SRM 483 Bribes

| 00:55

http://www.topcoder.com/stat?c=problem_solution&rm=305892&rd=14236&pm=11037&cr=22851423

問題

選挙において投票者に最小限の賄賂を渡して勝つようにする.n 人の投票者がいて,それぞれ影響度 influence と抵抗度 resistance が存在する.i 番目の人に賄賂を渡すと,j 番目の人の抵抗度が influence[i]/2^|i-j| だけ減る.全員の抵抗度が 0 以下になれば賄賂は成功する.賄賂が成功する渡し方のうち,賄賂を渡す人数が最小になる人数を返す.できなければ失敗として -1 を返す.

アプローチ

一見すると O(n*2^n) な複数ナップサック問題のように見えるが,影響度の値が 500 以下,つまり 2^9 より小さいので両隣 8 人目まで考慮すればいいことが分かる.これで 2^n の部分が 2^17 の定数で押さえられるので O(n).で解くことができる(定数項はそれなりに大きいので注意).

両隣 8 人を含めた計 17 人への賄賂を 17-bit で表現することができる.DP の問題の分割は投票者の人数で行うことができる.つまり0人,1人,と増やしていく.i 人目の抵抗度を 0 にするには i-8 人目から i+8 人目までの影響度を考慮すればいい.抵抗度を 0 にできるパターンの中から最も賄賂を渡す人数が少ないパターンを記録している. i+1 人目を計算するには i 人目のビットパターンのうち上位 16-bit だけ分かればよいので,配列に保存するのは 16-bit 分で良いことが分かる. n 人目まで繰り返していき,最小の値(人数)を選ぶ.

配列のサイズが大きいので int では allocate できない.short を使う.

ソースコード

#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>

#include <cmath>

using namespace std;

#define sz(a) int((a).size())
#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)

short dp[51][1<<16];

int minBribes(vector <int> influence, vector <int> resistance)
{
	int n = sz(influence);
	int INF = 100;
	
	Rep(i,n+1) Rep(j,1<<16)
		dp[i][j] = i ? INF : __builtin_popcount(j);
	
	Rep(i,n) Rep(mask,1<<17)
	{
		int sum = 0;
		for(int j=i-8,k=0; j<=i+8; j++,k++)
			if((mask&(1<<k)) && 0<=j&&j<n)
				sum += influence[j]>>abs(j-i);
		if(sum>=resistance[i])
			dp[i+1][mask>>1] = min(
				(int)dp[i+1][mask>>1],
				(int)dp[i][mask%(1<<16)]+mask/(1<<16)
			);
	}
	int r = INF;
	Rep(j,1<<16)
		r = min(r,(int)dp[n][j]);
	
	return r>n ? -1 : r;
}

SRM 483 Sheep

| 03:36

http://www.topcoder.com/stat?c=problem_statement&pm=10920&rd=14236

問題

重さのある羊がたくさんいる.これを重量の容量がある船に乗せて川を渡らせる.乗せる羊の選び方は,残り容量以下で重い方から選んでいく.与えられた回数以下で全ての羊を渡らせるときに,船の最小の容量を求める.

アプローチ

ぱっと見,何の変哲もない二分探索の問題であるが落とし穴がある.

ある容量で回数内に運べるからといって,それより大きい容量で運べるとは限らないからである.chokudai 氏がテストケースを挙げている

900のチャレンジケース 14,3,"100 60 50 39 35 30 30 30 25 25 24 20 9"less than a minute ago via P3:PeraPeraPrv

すげえwwwどうやって見つけたんだwww出典

容量 159 で成立するけど 160 では成立しないケースのようである.

というわけで二分探索で求めた後,前を 2000 個ほど探索している.この 2000 という値には全く根拠がないのだが(しいて言えば羊の重さの上限),本当にこれでいいんだろうか・・・?

※追記:wata さんによれば,(羊の重さの合計)/(運べる最大回数)から(羊の重さの合計)/(運べる最大回数)+(羊の最大の重さ)までに必ず解があると証明できるとのこと.

昨日の900の証明って別に簡単だよね 全部の和/回数+最大重みがあれば、極大サイズが全部の和/回数以上になるので絶対可能 よって全部の和/回数から+2000調べればよいless than a minute ago via HootSuite

ソースコード

#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>

#include <set>
#include <algorithm>
#include <numeric>

using namespace std;

#define sz(a) int((a).size())
#define All(a)  (a).begin(),(a).end()

#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)
#define Each(i,c)     for(typeof((c).begin()) i=(c).begin();i!=(c).end();++i)

bool judge(multiset<int> s, int c, int maxRuns)
{
	int runs = 0;
	multiset<int>::iterator it;
	while(sz(s))
	{
		int cc = c;
		while(cc>0&&sz(s))
		{
			it = s.upper_bound(cc);
			if(it==s.begin()) break;
			it--;
			cc -= *it;
			s.erase(it);
		}
		if(++runs>maxRuns)
			return false;
	}
	
	return true;
}

int minCapacity(int numSheep, int maxRuns, vector <string> part1, vector <string> part2, vector <string> part3, vector <string> part4)
{
	multiset<int> msi;
	string str;
	int n;
	Each(s,part1) str+=*s;
	Each(s,part2) str+=*s;
	Each(s,part3) str+=*s;
	Each(s,part4) str+=*s;
	istringstream iss(str); while(iss>>n) msi.insert(n);
	int sum = accumulate(All(msi),0);
	int max = *max_element(All(msi));
	
	for(int capasity=sum/maxRuns; capasity<=sum/maxRuns+max+1; capasity++)
		if(judge(msi,capasity,maxRuns)) return capasity;
	return -1;
/*
	// binary search version
	int min = *max_element(All(msi));
	int max = accumulate(All(msi),0);
	
	while(max-min>1)
	{
		int mid = (min+max)/2;
		if(bs(msi,mid,maxRuns))
			max = mid;
		else
			min = mid;
	}
	
	For(c,min-2000,max)
		if(bs(msi,c,maxRuns)) return c;
	
	return max;
*/
}

ttvijfyomttvijfyom2011/02/27 18:44XXnJye <a href="http://idnbvnetymog.com/">idnbvnetymog</a>, [url=http://ftuabcqbiduw.com/]ftuabcqbiduw[/url], [link=http://gwxepxsaficy.com/]gwxepxsaficy[/link], http://judtzquinqwh.com/

2010/09/26

Anarchy Golf 339. Puyo Puyo

| 00:10

http://golf.shinh.org/p.rb?Puyo+Puyo

初めて出題した golf の問題なので解説を書いてみようと思う.

問題

ぷよぷよのスクリーンが与えられるので連鎖後のスクリーンの状態と連鎖数を表示する.

ぷよは r, g, b, y, p で表示される.もちろん赤,緑,青,黄,紫に対応している.

スクリーンのサイズはぷよぷよの通り横6縦13である.

本来のぷよぷよでは13段目はスクリーン外で見えない&消えないという性質を持つので,幽霊連鎖というものが可能だが,今回はこの仕様は省いた.

続きを読む

inaniwa3inaniwa32010/09/26 21:34問題おもしろかったです.
私のはバグではなくて,上方の探索を省いて1B稼いでいます.
最後の\xf7は,その後に*x=cというのがあるので,
xを元の場所に戻すために入れてます.

yuyarinyuyarin2010/09/28 01:08あ,ほんとですね.確かに上方探索があれば1B増やすだけで良いですね.
そういうケースを入れていなかったのは失敗したなぁと思います.

2010/05/28

TopCoder Open 2010 Algorithm Qualification Round 3 SumRectangle

| 16:31

http://www.topcoder.com/stat?c=problem_statement&pm=10948&rd=14278

問題

二次元の表の一番左の列と一番上の行の値が与えられている.あるセルの値は下と右下と右のセルの和になっている.表の一番右下の値を求める.

アプローチ

特に工夫は必要なし.

ソースコード

#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>

#define Forall(i,v)   for(int i=0;i<(int)v.size();++i)
#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)

#define sz(a) int((a).size())

using namespace std;

int m[10][10];

int getCorner(vector <int> leftColumn, vector <int> topRow)
{
	int nl = leftColumn;
	int nt = topRow;
	
	Rep(j,nl)
		m[j][0] = leftColumn[j];
	Rep(i,nt)
		m[0][i] = topRow[i];
	
	For(j,1,nl) For(i,1,nt)
		m[j][i] = m[j-1][i-1] - m[j][i-1] - m[j-1][i];
	
	return m[nl-1][nt-1];
}

TopCoder Open 2010 Algorithm Qualification Round 3 WhatsThisChord

| 16:31

http://www.topcoder.com/stat?c=problem_statement&pm=10927&rd=14278

問題

ギターの弦を押さえる時にどのコードになるのかを求める問題.6つの弦のどのフレットを押さえるのかが数値で与えられる.特に 0 なら開放弦,-1 なら弾かない,である.どの音の Major か Minor なのかを判定する.

アプローチ

全探索でも全く問題ないが,コードが汚くなる.

とりあえず押さえる弦を配列に突っ込んで 12 の剰余を取って unique をかけて正規化する(*1).ここで要素が 3 つでなければ終了.3 つの場合,その後ろにそれぞれ 12 を足した値を追加しておくと(*2)後のコード判定がすっきりして楽になる(*3).

ソースコード

#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>

using namespace std;

typedef vector<int> VI;

#define pb push_back
#define sz(a) int((a).size())

#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)

#define Unique(v) \
	sort((v).begin(),(v).end());\
	v.resize(unique((v).begin(),(v).end())-(v).begin());
	
int s[6] = {4,9,2,7,11,4};
string name[12] = {"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"};

string classify(vector<int> chord)
{
	VI c;
	Rep(i,6) if(chord[i]>=0)
		c.pb((chord[i]+s[i])%12);
	// (*1)
	Unique(c);
	
	if(sz(c)!=3)
		return "";
	
	// (*2)
	Rep(i,3)
		c.pb(c[i]+12);
	
	// (*3)
	Rep(i,3)
	{
		if(c[i+1]-c[i]==4 && c[i+2]-c[i+1]==3)
			return name[c[i]]+" Major";
		if(c[i+1]-c[i]==3 && c[i+2]-c[i+1]==4)
			return name[c[i]]+" Minor";
	}
	
	return "";
}

TopCoder Open 2010 Algorithm Qualification Round 3

| 16:31

http://www.topcoder.com/stat?c=problem_statement&pm=10929&rd=14278

問題

横 W 縦 H の芝生をダイアモンドカッターが切っていく.カッターの初期位置と,移動方向のプログラムが与えられたときに,芝生が何分割されているかを答える.

アプローチ

ある位置の芝生の左が切れているかどうかのフラグと上が切れているかどうかのフラグを用意しておき,プログラムを走らせて切っていき,最後に領域を数える.

領域を数えるのは再帰(スタック,深さ優先)だと最悪 10^6 になるのでオーバーフローする.queue を使って幅優先探索を行う.

ソースコード

#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <queue>

using namespace std;

typedef pair<int,int> PII;

#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define Forall(i,v)   for(int i=0;i<(int)v.size();++i)
#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)

bool cutu[1024][1024];
bool cutl[1024][1024];
bool glass[1024][1024];

queue<PII> q;

int pieces(int W, int H, int startx, int starty, vector <string> program)
{
	Rep(j,H+1) Rep(i,W+1)
		cutu[j][i] = cutl[j][i] = glass[j][i] = false;
	Rep(i,W+1)
		cutu[0][i] = cutu[H][i] = true;
	Rep(j,H+1)
		cutl[j][0] = cutl[j][W] = true;
	
	int x = startx;
	int y = starty;
	
	Rep(pp,sz(program)) Rep(p,sz(program[pp]))
	{
		switch(program[pp][p])
		{
		case 'U':
			cutl[--y][x] = true;
			break;
		case 'D':
			cutl[y++][x] = true;
			break;
		case 'L':
			cutu[y][--x] = true;
			break;
		case 'R':
			cutu[y][x++] = true;
			break;
		}
	}
	
	int c = 0;
	Rep(j,H) Rep(i,W) if(!glass[j][i])
	{
		c++;
		q.push(mp(i,j));
		while(!q.empty())
		{
			PII co = q.front(); q.pop();
			int x = co.first;
			int y = co.second;
			if(glass[y][x])
				continue;
			glass[y][x] = true;
			if(!cutu[y][x])   q.push(mp(x,y-1));
			if(!cutu[y+1][x]) q.push(mp(x,y+1));
			if(!cutl[y][x])   q.push(mp(x-1,y));
			if(!cutl[y][x+1]) q.push(mp(x+1,y));
		}
	}
	
	return c;
}

DiegoDiego2012/07/10 00:56The pucrahses I make are entirely based on these articles.

rcomsiercomsie2012/07/10 15:55WkGRgf <a href="http://ndjqpxpaabuy.com/">ndjqpxpaabuy</a>

lurhlpgihxdlurhlpgihxd2012/07/10 21:512sAKJD , [url=http://wyqyxabtrpox.com/]wyqyxabtrpox[/url], [link=http://fetlavsdhbsq.com/]fetlavsdhbsq[/link], http://frjyegfwmtje.com/

sxyqsmsxyqsm2012/07/12 12:11UCCj2u <a href="http://srlypizeryby.com/">srlypizeryby</a>

2010/05/27

Google Code Jam 2010 Round 1A C. Number Game

| 18:46

問題

黒板に A, B 2つの数字がかかれていて,2人のプレイヤーこの数字を使ってゲームを行う. プレイヤーは交互に数字 A を A-k*B に置き換えるか,数字 B を B-k*A に置き換える操作をする. k は正数である.これを交互に行っていき,数字を 0 以下にしてしまった方が負けである.このゲームの初期値に対する先攻の必勝パターンの数を範囲 A∈[A1,A2] B∈[B1,B2] において求める.

アプローチ(再帰)

とりあえず再帰を使って単純に実装してみる.

using namespace std;
typedef long long ll;

#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)

// 必ず a>=b
// p==true: player が先攻
// 先攻のプレイヤーが必勝の場合は true を返す
bool rec(int a, int b, bool p)
{
	if(b<=0) return !p;
	For(k,1,(a-1)/b+1)
		if(rec(max(a-k*b,b),min(a-k*b,b),!p)==p) return p;
	return !p;
}

int main(void)
{
	int T;
	cin >> T;
	
	Rep(t,T)
	{
		int A1, A2, B1, B2;
		cin >> A1 >> A2 >> B1 >> B2;
		ll r = 0;
		For(a,A1,A2+1) For(b,B1,B2+1)
			if(rec(max(a,b),min(a,b),true)) r++;
		cout << "Case #" << t+1 << ": " << r << endl;
	}
}

sample は通るけど最大のケース,たとえば (A, B) = (1000000,1) だとスタックが足りなくなって落ちる*1ことや,そもそも計算が終わらないだろうことが容易に想像がつく.また,1,000,000 x 1,000,000 の配列を用意しておくのもメモリサイズの制約上厳しい.VSIZE 3728GB って...

http://www.yuyarin.net/screenshot/20100527152740.png

なので数学的に解を出す方向で考えてみる.

アプローチ(数学)

ひとまず 50x50 ぐらいで出力してみると,傾向があるのがわかる.

↓A B→
 *************************************************
*  ***********************************************
*   **********************************************
**    ********************************************
***     ******************************************
***      *****************************************
****       ***************************************
****        **************************************
*****         ************************************
******          **********************************
******           *********************************
*******            *******************************
********             *****************************
********              ****************************
*********               **************************
*********                *************************
**********                 ***********************
***********                  *********************
***********                   ********************
************                    ******************
************                     *****************
*************                      ***************
**************                       *************
**************                        ************
***************                         **********
****************                          ********
****************                           *******
*****************                            *****
*****************                             ****
******************                              **
*******************                               
*******************                               
********************                              
*********************                             
*********************                             
**********************                            
**********************                            
***********************                           
************************                          
************************                          
*************************                         
*************************                         
**************************                        
***************************                       
***************************                       
****************************                      
*****************************                     
*****************************                     
******************************                    
******************************                    

A > αB の場合と B > αA の場合に必勝パターンであることが分かる.このαを求める.

A, B は対称性があるので A > B の場合のみを考えれば良い(A==B の場合は先手が必ず負ける).

まず A >= 2B の場合に必勝パターンであることは簡単にわかる.が,よく見ると傾きは 2 より若干小さい.(11,6) -> A:(5,6) -> B:(5,1) -> A(1,1) -> B:(1,0) と A < 2B でも A が必ず勝てる組が存在する.A >= 2B の場合に必勝パターンであるということは先に選択肢を持った方が必ず勝つということである.

なのでどちらも選択肢が 2 つ以上持てないギリギリのパターンを考えると,(1,1) <- (2,1) <- (3,2) <- (5,3) <- (8,5) <- ... という組の列になる.この列はフィボナッチ数列になっている.このとき A と B の比はフィボナッチ数列の隣接項の比,黄金比 Φ=(sqrt(5.0)+1)/2 ≒ 1.6 である.よって A > ΦB であれば必勝パターンであることがわかる.

B をある値 b に固定したときに A > Φb であればよい.[A1, A2] でこのようになる A の個数は max(0,A2-max(A1,Φb)+1) である.これを b∈[B1, B2] の範囲で調べた後,A, B を反対にした場合の数を調べれば良い.

ソースコード

答えとなる数値は最大で 1M x 1M であるから int だとオーバーフローするので long long を使用する.

#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <cmath>

typedef long long ll;

using namespace std;

#define For(i,a,b)    for(int i=(a);i<(b);++i)
#define Rep(i,n)      for(int i=0;i<(n);++i)

double golden = (sqrt(5.0)+1)/2;

ll solve(int A1, int A2, int B1, int B2)
{
	ll r = 0;
	For(b,B1,B2+1)
		r += max(0,A2-max(A1,int(b*golden)+1)+1);
	return r;
}

int main(int argc, char* argv[])
{
	int T;
	cin >> T;
	
	Rep(t,T)
	{
		int A1, A2, B1, B2;
		cin >> A1 >> A2 >> B1 >> B2;
		ll r = solve(A1, A2, B1, B2) + solve(B1, B2, A1, A2);
		cout << "Case #" << t+1 << ": " << r << endl;
	}
	
	return 0;
}

*1Mac OS X ではデフォルトで 8192 KB なので 10 万回ぐらいめの再帰で溢れてしまう.

VadimVadim2012/07/09 23:30Articles like this are an example of quick, hlepful answers.

qjbrhhqjbrhh2012/07/10 15:49kSuNdQ <a href="http://mdjoejftmbvz.com/">mdjoejftmbvz</a>

pqzkpfjtrpqzkpfjtr2012/07/10 21:46qQr9EH , [url=http://fhvkqwxahzhs.com/]fhvkqwxahzhs[/url], [link=http://mdchxyyvtvey.com/]mdchxyyvtvey[/link], http://rqniilnhuwie.com/

oidakxcccinoidakxcccin2012/07/12 12:07Jpayqp <a href="http://jyiazemeadxh.com/">jyiazemeadxh</a>

whmpyvpwhmpyvp2012/07/12 17:36VAQd8L , [url=http://gqopwfgotuey.com/]gqopwfgotuey[/url], [link=http://lfdyxzapnxeq.com/]lfdyxzapnxeq[/link], http://kqvfxprmucse.com/