bodicsek 4 lat temu
commit
4727a89e1f
8 zmienionych plików z 2198 dodań i 0 usunięć
  1. 18 0
      .editorconfig
  2. 1 0
      .gitignore
  3. 1 0
      .npmrc
  4. 45 0
      day01/day01.ts
  5. 2002 0
      day01/input1.ts
  6. 110 0
      package-lock.json
  7. 18 0
      package.json
  8. 3 0
      tsconfig.json

+ 18 - 0
.editorconfig

@@ -0,0 +1,18 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+node_modules

+ 1 - 0
.npmrc

@@ -0,0 +1 @@
+registry=https://artifactory.oci.oraclecorp.com/api/npm/global-dev-npm/

+ 45 - 0
day01/day01.ts

@@ -0,0 +1,45 @@
+
+import { init, reduce, tail, zip, zipWith, map } from "fp-ts/lib/Array";
+import { pipe } from "fp-ts/lib/function";
+import { MonoidSum, Ord } from "fp-ts/lib/number";
+import { getOrElse, chain } from "fp-ts/lib/Option";
+import { lt } from "fp-ts/lib/Ord";
+import { concatAll } from "fp-ts/lib/Monoid";
+
+import { depthMeasurements } from "./input1";
+
+const increaseCount = (as: number[]): number => pipe(
+  zip(
+    pipe(as, init, getOrElse<number[]>(() => [])),
+    pipe(as, tail, getOrElse<number[]>(() => []))
+  ),
+  map(([a, b]) => lt(Ord)(a, b)),
+  reduce(0, (acc, n) => n ? acc + 1 : acc)
+);
+
+const increases = pipe(
+  depthMeasurements,
+  increaseCount
+);
+
+console.log("the number of times a depth measurement increases", increases);
+
+const slidingWindows = (as: number[]): [number, number, number][] => pipe(
+  zip(
+    zip(
+      pipe(as, init, getOrElse<number[]>(() => [])),
+      pipe(as, tail, getOrElse<number[]>(() => []))
+    ),
+    pipe(as, tail, chain(tail), getOrElse<number[]>(() => [])),
+  ),
+  map(([[a, b], c]) => [a, b, c])
+);
+
+const slidingWindowSumsIncreases = pipe(
+  depthMeasurements,
+  slidingWindows,
+  map(concatAll(MonoidSum)),
+  increaseCount
+);
+
+console.log("the number of times a 3 length sliding window measurement sum increases", slidingWindowSumsIncreases);

+ 2002 - 0
day01/input1.ts

@@ -0,0 +1,2002 @@
+export const depthMeasurements = [
+  104,
+  111,
+  124,
+  139,
+  142,
+  141,
+  144,
+  151,
+  152,
+  154,
+  157,
+  156,
+  157,
+  149,
+  123,
+  118,
+  129,
+  133,
+  134,
+  130,
+  124,
+  102,
+  103,
+  105,
+  104,
+  99,
+  100,
+  101,
+  103,
+  116,
+  114,
+  129,
+  135,
+  147,
+  149,
+  148,
+  149,
+  137,
+  140,
+  149,
+  159,
+  157,
+  159,
+  165,
+  164,
+  170,
+  176,
+  180,
+  192,
+  198,
+  200,
+  202,
+  203,
+  202,
+  211,
+  212,
+  230,
+  233,
+  237,
+  229,
+  226,
+  229,
+  234,
+  242,
+  245,
+  244,
+  242,
+  256,
+  258,
+  262,
+  267,
+  269,
+  285,
+  274,
+  279,
+  270,
+  302,
+  305,
+  308,
+  320,
+  323,
+  324,
+  323,
+  325,
+  358,
+  361,
+  367,
+  364,
+  363,
+  351,
+  352,
+  350,
+  349,
+  355,
+  356,
+  359,
+  367,
+  375,
+  405,
+  413,
+  417,
+  425,
+  428,
+  436,
+  437,
+  438,
+  430,
+  429,
+  430,
+  431,
+  442,
+  451,
+  459,
+  460,
+  473,
+  481,
+  482,
+  483,
+  485,
+  491,
+  501,
+  499,
+  532,
+  533,
+  538,
+  540,
+  514,
+  505,
+  511,
+  508,
+  509,
+  507,
+  519,
+  521,
+  492,
+  493,
+  498,
+  497,
+  499,
+  510,
+  508,
+  501,
+  507,
+  509,
+  528,
+  529,
+  539,
+  545,
+  546,
+  575,
+  577,
+  599,
+  600,
+  602,
+  609,
+  634,
+  635,
+  637,
+  652,
+  660,
+  692,
+  677,
+  676,
+  679,
+  682,
+  683,
+  684,
+  688,
+  687,
+  688,
+  709,
+  708,
+  710,
+  713,
+  714,
+  729,
+  724,
+  723,
+  725,
+  728,
+  727,
+  722,
+  728,
+  759,
+  760,
+  764,
+  771,
+  754,
+  768,
+  761,
+  767,
+  798,
+  791,
+  811,
+  812,
+  831,
+  834,
+  842,
+  854,
+  855,
+  863,
+  864,
+  868,
+  882,
+  887,
+  891,
+  899,
+  902,
+  903,
+  906,
+  908,
+  915,
+  943,
+  937,
+  941,
+  928,
+  941,
+  928,
+  922,
+  924,
+  940,
+  950,
+  949,
+  950,
+  951,
+  947,
+  948,
+  955,
+  958,
+  960,
+  963,
+  956,
+  955,
+  957,
+  960,
+  965,
+  966,
+  967,
+  968,
+  969,
+  977,
+  945,
+  929,
+  925,
+  926,
+  939,
+  943,
+  944,
+  956,
+  965,
+  961,
+  968,
+  967,
+  966,
+  970,
+  968,
+  973,
+  975,
+  990,
+  1003,
+  1005,
+  1006,
+  1009,
+  1011,
+  1009,
+  1015,
+  1016,
+  1015,
+  1000,
+  1005,
+  1009,
+  1005,
+  1011,
+  1008,
+  1017,
+  1016,
+  1017,
+  1018,
+  1013,
+  1012,
+  1015,
+  1012,
+  1003,
+  1004,
+  1005,
+  1008,
+  1016,
+  1021,
+  1023,
+  1051,
+  1052,
+  1057,
+  1059,
+  1067,
+  1064,
+  1060,
+  1062,
+  1071,
+  1065,
+  1077,
+  1079,
+  1081,
+  1085,
+  1091,
+  1089,
+  1092,
+  1093,
+  1103,
+  1083,
+  1102,
+  1111,
+  1113,
+  1120,
+  1131,
+  1132,
+  1152,
+  1153,
+  1162,
+  1161,
+  1160,
+  1145,
+  1154,
+  1159,
+  1148,
+  1160,
+  1161,
+  1162,
+  1187,
+  1193,
+  1184,
+  1192,
+  1190,
+  1191,
+  1196,
+  1200,
+  1205,
+  1207,
+  1209,
+  1208,
+  1209,
+  1210,
+  1211,
+  1223,
+  1225,
+  1226,
+  1227,
+  1217,
+  1211,
+  1212,
+  1216,
+  1209,
+  1210,
+  1219,
+  1218,
+  1219,
+  1220,
+  1219,
+  1220,
+  1215,
+  1242,
+  1246,
+  1247,
+  1233,
+  1264,
+  1297,
+  1284,
+  1288,
+  1313,
+  1333,
+  1339,
+  1334,
+  1341,
+  1345,
+  1351,
+  1350,
+  1353,
+  1349,
+  1352,
+  1351,
+  1352,
+  1353,
+  1355,
+  1333,
+  1334,
+  1335,
+  1336,
+  1337,
+  1309,
+  1316,
+  1315,
+  1316,
+  1325,
+  1343,
+  1345,
+  1347,
+  1334,
+  1337,
+  1336,
+  1337,
+  1343,
+  1346,
+  1347,
+  1342,
+  1328,
+  1326,
+  1327,
+  1328,
+  1320,
+  1324,
+  1334,
+  1336,
+  1337,
+  1338,
+  1348,
+  1350,
+  1358,
+  1374,
+  1377,
+  1380,
+  1366,
+  1368,
+  1372,
+  1376,
+  1377,
+  1380,
+  1382,
+  1392,
+  1396,
+  1402,
+  1407,
+  1408,
+  1423,
+  1428,
+  1422,
+  1424,
+  1427,
+  1440,
+  1439,
+  1438,
+  1454,
+  1460,
+  1461,
+  1462,
+  1466,
+  1471,
+  1470,
+  1448,
+  1455,
+  1460,
+  1470,
+  1480,
+  1488,
+  1497,
+  1502,
+  1503,
+  1505,
+  1502,
+  1503,
+  1510,
+  1519,
+  1523,
+  1526,
+  1527,
+  1526,
+  1530,
+  1526,
+  1536,
+  1534,
+  1539,
+  1553,
+  1557,
+  1562,
+  1569,
+  1570,
+  1584,
+  1601,
+  1564,
+  1577,
+  1582,
+  1584,
+  1585,
+  1586,
+  1589,
+  1583,
+  1595,
+  1608,
+  1612,
+  1610,
+  1605,
+  1611,
+  1615,
+  1619,
+  1620,
+  1621,
+  1624,
+  1626,
+  1628,
+  1621,
+  1635,
+  1637,
+  1645,
+  1646,
+  1656,
+  1658,
+  1657,
+  1667,
+  1672,
+  1674,
+  1675,
+  1678,
+  1692,
+  1693,
+  1696,
+  1713,
+  1714,
+  1715,
+  1734,
+  1736,
+  1738,
+  1756,
+  1757,
+  1780,
+  1772,
+  1777,
+  1776,
+  1783,
+  1786,
+  1792,
+  1791,
+  1792,
+  1797,
+  1799,
+  1794,
+  1811,
+  1795,
+  1793,
+  1780,
+  1782,
+  1791,
+  1789,
+  1800,
+  1799,
+  1797,
+  1814,
+  1812,
+  1818,
+  1842,
+  1853,
+  1871,
+  1872,
+  1876,
+  1877,
+  1882,
+  1883,
+  1874,
+  1876,
+  1879,
+  1893,
+  1894,
+  1911,
+  1877,
+  1880,
+  1883,
+  1884,
+  1887,
+  1885,
+  1892,
+  1897,
+  1912,
+  1917,
+  1931,
+  1934,
+  1935,
+  1926,
+  1930,
+  1945,
+  1943,
+  1942,
+  1943,
+  1941,
+  1943,
+  1947,
+  1941,
+  1950,
+  1955,
+  1980,
+  1981,
+  1986,
+  1987,
+  2000,
+  2005,
+  1999,
+  2009,
+  2010,
+  2006,
+  1998,
+  1999,
+  2009,
+  2016,
+  2017,
+  1984,
+  1985,
+  1986,
+  1985,
+  1988,
+  2011,
+  2018,
+  2019,
+  2023,
+  2026,
+  2034,
+  2041,
+  2043,
+  2060,
+  2068,
+  2072,
+  2079,
+  2082,
+  2083,
+  2077,
+  2109,
+  2111,
+  2118,
+  2146,
+  2149,
+  2151,
+  2148,
+  2147,
+  2137,
+  2138,
+  2128,
+  2138,
+  2139,
+  2163,
+  2164,
+  2194,
+  2196,
+  2197,
+  2198,
+  2199,
+  2201,
+  2211,
+  2242,
+  2244,
+  2248,
+  2225,
+  2226,
+  2235,
+  2231,
+  2232,
+  2233,
+  2234,
+  2237,
+  2233,
+  2232,
+  2235,
+  2217,
+  2228,
+  2234,
+  2235,
+  2234,
+  2237,
+  2238,
+  2249,
+  2250,
+  2252,
+  2273,
+  2261,
+  2278,
+  2279,
+  2275,
+  2274,
+  2273,
+  2271,
+  2284,
+  2289,
+  2282,
+  2284,
+  2282,
+  2283,
+  2286,
+  2288,
+  2302,
+  2321,
+  2360,
+  2368,
+  2369,
+  2364,
+  2373,
+  2379,
+  2378,
+  2386,
+  2391,
+  2398,
+  2399,
+  2400,
+  2401,
+  2409,
+  2416,
+  2414,
+  2413,
+  2412,
+  2418,
+  2406,
+  2429,
+  2449,
+  2446,
+  2449,
+  2438,
+  2448,
+  2450,
+  2413,
+  2422,
+  2424,
+  2425,
+  2429,
+  2430,
+  2431,
+  2426,
+  2428,
+  2431,
+  2417,
+  2419,
+  2420,
+  2427,
+  2421,
+  2424,
+  2433,
+  2434,
+  2435,
+  2436,
+  2462,
+  2440,
+  2443,
+  2442,
+  2454,
+  2455,
+  2458,
+  2447,
+  2448,
+  2450,
+  2455,
+  2462,
+  2464,
+  2472,
+  2477,
+  2482,
+  2483,
+  2501,
+  2511,
+  2516,
+  2517,
+  2514,
+  2520,
+  2521,
+  2525,
+  2539,
+  2553,
+  2554,
+  2543,
+  2548,
+  2544,
+  2552,
+  2551,
+  2553,
+  2589,
+  2588,
+  2594,
+  2599,
+  2614,
+  2615,
+  2629,
+  2630,
+  2639,
+  2644,
+  2646,
+  2665,
+  2657,
+  2668,
+  2669,
+  2681,
+  2680,
+  2684,
+  2691,
+  2693,
+  2686,
+  2681,
+  2680,
+  2683,
+  2687,
+  2694,
+  2696,
+  2698,
+  2702,
+  2690,
+  2694,
+  2693,
+  2698,
+  2707,
+  2716,
+  2714,
+  2713,
+  2714,
+  2724,
+  2747,
+  2748,
+  2750,
+  2752,
+  2760,
+  2756,
+  2757,
+  2755,
+  2756,
+  2762,
+  2765,
+  2778,
+  2777,
+  2778,
+  2777,
+  2775,
+  2778,
+  2770,
+  2762,
+  2754,
+  2755,
+  2757,
+  2770,
+  2771,
+  2784,
+  2815,
+  2836,
+  2837,
+  2838,
+  2839,
+  2847,
+  2848,
+  2850,
+  2826,
+  2806,
+  2820,
+  2826,
+  2827,
+  2832,
+  2837,
+  2848,
+  2859,
+  2866,
+  2865,
+  2873,
+  2874,
+  2876,
+  2879,
+  2886,
+  2861,
+  2865,
+  2876,
+  2875,
+  2872,
+  2874,
+  2879,
+  2889,
+  2899,
+  2908,
+  2909,
+  2915,
+  2903,
+  2915,
+  2925,
+  2918,
+  2919,
+  2920,
+  2936,
+  2932,
+  2922,
+  2923,
+  2935,
+  2940,
+  2947,
+  2969,
+  2963,
+  2940,
+  2944,
+  2945,
+  2949,
+  2964,
+  2967,
+  2968,
+  2985,
+  2986,
+  2973,
+  2974,
+  2969,
+  2970,
+  2965,
+  2966,
+  2967,
+  2953,
+  2957,
+  2956,
+  2964,
+  2977,
+  2974,
+  2983,
+  2996,
+  2994,
+  2992,
+  2999,
+  2988,
+  2974,
+  2980,
+  2985,
+  2986,
+  2993,
+  3007,
+  3008,
+  3007,
+  3014,
+  3013,
+  3031,
+  3027,
+  3029,
+  3026,
+  3027,
+  3035,
+  3036,
+  3037,
+  3052,
+  3054,
+  3055,
+  3059,
+  3057,
+  3059,
+  3058,
+  3064,
+  3063,
+  3065,
+  3066,
+  3070,
+  3072,
+  3104,
+  3111,
+  3103,
+  3111,
+  3112,
+  3138,
+  3137,
+  3150,
+  3137,
+  3138,
+  3139,
+  3142,
+  3154,
+  3156,
+  3157,
+  3158,
+  3160,
+  3152,
+  3157,
+  3143,
+  3147,
+  3159,
+  3161,
+  3162,
+  3160,
+  3163,
+  3164,
+  3160,
+  3161,
+  3167,
+  3181,
+  3182,
+  3190,
+  3191,
+  3193,
+  3192,
+  3193,
+  3205,
+  3206,
+  3216,
+  3229,
+  3230,
+  3228,
+  3230,
+  3218,
+  3198,
+  3205,
+  3233,
+  3234,
+  3222,
+  3217,
+  3221,
+  3242,
+  3243,
+  3258,
+  3275,
+  3276,
+  3281,
+  3283,
+  3304,
+  3303,
+  3307,
+  3309,
+  3308,
+  3307,
+  3304,
+  3315,
+  3328,
+  3355,
+  3375,
+  3368,
+  3374,
+  3403,
+  3404,
+  3406,
+  3409,
+  3411,
+  3409,
+  3392,
+  3400,
+  3404,
+  3405,
+  3406,
+  3403,
+  3405,
+  3408,
+  3430,
+  3439,
+  3440,
+  3458,
+  3461,
+  3469,
+  3484,
+  3490,
+  3491,
+  3492,
+  3506,
+  3511,
+  3513,
+  3524,
+  3525,
+  3534,
+  3535,
+  3491,
+  3493,
+  3509,
+  3538,
+  3540,
+  3545,
+  3544,
+  3543,
+  3552,
+  3554,
+  3559,
+  3565,
+  3567,
+  3576,
+  3580,
+  3581,
+  3589,
+  3594,
+  3607,
+  3615,
+  3618,
+  3638,
+  3657,
+  3665,
+  3664,
+  3665,
+  3658,
+  3665,
+  3667,
+  3668,
+  3682,
+  3684,
+  3687,
+  3699,
+  3712,
+  3716,
+  3720,
+  3728,
+  3744,
+  3742,
+  3740,
+  3752,
+  3763,
+  3760,
+  3757,
+  3760,
+  3762,
+  3767,
+  3758,
+  3738,
+  3739,
+  3737,
+  3738,
+  3762,
+  3767,
+  3792,
+  3820,
+  3821,
+  3822,
+  3824,
+  3825,
+  3829,
+  3821,
+  3794,
+  3800,
+  3799,
+  3801,
+  3800,
+  3820,
+  3835,
+  3836,
+  3856,
+  3859,
+  3867,
+  3871,
+  3888,
+  3889,
+  3893,
+  3898,
+  3897,
+  3894,
+  3921,
+  3917,
+  3916,
+  3917,
+  3925,
+  3922,
+  3923,
+  3930,
+  3931,
+  3932,
+  3935,
+  3936,
+  3948,
+  3947,
+  3948,
+  3961,
+  3968,
+  3998,
+  3999,
+  4000,
+  4001,
+  3994,
+  3977,
+  3979,
+  3980,
+  3976,
+  3982,
+  3988,
+  3992,
+  4000,
+  4001,
+  4007,
+  4008,
+  4004,
+  4038,
+  4025,
+  4005,
+  3986,
+  3987,
+  3989,
+  3991,
+  3983,
+  3982,
+  4004,
+  4005,
+  4012,
+  4040,
+  4060,
+  4070,
+  4064,
+  4086,
+  4096,
+  4100,
+  4109,
+  4117,
+  4125,
+  4142,
+  4148,
+  4149,
+  4154,
+  4153,
+  4161,
+  4162,
+  4155,
+  4157,
+  4159,
+  4161,
+  4186,
+  4202,
+  4201,
+  4202,
+  4201,
+  4207,
+  4209,
+  4212,
+  4214,
+  4211,
+  4212,
+  4232,
+  4233,
+  4239,
+  4250,
+  4243,
+  4242,
+  4246,
+  4247,
+  4246,
+  4245,
+  4244,
+  4251,
+  4255,
+  4259,
+  4261,
+  4262,
+  4270,
+  4252,
+  4267,
+  4271,
+  4272,
+  4275,
+  4277,
+  4276,
+  4277,
+  4261,
+  4275,
+  4278,
+  4283,
+  4304,
+  4314,
+  4316,
+  4323,
+  4325,
+  4324,
+  4331,
+  4342,
+  4348,
+  4352,
+  4353,
+  4362,
+  4389,
+  4387,
+  4362,
+  4360,
+  4373,
+  4392,
+  4393,
+  4397,
+  4399,
+  4400,
+  4405,
+  4410,
+  4405,
+  4406,
+  4414,
+  4403,
+  4410,
+  4413,
+  4417,
+  4440,
+  4441,
+  4442,
+  4443,
+  4446,
+  4459,
+  4468,
+  4467,
+  4475,
+  4474,
+  4467,
+  4473,
+  4474,
+  4473,
+  4472,
+  4480,
+  4467,
+  4468,
+  4475,
+  4477,
+  4478,
+  4479,
+  4492,
+  4493,
+  4501,
+  4504,
+  4503,
+  4510,
+  4476,
+  4482,
+  4484,
+  4485,
+  4486,
+  4497,
+  4505,
+  4512,
+  4518,
+  4519,
+  4521,
+  4524,
+  4526,
+  4533,
+  4555,
+  4558,
+  4573,
+  4575,
+  4576,
+  4564,
+  4559,
+  4562,
+  4573,
+  4572,
+  4577,
+  4580,
+  4568,
+  4569,
+  4570,
+  4576,
+  4577,
+  4578,
+  4568,
+  4575,
+  4582,
+  4589,
+  4586,
+  4599,
+  4603,
+  4587,
+  4618,
+  4600,
+  4599,
+  4598,
+  4607,
+  4596,
+  4608,
+  4610,
+  4622,
+  4626,
+  4650,
+  4664,
+  4679,
+  4675,
+  4687,
+  4685,
+  4684,
+  4685,
+  4680,
+  4706,
+  4704,
+  4693,
+  4705,
+  4712,
+  4713,
+  4712,
+  4718,
+  4728,
+  4733,
+  4735,
+  4759,
+  4758,
+  4763,
+  4764,
+  4766,
+  4767,
+  4793,
+  4794,
+  4795,
+  4796,
+  4791,
+  4780,
+  4761,
+  4768,
+  4771,
+  4777,
+  4778,
+  4789,
+  4788,
+  4789,
+  4795,
+  4802,
+  4791,
+  4789,
+  4790,
+  4789,
+  4801,
+  4809,
+  4812,
+  4806,
+  4826,
+  4835,
+  4838,
+  4840,
+  4846,
+  4853,
+  4856,
+  4858,
+  4859,
+  4864,
+  4862,
+  4865,
+  4867,
+  4868,
+  4872,
+  4875,
+  4866,
+  4859,
+  4860,
+  4857,
+  4866,
+  4872,
+  4873,
+  4872,
+  4884,
+  4887,
+  4885,
+  4895,
+  4898,
+  4902,
+  4901,
+  4902,
+  4898,
+  4887,
+  4886,
+  4901,
+  4913,
+  4914,
+  4915,
+  4918,
+  4920,
+  4918,
+  4959,
+  4958,
+  4953,
+  4982,
+  4987,
+  4972,
+  4988,
+  4999,
+  4996,
+  4997,
+  5022,
+  5040,
+  5038,
+  5037,
+  5059,
+  5062,
+  5096,
+  5097,
+  5102,
+  5127,
+  5138,
+  5176,
+  5175,
+  5179,
+  5180,
+  5181,
+  5180,
+  5213,
+  5216,
+  5215,
+  5214,
+  5219,
+  5222,
+  5225,
+  5227,
+  5249,
+  5286,
+  5287,
+  5288,
+  5302,
+  5306,
+  5307,
+  5316,
+  5326,
+  5328,
+  5327,
+  5326,
+  5327,
+  5305,
+  5309,
+  5310,
+  5305,
+  5318,
+  5319,
+  5322,
+  5323,
+  5333,
+  5355,
+  5359,
+  5369,
+  5368,
+  5359,
+  5384,
+  5387,
+  5420,
+  5442,
+  5453,
+  5455,
+  5454,
+  5446,
+  5445,
+  5448,
+  5455,
+  5474,
+  5472,
+  5478,
+  5482,
+  5483,
+  5490,
+  5523,
+  5534,
+  5535,
+  5536,
+  5535,
+  5537,
+  5538,
+  5544,
+  5547,
+  5539,
+  5540,
+  5558,
+  5559,
+  5573,
+  5574,
+  5578,
+  5576,
+  5584,
+  5610,
+  5618,
+  5609,
+  5600,
+  5602,
+  5627,
+  5637,
+  5607,
+  5603,
+  5612,
+  5608,
+  5611,
+  5622,
+  5623,
+  5625,
+  5626,
+  5628,
+  5634,
+  5646,
+  5655,
+  5658,
+  5667,
+  5678,
+  5682,
+  5685,
+  5708,
+  5712,
+  5711,
+  5718,
+  5716,
+  5719,
+  5720,
+  5722,
+  5753,
+  5757,
+  5752,
+  5753,
+  5768,
+  5774,
+  5750,
+  5730,
+  5728,
+  5733,
+  5734,
+  5729,
+  5743,
+  5744,
+  5746,
+  5748,
+  5757,
+  5771,
+  5779,
+  5759,
+  5763,
+  5783,
+  5796,
+  5797,
+  5799,
+  5815,
+  5816,
+  5817,
+  5831,
+  5838,
+  5834,
+  5840,
+  5846,
+  5852,
+  5850,
+  5858,
+  5861,
+  5864,
+  5867,
+  5870,
+  5879,
+  5903,
+  5904,
+  5930,
+  5931,
+  5936,
+  5939,
+  5941,
+  5943,
+  5936,
+  5938,
+  5943,
+  5951,
+  5962,
+  5955,
+  5950,
+  5945,
+  5946,
+  5951,
+  5950,
+  5951,
+  5950,
+  5956,
+  5957,
+  5959,
+  5975,
+  5977,
+  5992,
+  5994,
+  5997,
+  5999,
+  6011,
+  6012,
+  6013,
+  6014,
+  6013,
+  6028,
+  6032,
+  6058,
+  6064,
+  6065,
+  6078,
+  6079,
+  6080,
+  6086,
+  6089,
+  6091,
+  6077,
+  6083,
+  6051,
+  6044,
+  6058,
+  6062,
+  6069,
+  6050,
+  6048,
+  6058,
+  6086,
+  6093,
+  6094,
+  6106,
+  6107,
+  6115,
+  6114,
+  6115,
+  6112,
+  6117,
+  6131,
+  6130,
+  6132,
+  6140,
+  6164,
+  6167,
+  6163,
+  6177,
+  6180,
+  6181,
+  6183,
+  6184,
+  6186,
+  6193,
+  6196,
+  6197,
+  6200,
+  6201,
+  6198,
+  6202,
+  6203,
+  6193,
+  6211,
+  6227,
+  6222,
+  6223,
+  6222,
+  6224,
+  6207,
+  6197,
+  6198,
+  6196,
+  6204,
+  6206,
+  6207,
+  6210,
+  6209,
+  6210,
+  6209,
+  6229,
+  6232,
+  6233,
+  6235,
+  6237,
+  6232,
+  6254,
+  6268,
+  6275,
+  6290,
+  6292,
+  6300,
+  6301,
+  6295,
+  6297,
+  6298,
+  6301,
+  6308,
+  6317,
+  6318,
+  6326,
+  6319,
+  6320,
+  6319,
+  6321,
+  6329,
+  6332,
+  6331,
+  6342,
+  6348,
+  6369,
+  6370,
+  6390,
+  6420,
+  6423,
+  6436,
+  6437,
+  6452,
+  6444,
+  6445,
+  6456,
+  6457,
+  6444,
+  6448,
+  6457,
+  6489,
+  6491,
+  6502,
+  6507,
+  6510,
+  6495,
+  6497,
+  6505,
+  6507,
+  6511,
+  6513,
+  6516,
+  6520,
+  6523,
+  6532,
+  6534,
+  6535,
+  6548,
+  6561,
+  6560,
+  6566,
+  6567,
+  6586,
+  6589,
+  6592,
+  6598,
+  6602,
+  6603,
+  6621,
+  6630,
+  6632,
+  6634,
+  6660,
+  6661,
+  6662,
+  6642,
+  6657,
+  6659,
+  6655,
+  6658,
+  6661,
+  6662,
+  6663,
+  6672,
+  6661,
+  6664,
+  6665,
+  6678,
+  6682,
+  6683,
+  6669,
+  6663,
+  6658,
+  6663,
+  6680,
+  6685,
+  6686,
+  6687,
+  6693,
+  6687,
+  6680,
+  6686,
+  6694,
+  6676,
+  6675,
+  6695,
+  6698,
+  6716,
+  6717,
+  6720,
+  6728,
+  6734,
+  6735,
+  6733,
+  6743,
+  6745,
+  6758,
+  6757,
+  6763,
+  6762,
+  6761,
+  6790,
+  6793,
+  6798,
+  6799,
+  6807,
+  6808,
+  6822,
+  6828,
+  6795,
+  6793,
+  6795,
+  6790,
+  6791,
+  6794,
+  6799,
+  6808,
+  6815,
+  6827,
+  6856,
+  6857,
+  6882,
+  6883,
+  6885,
+  6886,
+  6903,
+  6902,
+  6903,
+  6904,
+  6892,
+  6893,
+  6912,
+  6893,
+  6888,
+  6887,
+  6891,
+  6892,
+  6891,
+  6898,
+  6899,
+  6900,
+  6901,
+  6900,
+  6901,
+  6913,
+  6914,
+  6918,
+  6932,
+  6944,
+  6945,
+  6960,
+  6963,
+  6961,
+  6966,
+  6968,
+  6974,
+  6979,
+  6980,
+  6981,
+  6982,
+  7003,
+  7023,
+  7034,
+  7035,
+  7068,
+  7087,
+  7088,
+  7089,
+  7098,
+  7104,
+  7093,
+  7095,
+  7102,
+  7129,
+  7120,
+  7123,
+  7153,
+  7155,
+  7157,
+  7158,
+  7157,
+  7151,
+  7167,
+  7190,
+  7208,
+  7197,
+  7200,
+  7201,
+  7224,
+  7223,
+  7217,
+  7224,
+  7225,
+  7227,
+  7228,
+  7233,
+  7234,
+  7265,
+  7266,
+  7267,
+  7286,
+  7296,
+  7297,
+  7299,
+  7295,
+  7296,
+  7297,
+  7283,
+  7259,
+  7255,
+  7259,
+  7260,
+  7267,
+  7275,
+  7273,
+  7274,
+  7277,
+  7276,
+  7289,
+  7291,
+  7297,
+  7298,
+  7299,
+  7298,
+  7300,
+  7307,
+  7308,
+  7312,
+  7332,
+  7341,
+  7342,
+  7335,
+  7348,
+  7349,
+  7345,
+  7344,
+  7345,
+  7358,
+  7357,
+  7359,
+  7397,
+  7398,
+  7401,
+  7406,
+  7425,
+  7424,
+  7429,
+  7430,
+  7433,
+  7435,
+  7436,
+  7437,
+  7430,
+  7429,
+  7439,
+  7440,
+  7454,
+  7456,
+  7438,
+  7439,
+  7421,
+  7439,
+  7438,
+  7441,
+  7421,
+  7422,
+  7424,
+  7440
+];

+ 110 - 0
package-lock.json

@@ -0,0 +1,110 @@
+{
+  "name": "aoc-2021",
+  "version": "0.0.1",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "@cspotcode/source-map-consumer": {
+      "version": "0.8.0",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz",
+      "integrity": "sha1-M79LeznBeIIWBvZpu8RHpqYpeGs="
+    },
+    "@cspotcode/source-map-support": {
+      "version": "0.7.0",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz",
+      "integrity": "sha1-R4mECqhZ5G0vMXNyercHxmvzRPU=",
+      "requires": {
+        "@cspotcode/source-map-consumer": "0.8.0"
+      }
+    },
+    "@tsconfig/node10": {
+      "version": "1.0.8",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@tsconfig/node10/-/node10-1.0.8.tgz",
+      "integrity": "sha1-weToDW+WT77LM1nEO9SLQPfK2tk="
+    },
+    "@tsconfig/node12": {
+      "version": "1.0.9",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@tsconfig/node12/-/node12-1.0.9.tgz",
+      "integrity": "sha1-YsH23uLr2a6tgNw6+laBDljhoEw="
+    },
+    "@tsconfig/node14": {
+      "version": "1.0.1",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@tsconfig/node14/-/node14-1.0.1.tgz",
+      "integrity": "sha1-lfLRZ/+5uNIGiwsjUwL6/U33EfI="
+    },
+    "@tsconfig/node16": {
+      "version": "1.0.2",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@tsconfig/node16/-/node16-1.0.2.tgz",
+      "integrity": "sha1-Qjx3h30Fadsg4fyAiFrEEYMUAQ4="
+    },
+    "@types/node": {
+      "version": "16.11.11",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/@types/node/-/node-16.11.11.tgz",
+      "integrity": "sha1-bqc0Lfs3nqEhCDW62oezxRISAjQ="
+    },
+    "acorn": {
+      "version": "8.6.0",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/acorn/-/acorn-8.6.0.tgz",
+      "integrity": "sha1-42kroOsaDIPqpPN/X6c2jdcUKJU="
+    },
+    "acorn-walk": {
+      "version": "8.2.0",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/acorn-walk/-/acorn-walk-8.2.0.tgz",
+      "integrity": "sha1-dBIQ8uJCZFRQiFOi9E0KuDt/acE="
+    },
+    "arg": {
+      "version": "4.1.3",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/arg/-/arg-4.1.3.tgz",
+      "integrity": "sha1-Jp/HrVuOQstjyJbVZmAXJhwUQIk="
+    },
+    "create-require": {
+      "version": "1.1.1",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/create-require/-/create-require-1.1.1.tgz",
+      "integrity": "sha1-wdfo8eX2z8n/ZfnNNS03NIdWwzM="
+    },
+    "diff": {
+      "version": "4.0.2",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/diff/-/diff-4.0.2.tgz",
+      "integrity": "sha1-YPOuy4nV+uUgwRqhnvwruYKq3n0="
+    },
+    "fp-ts": {
+      "version": "2.11.5",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/fp-ts/-/fp-ts-2.11.5.tgz",
+      "integrity": "sha1-l8zrJmVbFFLXCI1vsIZPhMzv++Q="
+    },
+    "make-error": {
+      "version": "1.3.6",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/make-error/-/make-error-1.3.6.tgz",
+      "integrity": "sha1-LrLjfqm2fEiR9oShOUeZr0hM96I="
+    },
+    "ts-node": {
+      "version": "10.4.0",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/ts-node/-/ts-node-10.4.0.tgz",
+      "integrity": "sha1-aA+IlFiF9ObPRQ5/DWIj3UBIlfc=",
+      "requires": {
+        "@cspotcode/source-map-support": "0.7.0",
+        "@tsconfig/node10": "^1.0.7",
+        "@tsconfig/node12": "^1.0.7",
+        "@tsconfig/node14": "^1.0.0",
+        "@tsconfig/node16": "^1.0.2",
+        "acorn": "^8.4.1",
+        "acorn-walk": "^8.1.1",
+        "arg": "^4.1.0",
+        "create-require": "^1.1.0",
+        "diff": "^4.0.1",
+        "make-error": "^1.1.1",
+        "yn": "3.1.1"
+      }
+    },
+    "typescript": {
+      "version": "4.5.2",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/typescript/-/typescript-4.5.2.tgz",
+      "integrity": "sha1-isH7qfUiVv2wb7ieQSL6ajRsKZg="
+    },
+    "yn": {
+      "version": "3.1.1",
+      "resolved": "https://artifactory.oci.oraclecorp.com:443/api/npm/global-dev-npm/yn/-/yn-3.1.1.tgz",
+      "integrity": "sha1-HodAGgnXZ8HV6rJqbkwYUYLS61A="
+    }
+  }
+}

+ 18 - 0
package.json

@@ -0,0 +1,18 @@
+{
+  "name": "aoc-2021",
+  "version": "0.0.1",
+  "description": "AoC 2021 puzzles",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "MIT",
+  "dependencies": {
+    "@tsconfig/node16": "^1.0.2",
+    "@types/node": "16.11.11",
+    "fp-ts": "2.11.5",
+    "ts-node": "10.4.0",
+    "typescript": "4.5.2"
+  }
+}

+ 3 - 0
tsconfig.json

@@ -0,0 +1,3 @@
+{
+  "extends": "@tsconfig/node16/tsconfig.json",
+}