Skip to content

Instantly share code, notes, and snippets.

@ajtulloch
Created October 30, 2013 17:21
Show Gist options
  • Save ajtulloch/7236552 to your computer and use it in GitHub Desktop.
Save ajtulloch/7236552 to your computer and use it in GitHub Desktop.
Welcome to the Emacs shell
~/Code/haskell/search $ runhaskell search.hs
Passed:
1
Leaf 0
Passed:
1
Branch (Leaf (-1)) (Leaf 1)
Passed:
2
Leaf 2
Passed:
-1
Leaf 2
Passed:
-3
Leaf 4
Passed:
6
Leaf (-6)
Passed:
-2
Leaf (-3)
Passed:
-11
Leaf (-12)
Passed:
-12
Branch (Leaf 7) (Branch (Branch (Branch (Leaf (-18)) (Leaf 24)) (Leaf (-7))) (Branch (Leaf (-4)) (Leaf 18)))
Passed:
-6
Leaf (-14)
Passed:
-53
Leaf 49
Passed:
-51
Branch (Leaf 44) (Leaf 42)
Passed:
90
Branch (Branch (Branch (Leaf 105) (Leaf (-40))) (Branch (Branch (Leaf 15) (Leaf 49)) (Branch (Leaf 23) (Leaf (-44))))) (Leaf (-108))
Passed:
-14
Leaf (-47)
Passed:
244
Branch (Branch (Branch (Leaf (-44)) (Branch (Leaf (-232)) (Leaf 162))) (Branch (Branch (Leaf (-56)) (Leaf (-113))) (Branch (Leaf (-167)) (Leaf (-150))))) (Leaf (-125))
Passed:
-66
Branch (Branch (Branch (Leaf (-111)) (Leaf (-482))) (Leaf (-352))) (Branch (Leaf 39) (Leaf 438))
Passed:
447
Branch (Leaf 515) (Leaf 686)
Passed:
-728
Branch (Branch (Leaf 601) (Branch (Branch (Branch (Leaf (-802)) (Leaf (-413))) (Leaf 712)) (Branch (Branch (Leaf (-141)) (Leaf (-529))) (Branch (Leaf 188) (Leaf 878))))) (Branch (Leaf (-17)) (Branch (Leaf 406) (Leaf (-40))))
Passed:
492
Leaf 1613
Passed:
-635
Branch (Leaf 920) (Branch (Leaf (-349)) (Branch (Leaf (-1586)) (Branch (Branch (Leaf 1573) (Leaf (-443))) (Branch (Leaf (-1922)) (Leaf (-634))))))
Passed:
1990
Leaf 569
Passed:
-2688
Leaf (-6006)
Passed:
-603
Leaf (-2187)
Passed:
-15623
Branch (Branch (Leaf (-12846)) (Branch (Leaf 5340) (Branch (Branch (Leaf 15076) (Leaf 15633)) (Branch (Leaf 13108) (Leaf (-9987)))))) (Leaf (-10408))
Passed:
17838
Branch (Branch (Branch (Leaf (-27590)) (Leaf 13699)) (Branch (Leaf (-30171)) (Branch (Branch (Leaf (-29521)) (Leaf (-995))) (Branch (Leaf (-18484)) (Leaf (-22364)))))) (Branch (Branch (Branch (Leaf (-20658)) (Leaf (-2604))) (Branch (Leaf (-13790)) (Branch (Leaf 29901) (Leaf (-15839))))) (Branch (Branch (Leaf 28376) (Leaf 26783)) (Branch (Leaf (-17087)) (Leaf (-29972)))))
Passed:
29124
Branch (Leaf 19118) (Branch (Branch (Branch (Branch (Leaf (-20625)) (Leaf (-5833))) (Branch (Leaf (-23322)) (Leaf 772))) (Leaf (-8342))) (Branch (Leaf 13163) (Branch (Branch (Leaf 1085) (Leaf (-25371))) (Leaf 3652))))
Passed:
-47945
Leaf (-47812)
Passed:
20666
Leaf 62448
Passed:
-80872
Branch (Branch (Branch (Leaf 112635) (Branch (Leaf (-126610)) (Branch (Leaf (-90549)) (Leaf 14760)))) (Branch (Branch (Branch (Leaf 122537) (Leaf (-38124))) (Branch (Leaf (-42074)) (Leaf 3025))) (Branch (Leaf 78673) (Branch (Leaf 91920) (Leaf 4440))))) (Branch (Branch (Leaf 65338) (Leaf 30470)) (Branch (Leaf 114096) (Branch (Branch (Leaf 90237) (Leaf (-117850))) (Leaf (-43420)))))
Passed:
205348
Branch (Leaf 214574) (Branch (Branch (Branch (Branch (Leaf 99957) (Leaf 230203)) (Leaf 26923)) (Branch (Leaf (-156374)) (Branch (Leaf 198304) (Leaf (-196177))))) (Leaf (-191322)))
Passed:
20190
Leaf (-88296)
Passed:
-215654
Leaf (-521633)
Passed:
-1034947
Branch (Branch (Leaf (-342711)) (Branch (Branch (Leaf (-700012)) (Leaf (-817929))) (Leaf (-202688)))) (Leaf 980533)
Passed:
-566515
Leaf 191295
Passed:
-869746
Branch (Branch (Branch (Branch (Branch (Leaf (-891712)) (Leaf (-1619753))) (Leaf 1033165)) (Branch (Branch (Leaf 647895) (Leaf (-155448))) (Leaf (-736445)))) (Branch (Branch (Leaf (-894090)) (Leaf (-236711))) (Leaf 331033))) (Branch (Branch (Leaf 1280263) (Branch (Leaf (-424266)) (Branch (Branch (Leaf (-436002)) (Leaf (-813840))) (Leaf 521753)))) (Branch (Branch (Leaf (-73970)) (Branch (Branch (Leaf (-624362)) (Leaf (-1041147))) (Branch (Leaf (-778559)) (Leaf 1156018)))) (Branch (Branch (Leaf 264990) (Branch (Leaf 1373584) (Leaf (-949052)))) (Leaf (-375200)))))
Passed:
4052705
Leaf (-257241)
Passed:
2984995
Branch (Leaf (-3868871)) (Branch (Leaf 1445135) (Leaf 1271411))
Passed:
2791380
Branch (Leaf (-5405264)) (Leaf (-6606821))
Passed:
-5389831
Leaf 3758874
Passed:
15458395
Leaf (-13610360)
Passed:
2968036
Leaf 6013430
Passed:
-22671682
Branch (Leaf (-16328434)) (Leaf 24090213)
Passed:
-2929542
Branch (Leaf (-60697131)) (Branch (Leaf 48883733) (Leaf 379341))
Passed:
50839385
Leaf 31518838
Passed:
-110490711
Branch (Branch (Branch (Leaf 40955809) (Leaf 555754)) (Leaf (-13828106))) (Branch (Leaf (-58048171)) (Branch (Branch (Branch (Branch (Leaf 49735035) (Leaf (-87513564))) (Leaf (-5316444))) (Branch (Leaf (-49536440)) (Leaf (-42094820)))) (Branch (Branch (Branch (Leaf (-18490613)) (Leaf (-26556343))) (Branch (Leaf 82758358) (Leaf 94741130))) (Branch (Branch (Leaf (-30838647)) (Leaf 124451246)) (Leaf 55771557)))))
Passed:
140370890
Leaf 16074073
Passed:
210898925
Branch (Leaf 150295962) (Leaf (-12287543))
Passed:
494261501
Leaf 215000891
Passed:
-331233153
Leaf 274184577
Passed:
263371002
Branch (Branch (Branch (Branch (Branch (Branch (Leaf (-375382581)) (Leaf (-1054230535))) (Leaf (-312610798))) (Branch (Branch (Leaf (-180793879)) (Leaf (-341156619))) (Leaf (-76693962)))) (Leaf (-351934213))) (Leaf (-396786607))) (Branch (Leaf 34628372) (Branch (Leaf (-196170234)) (Leaf (-570504445))))
Passed:
-289210171
Leaf (-2139483447)
Passed:
2184860167
Branch (Leaf (-235167326)) (Branch (Branch (Leaf (-2742144164)) (Leaf 3406715682)) (Branch (Leaf (-691328269)) (Leaf 2999835085)))
Passed:
-2384550217
Branch (Branch (Leaf 2083567741) (Leaf (-3032200383))) (Branch (Branch (Branch (Branch (Branch (Leaf 3974304162) (Leaf (-2989245428))) (Branch (Leaf (-2708437885)) (Leaf 935233025))) (Leaf (-2817718261))) (Branch (Branch (Leaf (-1180285924)) (Leaf 1510246653)) (Branch (Leaf (-440313898)) (Leaf (-922773677))))) (Leaf 1403538286))
Passed:
2027524631
Leaf (-5858837782)
Passed:
-3190978181
Branch (Branch (Leaf 1688008750) (Branch (Leaf 14240983608) (Leaf 16904961027))) (Branch (Branch (Leaf (-7410799314)) (Leaf (-10240058396))) (Branch (Leaf (-16678419299)) (Leaf (-8806537277))))
Passed:
8932366342
Branch (Branch (Branch (Branch (Branch (Leaf (-3664692010)) (Leaf (-15944362157))) (Leaf (-3158635290))) (Leaf 2581412983)) (Leaf 4213870781)) (Branch (Leaf (-10680214394)) (Branch (Leaf (-1997146259)) (Branch (Branch (Leaf (-478879498)) (Leaf 3892799021)) (Leaf (-6417018099)))))
Passed:
-32891105502
Leaf (-13201808571)
Passed:
-15170112836
Leaf (-14764450917)
Passed:
23757229449
Leaf (-65637432140)
Passed:
-109097484331
Branch (Leaf 16916346485) (Branch (Leaf 2233572665) (Branch (Leaf (-110310739194)) (Leaf (-114850402238))))
Passed:
-89548998570
Branch (Leaf (-114406616077)) (Leaf (-127122964574))
Passed:
-190683836431
Branch (Branch (Leaf 85859165437) (Leaf (-252655639271))) (Leaf 25601409401)
Passed:
118802115018
Leaf (-301308266471)
Passed:
356847857470
Branch (Leaf (-477773160038)) (Leaf (-188295364052))
Passed:
-923783461548
Branch (Branch (Leaf (-907641597795)) (Leaf (-343259915118))) (Branch (Leaf 436395713653) (Branch (Leaf 856411162295) (Branch (Branch (Branch (Branch (Leaf 847576830810) (Leaf (-531698288870))) (Leaf 373830228829)) (Branch (Leaf (-1047684881351)) (Leaf (-263644424487)))) (Leaf (-615211543792)))))
Passed:
-189095614125
Leaf (-1024897305963)
Passed:
-412391148566
Leaf (-214636665588)
Passed:
-3218331552312
Leaf 3662952397591
Passed:
-310364265801
Branch (Leaf 625167905860) (Branch (Leaf (-1666308401918)) (Branch (Branch (Leaf 3761931702326) (Leaf (-828229163591))) (Branch (Leaf 299318573229) (Leaf 1699761422615))))
Passed:
8596247663997
Branch (Branch (Leaf 4939802005918) (Leaf (-7579151003588))) (Leaf 8534750837166)
Passed:
11684242866492
Branch (Branch (Branch (Branch (Branch (Leaf 8410999203848) (Leaf 2511602948241)) (Leaf (-8446358481693))) (Branch (Leaf (-7668850622727)) (Leaf 94462322874))) (Leaf (-12486314486400))) (Leaf (-14859808018199))
Passed:
-4061805858931
Leaf 15802937102578
Passed:
-23878804477654
Leaf (-8774496232854)
Passed:
29511466512911
Leaf 14902565915051
Passed:
-5060738633539
Leaf 18751530491015
Passed:
61750297223277
Branch (Branch (Leaf 75978964970762) (Branch (Leaf 71817943729795) (Branch (Leaf (-51815377178705)) (Branch (Leaf 21893527100558) (Branch (Leaf (-81354958232653)) (Leaf (-83108783860533))))))) (Leaf 82907489877346)
Passed:
-67542959767324
Branch (Leaf 117380145026829) (Leaf 23941049352867)
Passed:
94048200851582
Branch (Leaf (-82325931324294)) (Leaf 216662806439516)
Passed:
172406613517435
Branch (Leaf (-311468746973501)) (Leaf 151823998840668)
Passed:
432653251814128
Branch (Leaf 468119523037011) (Leaf 150821119442156)
Passed:
-631449346365028
Branch (Branch (Branch (Leaf (-590873627600218)) (Branch (Branch (Leaf (-798168789759766)) (Branch (Leaf 1080848729485904) (Branch (Leaf (-398627923166365)) (Leaf 367732447806220)))) (Branch (Branch (Branch (Leaf 762912866180668) (Leaf (-845171340838681))) (Leaf 70815190968968)) (Leaf (-957629836040933))))) (Branch (Branch (Branch (Leaf (-680284745559417)) (Branch (Branch (Leaf 561267570557504) (Leaf (-200330546542349))) (Branch (Leaf 364096915330316) (Leaf 659637375378905)))) (Leaf 934019628653813)) (Branch (Leaf 547771191000403) (Branch (Branch (Branch (Leaf (-879626247927629)) (Leaf 1023770577825236)) (Leaf 597312223566869)) (Branch (Branch (Leaf 834506196880650) (Leaf 1092609050808449)) (Leaf 315518699413014)))))) (Branch (Branch (Leaf (-359417552714539)) (Branch (Branch (Branch (Leaf (-27193066722030)) (Branch (Leaf 1038834273560922) (Leaf (-899628625362491)))) (Branch (Branch (Leaf 285161758105336) (Leaf (-147932163915399))) (Branch (Leaf 416121635808035) (Leaf (-699152530920099))))) (Branch (Branch (Branch (Leaf 81313216834606) (Leaf (-30050267198611))) (Branch (Leaf 534355719828827) (Leaf (-714978765664284)))) (Leaf (-489528397525892))))) (Branch (Branch (Leaf (-968884245435011)) (Leaf 881941940217903)) (Leaf (-81618773200880))))
Passed:
1793098485221732
Leaf (-1903199047983785)
Passed:
-683897028811881
Leaf 1448484919909363
Passed:
-3941812257226578
Leaf (-1185577206390108)
Passed:
-336240270400129
Branch (Leaf 2078875482714073) (Branch (Leaf (-135278496670660)) (Leaf (-2454817032169209)))
Passed:
4038987210772438
Branch (Leaf 8328404864697917) (Leaf (-5299743844889551))
Passed:
6541674111771162
Leaf 12611171553574858
Passed:
17856234915921133
Branch (Branch (Branch (Leaf 17040362881512523) (Branch (Leaf 35101974144450) (Leaf 8232803621592717))) (Branch (Branch (Leaf (-8220772333814209)) (Leaf 9306209046181861)) (Leaf (-2469776187954774)))) (Branch (Branch (Leaf (-709757855110509)) (Branch (Leaf 8903410671815428) (Branch (Leaf 3724249959890973) (Branch (Leaf (-2290324425462418)) (Leaf 10633153849469057))))) (Branch (Branch (Branch (Leaf 16393481545257022) (Leaf 13101149863056149)) (Leaf (-1937098828017775))) (Branch (Branch (Leaf 17969823852071726) (Branch (Leaf 7380348428592239) (Leaf 6237400989700477))) (Branch (Leaf (-683928282278109)) (Leaf (-11555954826477578))))))
Passed:
-12927443029269237
Leaf (-31570939177481396)
Passed:
29050210782505280
Branch (Leaf 26567095296088838) (Leaf 65820589439825731)
Passed:
69499033318757895
Branch (Branch (Branch (Leaf 52143393114105435) (Branch (Leaf (-22806716328730412)) (Leaf 40484463533365649))) (Branch (Branch (Leaf 40995022728598389) (Leaf 41557518918134502)) (Leaf (-65752456497653196)))) (Leaf (-55510962757435551))
Passed:
-98678602232097304
Leaf 93397930495317446
Passed:
136399069549704829
Branch (Branch (Branch (Branch (Branch (Leaf (-69653541063299786)) (Leaf (-35204274799376088))) (Leaf 100698619208287857)) (Branch (Branch (Leaf (-66364399976808013)) (Branch (Leaf 139530176608075484) (Branch (Leaf (-131886264296370594)) (Leaf (-93252474794215248))))) (Leaf (-11204660052822429)))) (Branch (Leaf 110882713807602925) (Branch (Branch (Branch (Branch (Leaf (-101100233250668861)) (Leaf 86450065008854318)) (Leaf (-39735511672028220))) (Leaf 108166313974675903)) (Leaf 62724366415536395)))) (Branch (Branch (Branch (Branch (Leaf 72960638472808696) (Branch (Branch (Leaf 96712330033724251) (Leaf 116971321417573595)) (Branch (Leaf 63492183983819482) (Leaf 113150818485228065)))) (Leaf (-23658601299573912))) (Branch (Leaf (-118620094019671153)) (Branch (Branch (Leaf (-95373177685122048)) (Branch (Leaf (-3013858974782263)) (Leaf 53776919435985459))) (Branch (Branch (Leaf 41268814823287448) (Leaf 117578658493314249)) (Leaf 49524713270114829))))) (Branch (Branch (Branch (Leaf 103416489436626207) (Leaf (-98336145324873697))) (Branch (Leaf 94932740254224531) (Branch (Branch (Leaf 66801337612321614) (Leaf 93100743995505148)) (Leaf 94769193761921161)))) (Leaf (-85089809021254855))))
Passed:
195229571343323160
Leaf 186690313743508451
Passed:
-84733473336747035
Branch (Leaf (-464057249760314764)) (Branch (Branch (Leaf 336226584410092533) (Branch (Branch (Leaf 78832857249620066) (Leaf (-224313903354396985))) (Leaf (-204584563212145038)))) (Branch (Branch (Branch (Leaf 173526333468600362) (Branch (Branch (Leaf 495734426992852726) (Leaf (-178640350565614794))) (Branch (Leaf 56111257519522745) (Leaf 532569695599809034)))) (Branch (Branch (Branch (Leaf (-499765289237117485)) (Leaf (-83946874346634498))) (Branch (Leaf 150804360076355854) (Leaf 519042718295648328))) (Leaf 300392316688075469))) (Branch (Branch (Leaf (-269001377350653239)) (Leaf (-274995028043275329))) (Branch (Leaf 206503507838083449) (Leaf 433283723069456146)))))
Passed:
361087303192465371
Branch (Branch (Branch (Branch (Leaf 27145317152684239) (Leaf 556322205519289723)) (Branch (Leaf (-115100389544051451)) (Leaf 81965564190985026))) (Leaf (-48511826142900514))) (Leaf 295363825137951477)
Passed:
211730117533287917
Leaf (-209136107744047961)
Passed:
1060602309314181928
Leaf 274856650165559975
Passed:
-1268223355495286389
Leaf 1708927261810868092
Passed:
1397252702665902638
Branch (Branch (Branch (Leaf 3624029744593329758) (Leaf 268857884610347261)) (Leaf (-2237354616891089320))) (Branch (Leaf (-3520472694888102118)) (Leaf (-2082956196333100647)))
+++ OK, passed 100 tests.
~/Code/haskell/search $
~/Code/haskell/search $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment