From 4a229e5205932455d8256deb8a348382503a9a00 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Sun, 5 Apr 2009 21:16:20 -0400 Subject: [PATCH 01/20] Slight cleanup of PE problem 54 solution --- extra/project-euler/054/054.factor | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/extra/project-euler/054/054.factor b/extra/project-euler/054/054.factor index 2e7eaa4cd3..5cf42737fb 100644 --- a/extra/project-euler/054/054.factor +++ b/extra/project-euler/054/054.factor @@ -73,15 +73,12 @@ IN: project-euler.054 "resource:extra/project-euler/054/poker.txt" ascii file-lines [ [ 14 head-slice ] [ 14 tail-slice* ] bi 2array ] map ; -: player1-win? ( hand1 hand2 -- ? ) - before? ; inline - PRIVATE> : euler054 ( -- answer ) - source-054 [ [ ] map first2 player1-win? ] count ; + source-054 [ [ ] map first2 before? ] count ; ! [ euler054 ] 100 ave-time -! 36 ms ave run time - 2.71 SD (100 trials) +! 34 ms ave run time - 2.65 SD (100 trials) SOLUTION: euler054 From fda3f6d3f0fa707281c869f25fef1e146b04dd17 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Sun, 5 Apr 2009 21:16:57 -0400 Subject: [PATCH 02/20] Add perfect hash optimization for poker vocab --- extra/poker/arrays/arrays.factor | 1267 ++++++++++++------------------ extra/poker/poker-tests.factor | 2 + extra/poker/poker.factor | 20 +- 3 files changed, 529 insertions(+), 760 deletions(-) diff --git a/extra/poker/arrays/arrays.factor b/extra/poker/arrays/arrays.factor index b415265348..bf758f166a 100644 --- a/extra/poker/arrays/arrays.factor +++ b/extra/poker/arrays/arrays.factor @@ -502,760 +502,517 @@ CONSTANT: unique5-table 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1600 } -! This is a lookup table for the product of prime values associated with the -! cards in a hand. -CONSTANT: products-table -{ 48 72 80 108 112 120 162 168 176 180 200 208 252 264 270 272 280 300 304 312 -368 378 392 396 405 408 420 440 450 456 464 468 496 500 520 552 567 588 592 594 -612 616 630 656 660 675 680 684 696 700 702 728 744 750 760 780 828 882 888 891 -918 920 924 945 952 968 980 984 990 1020 1026 1044 1050 1053 1064 1092 1100 -1116 1125 1140 1144 1160 1170 1240 1242 1250 1288 1300 1323 1332 1352 1372 1377 -1380 1386 1428 1452 1470 1476 1480 1485 1496 1530 1539 1540 1566 1575 1596 1624 -1638 1640 1650 1672 1674 1700 1710 1716 1736 1740 1750 1755 1768 1820 1860 1863 -1875 1900 1932 1950 1976 1998 2024 2028 2058 2070 2072 2079 2142 2156 2178 2205 -2214 2220 2244 2295 2296 2300 2312 2349 2380 2392 2394 2420 2436 2450 2457 2460 -2475 2508 2511 2548 2550 2552 2565 2574 2584 2604 2610 2625 2652 2660 2728 2750 -2790 2850 2860 2888 2898 2900 2925 2964 2997 3016 3036 3042 3087 3100 3105 3108 -3128 3213 3220 3224 3234 3250 3256 3267 3321 3330 3332 3366 3380 3388 3430 3444 -3450 3465 3468 3496 3588 3591 3608 3630 3654 3675 3690 3700 3724 3740 3762 3822 -3825 3828 3848 3850 3861 3876 3906 3915 3944 3978 4004 4060 4092 4095 4100 4125 -4180 4185 4216 4232 4250 4264 4275 4332 4340 4347 4350 4375 4408 4420 4446 4508 -4524 4550 4554 4563 4650 4662 4692 4712 4732 4750 4802 4836 4851 4875 4884 4940 -4995 4998 5032 5049 5060 5070 5082 5145 5166 5175 5180 5202 5236 5244 5324 5336 -5355 5382 5390 5412 5445 5481 5535 5550 5576 5586 5624 5643 5684 5704 5733 5740 -5742 5750 5772 5775 5780 5814 5852 5859 5916 5950 5967 5980 5985 6050 6076 6125 -6138 6150 6188 6232 6292 6324 6348 6370 6375 6380 6396 6435 6460 6498 6525 6612 -6650 6669 6728 6762 6786 6808 6820 6825 6831 6875 6916 6975 6993 7038 7068 7084 -7098 7125 7150 7192 7203 7220 7245 7250 7252 7254 7326 7436 7497 7540 7544 7546 -7548 7605 7623 7688 7749 7750 7803 7820 7866 7986 8004 8036 8050 8060 8073 8085 -8092 8118 8125 8140 8228 8325 8330 8364 8372 8379 8415 8436 8450 8470 8526 8556 -8575 8584 8613 8625 8658 8670 8721 8740 8788 8874 8918 8925 8932 9009 9020 9044 -9075 9114 9135 9176 9196 9207 9225 9250 9310 9348 9350 9405 9438 9486 9512 9522 -9548 9555 9594 9620 9625 9724 9747 9765 9860 9918 9945 9975 10092 10108 10143 -10150 10168 10179 10212 10250 10450 10540 10556 10557 10580 10602 10625 10647 -10660 10725 10788 10830 10850 10868 10875 10878 10881 10948 10952 10989 11020 -11050 11115 11132 11154 11270 11284 11316 11319 11322 11375 11385 11396 11492 -11532 11625 11655 11662 11780 11781 11799 11830 11858 11875 11979 12005 12006 -12054 12075 12136 12138 12177 12236 12342 12350 12495 12546 12580 12628 12650 -12654 12675 12705 12716 12789 12834 12844 12876 12915 12950 12987 13005 13034 -13156 13167 13182 13310 13311 13340 13377 13448 13455 13468 13475 13671 13764 -13794 13804 13875 13923 13940 13965 14014 14022 14025 14036 14060 14157 14210 -14212 14229 14260 14268 14283 14350 14355 14375 14391 14450 14535 14756 14812 -14875 14877 14924 14950 15004 15028 15125 15138 15162 15190 15225 15252 15318 -15345 15375 15428 15548 15561 15580 15675 15730 15778 15870 15884 15903 15925 -15939 15950 16150 16182 16245 16275 16317 16428 16492 16562 16575 16588 16625 -16698 16731 16796 16820 16905 16965 16974 16983 17020 17050 17204 17238 17298 -17493 17595 17612 17732 17745 17787 17875 17908 17980 18009 18050 18081 18125 -18130 18135 18204 18207 18315 18326 18513 18525 18590 18634 18676 18772 18819 -18837 18850 18860 18865 18975 18981 19074 19220 19228 19251 19266 19314 19375 -19425 19516 19550 19551 19604 19652 19665 19684 19773 19844 19894 19964 19965 -20090 20097 20125 20150 20172 20230 20295 20332 20349 20350 20482 20570 20646 -20691 20825 20956 21021 21033 21054 21125 21164 21175 21266 21315 21402 21460 -21483 21525 21645 21658 21675 21692 21812 21850 21879 21964 21970 22022 22185 -22218 22295 22425 22506 22542 22550 22707 22724 22743 22785 22878 22940 22977 -22990 23125 23188 23275 23276 23322 23375 23452 23548 23595 23667 23715 23751 -23780 23805 23826 23828 23925 23985 24050 24206 24225 24244 24273 24453 24548 -24633 24642 24650 24794 24795 24843 25012 25025 25047 25172 25230 25270 25375 -25382 25389 25420 25461 25575 25625 25636 25641 25857 25916 25947 26026 26125 -26350 26404 26411 26450 26505 26588 26650 26862 26908 27075 27125 27195 27306 -27380 27404 27436 27489 27508 27531 27550 27625 27676 27716 27830 27885 27951 -28126 28158 28175 28275 28305 28322 28413 28611 28652 28730 28798 28830 28899 -28971 29155 29282 29302 29325 29348 29406 29450 29478 29575 29601 29645 29716 -29766 29841 30015 30044 30135 30225 30258 30303 30340 30345 30525 30628 30668 -30723 30758 30855 30875 30932 30969 31059 31213 31262 31365 31372 31434 31450 -31581 31625 31635 31654 31790 31899 31977 32085 32103 32110 32116 32186 32375 -32487 32585 32708 32725 32775 32946 32955 33033 33201 33212 33275 33292 33327 -33350 33418 33524 33579 33620 33759 33813 33825 34276 34317 34485 34606 34684 -34713 34850 34914 34983 35035 35055 35090 35150 35322 35378 35525 35588 35650 -35739 35836 35875 35972 36075 36125 36244 36309 36556 36575 36822 36946 36963 -36975 37004 37030 37076 37107 37191 37323 37375 37444 37468 37510 37518 37570 -37791 37845 37905 37975 38073 38295 38318 38332 38675 38709 38870 38950 38962 -39039 39325 39445 39494 39525 39556 39627 39675 39710 39875 39882 39886 39897 -39975 40052 40204 40222 40293 40362 40375 40455 40508 40817 40898 40959 41070 -41154 41262 41325 41405 41492 41503 41574 41745 41876 42021 42050 42189 42237 -42284 42435 42476 42483 42550 42625 42772 42826 43095 43197 43225 43245 43263 -43732 43911 43923 43953 44109 44175 44198 44217 44252 44275 44289 44506 44649 -44764 44770 44919 44950 44954 45125 45254 45325 45356 45387 45619 45747 45815 -46137 46475 46585 46748 46893 46930 47068 47125 47138 47150 47151 47175 47212 -47396 47481 47619 47685 47804 48050 48165 48279 48285 48314 48334 48484 48668 -48807 48875 49010 49036 49049 49077 49126 49130 49419 49610 49735 49818 49972 -50025 50127 50225 50286 50375 50430 50468 50575 50578 50692 50875 51129 51205 -51425 51615 51646 51842 51909 52173 52234 52275 52316 52325 52371 52390 52514 -52598 52635 52725 52767 52972 52983 53067 53165 53428 53475 53482 53505 53613 -53650 53754 53958 53998 54145 54188 54418 54549 54625 54910 54925 55055 55223 -55233 55419 55506 55545 55594 55796 55825 55924 56265 56277 56355 56375 56525 -56637 57122 57188 57195 57350 57475 57477 57498 57681 57722 57868 57967 58190 -58305 58311 58425 58443 58870 59204 59241 59409 59450 59565 59644 59675 59774 -59823 59829 60125 60236 60306 60333 60515 60543 60775 61132 61226 61347 61364 -61370 61605 61625 61642 61659 61731 61828 61893 61985 62271 62361 62530 62678 -62814 63075 63175 63206 63426 63455 63550 63825 63916 64124 64141 64158 64239 -64467 64676 65065 65219 65348 65366 65596 65598 65702 65875 65975 66033 66092 -66125 66297 66470 66625 66748 66759 66861 67146 67155 67270 67425 67431 67599 -67881 67925 68265 68306 68324 68425 68450 68590 68614 68770 68782 68875 68894 -68913 69003 69290 69454 69575 69597 69629 69874 69938 70315 70395 70525 70587 -70602 70642 70707 70725 70805 71094 71188 71225 71668 71687 71825 71995 72075 -72261 72358 72471 72501 72964 73002 73036 73205 73255 73346 73515 73593 73625 -73689 73695 73964 74415 74431 74698 74727 74907 74958 75429 75645 75803 75850 -75867 76342 76475 76874 76895 77077 77121 77198 77372 77469 77763 77996 78039 -78155 78166 78292 78351 78585 78625 78771 78884 78897 78925 79135 79475 80073 -80142 80223 80275 80465 80475 80631 80852 80937 80997 81466 81548 81549 81627 -82225 82251 82365 82418 82522 82654 82708 83030 83259 83375 83391 83398 83421 -83486 83545 83810 84050 84175 84249 84303 84721 85514 85683 85782 85918 86025 -86247 86275 86428 86515 86583 86756 86779 87125 87172 87285 87362 87412 87542 -87725 87875 88102 88305 88412 88445 88806 88825 88837 89001 89125 89175 89590 -89661 89930 90117 90354 90364 90459 91091 91143 91234 91839 92046 92055 92225 -92365 92414 92463 92510 92575 93058 93092 93275 93357 93775 93795 93925 94017 -94178 94221 94622 94809 95139 95325 95571 95795 95830 95874 96026 96237 96278 -96425 96596 97006 97175 97375 97405 97526 97556 97682 98022 98049 98394 98397 -98441 98494 98553 98716 98735 99127 99275 99567 99705 99715 100510 100555 -100719 100793 100905 101062 102051 102245 102459 102487 102557 102675 102885 -102921 103075 103155 103156 103173 103246 103341 103675 103935 104044 104181 -104284 104690 104811 104907 104975 105125 105154 105183 105524 105710 105754 -105903 105963 106227 106375 106641 106782 106930 107065 107525 107559 107653 -107822 108086 108537 109089 109142 109174 109330 109388 109417 109503 109554 -110019 110075 110331 110495 110789 110825 110946 111265 111476 111910 111925 -112047 112375 112385 112406 112437 112651 113135 113553 113775 114057 114308 -114513 115258 115292 115311 115797 116058 116242 116402 116522 116725 116932 -116963 117249 117325 117334 117438 117670 117711 117845 117875 118490 119119 -119164 119187 119306 120125 120175 120213 120785 120802 120835 121121 121670 -121923 121975 122018 122199 122525 122815 122825 123025 123627 123783 123823 -123981 124025 124468 124545 124558 124775 124930 125097 125229 125426 125541 -125715 125829 125902 125948 126075 126445 127075 127426 127534 127738 127756 -128018 128271 128673 128877 128986 129115 129311 129514 129605 130134 130203 -130585 130975 131043 131118 131285 131313 131495 132153 132158 132275 132618 -133052 133133 133209 133342 133570 133705 134113 134125 134162 134199 134385 -134895 134995 135014 135531 135575 136045 136214 136325 136367 136851 137275 -137547 137566 137924 138069 138229 138621 138765 138985 139113 139564 139587 -139601 139638 140714 140777 141267 141933 142025 142228 142538 142766 142805 -142970 143143 143375 143745 143811 144039 144279 144305 144417 144925 145475 -145509 145521 146234 146289 146334 146523 146566 146575 147033 147175 147436 -147591 147706 147741 147994 148010 148625 148666 148707 148925 149435 149702 -149891 150183 150590 150765 150898 151294 151525 151593 152218 152438 153062 -153065 153410 153425 153729 154105 154652 154693 154869 155771 156066 156325 -156426 156674 156695 157035 157325 157339 157604 157731 158015 158389 158565 -158631 158804 158875 159562 159790 160173 160225 160395 161161 161253 161414 -161733 161975 162129 162578 163370 163415 163713 163761 163990 163995 164169 -164255 164331 164738 164983 165025 165886 166175 166419 166634 167042 167214 -167865 168175 168609 168674 169099 169169 169756 170126 170338 170765 171125 -171275 171462 171475 171535 171925 171941 171955 172235 172546 172822 172887 -172975 173225 173635 174087 174097 174363 174603 174685 174783 174845 174902 -175491 175972 176001 176157 176505 176605 177023 177489 177735 177970 178126 -178334 178746 178802 178959 179075 180154 180761 180895 181203 181447 181917 -182505 182590 182666 182819 183027 183365 183425 183483 183799 184093 184382 -184910 185725 186093 186238 186694 186702 186745 186837 186998 187187 187395 -187775 188108 188139 188518 188853 188922 188993 189625 190333 190463 190855 -191139 191301 191425 191607 191634 191675 192027 192185 192995 193325 193430 -193479 194271 194463 194579 194996 195201 195415 195730 196075 196137 196677 -197098 197846 198237 198927 199082 199927 200013 200158 200355 200725 201243 -202027 202521 202612 203203 203319 203522 203665 204321 204425 205751 205942 -206045 206305 206349 206635 206886 207214 207575 208075 208444 208495 208658 -208715 209209 209457 209525 210125 210749 210826 211071 212602 213342 213785 -213807 214149 214225 214291 214455 214774 214795 215747 215878 216775 216890 -217217 217341 217558 217906 218405 218530 218855 219351 219373 219501 219849 -220255 221030 221122 221221 221559 221991 222015 222111 222425 222999 223706 -223975 224516 224553 224825 224939 225446 225885 225998 226347 226525 226941 -228085 228206 228327 228475 228657 228718 228781 229586 229593 229957 230115 -230318 231035 231275 231725 231978 232101 232562 232645 232730 232934 233206 -233818 234025 234099 234175 234639 235011 235246 235445 235543 235586 236406 -236555 237429 237614 238206 239071 239343 239575 239685 240065 240149 240526 -240695 240737 240994 241129 242121 242515 243089 243815 243867 243890 244205 -244559 244783 245055 245985 246123 246202 246235 247107 247225 247247 248788 -248829 248897 249067 249158 249951 250325 250563 250821 251275 252586 252655 -253011 253175 253253 254634 255189 255507 255626 256711 257193 258115 258819 -258874 259233 259259 259325 259407 259666 260110 260642 260678 260710 261326 -261443 261725 262353 262885 263097 263302 264275 264385 265475 265727 265837 -266955 267189 267197 267325 267501 267674 268119 268203 269059 269555 270193 -270215 270231 270802 272194 272855 272935 273325 273581 273885 273999 274022 -274846 275684 276573 276575 277365 277574 278018 278179 278369 278690 279357 -279775 280041 280053 280497 281015 282302 282777 283383 283475 284053 284258 -284954 285131 285770 287287 287451 287638 287738 288145 288463 288827 289289 -290145 290605 290966 291005 291305 291893 292175 292201 292494 293335 293595 -293854 294151 294175 295075 295647 296225 296769 296989 297910 298265 298623 -298775 299299 299367 300237 300713 302005 303025 303646 303862 303918 304175 -304606 305045 305283 305762 305767 305942 306397 306475 307582 308074 308357 -308913 309442 310329 310821 311170 311395 312325 312666 312987 313565 314019 -314041 314171 314534 314755 314870 315425 315514 316239 316342 316825 317471 -318478 318565 318734 318835 318903 319319 319345 319390 320013 320045 322161 -322465 323449 323785 323817 324818 325335 325622 325703 325822 326337 326859 -326975 327795 328757 329623 330395 331075 331177 331298 331545 331683 331731 -333355 333925 335405 335559 335699 336091 336743 336774 336973 337502 337535 -338169 338675 338997 339031 339521 340442 340535 341341 341446 341734 341887 -342309 343077 343915 344379 344729 344810 345477 347282 347633 347967 348725 -348843 349095 349401 349525 349809 350727 350987 351538 351785 352869 353379 -353717 354609 355570 355946 356345 356421 356915 357309 357425 359414 359513 -360778 360789 361361 361491 361675 362674 363562 364021 364154 364994 365585 -365835 366415 367114 368039 369265 369303 369985 370025 370139 371665 371722 -372775 373182 373737 374255 375193 375683 376475 377245 377377 378235 378301 -378879 378917 380494 380545 381095 381938 381951 381997 382075 382109 382655 -383439 383525 384307 384659 384826 385526 386425 386630 387686 388311 388531 -389499 390165 390166 390963 391017 391065 391534 391685 391989 393421 394010 -394953 395937 397010 397822 397969 398866 398905 399475 400078 400673 400775 -401511 401698 401882 402866 403403 403535 404225 406203 406334 406445 406802 -406847 407407 407827 408291 408425 409975 410669 410839 411033 411845 412114 -412269 413075 413526 413678 414715 415454 416361 416585 417027 417074 417175 -417571 417605 418035 419881 421685 422807 423243 423453 424390 424589 424762 -424879 425258 425315 425546 425845 426374 426387 427025 427063 427431 428655 -429598 429913 430606 431365 431457 431607 432055 435638 435953 436449 437255 -438741 438991 440657 440781 440818 443989 444925 445315 445835 445991 446369 -446865 447005 447083 447146 447811 447925 448063 450262 450385 451451 453299 -453871 454138 454181 454597 455469 455793 455877 456025 456475 456665 456909 -458643 458689 458913 458983 459173 460955 461373 462111 462275 462346 462553 -462722 464163 465595 466697 466735 466755 467495 468999 469567 470327 471295 -471801 472305 472549 473271 474513 474734 476749 477158 477717 478101 479085 -480491 480766 481481 481574 482734 483575 484561 485537 486098 486266 487227 -487475 487490 488433 488733 489325 490637 491878 492499 492745 493025 494615 -496223 496947 497705 497798 498883 499681 500395 501787 502918 503234 505161 -505325 506253 506530 507566 508079 508277 508805 508898 509675 510663 511819 -512006 512169 512601 512746 512981 514786 514855 516925 516971 517215 517979 -518035 519622 520331 520421 520923 521110 521594 521645 523957 527065 527307 -528143 529529 531505 532763 533355 533533 533919 535717 536393 536558 536935 -537251 539121 539695 540175 541167 541282 541717 542087 542225 542659 543286 -543895 544011 544765 544825 545054 545343 546231 546325 547491 548359 550671 -551614 552575 552805 555458 555611 555814 555841 557566 557583 558467 559265 -559682 559773 561290 562438 563615 563914 564775 564949 564995 567853 568178 -569023 570515 570741 571795 572242 572663 572907 573562 573965 574678 575795 -576583 577239 578289 578347 579945 580601 581405 581529 581647 581825 582335 -582958 583015 583219 584545 584647 585249 585599 587301 588115 588965 590359 -591015 593021 593929 594035 594146 594473 595441 595515 596183 596733 598299 -600117 600281 600457 600691 601315 602485 602547 602823 603725 603911 604299 -604877 605098 607202 609501 609725 610203 612157 613118 614422 615043 615505 -616975 618171 618233 620194 620289 620517 620806 620977 621970 622895 623162 -623181 623441 624169 625611 625807 628694 630539 631465 633919 634114 634933 -636585 637143 637887 638319 639065 639331 639561 640211 640871 644397 644725 -645337 645909 647185 648907 649078 649165 650275 651605 651695 651775 651833 -653315 653429 653457 654493 655402 656183 656903 657662 658255 659525 659813 -661227 662966 663803 664411 665482 669185 670719 671099 675393 676286 677005 -677846 680485 680846 681207 682486 683501 683675 684574 685055 685069 687115 -687242 687401 689210 689843 692461 692714 693519 693842 693935 694083 695045 -696725 696787 700553 700843 701437 702559 702658 704099 705686 705755 708883 -709142 709423 709631 710645 712101 712327 712385 714425 715737 719095 719345 -720575 720797 721149 722361 724101 724594 725249 726869 727415 729147 729399 -729554 730303 730639 730825 731235 733381 734635 734638 735034 737426 737817 -737891 742577 743002 743774 744107 744775 746697 748867 749177 751502 751709 -754354 754377 754851 755573 756613 757393 758582 759115 759655 759795 761349 -761453 761515 762671 763347 764405 764855 768009 768955 769119 770185 772179 -773605 773927 774566 774706 775489 777925 779433 781665 782254 782391 782971 -783959 785213 785519 785806 786335 787175 788785 789061 790855 790993 791282 -792281 793117 796195 796835 798475 798721 800513 803551 804287 804837 806113 -809042 809627 811923 812045 812383 813967 814055 814555 814929 815269 816221 -817581 817663 818363 818662 823361 824182 824551 827421 828134 828245 828269 -828971 829226 829939 830297 830414 831575 831649 832117 833187 833721 836349 -836969 837199 838409 839523 839914 841841 841935 843479 843657 843755 845871 -850586 851105 852267 853615 854335 858363 858458 859027 860343 861707 862017 -862025 866723 866822 868205 870758 872053 872275 873422 874437 876826 877591 -877933 878845 884051 884374 885391 886414 887777 888925 889778 889865 891219 -893809 894179 894691 896506 898535 898909 900358 901945 906059 906685 907647 -908831 908905 910385 910803 912247 912373 912485 914641 916487 917662 917785 -918731 919677 921475 921557 921633 924482 926497 926782 927707 927979 929305 -930291 931209 932955 933658 934743 935693 936859 943041 947546 947807 949003 -950521 951142 951171 951235 952679 954845 955451 959077 960089 961961 962065 -963815 964894 966329 966575 969215 971509 971618 973063 973617 975415 978835 -979693 980837 983103 983411 985025 986493 988057 988418 989417 990437 990698 -990847 992525 994449 994555 994903 997165 997339 997694 998223 998963 1000195 -1004245 1004663 1004705 1005238 1006733 1007083 1007165 1012894 1013173 1014101 -1014429 1015835 1016738 1016769 1017005 1018381 1021269 1023729 1024309 1024426 -1026817 1026861 1028489 1030285 1030863 1032226 1033815 1034195 1036849 1037153 -1038635 1039071 1040763 1042685 1049191 1053987 1056757 1057978 1058529 1058743 -1059022 1060975 1061905 1062761 1063145 1063517 1063713 1063865 1065935 1066121 -1067857 1070167 1070558 1070797 1072478 1073995 1076515 1076537 1078259 1083047 -1083121 1084039 1085773 1085926 1086891 1088153 1089095 1094331 1094951 1095274 -1096381 1099825 1100869 1101957 1102045 1102551 1103414 1104299 1105819 1106139 -1106959 1107197 1114366 1114503 1114673 1115569 1115661 1117865 1119371 1121549 -1121894 1123343 1125655 1127253 1131531 1132058 1132681 1133407 1135234 1135345 -1136863 1137873 1139677 1140377 1146442 1147619 1155865 1156805 1157819 1159171 -1159543 1161849 1162059 1162213 1169311 1171001 1172354 1173381 1175675 1178709 -1181257 1182446 1183301 1186835 1186923 1187329 1191547 1192895 1195061 1196069 -1196506 1196569 1198483 1199266 1201915 1203935 1206835 1208938 1209271 1210547 -1211573 1213511 1213526 1213563 1213682 1215245 1215487 1215665 1216171 1218725 -1225367 1227993 1229695 1230383 1234838 1236273 1239953 1242201 1242989 1243839 -1244495 1245621 1245811 1255133 1255501 1257295 1257949 1257962 1258085 1259871 -1262723 1263661 1266325 1266749 1267474 1268915 1269359 1272245 1272467 1274539 -1275879 1277479 1279091 1280015 1281137 1281865 1281974 1282633 1284899 1285999 -1286965 1287687 1292669 1293853 1294033 1295723 1299055 1300233 1301027 1302775 -1303985 1306137 1306877 1310133 1310278 1314542 1315239 1316978 1322893 1325467 -1326561 1329621 1331729 1334667 1336783 1338623 1339634 1340003 1341395 1344718 -1344759 1346891 1349341 1349834 1350537 1351166 1353205 1354111 1354886 1356277 -1356901 1358215 1362635 1365581 1368334 1370369 1370386 1372019 1376493 1379035 -1381913 1386723 1388645 1389223 1389535 1390173 1392377 1393915 1396031 1399205 -1400273 1400487 1403207 1403225 1405943 1406095 1406587 1409785 1410031 1412327 -1414127 1414562 1416389 1420445 1421319 1422169 1423807 1426713 1428163 1430605 -1431382 1432417 1433531 1433729 1433905 1436695 1437293 1442399 1442926 1446071 -1447341 1447873 1448161 1448402 1454089 1457395 1457427 1459354 1459759 1465399 -1466641 1468987 1469194 1472207 1482627 1483339 1485365 1486047 1486667 1488403 -1489411 1492309 1496541 1497067 1497238 1503593 1507121 1507857 1508638 1511653 -1512118 1512745 1514071 1515839 1516262 1518005 1519341 1519817 1524733 1525107 -1526657 1529099 1531309 1532795 1533433 1536055 1536639 1542863 1544491 1548339 -1550485 1552015 1552661 1554925 1557905 1563419 1565011 1566461 1567247 1571735 -1575917 1582009 1582559 1583023 1585285 1586126 1586899 1586967 1588533 1589483 -1600313 1602403 1604986 1605837 1608717 1612682 1616197 1616402 1617122 1618211 -1619527 1622695 1628889 1629887 1635622 1638505 1639187 1641809 1642911 1644155 -1655121 1657415 1657466 1661569 1663705 1670053 1671241 1671549 1675333 1681691 -1682681 1682841 1685509 1687829 1689569 1690715 1691701 1692197 1694173 1694407 -1694615 1698087 1698619 1701343 1701931 1702115 1702851 1706215 1709659 1711435 -1711463 1718105 1719663 1721573 1722202 1723025 1727878 1729937 1731785 1734605 -1735327 1739881 1742293 1750507 1751629 1753037 1756645 1758531 1760213 1761319 -1764215 1769261 1771774 1772855 1773593 1773669 1776481 1778498 1781143 1786499 -1790921 1791946 1792021 1794611 1794759 1798899 1801751 1804231 1804786 1806091 -1807117 1811485 1812446 1813407 1818677 1820289 1820523 1822139 1823885 1825579 -1826246 1834963 1836595 1837585 1843565 1847042 1847677 1849243 1852201 1852257 -1852462 1856261 1857505 1859435 1869647 1870297 1872431 1877953 1878755 1879537 -1885885 1886943 1891279 1894487 1896455 1901211 1901501 1907689 1908386 1910051 -1916291 1920983 1922961 1924814 1929254 1930649 1933459 1936415 1936765 1939751 -1944103 1945349 1951481 1952194 1955635 1956449 1957703 1958887 1964515 1965417 -1968533 1971813 1973699 1975103 1975467 1976777 1978205 1979939 1980218 1982251 -1984279 1987453 1988623 1994707 1999283 1999591 1999898 2002481 2002847 2007467 -2009451 2011373 2017077 2019127 2019719 2022605 2024751 2026749 2032329 2040353 -2044471 2046655 2048449 2050841 2052501 2055579 2056223 2060455 2062306 2066801 -2070107 2070335 2071771 2073065 2076035 2079511 2092717 2099785 2100659 2111317 -2114698 2116543 2117843 2120393 2121843 2125207 2126465 2132273 2132902 2137822 -2141737 2145913 2146145 2146981 2147073 2150477 2153437 2155657 2164389 2167055 -2167957 2170679 2172603 2172821 2176895 2181067 2183555 2188021 2189031 2192065 -2193763 2200429 2203791 2204534 2207161 2209339 2210351 2210935 2212873 2215457 -2215763 2216035 2219399 2221271 2224445 2234837 2237411 2238067 2241265 2242454 -2245857 2250895 2257333 2262957 2266627 2268177 2271773 2274393 2275229 2284997 -2285258 2289443 2293907 2294155 2301817 2302658 2304323 2311205 2313649 2316955 -2320381 2329187 2330038 2334145 2336191 2338919 2340503 2343314 2345057 2357381 -2359379 2362789 2363153 2363486 2367001 2368333 2368865 2372461 2377855 2379189 -2382961 2386241 2388701 2396009 2397106 2399567 2405347 2407479 2412235 2416193 -2419023 2422109 2424499 2424603 2425683 2428447 2429045 2442862 2444923 2445773 -2453433 2459303 2461462 2466827 2469901 2471045 2473211 2476441 2476745 2481997 -2482597 2486199 2494235 2497759 2501369 2501917 2505919 2513095 2519959 2532235 -2536079 2541845 2542903 2544971 2551594 2553439 2561065 2571233 2572619 2580565 -2580991 2581934 2582827 2583303 2585843 2589151 2591817 2592629 2598977 2600507 -2603209 2611037 2612233 2614447 2618629 2618998 2624369 2630257 2631218 2636953 -2640239 2641171 2644213 2644945 2647555 2648657 2655037 2657661 2667747 2673539 -2674463 2676395 2678741 2681195 2681869 2687919 2688907 2700451 2705329 2707063 -2707179 2709239 2710981 2711471 2714815 2718669 2732561 2733511 2737889 2738185 -2739369 2750321 2758535 2760953 2764177 2766049 2767787 2769487 2770563 2771431 -2778693 2785915 2791613 2792387 2798939 2804735 2816033 2820103 2827442 2830145 -2831323 2831647 2838085 2857921 2861062 2862579 2865317 2866105 2868767 2884637 -2886689 2887221 2893757 2893881 2898469 2902291 2904739 2906449 2915674 2922029 -2926703 2928291 2930885 2937874 2939699 2951069 2951897 2956115 2970327 2977051 -2986159 2988073 2991265 2997383 2997797 2998165 2999847 3004603 3005249 3007693 -3022345 3022438 3025541 3027973 3033815 3033877 3034205 3047653 3055019 3056977 -3066613 3068891 3078251 3082729 3085771 3087095 3090277 3093409 3093459 3095309 -3101527 3102449 3114223 3120469 3124979 3130231 3137771 3140486 3144905 3147331 -3151253 3154591 3159637 3160729 3168685 3170366 3172047 3192101 3197207 3199353 -3204935 3206269 3206733 3211817 3230882 3234199 3235687 3243737 3246473 3255482 -3267803 3268967 3271021 3275695 3276971 3286355 3292445 3295331 3299179 3306801 -3307837 3308987 3316411 3328039 3328997 3332849 3339611 3346109 3349085 3361795 -3363681 3372149 3374585 3377129 3377543 3377915 3379321 3381487 3387215 3390361 -3400663 3411067 3414433 3415997 3420835 3424361 3425965 3427391 3427887 3445403 -3453839 3453987 3457817 3459463 3467443 3479998 3487583 3487627 3491929 3494413 -3495057 3502969 3514971 3516263 3518333 3531359 3536405 3537193 3542851 3545129 -3545229 3558583 3569929 3578455 3585491 3595659 3604711 3607315 3607426 3610477 -3612791 3614693 3617141 3621005 3624179 3628411 3637933 3646313 3648385 3651583 -3655847 3660151 3662497 3664293 3665441 3672985 3683017 3692193 3693157 3702923 -3706577 3719573 3728153 3735407 3743095 3744653 3746953 3748322 3753673 3765157 -3771595 3779309 3779831 3780295 3789227 3790655 3800741 3809927 3816131 3817879 -3827227 3827391 3833459 3856214 3860173 3861949 3864619 3872901 3881273 3900281 -3915083 3926629 3928497 3929941 3933137 3946813 3946827 3962203 3965315 3973319 -3985267 3993743 3997418 4012465 4012547 4024823 4031261 4031705 4035239 4039951 -4040509 4041005 4042687 4042805 4050553 4055843 4081181 4086511 4089055 4090757 -4093379 4103239 4121741 4131833 4133261 4138561 4143665 4148947 4153546 4170751 -4172201 4180963 4187771 4197431 4219007 4221811 4231283 4241163 4247341 4247887 -4260113 4260883 4273102 4274803 4277489 4291593 4302397 4305505 4309279 4314311 -4319695 4321933 4325633 4352051 4358341 4373511 4375681 4392287 4395859 4402867 -4405999 4406811 4416787 4425499 4429435 4433549 4436159 4446245 4449731 4458389 -4459939 4467073 4479865 4486909 4502641 4509973 4511965 4531115 4533001 4533657 -4554737 4560743 4565615 4567277 4574953 4585973 4586959 4600897 4602578 4609423 -4617605 4617931 4619527 4621643 4631155 4632959 4672841 4678223 4688719 4706513 -4709861 4710729 4721393 4721519 4724419 4729081 4739311 4742101 4755549 4757297 -4767521 4770965 4775147 4777721 4780723 4789169 4793269 4796351 4803821 4812035 -4821877 4822543 4823135 4829513 4834531 4846323 4864057 4871087 4875277 4880485 -4883223 4884763 4890467 4893779 4903301 4930783 4936409 4940377 4950545 4950967 -4951969 4955143 4999745 5009837 5034679 5035589 5047141 5050241 5069407 5084651 -5097301 5100154 5107739 5135119 5142179 5143333 5155765 5161217 5178013 5211503 -5219997 5222587 5231281 5240333 5258773 5271649 5276851 5280233 5286745 5292413 -5296877 5306917 5316979 5321303 5323153 5332255 5343161 5343899 5344555 5357183 -5382871 5389969 5397691 5411139 5436299 5448839 5459441 5487317 5511335 5517163 -5528809 5538101 5551441 5570917 5579977 5590127 5592059 5606135 5617451 5621447 -5622483 5634343 5635211 5644387 5651522 5656597 5657407 5659927 5677243 5690267 -5699369 5713145 5724677 5748431 5756645 5761691 5768419 5783557 5784321 5787191 -5801131 5818879 5824621 5825095 5827289 5837009 5841557 5852327 5858285 5888069 -5891843 5896579 5897657 5898629 5908715 5920039 5964803 5972593 5975653 5992765 -5996127 5998331 6009133 6024007 6024083 6027707 6047573 6068777 6107155 6129013 -6153655 6159049 6166241 6170417 6182423 6201209 6224743 6226319 6229171 6230319 -6243787 6244423 6247789 6268121 6271811 6298177 6305431 6315517 6316751 6322079 -6343561 6378985 6387767 6391861 6409653 6412009 6424717 6439537 6447947 6454835 -6464647 6468037 6483617 6485011 6503453 6528799 6534047 6547495 6578045 6580783 -6583811 6585001 6591499 6595963 6608797 6649159 6658769 6674393 6675251 6679351 -6704017 6709469 6725897 6736849 6752389 6791609 6832679 6876857 6883643 6903867 -6918791 6930763 6958627 6971107 6979061 6982823 6999643 7005547 7039139 7048421 -7050857 7058519 7065853 7068605 7119281 7132231 7139269 7152655 7166363 7172191 -7206529 7218071 7229981 7243379 7289185 7292311 7296893 7344685 7358377 7359707 -7367987 7379021 7395949 7401443 7424087 7431413 7434817 7451873 7453021 7464397 -7465157 7482377 7517179 7525837 7534519 7537123 7556095 7563113 7620301 7624109 -7650231 7653043 7685899 7715869 7777289 7780091 7795229 7800127 7829729 7848589 -7851215 7858097 7867273 7872601 7877647 7887919 7888933 7903283 7925915 7936093 -7947563 7966211 7979183 7998403 8026447 8054141 8059303 8077205 8080567 8084707 -8115389 8138705 8155133 8155351 8176753 8201599 8234809 8238581 8258753 8272201 -8297509 8316649 8329847 8332831 8339441 8389871 8401553 8420933 8448337 8452891 -8477283 8480399 8516807 8544523 8550017 8553401 8560357 8609599 8615117 8642273 -8675071 8699995 8707621 8717789 8723693 8740667 8773921 8782579 8804429 8806759 -8827423 8869751 8890211 8894171 8907509 8909119 8930579 8992813 8995921 9001687 -9018565 9035849 9036769 9099743 9116063 9166493 9194653 9209263 9230371 9303983 -9309829 9370805 9379019 9389971 9411631 9414613 9472111 9478093 9485801 9503329 -9523541 9536099 9549761 9613007 9622493 9640535 9649489 9659011 9732047 9744757 -9781739 9806147 9828767 9855703 9872267 9896047 9926323 9965009 9968453 9993545 -10013717 10044353 10050791 10060709 10083499 10158731 10170301 10188541 -10193761 10204859 10232447 10275973 10282559 10309819 10314971 10316297 -10354117 10383865 10405103 10432409 10482433 10496123 10506613 10511293 -10553113 10578533 10586477 10610897 10631543 10652251 10657993 10682755 -10692677 10737067 10754551 10773529 10784723 10891199 10896779 10938133 -10991701 10999439 11096281 11137363 11173607 11194313 11231207 11233237 -11308087 11342683 11366807 11386889 11393027 11394187 11430103 11473481 -11473589 11484911 11506445 11516531 11528497 11529979 11560237 11630839 -11647649 11648281 11692487 11730961 11731109 11758021 11780899 11870599 -11950639 12005773 12007943 12023777 12041003 12124937 12166747 12178753 -12179993 12264871 12311417 12333497 12404509 12447641 12488149 12511291 -12540151 12568919 12595651 12625991 12664619 12689261 12713977 12726523 -12750385 12774821 12815209 12823423 12836077 12853003 12871417 12888227 -12901781 12999173 12999337 13018667 13055191 13119127 13184083 13306099 -13404989 13435741 13438339 13482071 13496749 13538041 13590803 13598129 -13642381 13707797 13739417 13745537 13759819 13791559 13863863 13895843 -13902787 13955549 13957343 13990963 14033767 14088461 14128805 14200637 -14223761 14329471 14332061 14365121 14404489 14466563 14471699 14537411 -14575951 14638717 14686963 14742701 14854177 14955857 14967277 15060079 -15068197 15117233 15145247 15231541 15247367 15320479 15340681 15355819 -15362659 15405791 15464257 15523091 15538409 15550931 15581189 15699857 -15735841 15745927 15759439 15878603 15881473 15999503 16036207 16109023 -16158307 16221281 16267463 16360919 16398659 16414841 16460893 16585361 -16593649 16623409 16656623 16782571 16831853 16895731 16976747 16999133 -17023487 17102917 17145467 17218237 17272673 17349337 17389357 17437013 -17529601 17546899 17596127 17598389 17769851 17850539 17905151 17974933 -18129667 18171487 18240449 18285733 18327913 18378373 18457339 18545843 -18588623 18596903 18738539 18809653 18812071 18951881 18999031 19060859 -19096181 19139989 19424693 19498411 19572593 19591907 19645847 19780327 -19805323 19840843 19870597 19918169 20089631 20262569 20309309 20375401 -20413159 20452727 20607379 20615771 20755039 20764327 20843129 20922427 -20943073 21000733 21001829 21160633 21209177 21240983 21303313 21688549 -21709951 21875251 21925711 21946439 21985799 22135361 22186421 22261483 -22365353 22450231 22453117 22619987 22772507 22844503 22998827 23207189 -23272297 23383889 23437829 23448269 23502061 23716519 24033257 24240143 -24319027 24364093 24528373 24584953 24783229 24877283 24880481 24971929 -24996571 25054231 25065391 25314179 25352141 25690723 25788221 25983217 -26169397 26280467 26480567 26694131 26782109 26795437 26860699 26948111 -26998049 27180089 27462497 27566719 27671597 27698903 27775163 27909803 -27974183 28050847 28092913 28306813 28713161 28998521 29343331 29579983 -29692241 29834617 29903437 29916757 30118477 30259007 30663121 30693379 -30927079 30998419 31083371 31860737 31965743 32515583 32777819 32902213 -33059981 33136241 33151001 33388541 33530251 33785551 33978053 34170277 -34270547 34758037 35305141 35421499 35609059 35691199 36115589 36321367 -36459209 36634033 36734893 36998113 37155143 37438043 37864361 37975471 -38152661 39121913 39458687 39549707 40019977 40594469 40783879 40997909 -41485399 42277273 42599173 43105703 43351309 43724491 43825351 44346461 -45192947 45537047 45970307 46847789 47204489 47765779 48037937 48451463 -48677533 49140673 50078671 50459971 52307677 52929647 53689459 53939969 -54350669 55915103 57962561 58098991 58651771 59771317 60226417 61959979 -64379963 64992503 66233081 66737381 71339959 73952233 76840601 79052387 -81947069 85147693 87598591 94352849 104553157 } +! This is a lookup table for the perfect hash adjustment values. +CONSTANT: adjustments-table +{ 0 5628 7017 1298 2918 2442 8070 6383 6383 7425 2442 5628 8044 7425 3155 6383 +2918 7452 1533 6849 5586 7452 7452 1533 2209 6029 2794 3509 7992 7733 7452 131 +6029 4491 1814 7452 6110 3155 7077 6675 532 1334 7555 5325 3056 1403 1403 3969 +4491 1403 7592 522 8070 1403 0 1905 3584 2918 922 3304 6675 0 7622 7017 3210 +2139 1403 5225 0 3969 7992 5743 5499 5499 5345 7452 522 305 3056 7017 7017 2139 +1338 3056 7452 1403 6799 3204 3290 4099 1814 2191 4099 5743 1570 1334 7363 1905 +0 6799 4400 1480 6029 1905 0 7525 2028 2794 131 7646 3155 4986 1858 2442 7992 +1607 3584 4986 706 6029 5345 7622 6322 5196 1905 6847 218 1785 0 4099 2981 6849 +4751 3950 7733 3056 5499 4055 6849 1533 131 5196 2918 3879 5325 2794 6029 0 0 +322 7452 6178 2918 2320 6675 3056 6675 1533 6029 1428 2280 2171 6788 7452 3325 +107 4262 311 5562 7857 6110 2139 4942 4600 1905 0 3083 5345 7452 6675 0 6112 +4099 7017 1338 6799 2918 1232 3584 522 6029 5325 1403 6759 6849 508 6675 2987 +7745 6870 896 7452 1232 4400 12 2981 3850 4491 6849 0 6675 747 4491 7525 6675 +7452 7992 6921 7323 6849 3056 1199 2139 6029 6029 190 4351 7891 4400 7134 1533 +1194 3950 6675 5345 6383 7622 131 1905 2883 6383 1533 5345 2794 4303 1403 0 +1338 2794 992 4871 6383 4099 2794 3889 6184 3304 1905 6383 3950 3056 522 1810 +3975 7622 7452 522 6799 5866 7084 7622 6528 2798 7452 1810 7907 642 5345 1905 +6849 6675 7745 2918 4751 3229 2139 6029 5207 6601 2139 7452 5890 1428 5628 7622 +2139 3146 2400 578 941 7672 1814 3210 1533 4491 12 2918 1900 7425 2794 2987 +3465 1377 3822 3969 3210 859 5499 6878 1377 3056 4027 8065 8065 5207 4400 4303 +3210 3210 0 6675 357 5628 5512 1905 3452 1403 7646 859 6788 3210 2139 378 5663 +7733 870 0 4491 4813 2110 578 2139 3056 4099 1905 1298 4672 2191 3950 5499 3969 +4974 6323 6029 7414 6383 0 4974 3210 795 4099 131 5345 5345 6576 1810 1621 4400 +2918 1905 2442 2679 6322 7452 2110 1403 6383 2653 5132 6856 7841 2794 6110 2028 +6675 7425 6999 7441 6029 183 6675 4400 859 1403 2794 5985 5345 1533 322 4400 +1227 5890 4474 4491 3574 8166 6849 7086 5345 5345 5459 3584 6675 3969 7579 8044 +2295 2577 1480 5743 3304 5499 330 4303 6863 3822 4600 4751 5628 3822 2918 6675 +2400 6663 1403 6849 6029 3145 6110 3210 747 3229 3056 2918 7733 330 4055 7322 +5628 2987 3056 1905 2903 669 5325 2845 4099 5225 6283 4099 5000 642 4055 5345 +8034 2918 1041 5769 7051 1538 2918 3366 608 4303 3921 0 2918 1905 218 6687 5963 +859 3083 2987 896 5056 1905 2918 4415 7966 7646 2883 5628 7017 8029 6528 4474 +6322 5562 6669 4610 7006 } -! This is a lookup table for the final hand values of all hands not covered in -! the flushes and unique5 tables above. +! This is a lookup table for the perfect hash final hand values. CONSTANT: values-table -{ 166 322 165 310 164 2467 154 2466 163 3325 321 162 3324 2464 2401 161 2465 -3314 160 2461 159 2400 320 3323 153 2457 6185 2463 3303 2452 158 3322 157 298 -2460 2446 152 3292 156 2398 3321 2462 5965 155 6184 309 2456 3320 2439 3313 -2395 2459 2431 2335 2451 6181 3319 3281 2422 151 2391 2445 6183 2399 2455 319 -3291 2412 5964 6175 2386 3318 5745 150 2450 6180 3312 3317 297 6165 2458 2438 -5961 2430 2380 142 2444 3311 308 3316 318 286 149 6150 5963 6174 3259 5525 3315 -2421 2397 2454 5955 148 6182 2373 3302 6164 2437 5960 2411 5744 2449 2365 3310 -5945 6178 2429 6129 2334 2394 2453 6179 6101 147 141 3309 6149 5741 2448 2356 -2443 3215 2269 5930 2420 2396 5954 3290 3248 3280 2346 6065 6172 2390 2410 3308 -317 146 6173 2442 5944 3258 6128 3270 2393 6020 3301 6162 145 3289 5735 2436 -2385 5958 2447 6100 5909 2333 6169 6163 2428 2332 5881 5725 6177 316 5929 3307 -3300 6159 144 2435 6147 3204 285 3306 2379 6064 2441 2389 6148 2427 5524 2329 -2419 307 143 5845 3288 5952 3214 3257 2268 6019 5710 5962 3160 2440 6144 2384 -2409 5305 5908 3269 5800 3305 3287 6171 5942 5521 3299 6126 2418 5743 2392 6155 -5880 2372 2434 5949 6176 6127 6098 5959 3304 2331 6161 2364 2426 315 2325 2408 -3298 3094 6099 2378 5689 140 2433 6168 5939 3286 6123 5740 5927 306 5661 5844 -6140 2425 3213 2320 130 6095 3279 2328 6062 6158 2355 5515 2417 2388 6146 5085 -5304 2267 5799 3297 6063 3149 6170 6135 274 2432 5953 5924 5523 6017 3247 2371 -2345 5625 2407 5505 2416 2383 3285 2424 3278 6018 5906 2314 6059 5742 3159 5935 -6160 2363 6119 5734 2387 6143 5943 3237 3284 296 5878 5580 6167 2406 3256 6091 -3017 5520 2324 6125 6014 5957 6154 3083 3296 6114 5724 2382 314 5490 5903 2415 -6097 5739 2377 139 6157 3295 2354 5920 6086 6145 5084 2319 5738 2423 129 3093 -5928 2307 3283 5875 5842 3212 3277 6122 2405 2266 6055 3203 3246 313 2344 2299 -305 6139 5915 2203 6108 3282 5709 6094 2376 5522 3158 5797 138 6061 3255 3294 -5514 6010 6142 3276 5951 6050 3193 5303 5469 6080 284 2414 2370 2313 5839 4865 -2381 6134 262 5899 2263 5733 6124 5956 6016 6153 3236 5441 5907 2413 3254 2362 -3293 2290 5504 6005 5732 5941 5301 5871 2404 3006 6096 5519 5794 6058 2330 6166 -304 5879 6118 5894 5948 5723 2929 3092 3275 5688 2403 2369 6044 2280 5722 6090 -6121 2375 3016 5866 137 3202 6013 5737 6073 4645 5660 6156 2306 5405 2361 6138 -312 2353 6113 5729 5938 3253 5081 5489 6093 5999 2265 5835 2327 5926 6060 3211 -2830 2298 5843 2259 6085 5950 2374 5083 3226 136 273 128 5888 5360 5708 2402 -4864 2343 6133 5295 5719 5513 5790 6054 6015 5707 5830 3192 5302 3157 3274 5860 -3210 6037 5798 5624 2352 3148 2254 6141 5940 2137 2202 2368 6107 2262 311 5923 -6057 3268 3273 6029 5285 6117 2289 5947 6009 5503 5518 5785 5731 3252 6049 3245 -5468 6152 2360 6079 5992 303 5579 5905 135 2342 3138 5934 6089 3015 2323 2367 -6012 5704 3251 3156 295 2918 4644 5440 5687 5984 5824 5877 2279 6112 3209 5937 -6004 5721 5300 2248 4425 3091 2359 3267 5925 5686 5715 5853 3082 5659 3272 2720 -6084 3182 5728 6120 2318 5270 3201 6151 2928 5488 5902 5779 2351 6043 5658 6137 -5075 2819 2258 5919 6053 6092 5082 3225 2326 3250 6072 2366 3072 3271 134 5404 -5874 5975 3147 5841 5512 3244 5718 5080 2200 6106 3090 2341 5922 5683 5998 2264 -5706 2350 4861 2829 6132 2358 5065 5817 133 5623 6008 5700 2253 3208 250 5914 -6048 261 3249 2241 6078 2201 5359 5904 2312 5655 2599 4863 5796 6136 5933 5622 -5502 5294 5809 3243 3266 3207 5517 2340 5249 294 6056 3235 2233 5467 5772 6036 -5876 5578 5838 5509 3137 6116 6003 5695 5946 3155 2136 5298 5898 4424 2261 5703 -5221 4855 5577 302 6131 3081 5439 5764 6028 2349 5284 132 6088 3265 3014 5050 -2322 6011 2927 5299 2247 5870 5901 5991 3005 4641 6042 5685 5793 5619 5499 5714 -6111 2357 5936 3089 5918 2709 5679 5487 5893 3181 3206 5736 3242 6071 4205 4643 -2305 2224 5873 5983 2339 5657 131 6115 5840 3200 6083 301 5078 2317 5651 5997 -127 2995 5865 3154 5574 5185 2828 3071 2297 5403 5755 2719 6087 238 5511 3013 -5913 5674 2321 6052 3205 5269 5079 2199 2214 4635 3264 5682 5834 3127 5795 3146 -6110 5074 5292 3985 3199 2348 2257 118 5484 5699 6105 5029 5646 2071 3191 5921 -3224 6130 5140 2240 5887 6035 5358 5654 2588 5837 5974 4862 5621 6082 6007 5501 -2134 5293 2316 6047 2347 5897 126 5466 5789 6077 5001 5615 3241 2311 5829 5495 -4860 2232 5932 5859 2338 5064 6027 5282 2288 5508 2252 6051 5730 5694 4845 2135 -5297 5869 3088 272 5990 3004 5668 5438 3153 5792 2598 3240 3145 5576 6002 2337 -5283 2197 6104 5892 5570 4421 3198 5516 5784 5248 5610 4204 3061 3263 5982 5640 -3080 3152 2278 3012 5618 293 6006 5498 6046 5720 4625 5463 300 5678 2926 4423 -6076 5864 5486 5900 2310 6041 6109 5220 4965 4854 5931 2917 4642 3262 2223 5823 -5480 2718 5727 5917 5049 5565 5267 5077 3234 2246 5435 5650 6070 5833 2994 4640 -2304 4830 5402 5872 5573 6081 3011 5072 3239 3984 2315 5852 6001 125 3171 2336 -3765 2005 4415 5673 3180 5996 283 4920 5268 3087 5886 2907 2213 3079 2827 5778 -5973 3126 5604 2296 3151 5475 5073 5291 5717 2818 5912 2925 5788 117 5483 3197 -5645 5357 249 6040 5705 5828 4858 3238 3086 5184 5858 5633 5062 292 2193 3261 -6103 299 124 5916 5510 2133 3190 2198 6069 5465 4634 2597 2303 5399 5559 3196 -5614 6034 3150 5494 5836 4859 6045 2808 5063 5281 5816 5459 2131 6075 226 5896 -2309 5028 5995 2260 5783 5246 2070 3144 5139 2239 4610 2826 5667 5437 3260 4809 -2295 3545 6026 3136 2188 6102 2287 5911 5500 3233 5808 5431 2984 2196 5868 5354 -5569 5989 5702 3003 5000 5218 4852 5247 5609 5791 6000 2916 3060 2231 3085 5639 -5289 5771 5822 5597 4781 4405 5454 5507 6074 5047 5891 2308 4844 260 5296 123 -3078 5462 4201 4422 4638 6033 5684 5981 5219 3195 4853 2277 5713 5851 106 2924 -5763 5589 3232 5479 3764 5895 5426 6039 282 4420 5048 5863 5564 5266 4203 3084 -5434 5777 5552 4639 6025 5656 5279 3143 5401 2286 2717 4390 5071 5497 2817 5726 -6068 2182 3170 3010 4624 2708 2302 5395 5867 237 5988 3002 5485 5832 3194 4964 -5182 4589 2906 3070 5069 3981 2222 5544 5603 2923 5994 2256 4745 5474 5890 6038 -5076 271 2825 5448 3009 4195 4632 2294 5681 5885 5980 291 5356 4829 2276 5972 -4857 5910 4561 5183 3983 5632 5061 5815 2192 5716 5754 5350 6067 5698 2698 2004 -5026 4414 2068 2301 5390 5862 5787 4919 5137 3231 5827 122 5420 3116 2212 4633 -5653 5857 3544 5059 5398 5558 3125 4700 2716 5620 5993 2251 3189 5290 2807 5807 -5264 5458 2130 6032 1939 2824 116 5482 4998 5027 5831 2293 5245 2069 2596 5138 -121 2127 3077 5770 3975 3142 2587 2255 5535 2187 5345 5693 4842 2132 3223 5782 -2175 2922 5430 2983 6024 5884 5464 5275 3008 5353 4999 2285 5217 5971 4851 5575 -5493 3135 5762 4525 5288 3188 5280 5596 3141 5987 3001 5453 4418 6031 5786 5046 -5701 5826 4843 2896 2167 4849 6066 4609 2915 2300 4637 5384 5856 2122 5436 4808 -2577 5617 5821 5889 2250 5044 105 4185 4622 5588 2707 5677 5979 2195 5425 3007 -2245 2275 6023 4419 3050 2595 4962 3230 2284 5413 4202 2823 3059 4480 5712 120 -5850 2292 5551 4780 5278 4404 5861 3761 5986 3000 3179 5781 5243 2181 4369 4623 -5649 5461 5339 5394 4200 2993 4827 2715 5572 5776 3229 4963 3134 5181 2797 3076 -5260 5068 2816 5543 5753 5478 3763 4170 2002 3140 4412 5672 5978 4917 3187 2274 -5265 5215 214 3105 3965 5447 4341 2914 119 2158 4631 6030 5433 281 3069 5820 -4828 5400 4389 5070 3075 3222 3982 2116 5883 3169 5349 115 2244 2697 2003 5025 -5644 4413 5970 2067 4629 5389 5680 4918 2714 5136 2921 4588 5419 3115 5711 290 -5377 5849 6022 3980 5255 2586 5058 5814 2283 3139 3755 4744 5473 5697 5825 259 -5023 2065 5263 5855 2148 5055 4194 5985 2238 225 3950 4997 5613 5775 5355 2249 -5652 3541 4856 2822 4560 3228 2126 2291 5060 5369 2815 3221 2191 5806 5534 5882 -2594 5344 4995 5969 4841 2174 4149 4607 5179 5332 5666 5977 2230 5274 3068 4806 -4305 3543 5769 5397 2273 4699 5506 202 5780 5239 289 5692 3074 5457 4839 2129 -2194 1938 5854 5568 3039 4417 3186 5244 248 5608 2895 2166 280 4848 3227 2920 -4608 5324 5638 3974 5383 2121 4778 5813 4807 5761 4402 2713 2576 2186 5696 2109 -5211 2061 2593 2973 5043 2913 4621 5134 5429 2237 4198 2982 4260 5819 5352 3185 -3049 3535 5216 4961 4850 5412 5040 5616 3929 6021 5496 3073 5234 4524 5287 2243 -2282 2687 5805 4779 4403 5452 4619 2706 5676 5045 2101 5563 3220 5242 3133 5848 -4959 2919 2999 2229 5338 4199 4636 5768 5968 4826 2221 3745 4387 3178 2796 5259 -5691 2821 5206 4835 104 4184 3168 2281 3762 2912 2001 5774 5424 4411 5648 2992 -4916 5818 4824 5214 1873 3104 4586 5571 2814 2905 5976 2998 5035 2157 3978 4479 -2272 5315 5760 5602 5277 4742 2242 5752 3760 4388 1999 4409 5671 2115 5175 4914 -4192 2180 4368 3067 5847 5393 2592 2211 4628 3124 3730 3184 4121 4558 5180 4587 -5631 3177 2820 5376 5067 2190 3979 5254 2712 2271 4615 4169 2705 5675 4743 5481 -5773 5228 5022 5643 2064 2092 3964 5446 2147 5054 4340 4193 5812 4630 2813 2566 -2220 5557 4697 3132 2585 5019 94 3901 4559 2806 5368 5130 2236 2128 2711 5170 -1936 5348 288 5647 3525 236 5024 2991 3219 2066 5388 5200 4820 4994 5612 3183 -5135 2911 5492 4606 5178 5418 5331 3114 3972 5804 5967 4805 2997 3542 5057 2185 -5751 4698 3754 4991 1995 1807 2962 5238 5670 2082 2228 5262 4838 279 5767 1937 -3949 4604 2210 3038 4996 5665 5811 3218 3123 4803 3540 5690 5846 5014 2056 4085 -2125 5323 4522 5286 3973 5595 5966 4777 5125 4401 3709 2235 2270 114 3176 5343 -2108 5210 5642 2060 3510 5567 2972 4840 2173 5607 4148 5133 4197 5759 3058 2591 -2996 5273 4304 5637 5803 2584 4775 4399 5039 2812 4986 103 5233 4182 4523 5587 -2686 2227 4618 190 5460 5766 2885 4416 2100 5611 5491 5164 2894 2165 4958 4847 -4040 4477 3066 5550 2590 5382 3028 2120 5276 2704 3131 287 5477 3758 4386 4955 -3865 5042 5205 4834 5562 2179 4183 4366 4620 2219 4600 5664 4259 5432 5758 5193 -4799 3048 3534 4960 4823 3217 213 4585 5411 3928 4384 5066 5034 3977 4478 5810 -5542 5314 4167 3130 2710 4741 2990 270 5008 3759 2050 1998 5566 4408 5241 5119 -5174 5606 4913 3962 2234 4338 4191 3057 4367 4583 5337 2904 5636 3489 5750 2786 -4825 3744 4771 1990 4395 5601 2703 5669 2910 4557 4739 2795 5472 4910 3820 5258 -5802 4950 3681 2209 4614 2696 4168 2000 3175 4189 4410 247 4980 2218 5227 4915 -3216 5213 2091 1872 3103 2226 3113 3963 4339 5765 4555 2156 2565 5630 5056 2589 -4696 113 5476 3752 5018 5641 93 2811 2989 4815 2114 5129 5561 5261 3645 5169 -1935 3947 3174 2583 4627 5199 3538 4819 5396 5556 5749 5157 3729 82 4694 4120 -4380 2124 3065 3971 5375 5757 4905 2805 5253 5533 5456 258 3753 4990 2208 3129 -1994 1933 201 2961 3122 5021 2172 2063 2081 4146 4579 2146 5053 2903 5272 3948 -4603 4302 3969 178 4802 5600 3539 5149 4735 112 5471 3900 5013 3064 2055 2909 -4521 5367 4595 5124 2702 5663 5428 2874 2043 2981 3524 5351 2582 4944 5112 4993 -278 2164 4846 4147 4605 4551 5177 5330 2217 5629 2119 3461 4804 4303 4519 2189 -2575 5594 4774 3128 4398 5451 1806 5237 4985 5605 5041 5801 4181 3056 4837 5635 -4257 4973 1741 224 2035 3037 2884 2951 3047 3532 3173 5555 5104 4690 2225 5163 -3926 2908 4476 4084 5322 2804 3425 3027 4776 5748 5455 102 4179 4400 3708 5586 -1984 3757 1929 5662 5423 4794 2107 4899 5209 4954 5240 2059 3509 2810 2971 4365 -5132 2207 4196 4599 2775 4258 4474 3121 3742 5192 4798 5549 3533 2184 277 5038 -5560 5257 2676 3927 4383 5756 5232 3063 2685 4166 5427 235 111 3600 2980 4363 -4617 5007 5634 2049 5392 3172 4766 2099 5212 1870 4375 3102 5118 3961 4957 4337 -2155 4039 4582 4515 3167 2581 5593 2785 3743 4770 5541 1989 4394 5450 4164 4385 -4738 4909 2113 2809 3864 4574 5204 4949 4833 2701 2902 3959 5445 4335 4188 4626 -4979 5599 4937 2026 5470 3727 4118 4822 1871 4584 5095 2216 5033 4554 3976 3062 -5252 5313 4175 5585 3380 3751 4740 5422 5347 2695 1997 5020 4407 2062 4814 5387 -4546 5173 4912 2940 2700 2145 5628 5052 4190 3946 2988 5417 269 4470 4788 5548 -3488 4929 3537 3166 5156 3728 3898 81 4693 4119 3749 4556 4379 2215 3819 4904 -5747 3680 1977 2178 4359 4613 2901 3522 5391 5554 1932 3944 4892 2016 4992 5226 -5598 4145 4730 2090 2555 3055 5176 2206 4578 2803 2987 3120 2123 4301 2564 4760 -3968 5540 1675 1924 4695 4160 5148 5017 4734 1804 5532 5236 92 3899 5342 5128 -4836 5746 4594 3644 110 3955 5444 1969 5168 4143 1934 4331 2873 5627 3036 2042 -3523 4884 2183 4299 5198 4943 5111 4818 4082 2205 4550 3970 2580 3119 2979 4518 -3706 5346 2694 4989 1993 2106 5208 1805 2960 2058 3507 5386 5553 2970 4685 2080 -5131 2893 109 4510 5416 3112 4256 4972 189 5592 2802 4602 2034 2950 5381 3531 -5449 2118 4801 5103 4689 2574 1918 5037 2665 3925 5012 5231 2054 4083 4520 2579 -276 3165 5123 4178 3707 4616 1983 1928 3940 2098 4254 4793 4898 3508 268 3529 -4956 4568 4037 2900 5410 101 2863 3923 2774 5584 3460 4473 3741 2986 5421 4724 -2978 4773 5531 4397 5341 2675 4984 3862 5203 4832 4180 2171 4139 4465 2699 5547 -4362 1740 1960 5271 5336 2883 4295 5591 4765 4821 3739 1869 4374 4875 3054 4540 -5162 5626 5032 4038 2794 4475 4753 2204 2177 4514 3424 4354 3026 3118 3756 4163 -1996 4406 4953 5172 3863 4911 4573 2892 2163 1867 4364 3101 3958 4598 5539 4334 -3486 108 5380 2985 100 4155 5191 4936 4797 5583 4679 2025 3726 2573 4117 3053 -5094 3817 2801 4382 2764 5443 3678 2112 4326 4174 4612 4165 70 2578 3599 1950 -5006 4250 5546 5225 2048 3046 2544 2089 5117 4545 3960 3724 5409 2939 4115 4336 -3919 4581 275 4469 4787 5374 3487 3117 2784 4928 2176 2693 4769 4348 1988 5016 -4393 91 3897 5385 3748 4737 4908 5127 3818 3164 5415 4948 3642 246 5167 3679 -223 1976 4358 3521 107 5051 5335 4187 4978 3943 4891 5538 5197 2015 4817 3735 -2852 4729 212 2554 2793 3895 4504 5256 4553 5590 4759 5366 4717 177 1923 3935 -5442 3379 3750 4320 4159 4988 1992 1803 2959 3519 2079 4813 3163 1863 257 3643 -3954 1968 4142 3945 4601 4330 2154 5329 4883 5530 4800 4298 3536 5340 4533 5155 -2692 80 4692 2899 5011 4378 2053 4081 3052 1801 2170 99 4134 4903 5582 5122 -3705 4709 5414 3111 4290 1931 3506 3035 4684 3720 4144 4111 4577 4459 4509 3458 -5373 5545 4079 4300 5321 3967 4672 5251 1674 4772 4396 3703 1917 2753 5147 2664 -4733 2800 4983 2891 2105 2162 2057 3504 267 1911 4593 5379 1738 2144 2117 2872 -3939 2882 2041 2572 4253 4942 5110 5529 5161 3528 4567 4036 3891 3051 5036 4549 -2862 3922 3422 3025 5365 5537 3459 2169 4517 4664 4128 4245 4723 2684 3045 3515 -4284 4952 200 3861 5408 2097 3914 2977 1903 4138 4464 4597 3162 5328 4034 4255 -4971 1739 1959 5190 2033 4796 4294 2949 3530 3738 5102 4874 4688 4539 3924 4381 -1797 4497 5235 2898 4752 3423 3859 4353 2890 2161 4831 5334 3597 4177 2691 1982 -5005 1927 2047 2654 5378 256 4792 4897 2571 5116 2792 2976 3110 1866 4580 4075 -5320 3485 2773 5031 2783 4472 3740 4154 4768 1987 4678 5312 4392 3699 4736 4239 -4907 3816 4489 2674 98 5207 1858 234 245 3500 5581 4947 2969 2763 3677 4325 -5407 2153 3161 69 3908 4186 3598 4977 1949 4361 4249 3483 4764 2543 1868 4373 -3723 4452 2111 4114 4552 3918 2897 5230 3814 4513 3377 2683 5528 3675 4347 4655 -4611 5333 4162 4812 3715 97 4106 2168 2799 2841 4572 3641 5372 2088 2791 4030 -3957 5250 1894 4333 2563 4935 3734 5154 2024 3725 2851 79 4691 4116 4377 5015 -4444 5093 90 3894 5536 4902 4503 3855 5202 1852 2143 3100 4173 4716 3934 3378 -3639 4319 2152 1930 3518 3886 2889 2160 4816 4313 1862 4544 4576 2938 5364 2975 -2110 3966 4468 4786 1672 5311 2570 4927 5146 2533 4732 4532 3896 3747 4987 1991 -1800 2958 2798 4133 4592 2643 5171 5327 4100 2078 2690 4708 1975 2871 4357 2040 -1884 4289 5371 3520 3942 3044 4890 3479 4941 5109 2014 1792 5406 3109 3719 4728 -2742 4110 2553 4548 4458 3457 5010 3810 2052 4078 4516 4758 4671 3671 1673 1922 -2142 3034 4158 3702 2752 1802 5224 3503 96 4070 1910 5319 3880 2689 3953 2974 -1967 4970 1737 4141 4329 2032 5363 2948 3694 2562 3455 4882 4297 5101 4687 2790 -2104 3108 89 3495 3890 2968 4080 3421 4982 4435 5126 5527 4176 4663 3704 4127 -3635 1981 5166 4244 5326 1926 1735 3514 4791 4896 4283 3505 266 5196 1845 3099 -4683 3913 1902 1786 2151 5229 4277 4508 2772 4033 4471 2682 3419 3024 1916 2663 -2096 233 2673 1796 4496 255 4951 95 4025 3858 5526 3596 4360 4064 5318 3938 -2653 4596 4763 4252 211 4372 3688 2159 4795 4093 3527 4566 4035 3850 5370 2103 -5201 2051 4269 4074 2522 2861 4512 3921 2967 2569 5121 3698 4722 4161 3594 4238 -5004 4488 2046 1857 3860 3499 4571 2141 5030 4137 3956 4232 4463 3907 4332 5310 -188 3043 3451 1958 4934 4293 2023 2681 3482 2888 265 3737 4767 4873 3873 1986 -5092 4391 4538 4451 5362 3107 2095 4906 4751 3813 4172 2568 4352 3376 4946 3674 -4019 3474 4654 1731 2881 4976 3714 4105 4543 2840 2937 5160 3805 5325 1865 4224 -4029 4467 4785 3666 1893 3844 3484 3042 3415 3023 4926 4153 4677 2789 3374 3746 -1779 5223 4443 3815 2087 3854 2762 4811 3676 1851 1974 4324 4356 68 2561 3638 -3033 2688 3941 1948 4889 4248 2013 5309 5189 58 3098 2542 3885 4727 2552 4312 -2150 3722 4057 5317 78 3106 4113 3917 4376 4757 3630 5165 1671 1921 4901 2632 -4157 4346 2532 3590 199 2102 5195 2045 3468 222 2642 5115 3640 4099 3952 1966 -4140 4328 1883 4575 3799 4881 4296 3478 3660 2782 1837 3733 3097 1985 1669 2850 -1791 2957 2887 2741 2149 4731 2077 3893 5222 4502 3809 2680 2086 3670 4715 3933 -4591 2567 4318 2870 2560 2094 2039 3517 4682 4940 2140 5009 1861 4012 88 4069 -3879 4507 4547 5120 4215 3693 3454 3624 3041 2731 3370 1915 2662 4531 3494 5361 -3837 1799 5194 4810 4434 4132 3634 4707 3446 3937 4288 4251 4969 1734 2031 2947 -3526 1844 4565 5153 2886 3718 2139 4981 77 4686 4109 1785 2956 2860 3920 4457 -4276 3456 5308 4077 2076 4670 3418 4721 1726 176 1771 2880 3701 2751 1980 1925 -2788 5159 4790 4895 3502 4024 4136 4462 1909 3032 3410 1736 244 4063 1957 2511 -4292 2771 3040 1665 3736 4872 3687 4092 4537 5145 1828 5316 3096 3889 3792 3849 -4750 4268 2521 264 3420 4351 3653 4590 4662 4126 4243 46 254 5188 2038 3593 -3440 2966 3513 4282 2085 5108 4762 1864 3912 4371 1901 4231 3031 2559 4032 3450 -4152 4676 3585 4511 5003 87 3872 1720 4049 2787 2879 1795 4495 5114 2761 2679 -4323 3617 3857 5158 4570 67 3595 4018 1947 3473 4247 2093 1730 2781 2652 2030 -3404 232 2965 2946 2541 4933 5100 2022 1818 3095 3721 4112 3804 3916 4223 2138 -4945 4073 3665 3843 3414 4345 4171 3697 4975 1979 3373 1778 221 4237 3829 5187 -4789 4487 2075 1856 3498 2678 4542 3906 2936 253 3365 4466 3732 4784 57 2849 -3481 4925 3579 4004 5002 3892 4450 2044 4056 4501 2672 5307 3629 3812 5113 4714 -2631 3932 3375 4317 3673 1973 3589 4653 4355 3516 3467 1762 5152 2780 4888 3713 -4761 76 2012 4104 1860 4370 2839 4726 263 4900 4028 3433 3798 1892 3030 3659 -4756 1836 4530 1668 1920 4156 3784 4974 1798 4442 4131 2621 5306 3853 4569 1850 -4706 4287 1713 3637 3951 1965 2878 1660 4327 2084 5144 4880 2021 3359 3717 2964 -3884 4108 4311 4011 4456 5091 2558 4076 3397 3022 4669 4214 1670 2869 3623 86 -3700 2730 3369 2750 2531 1752 4939 5107 3836 3501 3609 5151 1908 2641 4541 4681 -4098 187 2935 3445 1882 4506 3029 5186 4783 3477 2083 1790 3888 2740 1914 2661 -3995 2557 3808 4661 4125 3669 4242 3572 4968 1725 1972 85 1770 2955 243 3512 -4281 3936 2074 5099 2011 1654 2963 3911 2610 5143 1900 4725 2551 4068 3878 4564 -4031 3409 2510 2859 2779 3692 4755 3453 1978 1664 1919 2868 4720 2037 1827 4894 -1794 4494 3493 3791 4938 5106 3856 4433 3652 2677 3633 2770 1964 4135 4461 2651 -45 2954 3439 1733 1956 2073 4291 1843 2671 4871 2500 1784 4536 4072 4275 4749 -3352 3584 3696 3417 4350 4236 4967 1719 2029 4048 4486 1855 2945 3497 3775 5098 -4680 3616 4023 1705 3905 210 4505 4062 3403 3480 5150 4151 3686 75 4675 4091 -1817 4449 1913 252 3848 3389 3021 4893 4267 3811 2520 2556 2760 3672 4322 4652 -66 4932 2769 3592 84 1946 3828 3712 4246 4103 2838 5090 2540 4563 4027 1696 -4230 2670 1891 2877 2858 3915 3449 1647 3364 5142 4719 3578 3871 4344 4003 4441 -2489 3020 3852 1849 2934 3564 3636 2867 4460 4017 2036 3472 1729 4924 1955 1761 -2953 5105 3883 3731 4310 2072 2848 4535 3803 4222 3432 2778 3664 175 4748 3842 -4500 1971 3413 4349 2530 4713 3931 4887 3372 83 1777 4316 3783 4931 2020 2620 -2550 2640 4097 3555 5089 1859 1881 4966 1712 2028 1659 220 3476 4150 56 5097 -4674 1789 3358 2739 4529 4055 3807 3396 198 3628 3344 2759 3668 1963 4130 2630 -4321 231 65 4705 3588 4879 1945 4286 4782 1751 2952 3466 4923 3608 251 4067 -3877 3716 4107 2768 3797 4455 3691 34 3452 2876 3658 74 4668 1835 4343 1667 -3492 2669 2749 4886 2010 3994 4432 3335 3019 3632 2549 3571 1907 1732 4754 1842 -1653 1912 2660 2847 2609 1783 4010 4274 3887 4499 1639 4213 3416 5141 4712 3622 -3930 73 4660 2729 4124 3368 4315 4241 4878 3511 3835 4280 4562 4022 209 242 -3910 4061 3444 1899 1686 4930 2875 2019 3685 4090 4528 5088 3847 2499 4266 2519 -1793 4493 1630 4129 3018 3351 2777 1724 4704 1954 1769 3591 4285 2650 4870 3774 -4534 219 2659 4229 2866 1704 2027 4454 3408 2944 3448 2509 4071 4922 5096 4667 -1663 3870 3695 2748 1826 3790 4235 3388 4485 1854 3651 3496 1970 4016 1906 3471 -2478 1728 44 2857 3904 4885 3438 2009 4718 2548 3802 4221 2767 1695 241 4448 -3663 3841 2943 3412 1646 64 2776 3583 4659 4123 1944 3371 4240 1776 2668 1718 -72 4651 4047 2539 4279 2488 3711 4869 4102 3615 3563 3909 1962 2837 1898 4026 -4747 4877 3402 55 1890 4342 1816 4054 197 4492 4440 3627 2629 3851 1848 1620 -3587 2667 3465 2649 3827 2846 4673 3882 3554 4498 4309 3796 2865 2018 2758 3657 -3363 1834 4314 1666 63 2658 5087 3577 71 2529 4002 4234 4484 1853 2538 3343 -2639 4096 3903 1880 1760 4527 3475 2933 4009 1788 4447 2856 2738 3431 4212 4921 -33 3806 2017 3621 22 2942 2728 3367 3667 5086 4650 3782 3834 3710 2619 4101 230 -2836 3334 4453 3443 4066 3876 1711 2864 1953 2008 1889 1658 3690 4711 4868 2747 -2547 3357 2932 4439 3491 4746 3395 1638 1905 2766 4431 1847 1723 1768 3631 1750 -186 3607 3881 1961 1841 4308 3407 2508 1782 4876 1685 4273 2007 4122 2941 1662 -4703 2546 2528 1825 4278 3789 3993 2757 3650 1629 1897 2638 4095 4021 3570 43 -1943 3437 1879 4060 4666 2537 1652 2608 3684 1787 4491 229 4089 2737 3846 2765 -4265 2518 3582 1904 2657 240 1717 4046 2666 3614 4065 3875 2477 4228 3401 3689 -3447 4658 2845 1815 4233 4483 208 3869 3490 2931 2498 4430 4710 3902 3350 1896 -2656 4015 3826 3470 1727 3773 1840 4446 1703 1781 1952 3801 4272 4220 3362 3662 -3840 4867 3411 2006 4526 3576 4001 2648 2545 2855 1775 3387 2835 4020 4702 1619 -1888 4059 1759 3683 54 4088 4438 2930 3430 1694 3845 1951 4053 1846 4264 2517 -4665 1645 3626 4866 2628 2746 3781 3586 2756 2618 2487 3464 4307 62 3562 1710 -1942 4227 1657 3795 2536 239 3356 3656 1833 4649 3868 174 3394 2637 4094 4657 -2834 21 1878 4014 3469 1749 1887 185 196 3606 2736 61 3553 3800 1941 4008 4219 -3661 3839 207 2535 4211 3620 2727 3366 1774 4490 3992 2854 3833 3874 3342 4306 -3569 2647 3442 1651 53 2607 2527 4052 4429 32 3625 228 2844 2627 1722 1877 2655 -1767 4482 1839 3463 4701 1780 3333 4271 2735 3794 3406 2507 3655 1832 1661 4445 -2497 1824 2853 3788 1637 3349 3649 4058 2745 4648 42 3682 3436 4087 3772 218 -2755 1702 4007 4263 2516 60 1684 1940 4210 3619 3581 2726 2534 4437 3386 1716 -4045 3832 4656 1838 1628 4226 3613 195 3441 4270 3400 3867 1895 1693 1814 1644 -4013 2526 1721 1766 2843 2486 3825 2636 2754 4086 3561 4218 59 2646 3838 2476 -3405 4262 227 2506 3361 173 1773 217 3575 1823 4000 3787 3648 4225 41 4481 52 -3435 1758 4051 3866 3552 2645 2626 3429 3580 2842 3462 1715 4044 3780 4428 3341 -2617 3612 4647 3793 1618 4217 1709 3654 2744 1831 3399 1656 206 3355 1813 1772 -1886 31 3393 4436 3824 1748 51 4006 3332 3605 4646 4050 4209 3618 2725 3360 -2625 2833 3574 3999 3831 1885 2515 1636 3991 2525 20 3568 2743 1757 2635 1830 -1650 1876 2606 1683 3428 184 1765 2734 3779 1627 2616 2524 4005 2505 1708 1655 -4208 2634 1822 2724 3354 3786 1875 3647 3830 2496 3392 40 3348 3434 194 1747 -4427 3604 3771 2475 1701 2644 50 1714 4043 1764 2832 3990 3611 3385 216 3567 -3398 2504 4426 1812 1649 2605 1821 3785 1692 3646 1829 1643 3823 39 4261 2514 -2485 1617 3560 2523 3573 3998 2831 183 4042 2495 1874 3610 2723 3347 1756 2733 -2513 3770 1811 3427 1700 3551 3778 4216 2615 3822 3384 19 1707 3340 1763 172 -3353 2633 3997 3391 1691 215 1642 30 1820 1746 2732 3603 1755 2484 2624 3559 -3331 38 3426 3989 3777 2614 49 3566 1635 1706 4041 1648 2604 2623 2512 3550 -3390 1682 1810 1745 4207 3602 205 3339 1626 3821 2494 3988 3346 29 3565 3996 -3769 4206 171 1699 2603 193 3330 2474 1754 3383 2503 1634 48 3776 2613 1690 37 -182 2493 1641 1681 3345 2483 2502 3558 3768 1625 1698 1819 1616 1744 3601 3382 -47 3987 3549 2622 1689 2722 2473 1640 2602 3338 2482 3557 1809 18 28 1753 2492 -3329 2501 3548 2721 1615 204 3767 1697 1633 36 3337 3381 1680 1743 27 2612 1688 -1624 170 3328 17 1808 2481 3556 35 1632 2601 2472 1679 3986 3547 1623 192 203 -3336 3766 181 26 1614 2471 2491 3327 1742 1687 1631 2480 2611 1678 16 1613 180 -1622 191 3546 2490 2470 15 2600 25 3326 169 24 1612 2479 1677 1621 1676 14 168 -2469 2468 1611 23 1610 13 179 12 167 11 } +{ 148 2934 166 5107 4628 166 166 166 166 3033 166 4692 166 5571 2225 166 5340 +3423 166 3191 1752 166 5212 166 166 3520 166 166 166 1867 166 3313 166 3461 166 +166 3174 1737 5010 5008 166 4344 2868 3877 166 4089 166 5041 4748 4073 4066 +5298 3502 1812 166 5309 166 233 3493 166 166 3728 5236 4252 4010 2149 166 164 +4580 3039 4804 3874 166 6170 2812 166 4334 166 166 166 166 166 166 1862 224 +2131 6081 166 2710 166 166 166 4765 166 1964 5060 166 1897 166 3987 166 166 +5566 2021 166 45 166 166 3283 3932 166 166 3519 166 166 291 166 166 5132 2800 +166 166 166 5531 4054 166 3509 166 166 4908 3028 1756 1910 4671 2729 5224 166 +121 3327 3317 166 181 2371 5541 166 1787 2666 5134 5698 166 5480 3870 166 3823 +166 3165 5343 5123 5089 166 2422 3724 166 2735 1953 5724 4444 4871 166 166 5001 +5512 3133 5171 166 2216 166 4877 4542 166 166 166 5270 166 166 166 1922 69 3547 +166 166 166 166 166 231 4547 5155 3357 3464 166 72 3332 166 4392 5971 3896 4451 +3173 2569 166 4466 2518 1698 2850 5349 166 166 4457 5062 166 2202 1650 2191 166 +1950 2583 166 5293 2032 5893 166 3994 5392 3878 96 166 166 3195 166 4001 1900 +2513 6027 166 166 166 166 5407 166 166 2332 5125 5891 3096 3172 166 166 3065 +166 166 4535 166 166 166 4553 3131 3693 166 2255 2613 166 166 166 166 2866 166 +166 166 2940 5333 3199 166 2628 4312 166 166 1794 4681 2058 3606 166 166 3542 +2166 4696 2520 166 4739 166 2563 166 166 3681 166 166 166 4127 1967 2972 166 +5227 166 166 5551 4255 56 166 5553 3219 4367 166 3218 4749 2886 3695 3711 2228 +166 166 166 2268 5054 3749 4825 166 4933 4992 4530 166 4892 3400 166 197 166 +6078 166 166 3971 166 166 5357 1852 3377 166 5196 3740 5320 166 166 3099 166 +4562 6061 3294 166 166 166 166 3266 3627 2567 166 228 2773 166 166 53 1833 2401 +124 166 4272 3922 5959 2903 3923 166 6155 166 166 166 166 216 166 5247 166 5591 +166 166 82 87 4526 166 166 5439 166 4935 166 3187 1869 166 1764 5500 6023 3356 +166 3350 2457 2455 166 1637 166 3342 166 166 3355 5154 166 276 166 166 166 3371 +5969 166 1665 166 166 166 166 166 166 166 4092 1712 3122 5086 166 166 4906 166 +2591 166 166 166 1894 2997 166 4476 4384 166 4747 4109 2655 166 5978 1636 4898 +166 166 166 166 166 166 166 5207 166 166 3712 3876 91 5876 3786 5998 166 166 +166 4391 166 166 2832 2220 4435 166 166 5796 3156 6112 166 1643 1821 3129 166 +4200 166 5857 166 166 2351 5902 1855 5043 166 3167 5191 3996 5718 4876 3071 +2965 5735 5930 6149 2345 3297 3822 166 166 307 6019 1859 2981 4914 3320 6165 +2328 140 2372 308 166 2280 5081 166 3275 166 159 2399 2327 5489 4690 6059 4492 +4269 6058 166 19 166 3323 5708 128 4812 2949 166 166 2890 2630 5237 166 256 +3673 4621 5380 166 3353 166 1651 2573 1635 4011 3429 3370 3720 166 166 6108 +3848 5104 2851 1998 166 166 5106 20 166 2633 166 166 166 166 5662 125 3651 1731 +4702 166 3197 166 2947 3046 4196 2185 6100 166 2602 2908 2487 166 5232 166 4028 +5919 166 2680 3608 3252 166 4899 166 166 166 166 2529 166 166 166 166 166 2534 +166 2299 4076 166 3643 166 3921 166 166 166 1939 2124 1829 2436 3892 166 3481 +271 5307 1697 166 166 5098 2906 5545 166 5980 3203 166 1903 4626 4674 6118 6097 +5926 4136 1677 3232 4720 166 166 166 229 2012 3620 166 3798 166 166 2609 3489 +3809 166 166 166 166 166 166 166 5826 166 166 166 4903 166 166 166 166 6168 166 +5052 5044 5644 2375 2677 4012 3062 5831 4752 166 4125 2610 2062 3238 292 2533 +5872 51 166 1947 4225 166 2288 4845 166 5788 166 5717 166 166 5549 5619 166 +4165 166 2721 2311 5501 4416 4383 166 166 3068 5499 5936 166 4204 4766 4688 +1870 5220 166 166 166 166 237 2523 6039 3061 2793 3998 166 2545 2309 3144 3679 +3969 166 166 166 4379 3574 205 2808 5822 166 166 2188 4823 4990 5561 5711 166 +5627 6034 5253 3783 5047 4405 166 59 1755 3178 318 166 4710 2933 3409 6062 2821 +166 6099 166 4178 166 166 4122 36 4779 166 166 4323 3073 5410 2101 166 166 44 +5690 166 3265 166 5222 5909 1838 166 4755 2215 166 4082 166 166 3210 5140 3124 +5238 166 5913 2321 166 2416 5976 3918 5078 4218 5703 4897 6011 5685 2214 166 +166 6180 5175 1715 166 166 3760 4497 1808 4826 166 2540 166 166 5513 4971 5915 +166 166 2525 166 4480 42 232 2412 2797 3229 5263 2852 5543 2126 3562 166 2872 +4695 5985 5136 2714 4262 5473 166 4160 4347 166 166 166 166 5271 166 166 5108 +166 166 166 166 5437 4875 3963 4362 5820 5559 4890 4728 166 166 2692 166 4870 +3591 5472 166 2690 166 5854 3817 166 280 166 166 113 4128 3396 166 4264 5058 +2283 166 2281 4916 5671 166 2708 166 166 4589 166 166 4689 166 1686 166 166 166 +166 166 1774 166 166 166 5651 3777 2234 166 3864 18 3589 4592 4777 166 166 5254 +4245 166 166 166 4368 5172 3522 166 4306 153 5230 166 5598 5420 311 2414 4159 +2985 5137 166 2179 1801 166 4595 2083 2020 166 3602 2170 4259 3048 166 166 4193 +2350 166 166 2702 166 4521 166 166 2496 166 4593 2006 166 166 2292 4135 166 +6069 4623 166 166 4827 3995 4291 3243 166 166 166 5622 166 3539 166 166 4915 +4373 2479 3775 6008 5838 4321 1612 5530 166 3773 4267 4086 3081 2261 166 166 +4785 4641 5292 166 4820 5612 5556 166 166 166 4396 6084 3414 166 3331 2380 5921 +4315 2340 166 5511 166 4713 3754 2912 2553 166 3468 5388 166 1932 3540 5834 166 +166 3186 5258 166 4107 166 166 166 166 166 166 166 166 2108 12 2368 2789 166 +166 4148 1878 166 166 2324 4179 2945 2531 166 166 166 4485 3765 2308 166 2754 +166 6102 166 1921 260 2241 166 2592 166 166 166 4964 166 3055 5261 4943 2916 +166 201 5728 166 5759 4314 4730 6024 166 4926 4762 1834 2055 166 40 166 5416 +166 3722 2360 1928 166 4889 4590 5550 3498 166 6003 2029 4106 4346 3758 166 +2753 103 1891 5067 166 3398 2079 5784 3074 3787 166 166 3936 166 5766 166 4847 +3928 5119 166 5181 4602 2605 5712 4523 166 166 4717 166 2227 2181 166 4678 166 +166 4901 166 4980 166 166 166 166 5806 2894 5631 4995 2608 166 166 166 3917 166 +3417 166 2795 1655 3189 3364 166 4839 3510 4212 5641 6091 138 166 166 3343 4620 +2722 4566 166 3518 3424 166 166 1653 166 5057 166 5375 4833 166 4273 4348 166 +166 166 4912 166 3662 166 4281 166 5169 166 5883 2737 2572 4685 4068 166 4214 +166 166 2409 166 166 4571 166 5624 5722 5949 166 3675 166 166 5109 3428 166 166 +5446 166 3290 166 3309 166 166 4776 166 166 166 166 166 166 5617 2860 166 166 +166 166 3629 1741 166 166 183 4973 3047 2854 75 2035 3652 2159 166 4150 6037 +3225 4519 1902 2678 2413 1961 166 166 166 166 4972 1847 166 5636 4017 166 3345 +166 4520 166 2861 166 3092 6060 157 2542 2298 4496 166 2607 6110 5707 2314 166 +166 273 166 5952 166 4957 322 6065 2272 6140 2438 3458 3287 166 166 166 166 +2684 288 3354 166 166 3983 1702 166 166 166 2393 2435 4202 3308 5805 5085 166 +166 1938 166 166 2171 5892 2337 166 4648 3116 2486 4363 3567 166 166 2822 2041 +166 4703 3956 5192 166 3975 5720 3647 2134 5932 166 166 5160 263 166 166 166 +4549 166 166 1701 3086 166 166 4737 166 2252 166 170 166 166 166 2301 5478 166 +166 5979 3007 166 166 166 4104 166 2469 2700 166 4998 3376 166 1840 166 166 +4470 166 5235 3930 166 166 166 6031 166 166 166 3827 4700 166 166 166 166 166 +166 4103 3976 166 166 166 166 5027 4322 5130 166 4741 2132 4118 3080 4137 166 +6179 166 166 166 166 166 6120 4188 166 2251 166 3253 166 4887 166 4293 5241 166 +166 166 166 166 166 5076 166 166 4177 166 221 166 2757 5377 166 43 166 166 3180 +5540 166 213 4541 166 166 166 166 166 1641 166 4578 4639 166 166 1683 2139 1689 +5249 5773 5226 166 2820 166 5516 5045 166 4896 5657 5189 166 5770 2725 5148 166 +166 166 2929 166 3479 166 166 4564 3752 4305 4232 166 5906 1779 166 2709 4941 +4342 166 4882 166 4277 2322 166 4879 1610 3038 166 3762 2054 5652 166 4524 3820 +4806 166 166 104 3416 4869 4243 4854 166 4114 166 2121 166 3463 3556 166 4795 +166 2118 3920 166 166 4667 5046 166 166 2088 4360 5787 2198 4233 5552 3970 3523 +2037 5791 166 166 4299 2336 166 166 166 4173 4588 3626 5187 166 3363 4611 294 +4962 5243 2719 6022 4976 3559 166 2662 5779 6151 166 3527 166 5404 6132 1839 +166 3090 166 2253 166 5441 5518 6049 166 166 6136 3026 3474 5960 166 3937 4105 +166 2348 2039 4738 166 5233 3882 3840 166 278 190 166 5751 4313 166 3855 166 +166 6171 166 166 5381 3941 166 166 166 166 3334 166 2038 6088 166 1918 5037 +2325 2378 4894 3514 3715 5168 166 166 4083 2873 166 166 166 2693 166 3543 166 +2577 3013 166 166 4594 2622 166 166 166 3401 166 166 5447 5328 5547 6133 2335 +3739 166 166 166 166 5614 3492 3610 3466 166 5336 4354 166 4662 166 166 4283 +166 166 303 5904 166 2717 166 166 2276 5564 2386 5661 2040 166 1630 4652 166 +4840 166 110 5329 3979 5734 2550 166 166 6007 5999 2978 4771 5360 166 4023 166 +166 5920 4065 166 3880 166 5422 1813 166 6166 73 166 166 3669 5762 5077 166 +2953 85 166 3517 166 116 166 2738 3710 166 1634 166 166 166 2290 3001 166 166 +3037 2400 3410 166 1791 4231 166 3546 5009 5299 2807 166 166 1675 1619 2374 +3093 5302 3278 2330 5301 2343 2307 3274 5017 2265 3700 2465 166 139 4292 166 +5056 3952 166 4528 2388 1886 166 166 3016 3698 5881 166 2379 3223 166 166 3847 +2407 5493 3183 3307 166 265 166 2421 6161 2057 5363 3863 2474 166 166 5427 166 +2140 2955 166 3070 4237 5018 5988 5570 275 4862 2357 166 195 166 2593 6047 166 +2878 166 166 2781 3004 4180 166 5593 166 5973 2544 5064 166 4324 4701 166 3084 +166 166 5372 4725 166 5650 166 166 2786 166 3781 3583 3682 1850 4420 3296 5173 +4461 166 166 166 2984 166 93 166 166 4336 5943 2922 3300 166 4843 166 166 166 +166 2094 166 2939 166 4656 166 5146 166 166 166 166 2104 3977 4660 5312 166 +1865 166 5487 5558 3380 166 1957 3162 3281 166 3588 3268 2099 166 166 2319 4913 +4187 5503 5782 150 166 52 5450 166 166 166 2941 5877 166 4031 5393 166 3931 +4166 3135 3445 166 5053 5430 4836 166 5315 3389 4636 166 166 3441 166 166 3767 +2961 166 4761 4604 3179 166 166 4751 2148 2015 166 123 5013 166 2936 166 2063 +166 5823 166 5096 166 166 4198 166 166 166 3845 166 166 238 166 2703 3541 166 +4813 166 4477 2349 4197 5996 3324 4789 3063 166 166 5504 5273 2805 13 166 5601 +5402 4119 5206 166 166 4251 3704 4176 1963 2882 166 202 3125 3318 112 166 3362 +4835 3420 3974 5099 166 4433 166 166 166 1766 2663 166 166 4683 166 166 5485 47 +5101 5341 5765 3390 1648 4341 3945 6045 1645 166 5578 2594 166 166 3772 166 166 +3196 3603 166 5399 166 5075 166 5911 4632 4781 5313 270 166 2346 166 166 166 +1986 166 166 4958 166 166 166 4048 166 3076 166 166 4891 166 166 57 166 220 166 +166 166 4117 166 166 166 166 5194 2658 166 166 2942 6071 4182 166 2976 5816 166 +166 166 166 3985 4211 2514 166 166 166 2504 3446 1711 166 166 2107 5190 166 34 +166 3912 5382 3003 166 166 166 2999 2404 4734 4455 2087 166 2405 156 166 2830 +3303 296 3295 2067 4268 166 166 5642 166 166 1901 166 5133 166 166 166 166 3176 +2973 4677 166 166 6164 3000 2396 2734 5697 5989 166 2823 5265 5852 166 166 2623 +2625 2287 4844 1758 166 166 166 166 166 6073 166 5379 2389 5279 2444 5515 166 +4038 166 4948 5640 166 166 3572 4258 166 166 166 5204 166 4603 5797 166 166 166 +1725 4600 166 166 5498 166 4152 166 172 4758 166 2598 2489 2076 4366 2568 166 +4352 3782 166 166 3059 3946 5138 5727 4484 5694 166 3796 166 166 166 166 5334 +1778 2245 166 4517 4419 2250 182 5856 166 2835 4495 1858 2033 6014 6086 3211 +166 166 154 2145 166 129 3661 2661 5860 6143 2640 3890 6160 166 166 2747 166 +166 2291 282 2476 166 166 3825 166 1925 166 4489 166 166 166 4034 166 166 166 +166 166 166 122 4708 4919 2373 2453 5419 5954 297 5290 166 1978 166 4932 3501 +166 3085 3386 166 5405 4512 166 3209 5740 4020 5495 5815 314 166 3190 4824 166 +166 3448 207 1623 6096 5878 166 1836 166 166 2728 166 5278 3419 3012 5618 5266 +3078 166 166 2244 166 4569 6068 166 3336 166 5677 6052 5079 166 5453 5245 5799 +166 1982 166 5958 4619 5821 166 5285 284 1631 5710 6070 5365 2189 3242 166 2752 +5483 5297 6150 5522 166 1815 166 166 166 5801 166 166 5398 166 166 166 2967 +2515 3169 166 166 2562 166 1617 2069 166 166 6154 166 3721 166 5327 166 166 166 +5592 166 166 2286 1716 3903 166 2395 286 3587 6146 3286 4186 5882 5894 5737 +6032 5879 2761 4829 3788 166 166 3233 5356 5693 166 2429 2449 141 3444 5186 166 +166 3477 4080 4584 166 166 3670 1851 3824 4337 3886 2792 166 5867 166 166 3557 +3147 166 166 2200 166 2505 166 4310 4865 5656 5992 5672 166 5199 135 3023 2994 +4472 166 166 166 2019 4319 3472 166 166 166 29 206 3944 3027 5804 4731 5449 166 +2825 3310 166 6172 5202 166 2516 3644 4557 166 166 166 166 2671 4427 3432 3276 +5584 5536 4645 3202 166 2612 166 4249 2425 3259 4622 166 2411 4303 4206 166 166 +166 3734 6063 118 166 166 3641 166 166 166 4937 1871 3421 2208 166 166 166 166 +4881 166 166 166 166 3298 166 61 166 166 166 3293 6145 71 3619 166 166 3383 +1624 320 2187 4113 166 166 166 166 166 5080 2344 5625 2358 1621 4230 5579 5359 +295 4248 5267 3883 6124 187 5112 2122 166 166 166 5142 6004 166 5322 6175 3639 +3182 4425 166 175 166 166 166 5778 3939 3484 166 166 5832 5248 5935 4467 5858 +166 5038 166 166 3102 166 4880 166 166 166 166 3418 1666 5338 3680 5291 4441 +3385 166 5733 4503 2774 166 2631 4153 166 2000 166 166 5345 166 166 4298 1804 +4707 166 1613 1952 2111 166 166 166 166 166 2897 166 166 4044 166 166 166 166 +2863 5475 166 166 166 1704 166 3609 2782 2018 166 5361 166 3694 3733 166 2785 +1969 166 166 2834 1868 3779 1877 60 166 4143 3902 166 4361 3188 2498 6009 166 +115 166 3138 166 4575 6080 133 2030 166 166 166 2306 2136 3043 3447 2142 166 +3799 1646 5269 3640 166 2674 5502 166 5467 166 5069 166 166 4654 4581 5274 5036 +4364 166 3115 166 2128 4544 5433 2086 2584 4413 166 166 5385 166 234 166 1625 +166 166 166 5139 2511 4974 2766 166 166 166 2095 3990 217 166 2988 4061 166 209 +4883 166 166 166 166 166 4326 166 5465 2859 166 2887 166 2231 166 1658 166 2246 +166 1844 166 166 3087 2871 3872 1660 48 166 166 3622 166 1709 166 166 6177 6173 +166 3569 166 166 166 241 3660 3631 166 166 5319 5141 174 166 166 4412 166 5145 +166 1919 166 5276 166 2385 166 1618 166 166 2501 166 166 1734 5966 3145 166 +1690 4025 1664 4559 2433 2392 3552 4006 1896 166 166 2546 4450 5396 4221 4046 +166 166 2642 166 4448 166 2784 3480 4807 166 166 3534 166 166 5272 166 166 2831 +4263 166 166 166 166 4414 5628 3486 166 3748 166 4598 3719 3598 3611 166 4792 +5059 4110 166 2656 166 166 84 5429 166 166 166 281 1955 166 166 166 3616 4997 +166 166 166 166 3230 166 166 166 166 166 166 77 166 166 166 1800 166 4236 166 +166 166 166 166 5757 2530 1662 166 4607 1659 166 1685 3341 166 1699 4058 3407 +1854 4417 3034 166 166 166 166 5568 166 3206 166 5529 166 166 166 2116 3487 144 +166 166 166 5523 5373 5321 166 6064 2921 166 1696 2473 166 166 3716 5689 166 +4608 3879 166 166 166 2156 166 4358 2446 166 3958 166 5520 4340 4848 166 3285 +166 2665 166 3459 1905 5115 68 5730 166 3127 5029 4370 166 3753 166 3674 6025 +4490 166 4183 166 94 166 166 4051 3766 3140 4907 3857 166 166 4596 166 3888 +3040 2507 5643 166 166 4311 2618 5582 166 166 3678 166 1988 166 166 4464 166 +166 166 166 4278 3677 2173 5256 166 166 5162 166 5178 1644 5094 166 2557 5506 +166 166 166 4927 5348 1797 166 166 39 166 3866 3655 236 5403 2175 3361 166 1976 +5993 226 166 4643 166 5339 4098 2653 4969 166 3346 4984 4635 166 166 166 166 +4981 188 166 166 28 4088 166 166 166 25 3663 2696 166 4679 5114 5802 166 166 +166 166 166 3810 5749 166 1673 4276 166 3756 4184 166 5630 166 166 166 4531 212 +5663 166 166 2746 166 5386 3618 3594 1887 166 166 5443 166 1726 4094 5065 4756 +166 166 5308 5225 2081 166 166 3064 166 166 1981 3637 4355 1626 166 166 4686 +166 5793 180 5066 2938 3819 4904 3601 166 166 2495 5025 5768 2621 4650 3041 166 +5897 3633 166 166 4375 166 5714 1667 3273 3950 1668 166 5855 166 2364 166 1881 +166 2646 5460 166 2770 4951 5414 166 4442 2113 5726 298 5934 2053 166 166 4053 +166 166 4514 4697 166 166 5198 2707 166 5605 166 166 5218 2596 166 2110 166 +1806 2160 166 166 2212 166 3636 166 166 4377 4021 3707 4502 166 4195 166 166 +166 4108 3725 3676 166 2084 166 166 166 166 4216 166 166 6156 166 2896 166 166 +166 166 166 166 3826 2870 3793 166 166 5927 166 2759 166 4613 2297 5638 166 +2842 5031 4793 5184 166 166 2008 166 257 2881 117 6051 3044 4079 2833 166 6117 +166 3236 5469 166 166 2874 6076 166 1799 80 41 166 1864 166 5709 1611 5026 5176 +168 3269 4081 166 166 1970 4550 166 4250 4101 4565 5950 5845 97 4064 166 5394 +4374 4343 166 166 4658 3248 166 208 1735 4047 2843 166 166 166 166 2794 166 166 +5844 166 166 3094 2177 5436 3646 166 3564 4682 166 5948 5835 162 2059 5151 2034 +1926 5941 5903 5177 166 166 166 4801 3439 1780 166 166 3280 3434 166 166 4498 +5565 4043 166 4432 4722 3959 166 3746 166 166 177 166 166 2748 166 4483 166 166 +4144 166 166 166 166 2066 2915 166 2049 2130 4684 166 49 3506 5391 166 2590 +6103 1714 2410 3053 3837 4301 166 3255 2644 166 166 4014 166 2475 4788 2876 166 +166 166 166 166 166 4140 166 166 321 166 1966 166 166 2855 3111 3800 166 4446 +2551 166 166 166 2824 166 166 166 2164 3010 2226 166 4857 166 2582 5118 4582 +5917 166 166 3338 3482 3328 166 4817 166 5371 3830 166 3009 1633 3329 4052 166 +3701 4983 4500 4487 4878 166 166 5482 3544 166 3057 2026 4398 2847 3532 3262 +3399 166 166 166 4478 4167 166 3411 2599 5362 166 2711 166 166 166 166 3452 +2522 5586 5548 3279 2538 166 166 166 4161 166 2123 166 166 2660 166 166 1706 +166 15 3537 5051 5869 166 3025 166 4447 3744 120 166 166 166 204 2810 166 5124 +2376 5306 166 166 4493 166 166 166 5289 6046 166 2762 2541 1857 2467 5163 166 +166 166 166 5830 166 2172 3359 166 2928 166 166 166 6129 166 5445 166 166 5924 +6144 166 102 166 166 1678 166 4491 5705 166 1753 166 3873 5725 4145 1909 166 +2155 166 166 1848 3315 1874 166 4945 2524 166 3263 2362 1785 166 166 166 152 +2102 5723 5131 5754 4032 4029 166 4295 3391 166 166 166 5282 1747 3159 2235 +5583 1786 3630 6111 2974 4797 3623 166 2071 4929 166 2603 3964 3378 166 166 +2654 151 3940 4527 4518 166 2430 1884 3812 166 2867 166 166 166 2756 5418 166 +2354 4606 166 2153 166 4855 166 166 1720 166 3213 3926 166 5158 4349 166 4828 +166 166 2031 166 2300 166 166 166 2211 4954 3121 4754 2485 166 166 166 3593 166 +2718 5317 2765 5120 166 2527 166 1994 5947 166 166 166 6085 2302 100 79 2982 +3705 2180 2043 166 1872 1671 166 3729 166 4944 3665 2217 2119 166 5615 166 1620 +166 166 166 166 35 3913 2760 166 3688 3672 4042 166 166 5117 4227 166 4445 2458 +3803 4554 4988 166 166 3141 3491 166 166 166 166 5095 4668 5567 166 166 2885 +1790 2996 166 166 166 166 3737 166 2470 166 166 4339 166 166 166 4920 166 166 +3697 5471 166 166 3538 4558 3467 5262 5609 3858 166 166 5007 2780 2791 2236 +5668 3134 166 166 5776 3470 3291 166 2532 166 166 166 3805 264 166 3227 166 166 +166 2334 166 5087 101 166 3634 58 2813 166 166 166 3222 4704 4488 4508 5459 +2117 5873 166 1828 166 166 166 166 166 2105 166 5613 5761 2920 3098 166 166 +3277 166 166 166 166 83 166 166 166 3967 166 5574 166 4985 30 3426 166 179 3014 +4015 246 2556 4449 3723 5611 3436 166 4240 3642 166 4536 2048 5810 166 1971 166 +5557 5323 5022 191 5492 166 4837 4426 2537 2271 3177 5674 166 2796 1995 166 +3906 166 4403 3862 4716 2406 3948 4670 4309 166 2575 5358 2951 166 3666 3612 +5577 4579 4743 166 6072 6036 4563 2586 166 5836 166 166 5752 166 3563 166 2909 +3251 92 166 4711 4149 166 166 3052 5122 2904 2635 1990 166 166 166 166 166 166 +166 166 4213 166 3103 3142 2683 6105 2209 3175 4215 166 166 166 166 166 166 166 +5303 4075 5374 166 4174 4154 1895 4538 2764 166 5817 6113 4033 166 6090 166 +2990 166 3164 166 166 166 247 166 6083 3412 166 5738 166 3599 166 1904 2162 +2547 3960 166 166 3154 55 166 5991 4921 2879 166 166 5347 166 166 166 2712 4787 +166 1908 166 166 166 3184 166 166 166 4572 3846 3657 166 166 5481 166 166 3397 +1856 4978 166 3900 3570 3802 166 166 2075 4408 166 6079 2313 166 166 5756 166 +166 2070 166 166 3137 166 166 3686 166 166 166 166 67 5019 166 1742 166 5354 +166 5149 166 2931 4946 6006 166 166 2865 4902 3029 1722 3449 166 1987 166 62 +5626 166 166 166 2670 1657 5599 3056 166 3791 5020 166 1979 4437 1899 166 166 +196 2636 166 143 3475 4317 2512 2415 5033 5024 2112 2864 3551 166 1688 33 4585 +3648 4399 166 166 166 166 166 1824 166 166 166 166 166 166 4513 166 2478 4407 +166 166 2492 4130 4318 2980 5746 166 2606 4063 4123 166 255 166 166 4680 166 +3586 5975 3935 166 5528 166 3158 166 166 2614 5035 166 3488 3214 166 166 166 +5413 3713 166 5875 4329 5250 166 166 3741 166 54 1885 3839 166 4924 166 166 166 +4158 166 166 2152 1661 166 166 4327 166 3933 166 5666 166 166 2580 166 3404 +4111 2862 4438 166 166 4072 166 166 3938 2958 4302 166 3851 166 268 166 166 +1975 222 3204 3438 4616 166 4275 3101 2648 3989 5215 166 4229 166 5440 166 5093 +2639 166 166 4439 166 2316 4239 166 166 166 166 166 1817 4486 166 3272 166 166 +4085 2078 2902 166 166 166 4381 1853 3054 166 166 5005 2669 166 2856 2706 166 +166 166 4185 166 1748 166 166 166 5771 166 166 3915 166 166 2205 6122 166 166 +1632 5400 166 2477 4740 166 166 166 1802 166 2472 3953 166 1849 2604 3780 2560 +4786 2566 3576 166 4768 166 1951 251 5068 166 166 166 2619 166 166 166 5432 166 +166 5260 5758 3908 166 4141 166 5777 166 166 166 166 166 3961 5143 166 3889 +3747 3743 166 2818 166 166 166 3867 166 166 3742 4763 2948 5533 166 3966 3555 +3843 3503 6005 166 4687 2790 4479 5828 3769 5688 166 166 166 166 3109 166 166 +166 166 4574 81 166 166 4576 3369 166 166 166 4207 166 5072 2210 166 184 166 +4673 166 166 166 166 166 166 1628 3590 1916 4784 4970 166 1832 166 166 3584 +3384 166 166 2880 1783 166 166 166 166 6115 6121 2157 5428 5859 4861 5635 4331 +5839 4223 313 166 166 6152 2168 166 4112 6089 6012 166 5294 3207 166 166 4884 +166 4655 166 166 166 1743 166 4077 166 4631 166 166 2957 1945 4936 166 166 5389 +166 166 5955 166 166 1639 2207 4129 166 3582 5560 6147 3088 166 166 4529 5259 +3118 166 3106 2853 166 1845 5660 166 3325 3973 2461 2163 166 3083 4190 166 166 +5505 166 166 3226 5507 109 6141 3991 166 4939 166 166 5889 3986 166 3664 4353 +2056 166 5071 166 166 4376 166 1958 2028 166 166 1793 166 5252 3536 166 166 +3525 3580 166 166 166 1782 5174 2011 1826 3352 3231 166 166 4986 2068 2801 166 +2500 166 5061 166 2263 2632 1993 166 2715 4424 166 166 6042 4661 166 5074 5479 +4822 166 166 166 166 5600 5853 166 1907 166 166 166 3808 166 5997 5032 4605 166 +1732 166 166 166 3015 5454 166 166 166 3806 5444 2238 1946 166 166 3221 4922 +166 6092 166 166 4007 166 3425 4282 2571 166 1749 166 166 38 4744 4900 4257 214 +5687 166 2490 2979 2924 166 4714 219 5344 3836 3302 78 1984 2986 2960 166 2869 +3507 3335 4967 2892 2723 4849 5070 166 166 4629 3815 166 4453 4760 166 3224 130 +166 166 166 166 166 3408 2494 2691 166 4325 2932 5165 5573 166 4769 166 5411 +5637 2050 166 166 2305 166 166 4834 24 4693 3554 2491 1738 166 166 166 23 2758 +3072 2564 4800 5537 3545 4133 166 166 166 5982 166 203 166 166 290 185 166 3774 +1929 3379 166 166 166 166 3002 166 3738 166 166 3344 4942 5353 2777 2839 4712 +1830 2664 166 5884 3516 166 5494 4169 2391 3319 166 166 5918 2597 166 4821 2787 +5719 166 166 166 1687 6148 3257 254 166 5180 6153 5964 306 166 6123 166 5208 +166 3163 5938 1736 166 2502 4910 166 166 2549 166 2900 3632 3270 166 2082 5953 +166 107 5750 166 166 166 5527 1751 4168 2950 166 2659 166 4189 1943 2595 166 +4191 166 166 166 166 2998 2296 5221 3617 166 5435 2451 2009 3005 2242 3768 3658 +166 166 166 166 166 2481 2256 166 166 4074 166 3120 166 4409 1759 166 166 1679 +3659 3499 5219 4501 3082 2047 166 166 166 4560 2768 5251 166 166 166 2437 3993 +3215 2447 166 166 166 2993 4963 166 3045 166 166 166 166 166 166 166 5521 166 +166 4868 166 3895 166 6131 3949 3306 3785 166 166 4895 4831 166 1772 166 166 +5928 166 2137 4805 2462 310 2667 3561 166 166 2312 4931 5255 166 166 166 5670 +166 2285 166 4672 5310 166 2103 2174 166 166 166 166 5417 166 4726 4203 166 166 +166 5581 166 5665 166 166 5747 166 166 2509 1973 2749 5463 166 166 4567 5014 +166 3322 3051 166 4090 166 3709 3887 3478 166 166 166 166 3565 3934 166 32 166 +166 166 2239 166 3947 3849 166 2022 166 2169 166 4691 98 166 3804 4155 1640 +4002 166 2138 1739 3730 5970 2274 4873 3119 166 4925 3577 3699 4049 3982 166 +5161 1744 166 166 166 5704 4979 2686 5383 5744 2289 166 166 166 3927 2539 166 +166 166 2585 166 4723 3755 4509 166 4961 2194 2535 166 176 166 4494 166 4171 +166 266 166 3454 5369 166 166 5899 5284 166 3607 3566 5514 166 1843 166 3997 +4599 2743 166 2857 2497 2751 166 166 166 3511 5742 166 166 166 4504 166 166 166 +5082 4401 166 166 5431 166 166 1949 4539 166 166 4852 166 166 3457 166 3433 +4669 166 1692 2454 3258 6159 166 166 166 166 166 2788 4350 3249 3816 4893 166 +4846 166 4993 1708 4138 166 2895 2891 166 1860 166 2480 1927 3853 166 166 166 +5100 166 3143 5159 166 4286 5182 5246 4975 166 2905 166 4917 5102 2044 6016 +5673 2005 5090 166 4634 3333 166 5702 3413 1762 6094 4284 4431 2641 166 4463 +5691 166 166 3442 3473 4192 2046 166 3838 166 3217 3349 166 2243 166 3490 166 +166 166 5922 166 166 166 4885 1798 2884 2750 5004 2741 166 166 5649 166 4410 +166 166 3382 166 166 1913 1703 5532 3770 166 5116 2645 2634 4357 5901 166 166 +5538 166 166 166 6028 166 166 5840 4102 2704 2091 5287 166 4757 2282 166 2650 +3528 64 253 3732 166 166 166 166 166 3465 166 166 166 5848 3110 111 166 166 +3403 2926 6030 3366 1948 4430 5509 3250 3972 2587 3579 166 6048 250 5275 4242 +2615 3112 3558 166 166 2342 166 5157 1917 2733 5647 1934 5675 166 3981 2923 +5213 5326 37 166 5288 3069 166 1923 5755 166 166 166 1888 166 6041 5895 5376 +3727 3901 166 5589 166 166 4609 166 166 166 4706 166 4482 1622 166 171 166 166 +4646 4151 2755 4614 166 2072 5409 4469 1647 4434 4633 1915 166 3615 4808 166 +3388 166 5280 2731 166 166 2417 166 14 166 4533 5126 166 2778 3022 166 166 166 +4830 4764 166 166 166 4982 166 4265 166 2466 5678 147 1883 166 166 166 114 4000 +2427 3597 166 4853 5981 166 2023 2519 166 1937 2221 4676 166 4522 5716 166 2432 +5731 166 6020 6163 4351 2442 4380 166 4390 1882 6139 4246 262 166 1676 5781 +2352 1956 200 166 166 5800 6184 166 2355 149 5962 5524 4238 166 5150 166 5888 +2423 166 5739 3192 4142 166 166 166 3201 161 4460 2459 158 166 166 166 166 2689 +166 166 166 166 1889 166 166 3374 166 70 166 2772 166 2995 166 2384 4989 166 +3299 166 166 166 166 3614 3645 3415 3160 1727 3735 5201 1693 3531 166 166 1776 +3871 166 166 166 166 86 3553 166 166 166 3392 166 166 2232 166 4977 2333 3394 +2875 2027 5736 166 1719 166 4952 2061 2150 5526 166 4637 166 4333 166 166 4733 +4809 3911 166 3460 166 5355 3126 4181 4436 300 166 3841 166 4770 126 5654 166 +166 166 1730 166 166 166 5610 166 6002 2197 3807 6109 166 166 166 166 166 5395 +4004 166 46 166 166 2570 4736 5318 4247 166 166 166 2293 3031 4591 166 245 166 +5510 1616 3117 4163 166 166 4759 3462 4819 4947 166 3128 5946 2278 2969 166 166 +5183 166 166 1729 173 2448 166 230 2971 166 166 5397 166 4093 3348 1866 4280 +166 6067 3794 166 166 166 4729 166 3456 166 2394 166 4953 166 166 2258 4863 166 +166 4060 166 5468 305 166 6134 166 166 2326 166 3453 2167 2845 166 166 166 5597 +166 166 166 166 5462 2809 5994 2899 166 166 166 5153 166 166 1638 166 166 4938 +3795 166 3842 166 166 166 2769 3194 166 4745 5508 5604 3910 166 166 4147 3239 +166 166 3548 3859 2092 166 2705 166 166 3625 4131 166 3513 166 166 2987 4555 +3107 166 166 166 166 5713 4698 3079 166 5342 166 166 2673 2517 2745 1795 166 +166 166 166 166 166 2463 166 166 2445 5425 6138 166 2687 3254 5871 166 2387 +4300 166 166 3529 1996 166 2369 3818 6126 1615 2643 65 4297 166 5324 3311 3852 +166 3868 4199 3978 166 166 166 5466 166 166 244 166 5929 6157 2390 5639 2267 +2073 4610 5774 2521 4556 166 4545 4307 2426 2450 166 5783 4968 6176 4156 166 +166 4126 3549 166 3581 5701 3234 166 4013 1879 166 6104 5874 166 166 3485 4279 +2528 5576 166 3992 166 3980 4934 166 2176 4228 5164 3784 1933 4120 5055 166 166 +5015 166 166 166 2310 1754 166 6087 166 166 4548 5268 2930 166 3656 166 3042 +5229 166 4016 2195 166 166 166 199 1745 3717 166 166 74 2668 252 4124 4657 5223 +166 2186 3628 166 166 166 4222 3114 2841 5103 3171 5135 166 166 2273 166 3899 +5332 5842 3575 2579 2431 2464 2229 3604 4561 2977 2815 166 3916 166 5825 166 +1694 166 4030 166 5841 166 3881 1831 166 5525 3011 166 5535 5217 316 4116 166 +166 2204 166 3136 3650 166 5813 1875 4511 4475 166 1999 166 2277 166 3024 5484 +5546 166 3988 5676 166 2213 2264 5214 166 4940 5974 166 4750 6077 166 1652 3148 +166 166 166 166 2554 166 6167 5257 5300 166 166 166 166 5408 166 166 3402 2141 +166 4663 5633 3312 166 2814 4930 1959 166 166 166 3861 166 166 302 2624 166 166 +166 1629 1724 166 3909 5281 166 2001 4395 5352 4428 2694 4850 166 166 5242 5910 +166 166 166 166 166 3212 166 2045 166 166 166 166 166 166 3017 4960 4456 166 +5616 6093 2151 166 166 166 315 3381 166 166 166 4330 166 6158 4721 6075 166 166 +166 4543 2303 166 166 3301 166 5000 3929 2543 3437 166 166 166 3422 166 5987 +5729 2428 166 4035 5588 3714 3834 5264 5743 166 3305 4886 6107 5156 166 166 166 +166 166 1672 5849 5827 5049 6101 2178 2420 3289 166 166 4274 6017 2257 166 4172 +3451 2367 2382 166 2964 4918 3241 2347 6082 99 2383 166 4454 163 2460 165 304 +1818 5580 166 312 5790 293 5794 5519 5083 3360 5748 166 3750 5034 166 166 166 +1863 3168 166 166 166 5111 166 166 166 166 2183 4510 166 166 3495 4382 4235 +4462 166 4056 5885 17 5028 1614 6038 166 2488 5632 3089 166 1940 66 4039 3999 +235 166 166 3829 3954 166 2365 269 166 166 166 166 166 166 4418 1796 4709 2004 +166 3596 5786 166 2819 4624 3152 2968 2838 166 5575 1767 5603 166 4386 5890 166 +1768 4201 3560 166 166 166 2184 2262 2966 2716 1765 2611 2983 166 4164 4084 142 +5314 166 166 4071 166 2578 2849 3600 166 166 166 166 5401 4814 3431 166 5088 +5084 198 166 3578 3764 166 2097 166 166 5390 4443 166 3166 166 4816 166 166 166 +166 3130 5963 1788 2129 1837 4100 6128 166 4586 5945 4772 166 5741 3151 3247 +5645 4507 5833 3904 6013 2506 3050 4175 1705 3019 166 5942 166 2418 3430 2230 +5745 166 2093 166 166 166 166 4666 3246 192 2010 4003 3533 5851 166 3621 3684 +3066 166 166 166 5073 3856 166 166 2224 166 2637 4270 166 166 5679 166 5792 +5850 166 2589 3060 2196 3476 3150 2025 166 166 166 2657 166 3685 3790 5587 2817 +3692 166 166 166 2359 2260 5896 2158 119 2816 5753 166 2739 5772 166 2919 2147 +1985 4271 4838 4991 166 166 166 5244 166 319 166 166 2779 4732 4994 5424 166 +166 3968 3049 3393 4473 4959 5967 5864 5170 4209 166 4810 4815 4205 2339 5023 +2279 5050 166 5837 132 166 166 166 2247 21 4775 166 166 5286 166 4170 4099 4803 +5767 166 166 166 5811 2240 5699 2499 166 4802 166 5785 166 166 166 3181 3435 +166 3339 166 5669 3865 2249 5002 166 4694 5461 4753 166 3157 166 1960 166 166 +166 2440 166 5818 5534 2439 1717 166 3789 2959 166 2943 166 2576 166 2002 2007 +1819 3256 4402 5311 3832 160 166 166 2803 166 3264 166 5863 166 2017 166 2798 +166 166 166 166 5607 4965 166 166 166 4537 4378 5944 3494 5457 5602 1942 5900 +5780 4411 5147 166 4966 2115 155 2827 1980 5063 166 285 5912 3304 2963 5179 +3220 166 166 166 2190 3708 5476 1944 2366 3893 166 166 166 3759 166 5434 2740 +1707 4244 5426 166 166 166 3155 166 4285 166 166 166 166 5721 166 3833 6001 301 +166 166 2574 186 2724 166 1873 3667 166 5216 166 2935 2100 4987 166 2284 166 +166 2911 3828 4009 166 2065 166 5496 6130 5563 4387 166 3771 3469 2989 2222 +4577 3965 4296 2975 3813 3240 166 4780 4481 3387 2338 166 6183 166 166 166 166 +166 2675 1761 2600 5167 3170 4773 2165 5166 166 2223 4642 166 166 4540 166 166 +166 3897 166 2483 1809 5477 3844 4067 2508 2275 166 166 166 166 166 3497 5458 +166 249 2956 166 4651 166 283 166 166 4955 4062 2315 2304 3261 2361 4791 4389 +1997 166 3455 166 166 166 166 166 166 4746 5695 5296 105 1841 3368 166 166 166 +5228 166 3496 4423 2024 3907 4774 166 166 166 166 166 2294 2193 166 166 166 166 +166 166 166 166 4393 166 166 2127 166 4573 166 5350 166 5016 3372 166 5653 166 +5972 4719 166 166 166 166 166 5370 166 6142 166 166 3691 2828 166 2601 166 2937 +2060 3654 3097 2341 5325 4568 4096 2776 166 2946 166 166 166 5843 1777 5295 +2837 4261 4397 5006 5808 4866 166 1713 5732 2954 166 166 27 166 4308 5629 2652 +2434 4474 166 4928 166 4727 3811 166 166 5234 166 6010 166 4911 166 4570 166 +6000 3450 5304 3919 166 166 4008 3942 166 272 2363 2064 3595 3505 166 166 3957 +1695 2452 4659 166 1792 166 131 5968 166 3731 3905 4115 166 166 2468 166 2727 +166 3526 4724 166 4388 3149 5539 5092 4440 6162 166 166 193 4429 2493 166 166 +3683 166 6029 166 277 166 166 166 5240 2408 166 309 2561 210 166 5200 166 166 +166 1930 5692 2697 166 166 166 3330 5331 3860 166 166 4335 166 50 3605 4289 +1763 166 166 166 166 3521 166 166 166 3668 166 166 166 166 166 3271 1656 166 +166 4782 166 2962 166 5907 166 3245 3375 2944 5933 166 166 5406 5655 3139 5423 +166 4359 5231 2548 166 3831 2858 5488 166 5824 166 166 166 3885 4372 166 166 +4024 166 4811 2970 166 4219 211 166 3471 166 166 166 166 3854 166 3358 2877 166 +166 5205 2804 166 166 166 4452 166 166 166 166 3776 166 166 3075 4208 166 5623 +1974 166 2647 166 3235 166 166 166 5211 166 166 4304 2206 166 4157 2182 166 +1816 2626 166 2893 2248 166 166 166 166 1983 5648 166 194 166 2106 4328 166 +4742 166 166 5572 2329 3314 166 6181 166 166 26 166 6026 166 166 2114 1669 4735 +166 166 4256 166 1861 166 5470 2317 166 4404 2482 166 5305 4415 5986 4949 5412 +166 1728 166 1898 166 166 4909 1989 166 166 166 2836 2051 274 166 2799 166 5865 +1663 4705 5121 2555 166 4316 4287 1880 1825 166 3689 166 1733 5012 166 166 2237 +4471 1682 2910 166 5366 166 166 166 166 4532 166 2802 166 166 166 4057 2471 166 +2889 166 166 4026 5682 3091 166 1977 166 2901 6137 5658 88 2318 1965 166 5914 +166 166 4468 1822 166 6050 5956 2201 166 4644 2918 166 3703 166 166 3524 4220 +2913 4210 166 166 2090 166 1906 1911 166 166 3671 2370 166 2552 166 3763 2259 +1924 166 5940 166 166 166 3185 3821 4069 261 2381 3244 166 166 5715 166 2052 +5905 166 2403 166 3030 2199 166 3550 166 166 1846 166 166 95 166 289 3208 2559 +5195 5091 1654 166 1781 1892 166 4516 2629 166 1700 3067 166 166 166 2080 1680 +166 166 166 5700 166 1820 5491 166 4226 166 166 166 166 4653 166 3508 227 5364 +166 2098 166 299 166 5795 166 166 166 166 3690 4134 5517 4534 5042 4874 5798 +4234 166 166 166 166 3702 166 166 3638 3108 3850 166 166 166 16 166 1775 166 +4022 166 223 4095 166 5127 4266 166 189 166 166 5203 166 1805 3884 3778 166 166 +2146 4818 166 2848 3440 4506 5886 3006 218 166 2377 166 4091 5925 166 4320 166 +2701 3036 166 166 166 4715 166 3801 166 3161 166 2077 166 4254 3032 243 1814 +166 166 166 166 166 166 166 166 1835 166 4394 166 5769 4923 166 2917 166 166 +178 166 166 1723 166 5887 166 4956 2952 166 4665 3925 3443 3123 166 166 166 166 +166 166 5144 166 4288 2074 2192 5442 6043 1746 2016 5995 2203 166 5686 5659 +3193 166 4055 166 166 2233 3571 5809 5984 2323 166 166 1740 89 4356 6053 6106 +3282 4796 166 6116 6056 2353 2829 166 5807 2042 166 166 166 1670 5937 4465 5646 +166 5562 3008 166 2419 3736 166 4132 169 166 166 166 2402 166 166 1968 2398 166 +1684 1827 4551 2679 3875 166 5585 3835 2295 166 1991 1803 2992 166 166 5847 +2649 166 76 5415 166 2269 2397 5387 5337 4422 166 2672 4832 4617 166 166 166 +166 4552 166 4612 1750 166 1931 166 1691 2424 4194 6018 166 166 4458 4856 166 +2089 3814 166 2844 166 3592 166 4867 5128 166 2685 166 166 2616 1972 2617 3943 +4664 166 4999 166 166 145 3635 166 166 4851 166 3483 5039 166 3649 3924 166 166 +166 3105 4260 166 6098 166 3568 267 2456 3653 2096 166 166 166 3512 166 3405 +166 3504 166 166 166 4005 2144 1769 166 5474 1920 5554 215 2443 3351 166 5961 +166 166 166 166 242 2331 166 166 5931 166 166 5862 166 1710 166 166 166 3321 +166 4139 166 166 3515 2732 2510 5544 166 166 2783 166 166 166 4018 4649 5789 +166 166 166 166 166 2726 6074 166 166 166 5684 166 166 3395 166 3100 166 5763 +3757 1992 166 3198 2003 166 166 4675 166 1893 5621 166 2270 166 166 166 5421 +5590 5664 4045 166 3687 4406 2699 1811 167 4036 5384 166 166 4601 1823 4041 239 +1954 166 146 166 166 3077 5152 5814 1649 5681 166 5868 166 166 3792 4860 166 +5335 5110 1718 166 166 166 166 3718 3365 2826 166 166 5021 4783 166 5569 5812 +166 166 1876 166 3260 166 1789 5667 4224 166 166 4385 166 166 2620 166 4162 +2883 2143 5497 166 166 5316 5680 166 166 248 4050 166 6021 166 2898 4618 166 +166 166 166 166 5368 166 5378 1842 1914 3696 3962 166 4345 2581 1773 2109 166 +4371 166 166 3761 5277 5870 3146 166 166 166 5764 127 3058 4059 4718 166 5097 +5040 5351 3205 166 166 4996 2991 2014 166 5846 2558 2688 5595 4027 3347 2125 +5696 5608 166 166 3228 3745 5775 166 1757 4647 166 5977 3020 166 240 2565 166 +4459 166 3367 166 166 166 3104 166 166 166 166 166 166 259 5486 2846 166 166 +166 4778 2713 166 3955 5683 2682 2914 5898 166 166 166 4400 317 166 5185 3021 +5983 4332 3891 166 3095 5003 166 166 166 5367 166 279 1784 4019 2736 4905 2651 +5346 166 4841 166 5606 166 166 2806 166 5239 166 166 3237 5490 166 225 166 166 +2254 166 2742 4587 22 166 166 166 5555 166 108 2927 2218 166 2120 166 5452 4087 +4369 166 166 166 166 166 4583 4338 6035 2840 4365 3624 11 1770 166 4630 166 +3216 166 166 166 4638 4699 3535 2536 4627 166 166 5760 1935 166 166 5210 166 +2219 2484 4597 5193 4799 3706 166 166 166 166 3337 3113 5951 4294 166 4040 3200 +4217 5861 2767 3530 4499 2775 4121 134 5939 5880 5908 3869 166 166 3316 6095 +2441 3288 166 3751 4794 166 166 5803 6169 2356 6182 6135 6127 166 3018 166 1674 +166 166 4097 166 5923 287 5965 5129 166 4078 166 166 6114 6015 5990 3573 166 +4146 2681 90 6055 4864 166 166 6119 3284 6054 5456 5113 6125 166 6057 166 3292 +166 166 166 166 166 6185 5105 1760 166 166 166 2720 166 2695 5448 166 1936 166 +1807 3406 166 166 2161 1642 166 5030 166 2036 5451 3427 166 166 166 166 3797 +166 1627 166 4515 166 166 166 4241 166 166 166 2771 166 31 5197 2638 3035 166 +166 3914 166 166 4546 166 166 166 4253 3500 166 166 2526 166 2698 166 3726 2744 +137 166 166 2676 166 5594 166 166 166 4842 166 63 2888 3585 4798 166 5011 166 +5634 5464 166 166 5620 3894 4070 166 2730 166 166 1810 2503 5957 1721 6066 5188 +166 166 1890 4505 1771 5455 166 3132 3984 166 166 2811 1962 166 166 4872 106 +3898 3267 166 2085 166 4950 6040 4525 6044 5866 3613 2907 4615 2135 258 166 +1681 1941 4888 166 4859 6178 6174 4858 5209 1912 3340 166 4640 5706 166 2763 +3153 3951 166 5542 5596 5819 5330 5048 4037 166 6033 4625 3326 2013 5283 136 +3373 2154 166 166 166 4421 166 5438 2627 2266 2320 166 2588 4790 4290 166 4767 +5829 2925 5916 2133 166 } diff --git a/extra/poker/poker-tests.factor b/extra/poker/poker-tests.factor index 29bd3ce6b8..9b7e99d3ea 100644 --- a/extra/poker/poker-tests.factor +++ b/extra/poker/poker-tests.factor @@ -8,9 +8,11 @@ IN: poker.tests [ 7462 ] [ "7C 5D 4H 3S 2C" value>> ] unit-test [ 1601 ] [ "KD QS JC TH 9S" value>> ] unit-test +[ 11 ] [ "AC AD AH AS KC" value>> ] unit-test [ 9 ] [ "6C 5C 4C 3C 2C" value>> ] unit-test [ 1 ] [ "AC KC QC JC TC" value>> ] unit-test [ "High Card" ] [ "7C 5D 4H 3S 2C" >value ] unit-test [ "Straight" ] [ "KD QS JC TH 9S" >value ] unit-test +[ "Four of a Kind" ] [ "AC AD AH AS KC" >value ] unit-test [ "Straight Flush" ] [ "6C 5C 4C 3C 2C" >value ] unit-test diff --git a/extra/poker/poker.factor b/extra/poker/poker.factor index 172bb49506..ca999dbf6e 100644 --- a/extra/poker/poker.factor +++ b/extra/poker/poker.factor @@ -4,8 +4,10 @@ USING: accessors ascii binary-search combinators kernel locals math math.bitwise math.order poker.arrays sequences splitting ; IN: poker -! The algorithm used is based on Cactus Kev's Poker Hand Evaluator: +! The algorithm used is based on Cactus Kev's Poker Hand Evaluator with +! the Senzee Perfect Hash Optimization: ! http://www.suffecool.net/poker/evaluator.html +! http://www.senzee5.com/2006/06/some-perfect-hash.html card-rank ( card -- str ) From cbc63b49690aed45efa74c06fc46712e04c7e84f Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Sun, 5 Apr 2009 23:28:13 -0400 Subject: [PATCH 03/20] Add more unit test coverage for poker vocab --- extra/poker/poker-tests.factor | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extra/poker/poker-tests.factor b/extra/poker/poker-tests.factor index 9b7e99d3ea..f7d9e4f6c3 100644 --- a/extra/poker/poker-tests.factor +++ b/extra/poker/poker-tests.factor @@ -5,7 +5,6 @@ IN: poker.tests [ 529159 ] [ "5s" >ckf ] unit-test [ 33589533 ] [ "jc" >ckf ] unit-test - [ 7462 ] [ "7C 5D 4H 3S 2C" value>> ] unit-test [ 1601 ] [ "KD QS JC TH 9S" value>> ] unit-test [ 11 ] [ "AC AD AH AS KC" value>> ] unit-test @@ -16,3 +15,12 @@ IN: poker.tests [ "Straight" ] [ "KD QS JC TH 9S" >value ] unit-test [ "Four of a Kind" ] [ "AC AD AH AS KC" >value ] unit-test [ "Straight Flush" ] [ "6C 5C 4C 3C 2C" >value ] unit-test + +[ +gt+ ] [ "7C 5D 4H 3S 2C" "KD QS JC TH 9S" [ ] bi@ <=> ] unit-test +[ +lt+ ] [ "AC AD AH AS KC" "KD QS JC TH 9S" [ ] bi@ <=> ] unit-test +[ +eq+ ] [ "7C 5D 4H 3S 2C" "7D 5D 4D 3C 2S" [ ] bi@ <=> ] unit-test + +[ t ] [ "7C 5D 4H 3S 2C" "2C 3S 4H 5D 7C" [ ] bi@ = ] unit-test + +[ t ] [ "7C 5D 4H 3S 2C" "7D 5D 4D 3C 2S" [ ] bi@ = ] unit-test +[ f ] [ "7C 5D 4H 3S 2C" "7D 5D 4D 3C 2S" [ ] bi@ eq? ] unit-test From 8201139dc7669ca7c79ef0b1d6db6ad39711cafc Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Mon, 6 Apr 2009 00:30:21 -0400 Subject: [PATCH 04/20] One more poker unit test dealing with equality --- extra/poker/poker-tests.factor | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extra/poker/poker-tests.factor b/extra/poker/poker-tests.factor index f7d9e4f6c3..1862974084 100644 --- a/extra/poker/poker-tests.factor +++ b/extra/poker/poker-tests.factor @@ -16,6 +16,8 @@ IN: poker.tests [ "Four of a Kind" ] [ "AC AD AH AS KC" >value ] unit-test [ "Straight Flush" ] [ "6C 5C 4C 3C 2C" >value ] unit-test +[ "6C 5C 4C 3C 2C" ] [ "6C 5C 4C 3C 2C" >cards ] unit-test + [ +gt+ ] [ "7C 5D 4H 3S 2C" "KD QS JC TH 9S" [ ] bi@ <=> ] unit-test [ +lt+ ] [ "AC AD AH AS KC" "KD QS JC TH 9S" [ ] bi@ <=> ] unit-test [ +eq+ ] [ "7C 5D 4H 3S 2C" "7D 5D 4D 3C 2S" [ ] bi@ <=> ] unit-test From cbd6b0ed3b11f427a59416802e5655637bf8b075 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Mon, 6 Apr 2009 15:18:35 -0400 Subject: [PATCH 05/20] fix documentation typo --- basis/ui/gadgets/buttons/buttons-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/ui/gadgets/buttons/buttons-docs.factor b/basis/ui/gadgets/buttons/buttons-docs.factor index 6042a39886..a28a6aef84 100644 --- a/basis/ui/gadgets/buttons/buttons-docs.factor +++ b/basis/ui/gadgets/buttons/buttons-docs.factor @@ -26,7 +26,7 @@ HELP: { $description "Creates a new " { $link button } " derived from a " { $link } " which calls the quotation every 100 milliseconds as long as the mouse button is held down." } ; HELP: button-pen -{ $class-description "A class implementing the " { $link draw-boundary } " and " { $link draw-interior } " gneeric words by delegating to an object in one of four slots which depend on the state of the button being drawn:" +{ $class-description "A class implementing the " { $link draw-boundary } " and " { $link draw-interior } " generic words by delegating to an object in one of four slots which depend on the state of the button being drawn:" { $list { { $snippet "plain" } " - the button is inactive" } { { $snippet "rollover" } " - the button is under the mouse" } From 2c1f7b9293ade5d1c16ebe8b3534238bfe026f43 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 03:37:29 -0500 Subject: [PATCH 06/20] Static responder now works when the root is a file rather than a directory --- basis/http/http-tests.factor | 23 ++++++++++++++++++----- basis/http/server/static/static.factor | 4 ++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/basis/http/http-tests.factor b/basis/http/http-tests.factor index bc906fad44..52763c4f18 100644 --- a/basis/http/http-tests.factor +++ b/basis/http/http-tests.factor @@ -1,8 +1,8 @@ -USING: http http.server http.client http.client.private tools.test multiline -io.streams.string io.encodings.utf8 io.encodings.8-bit -io.encodings.binary io.encodings.string kernel arrays splitting -sequences assocs io.sockets db db.sqlite continuations urls -hashtables accessors namespaces xml.data ; +USING: http http.server http.client http.client.private tools.test +multiline io.streams.string io.encodings.utf8 io.encodings.8-bit +io.encodings.binary io.encodings.string io.encodings.ascii kernel +arrays splitting sequences assocs io.sockets db db.sqlite +continuations urls hashtables accessors namespaces xml.data ; IN: http.tests [ "text/plain" latin1 ] [ "text/plain" parse-content-type ] unit-test @@ -359,4 +359,17 @@ SYMBOL: a ! Test basic auth [ "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" ] [ "Aladdin" "open sesame" set-basic-auth "Authorization" header ] unit-test +! Test a corner case with static responder +[ ] [ + + add-quit-action + "vocab:http/test/foo.html" >>default + test-httpd +] unit-test +[ t ] [ + "http://localhost/" add-port http-get nip + "vocab:http/test/foo.html" ascii file-contents = +] unit-test + +[ ] [ "http://localhost/quit" add-port http-get 2drop ] unit-test \ No newline at end of file diff --git a/basis/http/server/static/static.factor b/basis/http/server/static/static.factor index bbca70d845..f80a3cc7cd 100644 --- a/basis/http/server/static/static.factor +++ b/basis/http/server/static/static.factor @@ -47,8 +47,8 @@ TUPLE: file-responder root hook special allow-listings ; if ; : serving-path ( filename -- filename ) - [ file-responder get root>> trim-tail-separators "/" ] dip - "" or trim-head-separators 3append ; + [ file-responder get root>> trim-tail-separators ] dip + [ "/" swap trim-head-separators 3append ] unless-empty ; : serve-file ( filename -- response ) dup mime-type From e12f0f22807b7ee7df0575b41655834d5574be05 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 04:11:56 -0500 Subject: [PATCH 07/20] Treat a limit of f as unlimited instead of throwing an error --- basis/io/streams/limited/limited-tests.factor | 6 ++++++ basis/io/streams/limited/limited.factor | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/basis/io/streams/limited/limited-tests.factor b/basis/io/streams/limited/limited-tests.factor index 36c257fb5e..86d652d17c 100644 --- a/basis/io/streams/limited/limited-tests.factor +++ b/basis/io/streams/limited/limited-tests.factor @@ -76,3 +76,9 @@ IN: io.streams.limited.tests [ decoder? ] both? ] with-destructors ] unit-test + +[ "HELL" ] [ + "HELLO" + [ f stream-throws limit-input 4 read ] + with-string-reader +] unit-test \ No newline at end of file diff --git a/basis/io/streams/limited/limited.factor b/basis/io/streams/limited/limited.factor index fe3dd9ad93..b1b07a08c0 100755 --- a/basis/io/streams/limited/limited.factor +++ b/basis/io/streams/limited/limited.factor @@ -22,7 +22,7 @@ M: decoder limit ( stream limit mode -- stream' ) [ clone ] 2dip '[ _ _ limit ] change-stream ; M: object limit ( stream limit mode -- stream' ) - ; + over [ ] [ 2drop ] if ; GENERIC: unlimited ( stream -- stream' ) @@ -32,9 +32,11 @@ M: decoder unlimited ( stream -- stream' ) M: object unlimited ( stream -- stream' ) stream>> stream>> ; -: limit-input ( limit mode -- ) input-stream [ -rot limit ] change ; +: limit-input ( limit mode -- ) + [ input-stream ] 2dip '[ _ _ limit ] change ; -: unlimited-input ( -- ) input-stream [ unlimited ] change ; +: unlimited-input ( -- ) + input-stream [ unlimited ] change ; : with-unlimited-stream ( stream quot -- ) [ clone unlimited ] dip call ; inline From 63cf5b04e13570737f8e92e8b5a732bedd41831e Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 04:19:21 -0500 Subject: [PATCH 08/20] http.client: fix 307 redirect behavior (reported by Chris Double) --- basis/http/client/client.factor | 9 +++++---- basis/http/http-tests.factor | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/basis/http/client/client.factor b/basis/http/client/client.factor index 4099e3d84c..805929d27b 100644 --- a/basis/http/client/client.factor +++ b/basis/http/client/client.factor @@ -6,7 +6,7 @@ math.order hashtables byte-arrays destructors io io.sockets io.streams.string io.files io.timeouts io.pathnames io.encodings io.encodings.string io.encodings.ascii io.encodings.utf8 io.encodings.8-bit io.encodings.binary io.crlf -io.streams.duplex fry ascii urls urls.encoding present +io.streams.duplex fry ascii urls urls.encoding present locals http http.parsers http.client.post-data ; IN: http.client @@ -77,12 +77,13 @@ SYMBOL: redirects : redirect? ( response -- ? ) code>> 300 399 between? ; -: do-redirect ( quot: ( chunk -- ) response -- response ) +:: do-redirect ( quot: ( chunk -- ) response -- response ) redirects inc redirects get max-redirects < [ request get clone - swap "location" header redirect-url - "GET" >>method swap (with-http-request) + response "location" header redirect-url + response code>> 307 = [ "GET" >>method ] unless + quot (with-http-request) ] [ too-many-redirects ] if ; inline recursive : read-chunk-size ( -- n ) diff --git a/basis/http/http-tests.factor b/basis/http/http-tests.factor index 52763c4f18..da50a6f85f 100644 --- a/basis/http/http-tests.factor +++ b/basis/http/http-tests.factor @@ -372,4 +372,24 @@ SYMBOL: a "vocab:http/test/foo.html" ascii file-contents = ] unit-test +[ ] [ "http://localhost/quit" add-port http-get 2drop ] unit-test + +! Check behavior of 307 redirect (reported by Chris Double) +[ ] [ + + add-quit-action + + [ "b" ] >>submit + "a" add-responder + + [ + request get post-data>> data>> "data" = + [ "OK" "text/plain" ] [ "OOPS" throw ] if + ] >>submit + "b" add-responder + test-httpd +] unit-test + +[ "OK" ] [ "data" "http://localhost/a" add-port http-post nip ] unit-test + [ ] [ "http://localhost/quit" add-port http-get 2drop ] unit-test \ No newline at end of file From 65802b6aaa7e9a1e251e0f363958bbe410af2c73 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 7 Apr 2009 10:08:01 -0500 Subject: [PATCH 09/20] fix unit test in robots --- extra/robots/robots-tests.factor | 645 ++++++++++++++++--------------- extra/robots/robots.factor | 2 +- 2 files changed, 324 insertions(+), 323 deletions(-) diff --git a/extra/robots/robots-tests.factor b/extra/robots/robots-tests.factor index a590d9eee0..54b4892680 100644 --- a/extra/robots/robots-tests.factor +++ b/extra/robots/robots-tests.factor @@ -1,334 +1,335 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: calendar io.encodings.utf8 io.files robots tools.test ; +USING: calendar io.encodings.utf8 io.files robots tools.test +urls ; IN: robots.tests [ -{ "http://www.chiplist.com/sitemap.txt" } -{ - T{ rules - { user-agents V{ "*" } } - { allows V{ } } - { disallows - V{ - "/cgi-bin/" - "/scripts/" - "/ChipList2/scripts/" - "/ChipList2/styles/" - "/ads/" - "/ChipList2/ads/" - "/advertisements/" - "/ChipList2/advertisements/" - "/graphics/" - "/ChipList2/graphics/" + { "http://www.chiplist.com/sitemap.txt" } + { + T{ rules + { user-agents V{ "*" } } + { allows V{ } } + { disallows + V{ + URL" /cgi-bin/" + URL" /scripts/" + URL" /ChipList2/scripts/" + URL" /ChipList2/styles/" + URL" /ads/" + URL" /ChipList2/ads/" + URL" /advertisements/" + URL" /ChipList2/advertisements/" + URL" /graphics/" + URL" /ChipList2/graphics/" + } } - } - { visit-time - { - T{ timestamp { hour 2 } } - T{ timestamp { hour 5 } } + { visit-time + { + T{ timestamp { hour 2 } } + T{ timestamp { hour 5 } } + } } + { request-rate 1 } + { crawl-delay 1 } + { unknowns H{ } } } - { request-rate 1 } - { crawl-delay 1 } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "UbiCrawler" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "DOC" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Zao" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "sitecheck.internetseer.com" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Zealbot" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "MSIECrawler" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "SiteSnagger" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "WebStripper" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "WebCopier" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Fetch" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Offline Explorer" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Teleport" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "TeleportPro" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "WebZIP" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "linko" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "HTTrack" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Microsoft.URL.Control" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Xenu" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "larbin" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "libwww" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "ZyBORG" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "Download Ninja" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "wget" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "grub-client" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "k2spider" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "NPBot" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents V{ "WebReaper" } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } - } - T{ rules - { user-agents - V{ - "abot" - "ALeadSoftbot" - "BeijingCrawler" - "BilgiBot" - "bot" - "botlist" - "BOTW Spider" - "bumblebee" - "Bumblebee" - "BuzzRankingBot" - "Charlotte" - "Clushbot" - "Crawler" - "CydralSpider" - "DataFountains" - "DiamondBot" - "Dulance bot" - "DYNAMIC" - "EARTHCOM.info" - "EDI" - "envolk" - "Exabot" - "Exabot-Images" - "Exabot-Test" - "exactseek-pagereaper" - "Exalead NG" - "FANGCrawl" - "Feed::Find" - "flatlandbot" - "Gigabot" - "GigabotSiteSearch" - "GurujiBot" - "Hatena Antenna" - "Hatena Bookmark" - "Hatena RSS" - "HatenaScreenshot" - "Helix" - "HiddenMarket" - "HyperEstraier" - "iaskspider" - "IIITBOT" - "InfociousBot" - "iVia" - "iVia Page Fetcher" - "Jetbot" - "Kolinka Forum Search" - "KRetrieve" - "LetsCrawl.com" - "Lincoln State Web Browser" - "Links4US-Crawler" - "LOOQ" - "Lsearch/sondeur" - "MapoftheInternet.com" - "NationalDirectory" - "NetCarta_WebMapper" - "NewsGator" - "NextGenSearchBot" - "ng" - "nicebot" - "NP" - "NPBot" - "Nudelsalat" - "Nutch" - "OmniExplorer_Bot" - "OpenIntelligenceData" - "Oracle Enterprise Search" - "Pajaczek" - "panscient.com" - "PeerFactor 404 crawler" - "PeerFactor Crawler" - "PlantyNet" - "PlantyNet_WebRobot" - "plinki" - "PMAFind" - "Pogodak!" - "QuickFinder Crawler" - "Radiation Retriever" - "Reaper" - "RedCarpet" - "ScorpionBot" - "Scrubby" - "Scumbot" - "searchbot" - "Seeker.lookseek.com" - "SeznamBot" - "ShowXML" - "snap.com" - "snap.com beta crawler" - "Snapbot" - "SnapPreviewBot" - "sohu" - "SpankBot" - "Speedy Spider" - "Speedy_Spider" - "SpeedySpider" - "spider" - "SquigglebotBot" - "SurveyBot" - "SynapticSearch" - "T-H-U-N-D-E-R-S-T-O-N-E" - "Talkro Web-Shot" - "Tarantula" - "TerrawizBot" - "TheInformant" - "TMCrawler" - "TridentSpider" - "Tutorial Crawler" - "Twiceler" - "unwrapbot" - "URI::Fetch" - "VengaBot" - "Vonna.com b o t" - "Vortex" - "Votay bot" - "WebAlta Crawler" - "Webbot" - "Webclipping.com" - "WebCorp" - "Webinator" - "WIRE" - "WISEbot" - "Xerka WebBot" - "XSpider" - "YodaoBot" - "Yoono" - "yoono" + T{ rules + { user-agents V{ "UbiCrawler" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "DOC" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Zao" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "sitecheck.internetseer.com" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Zealbot" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "MSIECrawler" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "SiteSnagger" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "WebStripper" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "WebCopier" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Fetch" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Offline Explorer" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Teleport" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "TeleportPro" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "WebZIP" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "linko" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "HTTrack" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Microsoft.URL.Control" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Xenu" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "larbin" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "libwww" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "ZyBORG" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "Download Ninja" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "wget" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "grub-client" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "k2spider" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "NPBot" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents V{ "WebReaper" } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } + } + T{ rules + { user-agents + V{ + "abot" + "ALeadSoftbot" + "BeijingCrawler" + "BilgiBot" + "bot" + "botlist" + "BOTW Spider" + "bumblebee" + "Bumblebee" + "BuzzRankingBot" + "Charlotte" + "Clushbot" + "Crawler" + "CydralSpider" + "DataFountains" + "DiamondBot" + "Dulance bot" + "DYNAMIC" + "EARTHCOM.info" + "EDI" + "envolk" + "Exabot" + "Exabot-Images" + "Exabot-Test" + "exactseek-pagereaper" + "Exalead NG" + "FANGCrawl" + "Feed::Find" + "flatlandbot" + "Gigabot" + "GigabotSiteSearch" + "GurujiBot" + "Hatena Antenna" + "Hatena Bookmark" + "Hatena RSS" + "HatenaScreenshot" + "Helix" + "HiddenMarket" + "HyperEstraier" + "iaskspider" + "IIITBOT" + "InfociousBot" + "iVia" + "iVia Page Fetcher" + "Jetbot" + "Kolinka Forum Search" + "KRetrieve" + "LetsCrawl.com" + "Lincoln State Web Browser" + "Links4US-Crawler" + "LOOQ" + "Lsearch/sondeur" + "MapoftheInternet.com" + "NationalDirectory" + "NetCarta_WebMapper" + "NewsGator" + "NextGenSearchBot" + "ng" + "nicebot" + "NP" + "NPBot" + "Nudelsalat" + "Nutch" + "OmniExplorer_Bot" + "OpenIntelligenceData" + "Oracle Enterprise Search" + "Pajaczek" + "panscient.com" + "PeerFactor 404 crawler" + "PeerFactor Crawler" + "PlantyNet" + "PlantyNet_WebRobot" + "plinki" + "PMAFind" + "Pogodak!" + "QuickFinder Crawler" + "Radiation Retriever" + "Reaper" + "RedCarpet" + "ScorpionBot" + "Scrubby" + "Scumbot" + "searchbot" + "Seeker.lookseek.com" + "SeznamBot" + "ShowXML" + "snap.com" + "snap.com beta crawler" + "Snapbot" + "SnapPreviewBot" + "sohu" + "SpankBot" + "Speedy Spider" + "Speedy_Spider" + "SpeedySpider" + "spider" + "SquigglebotBot" + "SurveyBot" + "SynapticSearch" + "T-H-U-N-D-E-R-S-T-O-N-E" + "Talkro Web-Shot" + "Tarantula" + "TerrawizBot" + "TheInformant" + "TMCrawler" + "TridentSpider" + "Tutorial Crawler" + "Twiceler" + "unwrapbot" + "URI::Fetch" + "VengaBot" + "Vonna.com b o t" + "Vortex" + "Votay bot" + "WebAlta Crawler" + "Webbot" + "Webclipping.com" + "WebCorp" + "Webinator" + "WIRE" + "WISEbot" + "Xerka WebBot" + "XSpider" + "YodaoBot" + "Yoono" + "yoono" + } } + { allows V{ } } + { disallows V{ URL" /" } } + { unknowns H{ } } } - { allows V{ } } - { disallows V{ "/" } } - { unknowns H{ } } } -} ] [ "vocab:robots/robots.txt" utf8 file-contents parse-robots.txt ] unit-test diff --git a/extra/robots/robots.factor b/extra/robots/robots.factor index 242aa1dea2..3c0eb045f7 100644 --- a/extra/robots/robots.factor +++ b/extra/robots/robots.factor @@ -85,7 +85,7 @@ PRIVATE> : parse-robots.txt ( string -- sitemaps rules-seq ) normalize-robots.txt [ [ dup ] dip [ parse-robots.txt-line drop ] with each - ] map first ; + ] map ; : robots ( url -- robots ) >url From 7a9c0ce069a8d6a53fe81d52907cc838679e2550 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Tue, 7 Apr 2009 16:55:00 -0400 Subject: [PATCH 10/20] Solution to Project Euler problem 58 --- extra/project-euler/058/058-tests.factor | 3 ++ extra/project-euler/058/058.factor | 68 ++++++++++++++++++++++++ extra/project-euler/project-euler.factor | 15 +++--- 3 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 extra/project-euler/058/058-tests.factor create mode 100644 extra/project-euler/058/058.factor diff --git a/extra/project-euler/058/058-tests.factor b/extra/project-euler/058/058-tests.factor new file mode 100644 index 0000000000..13a2aafa94 --- /dev/null +++ b/extra/project-euler/058/058-tests.factor @@ -0,0 +1,3 @@ +USING: project-euler.058 tools.test ; + +{ 26241 } [ euler058 ] unit-test diff --git a/extra/project-euler/058/058.factor b/extra/project-euler/058/058.factor new file mode 100644 index 0000000000..133175f2a8 --- /dev/null +++ b/extra/project-euler/058/058.factor @@ -0,0 +1,68 @@ +! Copyright (c) 2009 Aaron Schaefer. +! See http://factorcode.org/license.txt for BSD license. +USING: fry kernel math math.primes math.ranges project-euler.common sequences ; +IN: project-euler.058 + +! http://projecteuler.net/index.php?section=problems&id=58 + +! DESCRIPTION +! ----------- + +! Starting with 1 and solveling anticlockwise in the following way, a square +! solve with side length 7 is formed. + +! 37 36 35 34 33 32 31 +! 38 17 16 15 14 13 30 +! 39 18 5 4 3 12 29 +! 40 19 6 1 2 11 28 +! 41 20 7 8 9 10 27 +! 42 21 22 23 24 25 26 +! 43 44 45 46 47 48 49 + +! It is interesting to note that the odd squares lie along the bottom right +! diagonal, but what is more interesting is that 8 out of the 13 numbers lying +! along both diagonals are prime; that is, a ratio of 8/13 ≈ 62%. + +! If one complete new layer is wrapped around the solve above, a square solve +! with side length 9 will be formed. If this process is continued, what is the +! side length of the square solve for which the ratio of primes along both +! diagonals first falls below 10%? + + +! SOLUTION +! -------- + + + +: euler058 ( -- answer ) + 8 7 solve ; + +! [ euler058 ] 10 ave-time +! 12974 ms ave run time - 284.46 SD (10 trials) + +SOLUTION: euler058 diff --git a/extra/project-euler/project-euler.factor b/extra/project-euler/project-euler.factor index 62f6a56c65..d60ae60126 100644 --- a/extra/project-euler/project-euler.factor +++ b/extra/project-euler/project-euler.factor @@ -15,13 +15,14 @@ USING: definitions io io.files io.pathnames kernel math math.parser project-euler.041 project-euler.042 project-euler.043 project-euler.044 project-euler.045 project-euler.046 project-euler.047 project-euler.048 project-euler.049 project-euler.052 project-euler.053 project-euler.054 - project-euler.055 project-euler.056 project-euler.057 project-euler.059 - project-euler.067 project-euler.071 project-euler.073 project-euler.075 - project-euler.076 project-euler.079 project-euler.092 project-euler.097 - project-euler.099 project-euler.100 project-euler.116 project-euler.117 - project-euler.134 project-euler.148 project-euler.150 project-euler.151 - project-euler.164 project-euler.169 project-euler.173 project-euler.175 - project-euler.186 project-euler.190 project-euler.203 project-euler.215 ; + project-euler.055 project-euler.056 project-euler.057 project-euler.058 + project-euler.059 project-euler.067 project-euler.071 project-euler.073 + project-euler.075 project-euler.076 project-euler.079 project-euler.092 + project-euler.097 project-euler.099 project-euler.100 project-euler.116 + project-euler.117 project-euler.134 project-euler.148 project-euler.150 + project-euler.151 project-euler.164 project-euler.169 project-euler.173 + project-euler.175 project-euler.186 project-euler.190 project-euler.203 + project-euler.215 ; IN: project-euler Date: Tue, 7 Apr 2009 18:34:20 -0400 Subject: [PATCH 11/20] Add documentation for poker vocab --- extra/poker/poker-docs.factor | 30 ++++++++++++++++++++++++++++++ extra/poker/poker.factor | 32 ++++++++++++++++---------------- 2 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 extra/poker/poker-docs.factor diff --git a/extra/poker/poker-docs.factor b/extra/poker/poker-docs.factor new file mode 100644 index 0000000000..09019a29d7 --- /dev/null +++ b/extra/poker/poker-docs.factor @@ -0,0 +1,30 @@ +USING: help.markup help.syntax strings ; +IN: poker + +HELP: +{ $values { "str" string } { "hand" "a new hand" } } +{ $description "Creates a new poker hand containing the cards specified in " { $snippet "str" } "." } +{ $examples + { $example "USING: kernel math.order poker prettyprint ;" + "\"AC KC QC JC TC\" \"7C 6D 5H 4S 2C\" [ ] bi@ <=> ." "+lt+" } + { $example "USING: kernel poker prettyprint ;" + "\"TC 9C 8C 7C 6C\" \"TH 9H 8H 7H 6H\" [ ] bi@ = ." "t" } +} +{ $notes "Cards may be specified in any order. Hands are directly comparable to each other on the basis of their computed value. Two hands are considered equal when they would tie in a game (despite being composed of different cards)." } ; + +HELP: >cards +{ $values { "hand" "a hand" } { "str" string } } +{ $description "Outputs a string representation of a hand's cards." } +{ $examples + { $example "USING: poker prettyprint ;" + "\"AC KC QC JC TC\" >cards ." "\"AC KC QC JC TC\"" } +} ; + +HELP: >value +{ $values { "hand" "a hand" } { "str" string } } +{ $description "Outputs a string representation of a hand's value." } +{ $examples + { $example "USING: poker prettyprint ;" + "\"AC KC QC JC TC\" >value ." "\"Straight Flush\"" } +} +{ $notes "This should not be used as a basis for hand comparison." } ; diff --git a/extra/poker/poker.factor b/extra/poker/poker.factor index ca999dbf6e..2a7fe73762 100644 --- a/extra/poker/poker.factor +++ b/extra/poker/poker.factor @@ -155,6 +155,19 @@ CONSTANT: VALUE_STR { "" "Straight Flush" "Four of a Kind" "Full House" "Flush" [ drop "S" ] } cond ; +: hand-rank ( hand -- rank ) + value>> { + { [ dup 6185 > ] [ drop HIGH_CARD ] } ! 1277 high card + { [ dup 3325 > ] [ drop ONE_PAIR ] } ! 2860 one pair + { [ dup 2467 > ] [ drop TWO_PAIR ] } ! 858 two pair + { [ dup 1609 > ] [ drop THREE_OF_A_KIND ] } ! 858 three-kind + { [ dup 1599 > ] [ drop STRAIGHT ] } ! 10 straights + { [ dup 322 > ] [ drop FLUSH ] } ! 1277 flushes + { [ dup 166 > ] [ drop FULL_HOUSE ] } ! 156 full house + { [ dup 10 > ] [ drop FOUR_OF_A_KIND ] } ! 156 four-kind + [ drop STRAIGHT_FLUSH ] ! 10 straight-flushes + } cond ; + PRIVATE> TUPLE: hand @@ -169,23 +182,10 @@ M: hand equal? " " split [ >ckf ] map dup hand-value hand boa ; -: hand-rank ( hand -- rank ) - value>> { - { [ dup 6185 > ] [ drop HIGH_CARD ] } ! 1277 high card - { [ dup 3325 > ] [ drop ONE_PAIR ] } ! 2860 one pair - { [ dup 2467 > ] [ drop TWO_PAIR ] } ! 858 two pair - { [ dup 1609 > ] [ drop THREE_OF_A_KIND ] } ! 858 three-kind - { [ dup 1599 > ] [ drop STRAIGHT ] } ! 10 straights - { [ dup 322 > ] [ drop FLUSH ] } ! 1277 flushes - { [ dup 166 > ] [ drop FULL_HOUSE ] } ! 156 full house - { [ dup 10 > ] [ drop FOUR_OF_A_KIND ] } ! 156 four-kind - [ drop STRAIGHT_FLUSH ] ! 10 straight-flushes - } cond ; - -: >value ( hand -- str ) - hand-rank VALUE_STR nth ; - : >cards ( hand -- str ) cards>> [ [ >card-rank ] [ >card-suit ] bi append ] map " " join ; + +: >value ( hand -- str ) + hand-rank VALUE_STR nth ; From 41e3e0acb4ab113be54fef6ec46593064cc99a22 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 18:49:54 -0500 Subject: [PATCH 12/20] Fix alien.fortran for NetBSD x86.64 --- basis/alien/fortran/fortran.factor | 7 ++++++- basis/math/blas/config/config.factor | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/basis/alien/fortran/fortran.factor b/basis/alien/fortran/fortran.factor index 71efa1aa24..c617efc26c 100644 --- a/basis/alien/fortran/fortran.factor +++ b/basis/alien/fortran/fortran.factor @@ -8,7 +8,7 @@ io.encodings.ascii io.encodings.string shuffle effects math.ranges math.order sorting strings system alien.libraries ; IN: alien.fortran -SINGLETONS: f2c-abi gfortran-abi intel-unix-abi intel-windows-abi ; +SINGLETONS: f2c-abi g95-abi gfortran-abi intel-unix-abi intel-windows-abi ; << : add-f2c-libraries ( -- ) @@ -42,30 +42,35 @@ library-fortran-abis [ H{ } clone ] initialize HOOK: fortran-c-abi fortran-abi ( -- abi ) M: f2c-abi fortran-c-abi "cdecl" ; +M: g95-abi fortran-c-abi "cdecl" ; M: gfortran-abi fortran-c-abi "cdecl" ; M: intel-unix-abi fortran-c-abi "cdecl" ; M: intel-windows-abi fortran-c-abi "cdecl" ; HOOK: real-functions-return-double? fortran-abi ( -- ? ) M: f2c-abi real-functions-return-double? t ; +M: g95-abi real-functions-return-double? f ; M: gfortran-abi real-functions-return-double? f ; M: intel-unix-abi real-functions-return-double? f ; M: intel-windows-abi real-functions-return-double? f ; HOOK: complex-functions-return-by-value? fortran-abi ( -- ? ) M: f2c-abi complex-functions-return-by-value? f ; +M: g95-abi complex-functions-return-by-value? f ; M: gfortran-abi complex-functions-return-by-value? t ; M: intel-unix-abi complex-functions-return-by-value? f ; M: intel-windows-abi complex-functions-return-by-value? f ; HOOK: character(1)-maps-to-char? fortran-abi ( -- ? ) M: f2c-abi character(1)-maps-to-char? f ; +M: g95-abi character(1)-maps-to-char? f ; M: gfortran-abi character(1)-maps-to-char? f ; M: intel-unix-abi character(1)-maps-to-char? t ; M: intel-windows-abi character(1)-maps-to-char? t ; HOOK: mangle-name fortran-abi ( name -- name' ) M: f2c-abi mangle-name lowercase-name-with-extra-underscore ; +M: f95-abi mangle-name lowercase-name-with-extra-underscore ; M: gfortran-abi mangle-name lowercase-name-with-underscore ; M: intel-unix-abi mangle-name lowercase-name-with-underscore ; M: intel-windows-abi mangle-name >upper ; diff --git a/basis/math/blas/config/config.factor b/basis/math/blas/config/config.factor index 8ed515625d..327c546963 100644 --- a/basis/math/blas/config/config.factor +++ b/basis/math/blas/config/config.factor @@ -15,6 +15,7 @@ blas-fortran-abi [ { { [ os macosx? ] [ intel-unix-abi ] } { [ os windows? cpu x86.32? and ] [ f2c-abi ] } + { [ os netbsd? cpu x86.64? and ] [ g95-abi ] } { [ os windows? cpu x86.64? and ] [ gfortran-abi ] } { [ os freebsd? ] [ gfortran-abi ] } { [ os linux? cpu x86.32? and ] [ gfortran-abi ] } From 409b3317161159fe34e0a8e2f612d881bcd1e599 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 20:06:28 -0500 Subject: [PATCH 13/20] Fix typo --- basis/alien/fortran/fortran.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/alien/fortran/fortran.factor b/basis/alien/fortran/fortran.factor index c617efc26c..b27c62b9a1 100644 --- a/basis/alien/fortran/fortran.factor +++ b/basis/alien/fortran/fortran.factor @@ -70,7 +70,7 @@ M: intel-windows-abi character(1)-maps-to-char? t ; HOOK: mangle-name fortran-abi ( name -- name' ) M: f2c-abi mangle-name lowercase-name-with-extra-underscore ; -M: f95-abi mangle-name lowercase-name-with-extra-underscore ; +M: g95-abi mangle-name lowercase-name-with-extra-underscore ; M: gfortran-abi mangle-name lowercase-name-with-underscore ; M: intel-unix-abi mangle-name lowercase-name-with-underscore ; M: intel-windows-abi mangle-name >upper ; From e78476a51eeb95edad2ceeaadd62b07a4a872cc9 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Tue, 7 Apr 2009 21:36:38 -0400 Subject: [PATCH 14/20] Solution to Project Euler problem 63 --- extra/project-euler/063/063-tests.factor | 3 ++ extra/project-euler/063/063.factor | 37 ++++++++++++++++++++++++ extra/project-euler/project-euler.factor | 14 ++++----- 3 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 extra/project-euler/063/063-tests.factor create mode 100644 extra/project-euler/063/063.factor diff --git a/extra/project-euler/063/063-tests.factor b/extra/project-euler/063/063-tests.factor new file mode 100644 index 0000000000..0cff44db5e --- /dev/null +++ b/extra/project-euler/063/063-tests.factor @@ -0,0 +1,3 @@ +USING: project-euler.063 tools.test ; + +{ 49 } [ euler063 ] unit-test diff --git a/extra/project-euler/063/063.factor b/extra/project-euler/063/063.factor new file mode 100644 index 0000000000..80e3990a24 --- /dev/null +++ b/extra/project-euler/063/063.factor @@ -0,0 +1,37 @@ +! Copyright (c) 2009 Aaron Schaefer. +! See http://factorcode.org/license.txt for BSD license. +USING: kernel math math.functions math.ranges project-euler.common sequences ; +IN: project-euler.063 + +! http://projecteuler.net/index.php?section=problems&id=63 + +! DESCRIPTION +! ----------- + +! The 5-digit number, 16807 = 7^5, is also a fifth power. Similarly, the +! 9-digit number, 134217728 = 8^9, is a ninth power. + +! How many n-digit positive integers exist which are also an nth power? + + +! SOLUTION +! -------- + +! Only have to check from 1 to 9 because 10^n already has too many digits. +! In general, x^n has n digits when: + +! 10^(n-1) <= x^n < 10^n + +! ...take the left side of that equation, solve for n to see where they meet: + +! n = log(10) / [ log(10) - log(x) ] + +! Round down since we already know that particular value of n is no good. + +: euler063 ( -- answer ) + 9 [1,b] [ log [ 10 log dup ] dip - /i ] sigma ; + +! [ euler063 ] 100 ave-time +! 0 ms ave run time - 0.0 SD (100 trials) + +SOLUTION: euler063 diff --git a/extra/project-euler/project-euler.factor b/extra/project-euler/project-euler.factor index d60ae60126..5d46d7f1fd 100644 --- a/extra/project-euler/project-euler.factor +++ b/extra/project-euler/project-euler.factor @@ -16,13 +16,13 @@ USING: definitions io io.files io.pathnames kernel math math.parser project-euler.045 project-euler.046 project-euler.047 project-euler.048 project-euler.049 project-euler.052 project-euler.053 project-euler.054 project-euler.055 project-euler.056 project-euler.057 project-euler.058 - project-euler.059 project-euler.067 project-euler.071 project-euler.073 - project-euler.075 project-euler.076 project-euler.079 project-euler.092 - project-euler.097 project-euler.099 project-euler.100 project-euler.116 - project-euler.117 project-euler.134 project-euler.148 project-euler.150 - project-euler.151 project-euler.164 project-euler.169 project-euler.173 - project-euler.175 project-euler.186 project-euler.190 project-euler.203 - project-euler.215 ; + project-euler.059 project-euler.063 project-euler.067 project-euler.071 + project-euler.073 project-euler.075 project-euler.076 project-euler.079 + project-euler.092 project-euler.097 project-euler.099 project-euler.100 + project-euler.116 project-euler.117 project-euler.134 project-euler.148 + project-euler.150 project-euler.151 project-euler.164 project-euler.169 + project-euler.173 project-euler.175 project-euler.186 project-euler.190 + project-euler.203 project-euler.215 ; IN: project-euler Date: Tue, 7 Apr 2009 21:32:45 -0500 Subject: [PATCH 15/20] opengl.textures: use GL_ARB_texture_non_power_of_two if available --- basis/opengl/textures/textures.factor | 13 ++++++++++--- basis/ui/backend/backend.factor | 8 ++++---- basis/ui/gadgets/worlds/worlds.factor | 12 +++++++++--- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/basis/opengl/textures/textures.factor b/basis/opengl/textures/textures.factor index bb232affa4..e13e99e10f 100755 --- a/basis/opengl/textures/textures.factor +++ b/basis/opengl/textures/textures.factor @@ -3,9 +3,11 @@ USING: accessors assocs cache colors.constants destructors fry kernel opengl opengl.gl combinators images images.tesselation grouping specialized-arrays.float sequences math math.vectors -math.matrices generalizations fry arrays ; +math.matrices generalizations fry arrays namespaces ; IN: opengl.textures +SYMBOL: non-power-of-2-textures? + : gen-texture ( -- id ) [ glGenTextures ] (gen-gl-object) ; : delete-texture ( id -- ) [ glDeleteTextures ] (delete-gl-object) ; @@ -29,9 +31,14 @@ GENERIC: draw-scaled-texture ( dim texture -- ) TUPLE: single-texture image dim loc texture-coords texture display-list disposed ; +: adjust-texture-dim ( dim -- dim' ) + non-power-of-2-textures? get [ + [ next-power-of-2 ] map + ] unless ; + : (tex-image) ( image -- ) [ GL_TEXTURE_2D 0 GL_RGBA ] dip - [ dim>> first2 [ next-power-of-2 ] bi@ 0 ] + [ dim>> adjust-texture-dim first2 0 ] [ component-order>> component-order>format f ] bi glTexImage2D ; @@ -81,7 +88,7 @@ TUPLE: single-texture image dim loc texture-coords texture display-list disposed ] with-texturing ; : texture-coords ( texture -- coords ) - [ [ dim>> ] [ image>> dim>> [ next-power-of-2 ] map ] bi v/ ] + [ [ dim>> ] [ image>> dim>> adjust-texture-dim ] bi v/ ] [ image>> upside-down?>> { { 0 1 } { 1 1 } { 1 0 } { 0 0 } } diff --git a/basis/ui/backend/backend.factor b/basis/ui/backend/backend.factor index d72ef13b44..9c844d3663 100755 --- a/basis/ui/backend/backend.factor +++ b/basis/ui/backend/backend.factor @@ -1,6 +1,6 @@ -! Copyright (C) 2006, 2007 Slava Pestov. +! Copyright (C) 2006, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel namespaces opengl opengl.gl ; +USING: kernel namespaces opengl opengl.gl fry ; IN: ui.backend SYMBOL: ui-backend @@ -28,7 +28,7 @@ GENERIC: flush-gl-context ( handle -- ) HOOK: offscreen-pixels ui-backend ( world -- alien w h ) : with-gl-context ( handle quot -- ) - swap [ select-gl-context call ] keep - flush-gl-context gl-error ; inline + '[ select-gl-context @ ] + [ flush-gl-context gl-error ] bi ; inline HOOK: (with-ui) ui-backend ( quot -- ) \ No newline at end of file diff --git a/basis/ui/gadgets/worlds/worlds.factor b/basis/ui/gadgets/worlds/worlds.factor index 655c9ba49d..f671add531 100644 --- a/basis/ui/gadgets/worlds/worlds.factor +++ b/basis/ui/gadgets/worlds/worlds.factor @@ -1,9 +1,10 @@ ! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs continuations kernel math models -namespaces opengl sequences io combinators combinators.short-circuit -fry math.vectors math.rectangles cache ui.gadgets ui.gestures -ui.render ui.backend ui.gadgets.tracks ui.commands ; +namespaces opengl opengl.capabilities opengl.textures sequences io +combinators combinators.short-circuit fry math.vectors math.rectangles +cache ui.gadgets ui.gestures ui.render ui.backend ui.gadgets.tracks +ui.commands ; IN: ui.gadgets.worlds TUPLE: world < track @@ -76,8 +77,13 @@ SYMBOL: flush-layout-cache-hook flush-layout-cache-hook [ [ ] ] initialize +: check-extensions ( -- ) + "2.0" { "GL_ARB_texture_non_power_of_two" } has-gl-version-or-extensions? + non-power-of-2-textures? set ; + : (draw-world) ( world -- ) dup handle>> [ + check-extensions { [ init-gl ] [ draw-gadget ] From ba61b8215275bb6ea605169d291f133b8d5db711 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 21:47:57 -0500 Subject: [PATCH 16/20] Pass vocab roots onto deployed app. Fixes deployment of apps outside the built-in roots. Reported by Alec Berryman --- basis/command-line/command-line.factor | 1 - basis/tools/deploy/backend/backend.factor | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/basis/command-line/command-line.factor b/basis/command-line/command-line.factor index 73a01aa352..56d7fbd207 100644 --- a/basis/command-line/command-line.factor +++ b/basis/command-line/command-line.factor @@ -60,7 +60,6 @@ SYMBOL: main-vocab-hook : default-cli-args ( -- ) global [ "quiet" off - "script" off "e" off "user-init" on embedded? "quiet" set diff --git a/basis/tools/deploy/backend/backend.factor b/basis/tools/deploy/backend/backend.factor index 28a32790dc..6ca54ca36b 100755 --- a/basis/tools/deploy/backend/backend.factor +++ b/basis/tools/deploy/backend/backend.factor @@ -8,7 +8,7 @@ debugger io.streams.c io.files io.files.temp io.pathnames io.directories io.directories.hierarchy io.backend quotations io.launcher words.private tools.deploy.config tools.deploy.config.editor bootstrap.image io.encodings.utf8 -destructors accessors ; +destructors accessors hashtables ; IN: tools.deploy.backend : copy-vm ( executable bundle-name -- vm ) @@ -88,7 +88,7 @@ DEFER: ?make-staging-image [ drop ] [ make-staging-image ] if ; : make-deploy-config ( vocab -- file ) - [ deploy-config unparse-use ] + [ deploy-config vocab-roots get vocab-roots associate assoc-union unparse-use ] [ "deploy-config-" prepend temp-file ] bi [ utf8 set-file-contents ] keep ; From 6082a98c7c075dbfc03d9a3c720e0fcccfda4eb5 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 7 Apr 2009 22:30:13 -0500 Subject: [PATCH 17/20] If (open-window) or similar fails, don't enter an infinite loop of opening error windows, just try to open one and then give up --- basis/ui/ui.factor | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index bf17e455f8..dff7726d08 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -2,9 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays assocs io kernel math models namespaces make dlists deques sequences threads sequences words continuations init -combinators hashtables concurrency.flags sets accessors calendar fry -destructors ui.gadgets ui.gadgets.private ui.gadgets.worlds -ui.gadgets.tracks ui.gestures ui.backend ui.render ; +combinators combinators.short-circuit hashtables concurrency.flags +sets accessors calendar fry destructors ui.gadgets ui.gadgets.private +ui.gadgets.worlds ui.gadgets.tracks ui.gestures ui.backend ui.render ; IN: ui : find-window ( quot -- world ) - windows get values - [ gadget-child swap call ] with find-last nip ; inline + [ windows get values ] dip '[ gadget-child @ ] find-last nip ; inline : ui-running? ( -- ? ) \ ui-running get-global ; @@ -142,9 +139,15 @@ PRIVATE> Date: Wed, 8 Apr 2009 02:41:02 -0400 Subject: [PATCH 18/20] Solutions to Project Euler problem 69 --- extra/project-euler/007/007.factor | 3 - extra/project-euler/069/069-tests.factor | 4 ++ extra/project-euler/069/069.factor | 87 ++++++++++++++++++++++++ extra/project-euler/071/071.factor | 7 -- extra/project-euler/common/common.factor | 19 ++++-- extra/project-euler/project-euler.factor | 16 ++--- 6 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 extra/project-euler/069/069-tests.factor create mode 100644 extra/project-euler/069/069.factor diff --git a/extra/project-euler/007/007.factor b/extra/project-euler/007/007.factor index f9208e11b3..1827d0fa06 100644 --- a/extra/project-euler/007/007.factor +++ b/extra/project-euler/007/007.factor @@ -17,9 +17,6 @@ IN: project-euler.007 ! SOLUTION ! -------- -: nth-prime ( n -- n ) - 1- lprimes lnth ; - : euler007 ( -- answer ) 10001 nth-prime ; diff --git a/extra/project-euler/069/069-tests.factor b/extra/project-euler/069/069-tests.factor new file mode 100644 index 0000000000..97741c0ee3 --- /dev/null +++ b/extra/project-euler/069/069-tests.factor @@ -0,0 +1,4 @@ +USING: project-euler.069 tools.test ; + +{ 510510 } [ euler069 ] unit-test +{ 510510 } [ euler069a ] unit-test diff --git a/extra/project-euler/069/069.factor b/extra/project-euler/069/069.factor new file mode 100644 index 0000000000..eae1d82ece --- /dev/null +++ b/extra/project-euler/069/069.factor @@ -0,0 +1,87 @@ +! Copyright (c) 2009 Aaron Schaefer. +! See http://factorcode.org/license.txt for BSD license. +USING: combinators fry kernel math math.primes math.primes.factors math.ranges + project-euler.common sequences ; +IN: project-euler.069 + +! http://projecteuler.net/index.php?section=problems&id=69 + +! DESCRIPTION +! ----------- + +! Euler's Totient function, φ(n) [sometimes called the phi function], is used +! to determine the number of numbers less than n which are relatively prime to +! n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and +! relatively prime to nine, φ(9)=6. + +! +----+------------------+------+-----------+ +! | n | Relatively Prime | φ(n) | n / φ(n) | +! +----+------------------+------+-----------+ +! | 2 | 1 | 1 | 2 | +! | 3 | 1,2 | 2 | 1.5 | +! | 4 | 1,3 | 2 | 2 | +! | 5 | 1,2,3,4 | 4 | 1.25 | +! | 6 | 1,5 | 2 | 3 | +! | 7 | 1,2,3,4,5,6 | 6 | 1.1666... | +! | 8 | 1,3,5,7 | 4 | 2 | +! | 9 | 1,2,4,5,7,8 | 6 | 1.5 | +! | 10 | 1,3,7,9 | 4 | 2.5 | +! +----+------------------+------+-----------+ + +! It can be seen that n = 6 produces a maximum n / φ(n) for n ≤ 10. + +! Find the value of n ≤ 1,000,000 for which n / φ(n) is a maximum. + + +! SOLUTION +! -------- + +! Brute force + + + +: euler069 ( -- answer ) + 2 1000000 [a,b] [ totient-ratio ] map + [ supremum ] keep index 2 + ; + +! [ euler069 ] 10 ave-time +! 25210 ms ave run time - 115.37 SD (10 trials) + + +! ALTERNATE SOLUTIONS +! ------------------- + +! In order to obtain maximum n / φ(n), φ(n) needs to be low and n needs to be +! high. Hence we need a number that has the most factors. A number with the +! most unique factors would have fewer relatively prime. + + + +: euler069a ( -- answer ) + 1000000 primorial-upto ; + +! [ euler069a ] 100 ave-time +! 0 ms ave run time - 0.01 SD (100 trials) + +SOLUTION: euler069a diff --git a/extra/project-euler/071/071.factor b/extra/project-euler/071/071.factor index cccf6bf708..0fd93a8f2d 100644 --- a/extra/project-euler/071/071.factor +++ b/extra/project-euler/071/071.factor @@ -32,13 +32,6 @@ IN: project-euler.071 ! repeatedly until the denominator is as close to 1000000 as possible without ! going over. - - : euler071 ( -- answer ) 2/5 [ dup denominator 1000000 <= ] [ 3/7 mediant dup ] produce nip penultimate numerator ; diff --git a/extra/project-euler/common/common.factor b/extra/project-euler/common/common.factor index ba8c81fbf4..c2ffe26d94 100644 --- a/extra/project-euler/common/common.factor +++ b/extra/project-euler/common/common.factor @@ -1,9 +1,10 @@ -! Copyright (c) 2007-2008 Aaron Schaefer. +! Copyright (c) 2007-2009 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays kernel make math math.functions math.matrices math.miller-rabin - math.order math.parser math.primes.factors math.ranges math.ratios - sequences sorting strings unicode.case parser accessors vocabs.parser - namespaces vocabs words quotations prettyprint ; +USING: accessors arrays kernel lists make math math.functions math.matrices + math.miller-rabin math.order math.parser math.primes.factors + math.primes.lists math.ranges math.ratios namespaces parser prettyprint + quotations sequences sorting strings unicode.case vocabs vocabs.parser + words ; IN: project-euler.common ! A collection of words used by more than one Project Euler solution @@ -16,11 +17,13 @@ IN: project-euler.common ! log10 - #25, #134 ! max-path - #18, #67 ! mediant - #71, #73 +! nth-prime - #7, #69 ! nth-triangle - #12, #42 ! number>digits - #16, #20, #30, #34, #35, #38, #43, #52, #55, #56, #92 ! palindrome? - #4, #36, #55 ! pandigital? - #32, #38 ! pentagonal? - #44, #45 +! penultimate - #69, #71 ! propagate-all - #18, #67 ! sum-proper-divisors - #21 ! tau* - #12 @@ -78,6 +81,9 @@ PRIVATE> : number-length ( n -- m ) log10 floor 1+ >integer ; +: nth-prime ( n -- n ) + 1- lprimes lnth ; + : nth-triangle ( n -- n ) dup 1+ * 2 / ; @@ -90,6 +96,9 @@ PRIVATE> : pentagonal? ( n -- ? ) dup 0 > [ 24 * 1+ sqrt 1+ 6 / 1 mod zero? ] [ drop f ] if ; +: penultimate ( seq -- elt ) + dup length 2 - swap nth ; + ! Not strictly needed, but it is nice to be able to dump the triangle after the ! propagation : propagate-all ( triangle -- new-triangle ) diff --git a/extra/project-euler/project-euler.factor b/extra/project-euler/project-euler.factor index 5d46d7f1fd..95d3644215 100644 --- a/extra/project-euler/project-euler.factor +++ b/extra/project-euler/project-euler.factor @@ -1,4 +1,4 @@ -! Copyright (c) 2007, 2008, 2009 Aaron Schaefer, Samuel Tardieu. +! Copyright (c) 2007-2009 Aaron Schaefer, Samuel Tardieu. ! See http://factorcode.org/license.txt for BSD license. USING: definitions io io.files io.pathnames kernel math math.parser prettyprint project-euler.ave-time sequences vocabs vocabs.loader @@ -16,13 +16,13 @@ USING: definitions io io.files io.pathnames kernel math math.parser project-euler.045 project-euler.046 project-euler.047 project-euler.048 project-euler.049 project-euler.052 project-euler.053 project-euler.054 project-euler.055 project-euler.056 project-euler.057 project-euler.058 - project-euler.059 project-euler.063 project-euler.067 project-euler.071 - project-euler.073 project-euler.075 project-euler.076 project-euler.079 - project-euler.092 project-euler.097 project-euler.099 project-euler.100 - project-euler.116 project-euler.117 project-euler.134 project-euler.148 - project-euler.150 project-euler.151 project-euler.164 project-euler.169 - project-euler.173 project-euler.175 project-euler.186 project-euler.190 - project-euler.203 project-euler.215 ; + project-euler.059 project-euler.063 project-euler.067 project-euler.069 + project-euler.071 project-euler.073 project-euler.075 project-euler.076 + project-euler.079 project-euler.092 project-euler.097 project-euler.099 + project-euler.100 project-euler.116 project-euler.117 project-euler.134 + project-euler.148 project-euler.150 project-euler.151 project-euler.164 + project-euler.169 project-euler.173 project-euler.175 project-euler.186 + project-euler.190 project-euler.203 project-euler.215 ; IN: project-euler Date: Wed, 8 Apr 2009 05:04:58 -0500 Subject: [PATCH 19/20] Fix poker tests --- extra/poker/poker-tests.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/poker/poker-tests.factor b/extra/poker/poker-tests.factor index 1862974084..ad371a6bff 100644 --- a/extra/poker/poker-tests.factor +++ b/extra/poker/poker-tests.factor @@ -1,4 +1,4 @@ -USING: accessors poker poker.private tools.test ; +USING: accessors poker poker.private tools.test math.order kernel ; IN: poker.tests [ 134236965 ] [ "KD" >ckf ] unit-test From 30191f87e5d06749a4c8c0c317a5ad09ad8381cc Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 8 Apr 2009 05:13:06 -0500 Subject: [PATCH 20/20] descriptive: add make-descriptive word to enable this functionality to be used as an annotation; improve docs --- extra/descriptive/descriptive-docs.factor | 22 +++++++++++++++------- extra/descriptive/descriptive.factor | 11 +++++++++-- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/extra/descriptive/descriptive-docs.factor b/extra/descriptive/descriptive-docs.factor index dc02f8bd9d..6ced201c13 100755 --- a/extra/descriptive/descriptive-docs.factor +++ b/extra/descriptive/descriptive-docs.factor @@ -1,20 +1,28 @@ -USING: help.syntax help.markup ; +USING: help.syntax help.markup words ; IN: descriptive HELP: DESCRIPTIVE: { $syntax "DESCRIPTIVE: word ( inputs -- outputs ) definition ;" } -{ $description "Defines a word such that, if an error is thrown from within it, that error is wrapped in a descriptive tag including the arguments to that word." } ; +{ $description "Defines a word such that, if an error is thrown from within it, that error is wrapped in a " { $link descriptive-error } " with the arguments to that word." } ; HELP: DESCRIPTIVE:: { $syntax "DESCRIPTIVE:: word ( inputs -- outputs ) definition ;" } -{ $description "Defines a word which uses locals such that, if an error is thrown from within it, that error is wrapped in a descriptive tag including the arguments to that word." } ; +{ $description "Defines a word which uses locals such that, if an error is thrown from within it, that error is wrapped in a " { $link descriptive-error } " with the arguments to that word." } ; -HELP: descriptive -{ $class-description "The class of errors wrapping another error (in the underlying slot) which were thrown in a word (in the word slot) with a given set of arguments (in the args slot)." } ; +HELP: descriptive-error +{ $error-description "The class of errors wrapping another error (in the underlying slot) which were thrown in a word (in the word slot) with a given set of arguments (in the args slot)." } ; + +HELP: make-descriptive +{ $values { "word" word } } +{ $description "Makes the word wrap errors in " { $link descriptive-error } " instances." } ; ARTICLE: "descriptive" "Descriptive errors" -"This vocabulary defines automatic descriptive errors. Using it, you can define a word which acts as normal, except when it throws an error, the error is wrapped in a special descriptor declaring that an error was thrown from inside that word, and including the arguments given to that word. The error is of the following class:" -{ $subsection descriptive } +"This vocabulary defines automatic descriptive errors. Using it, you can define a word which acts as normal, except when it throws an error, the error is wrapped in an instance of a class:" +{ $subsection descriptive-error } +"The wrapper contains the word itself, the input parameters, as well as the original error." +$nl +"To annotate an existing word with descriptive error checking:" +{ $subsection make-descriptive } "To define words which throw descriptive errors, use the following words:" { $subsection POSTPONE: DESCRIPTIVE: } { $subsection POSTPONE: DESCRIPTIVE:: } ; diff --git a/extra/descriptive/descriptive.factor b/extra/descriptive/descriptive.factor index ceadc9fe6e..9af94aa4ed 100755 --- a/extra/descriptive/descriptive.factor +++ b/extra/descriptive/descriptive.factor @@ -1,6 +1,9 @@ -USING: words kernel sequences locals locals.parser +! Copyright (c) 2008 Daniel Ehrenberg. +! See http://factorcode.org/license.txt for BSD license. +USING: words kernel sequences locals locals.parser fry locals.definitions accessors parser namespaces continuations -summary definitions generalizations arrays prettyprint debugger io ; +summary definitions generalizations arrays prettyprint debugger io +effects tools.annotations ; IN: descriptive ERROR: descriptive-error args underlying word ; @@ -23,6 +26,10 @@ M: descriptive-error error. PRIVATE> +: make-descriptive ( word -- ) + dup [ ] [ def>> ] [ stack-effect ] tri [descriptive] + '[ drop _ ] annotate-methods ; + : define-descriptive ( word def effect -- ) [ drop "descriptive-definition" set-word-prop ] [ [ [ dup ] 2dip [descriptive] ] keep define-declared ]