day 19 init

This commit is contained in:
2022-01-07 22:35:38 +01:00
parent 0e333e5cb9
commit a0b094aa61
4 changed files with 1278 additions and 0 deletions

136
2021/day19/EXAMPLE.txt Normal file
View File

@@ -0,0 +1,136 @@
--- scanner 0 ---
404,-588,-901
528,-643,409
-838,591,734
390,-675,-793
-537,-823,-458
-485,-357,347
-345,-311,381
-661,-816,-575
-876,649,763
-618,-824,-621
553,345,-567
474,580,667
-447,-329,318
-584,868,-557
544,-627,-890
564,392,-477
455,729,728
-892,524,684
-689,845,-530
423,-701,434
7,-33,-71
630,319,-379
443,580,662
-789,900,-551
459,-707,401
--- scanner 1 ---
686,422,578
605,423,415
515,917,-361
-336,658,858
95,138,22
-476,619,847
-340,-569,-846
567,-361,727
-460,603,-452
669,-402,600
729,430,532
-500,-761,534
-322,571,750
-466,-666,-811
-429,-592,574
-355,545,-477
703,-491,-529
-328,-685,520
413,935,-424
-391,539,-444
586,-435,557
-364,-763,-893
807,-499,-711
755,-354,-619
553,889,-390
--- scanner 2 ---
649,640,665
682,-795,504
-784,533,-524
-644,584,-595
-588,-843,648
-30,6,44
-674,560,763
500,723,-460
609,671,-379
-555,-800,653
-675,-892,-343
697,-426,-610
578,704,681
493,664,-388
-671,-858,530
-667,343,800
571,-461,-707
-138,-166,112
-889,563,-600
646,-828,498
640,759,510
-630,509,768
-681,-892,-333
673,-379,-804
-742,-814,-386
577,-820,562
--- scanner 3 ---
-589,542,597
605,-692,669
-500,565,-823
-660,373,557
-458,-679,-417
-488,449,543
-626,468,-788
338,-750,-386
528,-832,-391
562,-778,733
-938,-730,414
543,643,-506
-524,371,-870
407,773,750
-104,29,83
378,-903,-323
-778,-728,485
426,699,580
-438,-605,-362
-469,-447,-387
509,732,623
647,635,-688
-868,-804,481
614,-800,639
595,780,-596
--- scanner 4 ---
727,592,562
-293,-554,779
441,611,-461
-714,465,-776
-743,427,-804
-660,-479,-426
832,-632,460
927,-485,-438
408,393,-506
466,436,-512
110,16,151
-258,-428,682
-393,719,612
-211,-452,876
808,-476,-593
-575,615,604
-485,667,467
-680,325,-822
-627,-443,-432
872,-547,-609
833,512,582
807,604,487
839,-516,451
891,-625,532
-652,-548,-490
30,-46,-14

717
2021/day19/INPUT.txt Normal file
View File

@@ -0,0 +1,717 @@
--- scanner 0 ---
878,-830,-633
-654,579,583
-297,520,-671
-288,418,-607
927,-707,-599
834,-770,492
65,-56,25
662,392,-584
-635,672,759
-286,-837,-550
943,-732,-680
868,-851,577
845,-735,422
757,441,-546
417,377,639
-422,-920,-556
-379,503,-529
-358,-887,-535
-557,695,590
-469,-715,623
421,350,460
727,244,-543
-524,-657,716
530,386,541
-516,-654,485
--- scanner 1 ---
-576,568,-812
657,415,-415
697,-697,-764
-768,-701,-757
133,21,23
660,-634,-685
531,764,612
-693,-514,675
625,435,-393
-505,429,-811
-732,-827,-754
-751,-553,759
585,424,-332
406,869,566
-345,414,781
-452,446,-773
437,881,577
-667,-527,862
592,-509,865
572,-544,667
796,-712,-731
-466,394,764
-793,-859,-721
-424,469,687
546,-522,796
--- scanner 2 ---
496,419,871
517,-648,-341
-373,-342,699
610,-470,865
-405,433,-478
635,-489,683
591,-554,-342
-523,457,-377
480,382,833
-383,339,809
796,849,-470
576,-541,-376
-529,382,821
-359,-444,565
-657,-489,-782
-660,462,-493
-701,-484,-738
-444,333,689
736,800,-551
440,430,856
-749,-542,-720
628,771,-522
-84,45,31
-354,-473,697
655,-447,812
--- scanner 3 ---
-585,-799,-407
-8,3,-15
-352,263,-798
648,-897,-545
807,594,858
949,398,-473
-550,462,970
939,-728,848
923,450,-605
-370,-983,687
-320,-899,708
-678,-623,-426
-701,-792,-504
134,-80,61
-425,479,834
651,-666,-537
906,-869,727
906,647,784
-301,457,941
709,-759,-592
-338,-971,589
-326,308,-768
-271,271,-719
957,-780,619
905,310,-592
902,471,898
--- scanner 4 ---
-344,-650,707
-19,-55,-144
-475,295,231
-790,471,-694
634,400,-574
-387,-696,643
526,-976,-868
737,-562,293
-362,-790,-599
649,528,271
783,305,-610
-348,-610,641
827,579,241
649,-550,431
20,-194,-1
-548,230,315
726,671,262
-513,246,239
699,-549,494
601,-874,-967
621,381,-566
600,-977,-919
-756,576,-753
-389,-745,-695
-411,-777,-544
-712,472,-707
--- scanner 5 ---
-736,-631,547
489,543,-764
-658,-613,524
-765,344,314
474,-482,585
-588,530,-365
-589,305,-401
443,401,516
376,-573,506
594,481,-777
-688,-591,744
-519,362,-375
-728,347,358
442,-612,670
-657,447,279
434,-736,-722
645,623,-783
-13,-133,-116
-758,-472,-812
-651,-534,-759
-805,-505,-654
418,-677,-730
407,437,584
-149,-18,22
485,-643,-827
272,461,520
--- scanner 6 ---
457,-689,-751
394,-366,777
7,-79,-26
-346,-410,-447
492,343,394
64,50,92
-432,487,345
328,-665,-703
329,-753,-802
-568,-783,674
-347,611,-432
-361,477,-330
508,305,431
-628,-604,616
-504,-588,665
452,320,442
-425,-374,-325
667,364,-435
-465,-527,-427
647,493,-477
391,-438,763
-517,355,394
345,-455,661
-371,367,351
622,311,-458
-342,479,-461
--- scanner 7 ---
240,-368,494
553,641,-895
-844,-774,775
-158,152,27
604,463,-925
-808,-665,694
257,746,637
-582,876,794
-564,874,680
295,-496,433
502,-255,-850
-524,591,-672
336,-262,-791
-887,-673,-732
496,-283,-694
276,755,723
233,780,826
-537,896,707
-16,-5,-83
-869,-640,-763
292,-328,445
-525,641,-735
-817,-778,596
-959,-707,-833
-537,553,-873
696,564,-904
--- scanner 8 ---
-138,-81,-56
441,422,-748
-613,-753,-567
-711,-766,-679
471,430,517
469,-785,640
-736,-746,-682
-467,333,-521
-837,485,476
574,-437,-615
-838,-845,533
436,232,537
454,235,-722
630,-503,-471
-869,-867,440
-875,-814,670
449,301,491
-942,531,351
-487,316,-400
477,-764,674
480,338,-806
569,-466,-398
-954,520,382
-542,410,-479
539,-822,685
--- scanner 9 ---
467,-625,-603
-669,564,-709
-847,-826,-623
652,-665,691
-836,-756,-658
555,-658,807
-738,641,-734
-640,530,-730
-532,-707,498
467,444,-799
261,397,458
-419,-609,489
-490,820,347
522,-532,-545
454,584,-817
-557,750,437
586,532,-843
-870,-671,-739
514,-763,-542
-524,719,419
-98,20,18
-423,-788,462
340,405,377
291,442,432
633,-489,784
--- scanner 10 ---
716,-305,-787
837,-330,-928
888,-497,410
-835,-736,-589
-726,396,-816
105,27,-108
-269,644,397
-783,-776,-540
-719,467,-739
-739,-842,696
-8,-46,23
683,628,-464
-579,-821,599
-354,666,310
393,435,700
912,-501,603
714,514,-397
810,-320,-849
487,494,578
-339,704,339
895,-524,455
-704,404,-846
424,551,688
-780,-608,-528
692,689,-364
-573,-849,755
--- scanner 11 ---
-324,527,757
608,-702,-558
429,818,379
582,-495,715
-341,737,-607
-796,-621,820
-880,-642,770
-868,-740,802
597,-658,-369
-453,503,805
572,409,-620
560,-388,839
565,-359,590
-483,-797,-347
536,-739,-501
-390,826,-723
-387,754,-709
508,604,-611
-41,-143,24
-418,-868,-393
-325,439,856
36,43,-57
469,665,481
350,782,501
-394,-779,-323
632,588,-562
--- scanner 12 ---
-866,-426,-688
486,-659,807
-935,-385,-780
-686,-505,394
662,-480,-583
816,333,564
534,365,-598
-696,619,400
767,325,526
-694,783,523
757,-516,-732
391,356,-675
-924,-312,-703
-50,27,6
591,-600,841
590,-613,763
-723,-341,410
483,335,-776
-424,345,-345
-685,728,577
681,-472,-570
-557,-447,419
832,409,599
-370,343,-406
-382,333,-397
--- scanner 13 ---
-578,-856,613
-609,-874,646
744,-939,-717
473,-481,439
-508,-946,680
792,-836,-716
391,419,-696
-38,-154,-175
499,-592,313
-550,349,235
-491,515,228
-416,617,-490
382,488,294
399,438,-683
-437,709,-591
435,343,-534
-105,-7,-65
475,517,354
-647,509,256
-606,-512,-668
-669,-511,-618
362,514,220
693,-938,-791
-446,566,-668
-468,-524,-580
556,-552,297
--- scanner 14 ---
-757,815,582
-2,58,9
-515,-401,595
-371,445,-483
637,752,-662
8,-94,-131
723,-646,-779
-582,817,681
655,514,402
-453,-455,594
-442,-349,665
-521,-349,-553
-393,472,-510
-487,-325,-364
616,678,468
615,532,-632
746,593,500
-391,490,-396
585,-819,511
597,555,-710
-512,-368,-467
492,-714,460
551,-722,444
756,-804,-732
-696,826,735
694,-751,-625
--- scanner 15 ---
-643,847,-354
-766,752,-394
757,394,440
799,-393,-663
-538,-714,742
-634,-605,-282
-165,88,-1
-819,851,-468
-629,-356,-311
727,-375,-544
256,-339,516
-419,-694,859
749,586,347
811,-425,-565
-498,-816,895
255,-438,604
697,851,-525
556,884,-404
788,442,416
-651,-480,-418
-923,489,752
-970,419,912
608,902,-633
-894,449,783
-49,-39,90
384,-390,580
--- scanner 16 ---
469,-678,693
-644,-431,470
-57,-144,57
392,324,928
553,371,-753
-875,-821,-277
432,-606,750
-621,243,-576
-606,-460,455
-906,725,820
-682,343,-567
-759,-809,-308
481,-761,-382
382,-776,-415
-816,-699,-371
-914,695,842
593,360,-814
374,413,904
-159,-10,163
-796,276,-598
-666,-518,385
513,-667,882
303,348,858
518,-698,-461
-843,618,835
521,351,-731
--- scanner 17 ---
353,635,-713
-771,-279,699
-474,769,499
-701,714,-588
-643,-334,760
-361,778,597
-305,-533,-323
-323,-424,-408
432,-395,549
-74,22,-27
691,483,717
-811,-331,748
708,-667,-556
-671,911,-585
369,-410,442
361,-388,472
-606,763,-626
-365,805,418
710,576,541
435,652,-571
-385,-573,-325
344,737,-649
682,-849,-596
739,-711,-666
613,460,548
--- scanner 18 ---
630,-778,-377
-642,806,-657
404,849,-563
-504,-789,-498
-659,778,-635
34,-62,148
347,-484,785
-420,405,665
-457,478,604
384,813,754
-718,-667,757
468,755,793
263,852,-712
-776,-678,695
653,-822,-405
476,-510,763
-608,-880,-588
256,827,-572
278,-530,798
-133,7,20
-451,-884,-500
-739,-633,765
-391,622,660
-640,591,-646
281,729,780
520,-823,-410
--- scanner 19 ---
-957,587,417
711,-510,-899
-500,835,-796
348,583,-720
778,798,343
464,486,-727
-414,-471,-425
499,-891,534
679,-608,-911
-25,-50,-79
723,847,380
-872,565,330
729,-629,-827
-438,-453,-514
-484,-382,-449
-522,827,-826
-507,764,-719
-146,50,47
-592,-511,505
371,505,-551
697,877,335
-887,527,359
-649,-548,577
-460,-592,566
748,-862,529
624,-755,551
--- scanner 20 ---
-970,-446,-402
660,-629,-380
598,-630,-326
-988,-361,-511
417,-770,901
601,432,-293
-622,-623,933
-592,-626,736
-908,-363,-551
-932,559,800
592,518,-274
-138,98,149
-144,-53,-3
-687,-664,785
722,361,565
626,329,-250
-650,722,-312
-522,661,-257
356,-617,890
-819,461,791
531,-716,892
671,-700,-274
720,475,547
742,448,520
-928,380,827
-482,710,-309
--- scanner 21 ---
-877,509,-750
-613,-482,651
442,-680,-742
361,600,630
-67,40,98
-831,444,-821
-901,420,-732
841,456,-531
-662,-606,635
758,447,-603
416,-669,822
400,478,506
419,-795,786
362,461,559
-617,367,784
452,-827,847
-666,-582,-655
-515,413,801
57,6,-81
488,-602,-606
-855,-571,-611
-501,416,873
-604,-546,456
780,467,-571
409,-665,-643
-723,-510,-692
--- scanner 22 ---
-11,-95,-104
-767,-537,-778
-624,512,-512
877,487,-759
-686,495,624
595,-590,329
-607,370,-430
-837,-531,-869
609,-637,320
-709,434,-421
551,-611,-783
602,-649,242
695,527,-785
-400,-664,553
-883,498,594
739,417,-816
-517,-652,414
-735,457,529
688,-605,-694
561,760,228
-841,-389,-778
-389,-727,337
601,758,308
671,-574,-878
452,675,246
--- scanner 23 ---
843,466,-900
825,-466,237
-918,-519,-987
823,-405,291
835,504,-949
833,-836,-616
835,-457,249
-59,-106,-149
-710,351,663
-729,-553,-963
385,463,561
549,340,563
-815,-544,-944
-503,691,-666
-732,450,730
-539,-683,472
812,-735,-524
803,-658,-667
759,539,-965
-546,-553,598
-619,-530,502
-657,662,-561
-626,394,776
440,517,552
-550,724,-508
--- scanner 24 ---
-80,-88,-25
-862,-445,-663
803,-429,-392
396,465,-685
-847,-416,-625
833,-844,438
682,683,480
-421,422,649
-462,-802,883
46,30,75
-418,434,817
-628,-861,890
-366,483,777
373,634,-607
743,-774,505
748,-466,-343
-482,633,-426
722,-421,-313
718,764,371
691,585,367
-497,740,-363
-475,710,-355
761,-743,472
-622,-705,862
489,641,-704
-932,-503,-603
--- scanner 25 ---
-711,-795,292
820,713,-588
682,725,-676
780,291,672
-448,-881,-583
524,-765,493
-489,-819,-650
710,381,605
494,-400,-461
-423,-863,-611
-828,406,739
-796,-714,326
-649,433,743
-733,686,-909
-866,-679,315
-760,713,-931
-847,668,-911
-747,442,630
425,-473,-488
490,-786,522
679,363,638
601,-790,424
573,-463,-414
619,726,-626
-3,-97,-140

60
2021/day19/Makefile Normal file
View File

@@ -0,0 +1,60 @@
# AOC daily Makefile - GNU make only.
#
# Copyright (C) 2021 Bruno Raoult ("br")
# Licensed under the GNU General Public License v3.0 or later.
# Some rights reserved. See COPYING.
#
# You should have received a copy of the GNU General Public License along with this
# program. If not, see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>.
#
# SPDX-License-Identifier: GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
#
INPUT := INPUT.txt
SHELL := /bin/bash
CC := gcc
LIB := aoc_$(shell uname -m)
INCDIR := ../include
LIBDIR := ../lib
LDFLAGS := -L$(LIBDIR)
#LDLIB := -l$(LIB) -lm
LDLIB := -l$(LIB)
export LD_LIBRARY_PATH = $(LIBDIR)
CFLAGS += -std=gnu99
CFLAGS += -O2
CFLAGS += -g
#CFLAGS += -pg
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -march=native
CFLAGS += -Wmissing-declarations
CFLAGS += -Wno-unused-result
CFLAGS += -DDEBUG_DEBUG # activate general debug (debug.c)
CFLAGS += -DDEBUG_POOL # memory pools management
TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n"
export PATH := .:$(PATH)
.PHONY: clean all compile ex1 ex2
all: ex1 ex2
compile: aoc-c
ex1: aoc-c
@$(TIME) aoc-c -p 1 < $(INPUT)
ex2: aoc-c
@$(TIME) aoc-c -p 2 < $(INPUT)
clean:
@rm -f aoc-c core* gmon.out
.c:
@echo compiling $<
@$(CC) $(CFLAGS) $(LDFLAGS) -I $(INCDIR) $< $(LDLIB) -o $@

365
2021/day19/README.txt Normal file
View File

@@ -0,0 +1,365 @@
--- Day 19: Beacon Scanner ---
As your probe drifted down through this area, it released an assortment of beacons and scanners into the water. It's difficult to navigate in the pitch black open waters of the ocean trench, but if you can build a map of the trench using data from the scanners, you should be able to safely reach the bottom.
The beacons and scanners float motionless in the water; they're designed to maintain the same position for long periods of time. Each scanner is capable of detecting all beacons in a large cube centered on the scanner; beacons that are at most 1000 units away from the scanner in each of the three axes (x, y, and z) have their precise position determined relative to the scanner. However, scanners cannot detect other scanners. The submarine has automatically summarized the relative positions of beacons detected by each scanner (your puzzle input).
For example, if a scanner is at x,y,z coordinates 500,0,-500 and there are beacons at -500,1000,-1500 and 1501,0,-500, the scanner could report that the first beacon is at -1000,1000,-1000 (relative to the scanner) but would not detect the second beacon at all.
Unfortunately, while each scanner can report the positions of all detected beacons relative to itself, the scanners do not know their own position. You'll need to determine the positions of the beacons and scanners yourself.
The scanners and beacons map a single contiguous 3d region. This region can be reconstructed by finding pairs of scanners that have overlapping detection regions such that there are at least 12 beacons that both scanners detect within the overlap. By establishing 12 common beacons, you can precisely determine where the scanners are relative to each other, allowing you to reconstruct the beacon map one scanner at a time.
For a moment, consider only two dimensions. Suppose you have the following scanner reports:
--- scanner 0 ---
0,2
4,1
3,3
--- scanner 1 ---
-1,-1
-5,0
-2,1
Drawing x increasing rightward, y increasing upward, scanners as S, and beacons as B, scanner 0 detects this:
...B.
B....
....B
S....
Scanner 1 detects this:
...B..
B....S
....B.
For this example, assume scanners only need 3 overlapping beacons. Then, the beacons visible to both scanners overlap to produce the following complete map:
...B..
B....S
....B.
S.....
Unfortunately, there's a second problem: the scanners also don't know their rotation or facing direction. Due to magnetic alignment, each scanner is rotated some integer number of 90-degree turns around all of the x, y, and z axes. That is, one scanner might call a direction positive x, while another scanner might call that direction negative y. Or, two scanners might agree on which direction is positive x, but one scanner might be upside-down from the perspective of the other scanner. In total, each scanner could be in any of 24 different orientations: facing positive or negative x, y, or z, and considering any of four directions "up" from that facing.
For example, here is an arrangement of beacons as seen from a scanner in the same position but in different orientations:
--- scanner 0 ---
-1,-1,1
-2,-2,2
-3,-3,3
-2,-3,1
5,6,-4
8,0,7
--- scanner 0 ---
1,-1,1
2,-2,2
3,-3,3
2,-1,3
-5,4,-6
-8,-7,0
--- scanner 0 ---
-1,-1,-1
-2,-2,-2
-3,-3,-3
-1,-3,-2
4,6,5
-7,0,8
--- scanner 0 ---
1,1,-1
2,2,-2
3,3,-3
1,3,-2
-4,-6,5
7,0,8
--- scanner 0 ---
1,1,1
2,2,2
3,3,3
3,1,2
-6,-4,-5
0,7,-8
By finding pairs of scanners that both see at least 12 of the same beacons, you can assemble the entire map. For example, consider the following report:
--- scanner 0 ---
404,-588,-901
528,-643,409
-838,591,734
390,-675,-793
-537,-823,-458
-485,-357,347
-345,-311,381
-661,-816,-575
-876,649,763
-618,-824,-621
553,345,-567
474,580,667
-447,-329,318
-584,868,-557
544,-627,-890
564,392,-477
455,729,728
-892,524,684
-689,845,-530
423,-701,434
7,-33,-71
630,319,-379
443,580,662
-789,900,-551
459,-707,401
--- scanner 1 ---
686,422,578
605,423,415
515,917,-361
-336,658,858
95,138,22
-476,619,847
-340,-569,-846
567,-361,727
-460,603,-452
669,-402,600
729,430,532
-500,-761,534
-322,571,750
-466,-666,-811
-429,-592,574
-355,545,-477
703,-491,-529
-328,-685,520
413,935,-424
-391,539,-444
586,-435,557
-364,-763,-893
807,-499,-711
755,-354,-619
553,889,-390
--- scanner 2 ---
649,640,665
682,-795,504
-784,533,-524
-644,584,-595
-588,-843,648
-30,6,44
-674,560,763
500,723,-460
609,671,-379
-555,-800,653
-675,-892,-343
697,-426,-610
578,704,681
493,664,-388
-671,-858,530
-667,343,800
571,-461,-707
-138,-166,112
-889,563,-600
646,-828,498
640,759,510
-630,509,768
-681,-892,-333
673,-379,-804
-742,-814,-386
577,-820,562
--- scanner 3 ---
-589,542,597
605,-692,669
-500,565,-823
-660,373,557
-458,-679,-417
-488,449,543
-626,468,-788
338,-750,-386
528,-832,-391
562,-778,733
-938,-730,414
543,643,-506
-524,371,-870
407,773,750
-104,29,83
378,-903,-323
-778,-728,485
426,699,580
-438,-605,-362
-469,-447,-387
509,732,623
647,635,-688
-868,-804,481
614,-800,639
595,780,-596
--- scanner 4 ---
727,592,562
-293,-554,779
441,611,-461
-714,465,-776
-743,427,-804
-660,-479,-426
832,-632,460
927,-485,-438
408,393,-506
466,436,-512
110,16,151
-258,-428,682
-393,719,612
-211,-452,876
808,-476,-593
-575,615,604
-485,667,467
-680,325,-822
-627,-443,-432
872,-547,-609
833,512,582
807,604,487
839,-516,451
891,-625,532
-652,-548,-490
30,-46,-14
Because all coordinates are relative, in this example, all "absolute" positions will be expressed relative to scanner 0 (using the orientation of scanner 0 and as if scanner 0 is at coordinates 0,0,0).
Scanners 0 and 1 have overlapping detection cubes; the 12 beacons they both detect (relative to scanner 0) are at the following coordinates:
-618,-824,-621
-537,-823,-458
-447,-329,318
404,-588,-901
544,-627,-890
528,-643,409
-661,-816,-575
390,-675,-793
423,-701,434
-345,-311,381
459,-707,401
-485,-357,347
These same 12 beacons (in the same order) but from the perspective of scanner 1 are:
686,422,578
605,423,415
515,917,-361
-336,658,858
-476,619,847
-460,603,-452
729,430,532
-322,571,750
-355,545,-477
413,935,-424
-391,539,-444
553,889,-390
Because of this, scanner 1 must be at 68,-1246,-43 (relative to scanner 0).
Scanner 4 overlaps with scanner 1; the 12 beacons they both detect (relative to scanner 0) are:
459,-707,401
-739,-1745,668
-485,-357,347
432,-2009,850
528,-643,409
423,-701,434
-345,-311,381
408,-1815,803
534,-1912,768
-687,-1600,576
-447,-329,318
-635,-1737,486
So, scanner 4 is at -20,-1133,1061 (relative to scanner 0).
Following this process, scanner 2 must be at 1105,-1205,1229 (relative to scanner 0) and scanner 3 must be at -92,-2380,-20 (relative to scanner 0).
The full list of beacons (relative to scanner 0) is:
-892,524,684
-876,649,763
-838,591,734
-789,900,-551
-739,-1745,668
-706,-3180,-659
-697,-3072,-689
-689,845,-530
-687,-1600,576
-661,-816,-575
-654,-3158,-753
-635,-1737,486
-631,-672,1502
-624,-1620,1868
-620,-3212,371
-618,-824,-621
-612,-1695,1788
-601,-1648,-643
-584,868,-557
-537,-823,-458
-532,-1715,1894
-518,-1681,-600
-499,-1607,-770
-485,-357,347
-470,-3283,303
-456,-621,1527
-447,-329,318
-430,-3130,366
-413,-627,1469
-345,-311,381
-36,-1284,1171
-27,-1108,-65
7,-33,-71
12,-2351,-103
26,-1119,1091
346,-2985,342
366,-3059,397
377,-2827,367
390,-675,-793
396,-1931,-563
404,-588,-901
408,-1815,803
423,-701,434
432,-2009,850
443,580,662
455,729,728
456,-540,1869
459,-707,401
465,-695,1988
474,580,667
496,-1584,1900
497,-1838,-617
527,-524,1933
528,-643,409
534,-1912,768
544,-627,-890
553,345,-567
564,392,-477
568,-2007,-577
605,-1665,1952
612,-1593,1893
630,319,-379
686,-3108,-505
776,-3184,-501
846,-3110,-434
1135,-1161,1235
1243,-1093,1063
1660,-552,429
1693,-557,386
1735,-437,1738
1749,-1800,1813
1772,-405,1572
1776,-675,371
1779,-442,1789
1780,-1548,337
1786,-1538,337
1847,-1591,415
1889,-1729,1762
1994,-1805,1792
In total, there are 79 beacons.
Assemble the full map of beacons. How many beacons are there?