adventofcode

git clone https://git.ce9e.org/adventofcode.git

commit
aef51959ca83c1f361986ddf1d6430c7c46d4855
parent
10a3f14f9ce5cd83e849c9868fbe88b7a76fad42
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-12-23 06:42
2024-12-22

Diffstat

A 2024/22/input.txt 1811 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A 2024/22/solution.rs 43 +++++++++++++++++++++++++++++++++++++++++++
A 2024/22/test1.txt 4 ++++
A 2024/22/test2.txt 4 ++++
A 2024/22/test3.txt 1 +

5 files changed, 1863 insertions, 0 deletions


diff --git a/2024/22/input.txt b/2024/22/input.txt

@@ -0,0 +1,1811 @@
   -1     1 8165752
   -1     2 14569926
   -1     3 3767076
   -1     4 15353339
   -1     5 2278086
   -1     6 9212326
   -1     7 11684913
   -1     8 231995
   -1     9 2939267
   -1    10 13627562
   -1    11 2230384
   -1    12 8285292
   -1    13 7154741
   -1    14 1285944
   -1    15 10343047
   -1    16 13657793
   -1    17 4654515
   -1    18 4206420
   -1    19 8850944
   -1    20 6610095
   -1    21 15413502
   -1    22 16175073
   -1    23 8854824
   -1    24 7207123
   -1    25 5868632
   -1    26 11760123
   -1    27 15172836
   -1    28 2559018
   -1    29 3890759
   -1    30 6229173
   -1    31 1236683
   -1    32 9751316
   -1    33 13463975
   -1    34 6702739
   -1    35 5888347
   -1    36 4933103
   -1    37 515922
   -1    38 8949450
   -1    39 16494878
   -1    40 7532915
   -1    41 11588505
   -1    42 2130951
   -1    43 1282099
   -1    44 5405800
   -1    45 7240657
   -1    46 6907112
   -1    47 16733850
   -1    48 14934550
   -1    49 5440328
   -1    50 9388204
   -1    51 15067401
   -1    52 9916468
   -1    53 15171410
   -1    54 1793733
   -1    55 3043612
   -1    56 11049516
   -1    57 12170977
   -1    58 14260981
   -1    59 9919481
   -1    60 5861152
   -1    61 7643802
   -1    62 10656646
   -1    63 13662054
   -1    64 10162771
   -1    65 10591940
   -1    66 14303433
   -1    67 11445420
   -1    68 3767153
   -1    69 970576
   -1    70 6259366
   -1    71 12730200
   -1    72 8678271
   -1    73 11460592
   -1    74 13124450
   -1    75 12701767
   -1    76 9234774
   -1    77 6669776
   -1    78 6825963
   -1    79 15592980
   -1    80 14340870
   -1    81 15572309
   -1    82 16717610
   -1    83 13399861
   -1    84 12496329
   -1    85 12274826
   -1    86 7210147
   -1    87 12815053
   -1    88 1368527
   -1    89 2740524
   -1    90 4038786
   -1    91 10350405
   -1    92 13318067
   -1    93 4497338
   -1    94 14911948
   -1    95 3263605
   -1    96 12070968
   -1    97 9191154
   -1    98 15130578
   -1    99 2676253
   -1   100 11139477
   -1   101 14833632
   -1   102 12933201
   -1   103 13436436
   -1   104 10485173
   -1   105 3685910
   -1   106 16265437
   -1   107 14866303
   -1   108 706436
   -1   109 3861723
   -1   110 15001100
   -1   111 13652214
   -1   112 16720066
   -1   113 12158218
   -1   114 10429125
   -1   115 5899858
   -1   116 5733068
   -1   117 15358701
   -1   118 9043900
   -1   119 8601458
   -1   120 16382248
   -1   121 3535806
   -1   122 16625559
   -1   123 5931767
   -1   124 7383551
   -1   125 11288215
   -1   126 16773527
   -1   127 14974603
   -1   128 9557025
   -1   129 14656562
   -1   130 5966825
   -1   131 5733601
   -1   132 13029816
   -1   133 5569446
   -1   134 16263581
   -1   135 6805532
   -1   136 9115515
   -1   137 14499629
   -1   138 8349787
   -1   139 14541030
   -1   140 15599598
   -1   141 3945283
   -1   142 11460714
   -1   143 11272915
   -1   144 15900191
   -1   145 15841990
   -1   146 7852151
   -1   147 3225941
   -1   148 12665101
   -1   149 7400558
   -1   150 6864544
   -1   151 7772343
   -1   152 6485560
   -1   153 7421891
   -1   154 8573913
   -1   155 8284215
   -1   156 5852081
   -1   157 1073593
   -1   158 4755105
   -1   159 2123886
   -1   160 763482
   -1   161 13957767
   -1   162 12244998
   -1   163 7731151
   -1   164 587086
   -1   165 10839711
   -1   166 4707267
   -1   167 2367756
   -1   168 15287505
   -1   169 15274895
   -1   170 1561313
   -1   171 5947581
   -1   172 7554954
   -1   173 247388
   -1   174 16554406
   -1   175 9769874
   -1   176 3080606
   -1   177 16315186
   -1   178 3915566
   -1   179 1284310
   -1   180 10386326
   -1   181 16178574
   -1   182 15464408
   -1   183 10318070
   -1   184 15681828
   -1   185 9718694
   -1   186 2186764
   -1   187 4301085
   -1   188 8789592
   -1   189 8978328
   -1   190 4169594
   -1   191 7276242
   -1   192 16210717
   -1   193 9382922
   -1   194 11127239
   -1   195 11705568
   -1   196 6614444
   -1   197 13760517
   -1   198 3756556
   -1   199 8063116
   -1   200 2823904
   -1   201 9082469
   -1   202 2162698
   -1   203 3243892
   -1   204 5846161
   -1   205 6825946
   -1   206 2710029
   -1   207 1633828
   -1   208 8835962
   -1   209 16497248
   -1   210 16374455
   -1   211 16716175
   -1   212 7788923
   -1   213 4808244
   -1   214 4917144
   -1   215 2743671
   -1   216 7528379
   -1   217 14683573
   -1   218 8450171
   -1   219 3486386
   -1   220 11333548
   -1   221 10263292
   -1   222 14798007
   -1   223 13856278
   -1   224 1784747
   -1   225 8651532
   -1   226 9406305
   -1   227 4771501
   -1   228 1927638
   -1   229 4614691
   -1   230 13819519
   -1   231 13099919
   -1   232 5259908
   -1   233 9115460
   -1   234 4597103
   -1   235 4924076
   -1   236 10258894
   -1   237 554287
   -1   238 1587651
   -1   239 1914181
   -1   240 3953079
   -1   241 3953893
   -1   242 7036071
   -1   243 6447318
   -1   244 3987105
   -1   245 6834314
   -1   246 13144935
   -1   247 5203623
   -1   248 9764616
   -1   249 4605109
   -1   250 2830697
   -1   251 4728043
   -1   252 7454685
   -1   253 11737431
   -1   254 14947864
   -1   255 9555456
   -1   256 14165324
   -1   257 13011501
   -1   258 1567623
   -1   259 14254055
   -1   260 9478728
   -1   261 8296503
   -1   262 8247436
   -1   263 1569679
   -1   264 2618584
   -1   265 532938
   -1   266 9323540
   -1   267 14984236
   -1   268 14262247
   -1   269 14126307
   -1   270 15446259
   -1   271 12561971
   -1   272 346665
   -1   273 7692021
   -1   274 3584843
   -1   275 12545817
   -1   276 2206352
   -1   277 14816729
   -1   278 6517706
   -1   279 3739225
   -1   280 3330779
   -1   281 13000323
   -1   282 12198776
   -1   283 7352482
   -1   284 9649629
   -1   285 15267614
   -1   286 6931900
   -1   287 3507064
   -1   288 4587108
   -1   289 11643516
   -1   290 16088920
   -1   291 10429656
   -1   292 11768517
   -1   293 2581070
   -1   294 16478650
   -1   295 5141446
   -1   296 6184386
   -1   297 10568506
   -1   298 6124502
   -1   299 12654306
   -1   300 14980269
   -1   301 5444082
   -1   302 7384567
   -1   303 11286895
   -1   304 10807940
   -1   305 15608193
   -1   306 14175888
   -1   307 8034393
   -1   308 4230458
   -1   309 13594981
   -1   310 12837874
   -1   311 8987646
   -1   312 13546322
   -1   313 10607791
   -1   314 4924439
   -1   315 8199062
   -1   316 9656750
   -1   317 11524651
   -1   318 12413253
   -1   319 5552196
   -1   320 14918009
   -1   321 7341970
   -1   322 8608332
   -1   323 13767386
   -1   324 9439778
   -1   325 1879834
   -1   326 991313
   -1   327 3404908
   -1   328 16674944
   -1   329 12242454
   -1   330 14439634
   -1   331 12188124
   -1   332 1640549
   -1   333 11095337
   -1   334 12071302
   -1   335 6543733
   -1   336 9078372
   -1   337 10605904
   -1   338 9458418
   -1   339 1303209
   -1   340 10375624
   -1   341 16738632
   -1   342 2357097
   -1   343 16639715
   -1   344 12263533
   -1   345 12007190
   -1   346 8622062
   -1   347 9683557
   -1   348 5041322
   -1   349 12288532
   -1   350 9294089
   -1   351 9212104
   -1   352 12009025
   -1   353 15210925
   -1   354 9791519
   -1   355 15486422
   -1   356 6328338
   -1   357 15174612
   -1   358 2480133
   -1   359 13108210
   -1   360 13949492
   -1   361 2923454
   -1   362 5940950
   -1   363 4634950
   -1   364 14053654
   -1   365 9628800
   -1   366 9072863
   -1   367 509821
   -1   368 15094622
   -1   369 535581
   -1   370 13644393
   -1   371 7938727
   -1   372 16668521
   -1   373 14630224
   -1   374 7886268
   -1   375 11138671
   -1   376 5534611
   -1   377 11680895
   -1   378 14421324
   -1   379 13881479
   -1   380 16742358
   -1   381 13112972
   -1   382 1578300
   -1   383 3336123
   -1   384 1192114
   -1   385 9405898
   -1   386 3544252
   -1   387 2737087
   -1   388 12525808
   -1   389 2976278
   -1   390 12257446
   -1   391 8398401
   -1   392 3223149
   -1   393 16370699
   -1   394 657100
   -1   395 6315365
   -1   396 13108177
   -1   397 2334840
   -1   398 16547320
   -1   399 1545775
   -1   400 14097160
   -1   401 341938
   -1   402 13314895
   -1   403 14814715
   -1   404 905242
   -1   405 8965082
   -1   406 9583654
   -1   407 4296794
   -1   408 15484704
   -1   409 7532858
   -1   410 9010319
   -1   411 10954317
   -1   412 6027302
   -1   413 11195320
   -1   414 14131486
   -1   415 4102120
   -1   416 11095558
   -1   417 9352136
   -1   418 9985580
   -1   419 13497869
   -1   420 7192464
   -1   421 8092599
   -1   422 13001416
   -1   423 13310450
   -1   424 9587128
   -1   425 9994983
   -1   426 12046882
   -1   427 5924755
   -1   428 4404226
   -1   429 3577717
   -1   430 14120356
   -1   431 11231847
   -1   432 910087
   -1   433 8034053
   -1   434 8564053
   -1   435 11353038
   -1   436 5791094
   -1   437 8821934
   -1   438 8897855
   -1   439 629997
   -1   440 14652403
   -1   441 3664825
   -1   442 9604756
   -1   443 3534042
   -1   444 15454415
   -1   445 3544209
   -1   446 4015140
   -1   447 15815658
   -1   448 8038350
   -1   449 14131835
   -1   450 15289471
   -1   451 13111614
   -1   452 2612485
   -1   453 2436262
   -1   454 13066866
   -1   455 8612747
   -1   456 12511783
   -1   457 1876976
   -1   458 15806524
   -1   459 1695036
   -1   460 7194810
   -1   461 15587099
   -1   462 2896837
   -1   463 10949101
   -1   464 7899928
   -1   465 16093523
   -1   466 15049830
   -1   467 13046604
   -1   468 11207549
   -1   469 13273563
   -1   470 358055
   -1   471 14256444
   -1   472 4228343
   -1   473 732969
   -1   474 10289439
   -1   475 8804385
   -1   476 9489297
   -1   477 7060287
   -1   478 12994855
   -1   479 12061670
   -1   480 14664954
   -1   481 9763280
   -1   482 6410168
   -1   483 291402
   -1   484 1414769
   -1   485 7518921
   -1   486 16097223
   -1   487 10901181
   -1   488 11763170
   -1   489 16419856
   -1   490 672221
   -1   491 3768536
   -1   492 10127354
   -1   493 12678059
   -1   494 11177334
   -1   495 6266930
   -1   496 8413474
   -1   497 16705342
   -1   498 8628633
   -1   499 2336797
   -1   500 3436902
   -1   501 5506705
   -1   502 15996082
   -1   503 12513123
   -1   504 11468975
   -1   505 15500310
   -1   506 14516554
   -1   507 13309664
   -1   508 5713665
   -1   509 8976242
   -1   510 3576717
   -1   511 12116294
   -1   512 8343784
   -1   513 7756515
   -1   514 2491325
   -1   515 1350181
   -1   516 5097680
   -1   517 14216148
   -1   518 845237
   -1   519 15988128
   -1   520 16656301
   -1   521 13420824
   -1   522 9664144
   -1   523 10107114
   -1   524 5339136
   -1   525 9807197
   -1   526 4264244
   -1   527 4290826
   -1   528 3648316
   -1   529 9134565
   -1   530 4004380
   -1   531 11568351
   -1   532 16621668
   -1   533 16712707
   -1   534 1031185
   -1   535 11013314
   -1   536 14608584
   -1   537 4738815
   -1   538 12268528
   -1   539 5337243
   -1   540 5565145
   -1   541 5794496
   -1   542 2802295
   -1   543 11249785
   -1   544 7159915
   -1   545 6745632
   -1   546 8051261
   -1   547 10915642
   -1   548 15596227
   -1   549 9756971
   -1   550 2756254
   -1   551 14663146
   -1   552 260475
   -1   553 8638301
   -1   554 13633562
   -1   555 14198008
   -1   556 9352850
   -1   557 7388093
   -1   558 6311184
   -1   559 15524204
   -1   560 1648572
   -1   561 925699
   -1   562 9376796
   -1   563 6775720
   -1   564 4966522
   -1   565 1733691
   -1   566 11878787
   -1   567 12191289
   -1   568 3346331
   -1   569 1434873
   -1   570 10085402
   -1   571 9965978
   -1   572 15915584
   -1   573 5876484
   -1   574 12802542
   -1   575 6289580
   -1   576 2256095
   -1   577 2043737
   -1   578 12790433
   -1   579 3976421
   -1   580 4922463
   -1   581 3738041
   -1   582 6006535
   -1   583 5917747
   -1   584 9987315
   -1   585 11316568
   -1   586 8297443
   -1   587 2941067
   -1   588 12510798
   -1   589 3796744
   -1   590 9738964
   -1   591 5336619
   -1   592 13271874
   -1   593 11247885
   -1   594 15227318
   -1   595 13423738
   -1   596 3451712
   -1   597 879355
   -1   598 12375933
   -1   599 12057186
   -1   600 16769985
   -1   601 5529155
   -1   602 5756778
   -1   603 1934566
   -1   604 3349530
   -1   605 4006578
   -1   606 12710412
   -1   607 8243589
   -1   608 11183405
   -1   609 1505257
   -1   610 13051892
   -1   611 10936561
   -1   612 11017459
   -1   613 11547087
   -1   614 3888706
   -1   615 15957289
   -1   616 10084866
   -1   617 3390779
   -1   618 10160737
   -1   619 2978856
   -1   620 15086063
   -1   621 659333
   -1   622 13464117
   -1   623 3115185
   -1   624 6866116
   -1   625 1478217
   -1   626 8919523
   -1   627 9687494
   -1   628 2766003
   -1   629 13622427
   -1   630 8976857
   -1   631 254417
   -1   632 577949
   -1   633 3729131
   -1   634 15878277
   -1   635 4283456
   -1   636 5865808
   -1   637 2838332
   -1   638 10316842
   -1   639 368357
   -1   640 10892507
   -1   641 6080202
   -1   642 13319381
   -1   643 14309138
   -1   644 1922780
   -1   645 3518717
   -1   646 2821404
   -1   647 14800082
   -1   648 13683555
   -1   649 1987730
   -1   650 9587845
   -1   651 685134
   -1   652 8578463
   -1   653 9245413
   -1   654 15155453
   -1   655 11207103
   -1   656 13086621
   -1   657 7684589
   -1   658 6791007
   -1   659 11748069
   -1   660 12874239
   -1   661 8649437
   -1   662 565121
   -1   663 11681101
   -1   664 7953126
   -1   665 10194274
   -1   666 14780291
   -1   667 14878243
   -1   668 10817821
   -1   669 6315369
   -1   670 1977869
   -1   671 16466587
   -1   672 8380695
   -1   673 13321909
   -1   674 16076124
   -1   675 8295011
   -1   676 15978827
   -1   677 11253236
   -1   678 11598468
   -1   679 5125061
   -1   680 13332780
   -1   681 13791708
   -1   682 5869353
   -1   683 10473073
   -1   684 10395200
   -1   685 16351131
   -1   686 15780149
   -1   687 4960806
   -1   688 5315474
   -1   689 592954
   -1   690 12182936
   -1   691 9858195
   -1   692 7265870
   -1   693 12005330
   -1   694 897560
   -1   695 4952588
   -1   696 3335220
   -1   697 3247902
   -1   698 9551961
   -1   699 2183612
   -1   700 6923102
   -1   701 10036145
   -1   702 15557390
   -1   703 14814247
   -1   704 7625669
   -1   705 2232891
   -1   706 8347401
   -1   707 13169891
   -1   708 3758097
   -1   709 16560217
   -1   710 7554623
   -1   711 8706663
   -1   712 1335643
   -1   713 6121515
   -1   714 16084087
   -1   715 16761847
   -1   716 10423993
   -1   717 1226301
   -1   718 11470162
   -1   719 15542659
   -1   720 13452006
   -1   721 14038682
   -1   722 7607198
   -1   723 13193069
   -1   724 5899662
   -1   725 15316656
   -1   726 8833964
   -1   727 8827887
   -1   728 9844879
   -1   729 16130865
   -1   730 9791301
   -1   731 11903207
   -1   732 2265305
   -1   733 13531803
   -1   734 11682635
   -1   735 5486196
   -1   736 14298249
   -1   737 7648739
   -1   738 3188401
   -1   739 2864364
   -1   740 12609905
   -1   741 14211243
   -1   742 4493708
   -1   743 8698406
   -1   744 4974178
   -1   745 2918587
   -1   746 16141147
   -1   747 14324529
   -1   748 4283203
   -1   749 11868378
   -1   750 14324324
   -1   751 4221693
   -1   752 13305440
   -1   753 902329
   -1   754 6020358
   -1   755 12055660
   -1   756 5537092
   -1   757 12047024
   -1   758 1260123
   -1   759 12246466
   -1   760 9421556
   -1   761 7258857
   -1   762 281400
   -1   763 9947179
   -1   764 16611722
   -1   765 12841751
   -1   766 1204431
   -1   767 6603667
   -1   768 3346384
   -1   769 9498695
   -1   770 11271273
   -1   771 3752115
   -1   772 6355428
   -1   773 7132693
   -1   774 14302678
   -1   775 5903542
   -1   776 11778993
   -1   777 14338706
   -1   778 5432554
   -1   779 5525083
   -1   780 5049010
   -1   781 9375833
   -1   782 10592319
   -1   783 2537470
   -1   784 16066395
   -1   785 7467940
   -1   786 3066080
   -1   787 15574881
   -1   788 15479636
   -1   789 3646443
   -1   790 6965765
   -1   791 5805937
   -1   792 3505641
   -1   793 1044587
   -1   794 8146505
   -1   795 2727096
   -1   796 6430961
   -1   797 15002332
   -1   798 4324032
   -1   799 4288119
   -1   800 7588837
   -1   801 11481133
   -1   802 832883
   -1   803 6754246
   -1   804 10948075
   -1   805 8946258
   -1   806 10451292
   -1   807 14248270
   -1   808 9566276
   -1   809 8024090
   -1   810 3665874
   -1   811 12705943
   -1   812 8490436
   -1   813 4714456
   -1   814 14378917
   -1   815 10643699
   -1   816 16611280
   -1   817 8681184
   -1   818 5070489
   -1   819 6758259
   -1   820 7279311
   -1   821 563765
   -1   822 3462133
   -1   823 16542282
   -1   824 9541892
   -1   825 8223565
   -1   826 6472726
   -1   827 10301535
   -1   828 13918301
   -1   829 16187074
   -1   830 9524876
   -1   831 7875252
   -1   832 2718706
   -1   833 1200292
   -1   834 4121640
   -1   835 713346
   -1   836 11807191
   -1   837 12241798
   -1   838 1577440
   -1   839 3780577
   -1   840 16396078
   -1   841 13609662
   -1   842 4846018
   -1   843 14172390
   -1   844 3365996
   -1   845 13481473
   -1   846 8791673
   -1   847 11719684
   -1   848 8716384
   -1   849 11891599
   -1   850 7944432
   -1   851 6329750
   -1   852 3145402
   -1   853 9799159
   -1   854 11277453
   -1   855 11166517
   -1   856 1627257
   -1   857 344885
   -1   858 12285499
   -1   859 572305
   -1   860 15675192
   -1   861 1760032
   -1   862 7216912
   -1   863 8958518
   -1   864 13193493
   -1   865 16487202
   -1   866 12451300
   -1   867 2191251
   -1   868 10655642
   -1   869 14136346
   -1   870 7081296
   -1   871 15917660
   -1   872 8898086
   -1   873 2571395
   -1   874 13252314
   -1   875 11850536
   -1   876 1812764
   -1   877 3452014
   -1   878 15901154
   -1   879 10895826
   -1   880 8920167
   -1   881 4602241
   -1   882 1900253
   -1   883 3983629
   -1   884 11739875
   -1   885 673550
   -1   886 11192053
   -1   887 9003764
   -1   888 3379876
   -1   889 13334642
   -1   890 4345527
   -1   891 9254236
   -1   892 12042577
   -1   893 9857573
   -1   894 6539724
   -1   895 2400514
   -1   896 14535014
   -1   897 9951133
   -1   898 1107702
   -1   899 6782832
   -1   900 492172
   -1   901 7565461
   -1   902 9635958
   -1   903 9819107
   -1   904 6980114
   -1   905 1185706
   -1   906 3272468
   -1   907 5895956
   -1   908 14920213
   -1   909 9692413
   -1   910 4206206
   -1   911 7139379
   -1   912 14126079
   -1   913 4242009
   -1   914 10306174
   -1   915 15069666
   -1   916 2792100
   -1   917 6953384
   -1   918 9012929
   -1   919 13450331
   -1   920 8429463
   -1   921 5593753
   -1   922 2009178
   -1   923 4495714
   -1   924 15842092
   -1   925 483386
   -1   926 10355208
   -1   927 11050734
   -1   928 6577415
   -1   929 2822825
   -1   930 9200774
   -1   931 3438039
   -1   932 190783
   -1   933 13214591
   -1   934 9460638
   -1   935 14177802
   -1   936 6965651
   -1   937 12123207
   -1   938 11170225
   -1   939 1099065
   -1   940 15104177
   -1   941 9409843
   -1   942 8142476
   -1   943 6300397
   -1   944 1145875
   -1   945 1883812
   -1   946 4539906
   -1   947 4694371
   -1   948 12086709
   -1   949 7438619
   -1   950 6518691
   -1   951 3317902
   -1   952 3190438
   -1   953 11629861
   -1   954 13845809
   -1   955 3857371
   -1   956 15432778
   -1   957 4531797
   -1   958 6691331
   -1   959 5969761
   -1   960 16294190
   -1   961 3735956
   -1   962 16446598
   -1   963 10176837
   -1   964 7234882
   -1   965 10598199
   -1   966 5571913
   -1   967 10136596
   -1   968 4529554
   -1   969 2692061
   -1   970 894630
   -1   971 3471863
   -1   972 10127020
   -1   973 14307220
   -1   974 1865240
   -1   975 410229
   -1   976 9798758
   -1   977 7985399
   -1   978 2795160
   -1   979 3838112
   -1   980 2286324
   -1   981 9490629
   -1   982 3420948
   -1   983 9034045
   -1   984 364018
   -1   985 285195
   -1   986 14150387
   -1   987 2526092
   -1   988 3637113
   -1   989 11739741
   -1   990 1606175
   -1   991 13467401
   -1   992 5234992
   -1   993 400512
   -1   994 8063900
   -1   995 6350968
   -1   996 10078454
   -1   997 9655761
   -1   998 12212949
   -1   999 3099693
   -1  1000 15878091
   -1  1001 1346301
   -1  1002 11638278
   -1  1003 15339128
   -1  1004 4041079
   -1  1005 5905151
   -1  1006 1721635
   -1  1007 4786341
   -1  1008 1612708
   -1  1009 8722186
   -1  1010 11595096
   -1  1011 9657570
   -1  1012 3942708
   -1  1013 10900200
   -1  1014 5372929
   -1  1015 15683807
   -1  1016 8261620
   -1  1017 11852382
   -1  1018 5612907
   -1  1019 4071878
   -1  1020 14274844
   -1  1021 5397891
   -1  1022 1918475
   -1  1023 1124254
   -1  1024 6172049
   -1  1025 15844995
   -1  1026 3062030
   -1  1027 2821608
   -1  1028 1872724
   -1  1029 4849394
   -1  1030 2260775
   -1  1031 8777383
   -1  1032 5619545
   -1  1033 11151586
   -1  1034 12852592
   -1  1035 3964850
   -1  1036 3193723
   -1  1037 5138444
   -1  1038 6227927
   -1  1039 11451263
   -1  1040 1835369
   -1  1041 7696597
   -1  1042 1443376
   -1  1043 11219501
   -1  1044 12342792
   -1  1045 14880132
   -1  1046 13056117
   -1  1047 846065
   -1  1048 10857229
   -1  1049 16432357
   -1  1050 10006247
   -1  1051 12255331
   -1  1052 8166267
   -1  1053 2328733
   -1  1054 6066164
   -1  1055 565658
   -1  1056 14541066
   -1  1057 4504511
   -1  1058 4305069
   -1  1059 8683842
   -1  1060 3881403
   -1  1061 3193772
   -1  1062 2334556
   -1  1063 11725622
   -1  1064 12632899
   -1  1065 14869768
   -1  1066 7719802
   -1  1067 1852257
   -1  1068 9032559
   -1  1069 1565798
   -1  1070 14920876
   -1  1071 357860
   -1  1072 400978
   -1  1073 11531691
   -1  1074 8166609
   -1  1075 15819704
   -1  1076 14727823
   -1  1077 6628660
   -1  1078 667976
   -1  1079 15670828
   -1  1080 184078
   -1  1081 1241787
   -1  1082 11861663
   -1  1083 8854974
   -1  1084 16435465
   -1  1085 6577794
   -1  1086 11415978
   -1  1087 9219061
   -1  1088 9214875
   -1  1089 12631422
   -1  1090 11844291
   -1  1091 2737894
   -1  1092 7030716
   -1  1093 1372251
   -1  1094 15005043
   -1  1095 4580394
   -1  1096 16165639
   -1  1097 13400781
   -1  1098 10543389
   -1  1099 14117631
   -1  1100 6033819
   -1  1101 207915
   -1  1102 1237143
   -1  1103 16744018
   -1  1104 3037699
   -1  1105 964439
   -1  1106 2056089
   -1  1107 979563
   -1  1108 6393407
   -1  1109 16309770
   -1  1110 8656842
   -1  1111 1243848
   -1  1112 2814147
   -1  1113 12208616
   -1  1114 13270312
   -1  1115 9068210
   -1  1116 16759992
   -1  1117 1664106
   -1  1118 13054930
   -1  1119 12300770
   -1  1120 11056019
   -1  1121 12090450
   -1  1122 7965183
   -1  1123 1260899
   -1  1124 6378726
   -1  1125 3492990
   -1  1126 9474294
   -1  1127 16433072
   -1  1128 16575782
   -1  1129 6028045
   -1  1130 6256927
   -1  1131 7599302
   -1  1132 3015465
   -1  1133 11229504
   -1  1134 14205239
   -1  1135 6663073
   -1  1136 7792441
   -1  1137 12284727
   -1  1138 15870080
   -1  1139 196954
   -1  1140 3993521
   -1  1141 10435179
   -1  1142 9458030
   -1  1143 14407347
   -1  1144 8866694
   -1  1145 8363521
   -1  1146 8380120
   -1  1147 3055253
   -1  1148 335934
   -1  1149 6359108
   -1  1150 2386701
   -1  1151 185994
   -1  1152 4463774
   -1  1153 15122477
   -1  1154 5502814
   -1  1155 14002416
   -1  1156 3657873
   -1  1157 4577430
   -1  1158 5694892
   -1  1159 5500680
   -1  1160 6118321
   -1  1161 4021178
   -1  1162 251269
   -1  1163 6671016
   -1  1164 2988912
   -1  1165 7434423
   -1  1166 1119486
   -1  1167 1628091
   -1  1168 15173074
   -1  1169 4520281
   -1  1170 7343110
   -1  1171 14497855
   -1  1172 14433137
   -1  1173 2832363
   -1  1174 4000117
   -1  1175 5760463
   -1  1176 11622594
   -1  1177 3442366
   -1  1178 2434105
   -1  1179 8348980
   -1  1180 4835429
   -1  1181 2563350
   -1  1182 7148331
   -1  1183 6131403
   -1  1184 13223120
   -1  1185 12308095
   -1  1186 1287195
   -1  1187 13249773
   -1  1188 2859948
   -1  1189 14688770
   -1  1190 10559550
   -1  1191 7275461
   -1  1192 4560596
   -1  1193 2688380
   -1  1194 381689
   -1  1195 4452173
   -1  1196 9749313
   -1  1197 7712290
   -1  1198 8718686
   -1  1199 11493470
   -1  1200 13646555
   -1  1201 3428757
   -1  1202 13848091
   -1  1203 7803901
   -1  1204 964804
   -1  1205 10660393
   -1  1206 7735455
   -1  1207 7115823
   -1  1208 16252295
   -1  1209 3638429
   -1  1210 442481
   -1  1211 8407761
   -1  1212 5156694
   -1  1213 9942361
   -1  1214 14708814
   -1  1215 6211823
   -1  1216 6055858
   -1  1217 8392273
   -1  1218 9503128
   -1  1219 7517017
   -1  1220 7186567
   -1  1221 15500505
   -1  1222 14237930
   -1  1223 13800198
   -1  1224 1488226
   -1  1225 3432268
   -1  1226 6062647
   -1  1227 14014733
   -1  1228 12942895
   -1  1229 11775221
   -1  1230 5469944
   -1  1231 16758226
   -1  1232 15400603
   -1  1233 14589612
   -1  1234 8273166
   -1  1235 11085074
   -1  1236 4627576
   -1  1237 13611947
   -1  1238 1102545
   -1  1239 4304976
   -1  1240 9334287
   -1  1241 16165752
   -1  1242 7103919
   -1  1243 2034202
   -1  1244 3212518
   -1  1245 16014163
   -1  1246 3372573
   -1  1247 6070893
   -1  1248 6412107
   -1  1249 14477922
   -1  1250 180043
   -1  1251 11780693
   -1  1252 9042081
   -1  1253 7443397
   -1  1254 5045289
   -1  1255 8545975
   -1  1256 13378403
   -1  1257 10901517
   -1  1258 12773245
   -1  1259 1571567
   -1  1260 9872864
   -1  1261 10907615
   -1  1262 15772612
   -1  1263 2029482
   -1  1264 876704
   -1  1265 13549411
   -1  1266 13759095
   -1  1267 10697756
   -1  1268 13197743
   -1  1269 7855290
   -1  1270 2558660
   -1  1271 3040087
   -1  1272 14010191
   -1  1273 3787556
   -1  1274 13006744
   -1  1275 5521452
   -1  1276 8803549
   -1  1277 3057523
   -1  1278 6780140
   -1  1279 6532001
   -1  1280 15317811
   -1  1281 4911426
   -1  1282 827051
   -1  1283 5816217
   -1  1284 14684273
   -1  1285 5938661
   -1  1286 11166047
   -1  1287 15400134
   -1  1288 14071452
   -1  1289 13561388
   -1  1290 7004144
   -1  1291 9599904
   -1  1292 5782359
   -1  1293 16467497
   -1  1294 8436543
   -1  1295 5676923
   -1  1296 13443529
   -1  1297 4697500
   -1  1298 2882087
   -1  1299 12092496
   -1  1300 2128041
   -1  1301 13223998
   -1  1302 6167473
   -1  1303 13170509
   -1  1304 6053507
   -1  1305 10032653
   -1  1306 8725424
   -1  1307 15850119
   -1  1308 3130185
   -1  1309 13579440
   -1  1310 3329261
   -1  1311 6207882
   -1  1312 5293461
   -1  1313 13644656
   -1  1314 3321115
   -1  1315 5480948
   -1  1316 11979061
   -1  1317 11686562
   -1  1318 11093894
   -1  1319 3626084
   -1  1320 13302047
   -1  1321 5944636
   -1  1322 9907473
   -1  1323 12130935
   -1  1324 937535
   -1  1325 14585614
   -1  1326 13849750
   -1  1327 10893725
   -1  1328 13026389
   -1  1329 7379831
   -1  1330 5758733
   -1  1331 4230133
   -1  1332 5983124
   -1  1333 8685209
   -1  1334 8464636
   -1  1335 9595740
   -1  1336 15451829
   -1  1337 13977041
   -1  1338 1843147
   -1  1339 9843474
   -1  1340 9789127
   -1  1341 12972770
   -1  1342 5154644
   -1  1343 16139655
   -1  1344 10313284
   -1  1345 12181361
   -1  1346 648149
   -1  1347 5574857
   -1  1348 6105277
   -1  1349 13271951
   -1  1350 4095959
   -1  1351 6687042
   -1  1352 8628692
   -1  1353 10967438
   -1  1354 11511328
   -1  1355 9912936
   -1  1356 6126136
   -1  1357 5200664
   -1  1358 12066515
   -1  1359 2763747
   -1  1360 13046251
   -1  1361 10866282
   -1  1362 2596394
   -1  1363 16136935
   -1  1364 12294485
   -1  1365 4163206
   -1  1366 16401379
   -1  1367 11326983
   -1  1368 5672014
   -1  1369 5651933
   -1  1370 11931253
   -1  1371 4250129
   -1  1372 15239374
   -1  1373 7132958
   -1  1374 5420427
   -1  1375 11557648
   -1  1376 3851202
   -1  1377 10230772
   -1  1378 12004823
   -1  1379 2355590
   -1  1380 15009591
   -1  1381 13763652
   -1  1382 15978107
   -1  1383 13810889
   -1  1384 2192136
   -1  1385 10756560
   -1  1386 3575694
   -1  1387 7555846
   -1  1388 11663906
   -1  1389 584577
   -1  1390 16292617
   -1  1391 16550492
   -1  1392 9607084
   -1  1393 6371423
   -1  1394 8519542
   -1  1395 7583498
   -1  1396 2434646
   -1  1397 7349234
   -1  1398 11396899
   -1  1399 4035946
   -1  1400 5023393
   -1  1401 7416840
   -1  1402 1870173
   -1  1403 1969701
   -1  1404 13399034
   -1  1405 7203348
   -1  1406 8648281
   -1  1407 12194677
   -1  1408 6136397
   -1  1409 4530149
   -1  1410 4707281
   -1  1411 4154151
   -1  1412 16288506
   -1  1413 6400057
   -1  1414 15182133
   -1  1415 8834389
   -1  1416 7395062
   -1  1417 10710697
   -1  1418 2889831
   -1  1419 14149501
   -1  1420 1462636
   -1  1421 8327046
   -1  1422 10521728
   -1  1423 2423303
   -1  1424 10885175
   -1  1425 4574927
   -1  1426 9426130
   -1  1427 1717963
   -1  1428 14664527
   -1  1429 10343639
   -1  1430 10991789
   -1  1431 14044535
   -1  1432 15703926
   -1  1433 16328496
   -1  1434 3527110
   -1  1435 15852100
   -1  1436 16234590
   -1  1437 16233579
   -1  1438 2588945
   -1  1439 16490392
   -1  1440 12787948
   -1  1441 559249
   -1  1442 4214286
   -1  1443 5121964
   -1  1444 3635795
   -1  1445 7560869
   -1  1446 13876235
   -1  1447 14834553
   -1  1448 3887701
   -1  1449 12073045
   -1  1450 6749630
   -1  1451 9094030
   -1  1452 3836764
   -1  1453 7102411
   -1  1454 15984350
   -1  1455 14328215
   -1  1456 8582077
   -1  1457 13672416
   -1  1458 6889197
   -1  1459 1884573
   -1  1460 4631061
   -1  1461 4453406
   -1  1462 3379532
   -1  1463 9155628
   -1  1464 8482964
   -1  1465 8997845
   -1  1466 13313774
   -1  1467 11932089
   -1  1468 5373384
   -1  1469 12781851
   -1  1470 13129402
   -1  1471 14409642
   -1  1472 2843771
   -1  1473 15592893
   -1  1474 1080417
   -1  1475 13663127
   -1  1476 11363153
   -1  1477 5532758
   -1  1478 12792824
   -1  1479 3054897
   -1  1480 15643875
   -1  1481 1215039
   -1  1482 5461016
   -1  1483 14634637
   -1  1484 4264029
   -1  1485 6772661
   -1  1486 11747928
   -1  1487 15542316
   -1  1488 16287239
   -1  1489 2925949
   -1  1490 13965369
   -1  1491 581235
   -1  1492 11022435
   -1  1493 14822002
   -1  1494 12831313
   -1  1495 863189
   -1  1496 11343700
   -1  1497 612021
   -1  1498 15516286
   -1  1499 13468189
   -1  1500 16170003
   -1  1501 6368712
   -1  1502 866625
   -1  1503 3967207
   -1  1504 1214645
   -1  1505 4830147
   -1  1506 12731408
   -1  1507 10705768
   -1  1508 15440273
   -1  1509 16499600
   -1  1510 14536593
   -1  1511 7372583
   -1  1512 4173809
   -1  1513 13892768
   -1  1514 10254043
   -1  1515 439384
   -1  1516 11407693
   -1  1517 1395905
   -1  1518 775644
   -1  1519 8372747
   -1  1520 16611974
   -1  1521 9852534
   -1  1522 10233294
   -1  1523 5648441
   -1  1524 2150572
   -1  1525 13399334
   -1  1526 4706627
   -1  1527 6695749
   -1  1528 777763
   -1  1529 16629097
   -1  1530 8551155
   -1  1531 7893845
   -1  1532 12980591
   -1  1533 6644004
   -1  1534 7178398
   -1  1535 3135826
   -1  1536 4132673
   -1  1537 1907631
   -1  1538 8754116
   -1  1539 12597019
   -1  1540 2361866
   -1  1541 6388199
   -1  1542 13809079
   -1  1543 3183590
   -1  1544 1350385
   -1  1545 16460825
   -1  1546 5053879
   -1  1547 11404376
   -1  1548 1738946
   -1  1549 6570983
   -1  1550 13367099
   -1  1551 13585251
   -1  1552 8525404
   -1  1553 16512411
   -1  1554 14200413
   -1  1555 8781912
   -1  1556 11045086
   -1  1557 1559305
   -1  1558 4587912
   -1  1559 14185491
   -1  1560 3562520
   -1  1561 2114817
   -1  1562 9178122
   -1  1563 14572941
   -1  1564 13414066
   -1  1565 14466882
   -1  1566 8791558
   -1  1567 15522158
   -1  1568 8963265
   -1  1569 16027995
   -1  1570 7654767
   -1  1571 13898658
   -1  1572 14410969
   -1  1573 3169309
   -1  1574 6165056
   -1  1575 8474911
   -1  1576 7433726
   -1  1577 11874126
   -1  1578 13539347
   -1  1579 10978940
   -1  1580 774753
   -1  1581 6333683
   -1  1582 6365528
   -1  1583 7762174
   -1  1584 13400171
   -1  1585 2727638
   -1  1586 15062808
   -1  1587 4568873
   -1  1588 1412918
   -1  1589 4349766
   -1  1590 7062545
   -1  1591 4724437
   -1  1592 1190521
   -1  1593 9967262
   -1  1594 9700655
   -1  1595 5406004
   -1  1596 3791261
   -1  1597 9929725
   -1  1598 5201173
   -1  1599 8072193
   -1  1600 6888408
   -1  1601 10303369
   -1  1602 3839549
   -1  1603 1514078
   -1  1604 13180172
   -1  1605 8429564
   -1  1606 6977700
   -1  1607 15899357
   -1  1608 12186221
   -1  1609 12585606
   -1  1610 6827641
   -1  1611 14302770
   -1  1612 9623583
   -1  1613 1035232
   -1  1614 16023632
   -1  1615 10020617
   -1  1616 14798684
   -1  1617 1446474
   -1  1618 5187229
   -1  1619 1786487
   -1  1620 5463303
   -1  1621 1344061
   -1  1622 15398150
   -1  1623 12338525
   -1  1624 11489352
   -1  1625 10506770
   -1  1626 13000167
   -1  1627 2886905
   -1  1628 3704111
   -1  1629 12233544
   -1  1630 14340856
   -1  1631 9006024
   -1  1632 13368892
   -1  1633 2929155
   -1  1634 16125053
   -1  1635 15177379
   -1  1636 2473583
   -1  1637 16167989
   -1  1638 5704871
   -1  1639 13868233
   -1  1640 14231891
   -1  1641 5185858
   -1  1642 9677316
   -1  1643 3447656
   -1  1644 1562005
   -1  1645 14710836
   -1  1646 6882220
   -1  1647 10137028
   -1  1648 6784434
   -1  1649 14761323
   -1  1650 5115368
   -1  1651 1993211
   -1  1652 9244554
   -1  1653 2170980
   -1  1654 4034420
   -1  1655 9302774
   -1  1656 6185941
   -1  1657 13246071
   -1  1658 3911739
   -1  1659 14364102
   -1  1660 5013483
   -1  1661 3338132
   -1  1662 1473435
   -1  1663 1382202
   -1  1664 11539390
   -1  1665 16526769
   -1  1666 16409487
   -1  1667 12935467
   -1  1668 2759000
   -1  1669 13971000
   -1  1670 13594889
   -1  1671 5108062
   -1  1672 13690904
   -1  1673 14984669
   -1  1674 14025158
   -1  1675 15948164
   -1  1676 13611334
   -1  1677 3676768
   -1  1678 7599751
   -1  1679 12739655
   -1  1680 9266129
   -1  1681 15303200
   -1  1682 6182713
   -1  1683 3674579
   -1  1684 9969318
   -1  1685 8707870
   -1  1686 11968248
   -1  1687 9781917
   -1  1688 5661248
   -1  1689 9779406
   -1  1690 15079718
   -1  1691 10583227
   -1  1692 10008619
   -1  1693 6694438
   -1  1694 15963349
   -1  1695 3476030
   -1  1696 16613207
   -1  1697 501436
   -1  1698 13166031
   -1  1699 16038298
   -1  1700 2016372
   -1  1701 8181265
   -1  1702 13401133
   -1  1703 14358314
   -1  1704 3058428
   -1  1705 12519207
   -1  1706 7810621
   -1  1707 15436895
   -1  1708 8514544
   -1  1709 7601941
   -1  1710 9379262
   -1  1711 6138170
   -1  1712 8759307
   -1  1713 8043480
   -1  1714 5536514
   -1  1715 6974211
   -1  1716 3959230
   -1  1717 5429146
   -1  1718 9140072
   -1  1719 312128
   -1  1720 9649422
   -1  1721 12451995
   -1  1722 12631806
   -1  1723 6772524
   -1  1724 10589795
   -1  1725 13105527
   -1  1726 11577235
   -1  1727 11372010
   -1  1728 3281461
   -1  1729 1076388
   -1  1730 15096961
   -1  1731 8883698
   -1  1732 7828624
   -1  1733 14798921
   -1  1734 2536138
   -1  1735 10302473
   -1  1736 14589353
   -1  1737 3234814
   -1  1738 10887862
   -1  1739 2153287
   -1  1740 14820821
   -1  1741 2054312
   -1  1742 1530907
   -1  1743 13928849
   -1  1744 15996077
   -1  1745 11010732
   -1  1746 8706770
   -1  1747 10686959
   -1  1748 13408893
   -1  1749 2879404
   -1  1750 10236548
   -1  1751 5077496
   -1  1752 5250479
   -1  1753 14025345
   -1  1754 9502182
   -1  1755 4902045
   -1  1756 16674165
   -1  1757 11731339
   -1  1758 7835398
   -1  1759 11847232
   -1  1760 4060359
   -1  1761 4711519
   -1  1762 16440764
   -1  1763 1847320
   -1  1764 9284200
   -1  1765 7792057
   -1  1766 4819091
   -1  1767 16393825
   -1  1768 16112059
   -1  1769 9030895
   -1  1770 9825471
   -1  1771 5433844
   -1  1772 4078088
   -1  1773 10167912
   -1  1774 2677886
   -1  1775 4652362
   -1  1776 15660042
   -1  1777 13184120
   -1  1778 8053318
   -1  1779 9837271
   -1  1780 10476964
   -1  1781 9425071
   -1  1782 11432862
   -1  1783 11319877
   -1  1784 10641166
   -1  1785 9830620
   -1  1786 15219250
   -1  1787 5193404
   -1  1788 8978680
   -1  1789 1391186
   -1  1790 1476043
   -1  1791 7284201
   -1  1792 4048327
   -1  1793 12552309
   -1  1794 12255320
   -1  1795 15628614
   -1  1796 6829681
   -1  1797 16247151
   -1  1798 9201381
   -1  1799 2745436
   -1  1800 13163341
   -1  1801 16579535
   -1  1802 16316818
   -1  1803 16445322
   -1  1804 12840889
   -1  1805 15661562
   -1  1806 12698127
   -1  1807 750118
   -1  1808 16323206
   -1  1809 1117174
   -1  1810 11996652
   -1  1811 2165843

diff --git a/2024/22/solution.rs b/2024/22/solution.rs

@@ -0,0 +1,43 @@
   -1     1 use std::collections::HashMap;
   -1     2 use std::collections::HashSet;
   -1     3 
   -1     4 #[path = "../lib.rs"]
   -1     5 mod lib;
   -1     6 
   -1     7 fn step(x: u32) -> u32 {
   -1     8     let mut y = x;
   -1     9     y = y ^ ((y << 6) % (1 << 24));
   -1    10     y = y ^ (y >> 5);
   -1    11     y = y ^ ((y << 11) % (1 << 24));
   -1    12     return y;
   -1    13 }
   -1    14 
   -1    15 fn main() {
   -1    16     let mut sum1 = 0;
   -1    17     let mut sums2 = HashMap::new();
   -1    18 
   -1    19     for line in lib::iter_input() {
   -1    20         let mut x = line.parse::<u32>().unwrap();
   -1    21         let mut seen = HashSet::new();
   -1    22         let mut pattern = 0;
   -1    23         let mut prev = 0;
   -1    24 
   -1    25         for i in 0..2000 {
   -1    26             x = step(x);
   -1    27             let value = x % 10;
   -1    28             let d = 10 + value - prev;  // +10 to avoid negative numbers
   -1    29             pattern = ((pattern << 5) | d) % (1 << 20);
   -1    30             if i >= 3 && seen.insert(pattern) {
   -1    31                 sums2
   -1    32                     .entry(pattern)
   -1    33                     .and_modify(|sum| *sum += value)
   -1    34                     .or_insert(value);
   -1    35             }
   -1    36             prev = value;
   -1    37         }
   -1    38         sum1 += x as u64;
   -1    39     }
   -1    40 
   -1    41     println!("part1: {}", sum1);
   -1    42     println!("part2: {}", sums2.values().max().unwrap());
   -1    43 }

diff --git a/2024/22/test1.txt b/2024/22/test1.txt

@@ -0,0 +1,4 @@
   -1     1 1
   -1     2 10
   -1     3 100
   -1     4 2024

diff --git a/2024/22/test2.txt b/2024/22/test2.txt

@@ -0,0 +1,4 @@
   -1     1 1
   -1     2 2
   -1     3 3
   -1     4 2024

diff --git a/2024/22/test3.txt b/2024/22/test3.txt

@@ -0,0 +1 @@
   -1     1 123