Kaynağa Gözat

Add start to day 14

ApisNecros 2 ay önce
ebeveyn
işleme
e91375d11f
7 değiştirilmiş dosya ile 119 ekleme ve 0 silme
  1. 5 0
      14/14_1.js
  2. 63 0
      14/input.dat
  3. 6 0
      14/sample_1.dat
  4. 7 0
      14/sample_2.dat
  5. 9 0
      14/sample_3.dat
  6. 12 0
      14/sample_4.dat
  7. 17 0
      14/sample_5.dat

+ 5 - 0
14/14_1.js

@@ -0,0 +1,5 @@
+const fs = require("node:fs");
+
+const input = fs.readFileSync("./14/input.dat", "utf8").split("\n");
+
+console.log(input);

+ 63 - 0
14/input.dat

@@ -0,0 +1,63 @@
+12 VJWQR, 1 QTBC => 6 BGXJV
+12 BGTMN, 2 DRKQR => 2 TVSF
+2 FTFK => 2 THNDN
+13 LKRTN, 7 MDPN, 12 NZKQZ => 5 LPWPD
+1 HDKX, 3 DWZS, 1 RCBQS => 1 DCRK
+14 ZCMF => 6 ZKHLC
+3 ZFVH, 2 ZCMF, 1 SCJG, 1 LQWJ, 4 BGBJ, 1 NHPR, 3 VKZFJ, 7 FWFXZ => 4 QVJMP
+11 TNMLB => 7 NVDCR
+1 LPWPD, 1 BGBJ => 2 SCJG
+3 DFCVF, 1 QGSN => 6 PQXG
+1 BGXJV, 1 THNDN => 4 BCQN
+3 LKRTN => 9 MDPN
+2 THNDN, 13 RCKZ, 10 FQSLN => 8 VKZFJ
+4 LBCZ, 9 LWHS => 1 FQSLN
+6 WSRVZ => 9 TNMLB
+8 FQSLN, 14 JQRF, 4 BGTMN => 5 QGSN
+4 ZCMF, 4 PLSM, 2 ZHTX => 8 TDHPM
+2 RSKC, 10 SHBC, 8 MDPN => 6 FMSZ
+2 VJWQR => 2 FPTV
+12 DRKQR => 6 NHPR
+35 QJLF, 22 BGTMN, 11 VJWTR, 1 QVJMP, 8 LQWJ, 1 TWLC, 16 NXZCH, 18 THKF, 42 JBLM => 1 FUEL
+2 BGTMN, 4 XJKN => 8 ZCMF
+4 TVSF => 3 RSKC
+7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 - 0
14/sample_1.dat

@@ -0,0 +1,6 @@
+10 ORE => 10 A
+1 ORE => 1 B
+7 A, 1 B => 1 C
+7 A, 1 C => 1 D
+7 A, 1 D => 1 E
+7 A, 1 E => 1 FUEL

+ 7 - 0
14/sample_2.dat

@@ -0,0 +1,7 @@
+9 ORE => 2 A
+8 ORE => 3 B
+7 ORE => 5 C
+3 A, 4 B => 1 AB
+5 B, 7 C => 1 BC
+4 C, 1 A => 1 CA
+2 AB, 3 BC, 4 CA => 1 FUEL

+ 9 - 0
14/sample_3.dat

@@ -0,0 +1,9 @@
+157 ORE => 5 NZVS
+165 ORE => 6 DCFZ
+44 XJWVT, 5 KHKGT, 1 QDVJ, 29 NZVS, 9 GPVTF, 48 HKGWZ => 1 FUEL
+12 HKGWZ, 1 GPVTF, 8 PSHF => 9 QDVJ
+179 ORE => 7 PSHF
+177 ORE => 5 HKGWZ
+7 DCFZ, 7 PSHF => 2 XJWVT
+165 ORE => 2 GPVTF
+3 DCFZ, 7 NZVS, 5 HKGWZ, 10 PSHF => 8 KHKGT

+ 12 - 0
14/sample_4.dat

@@ -0,0 +1,12 @@
+2 VPVL, 7 FWMGM, 2 CXFTF, 11 MNCFX => 1 STKFG
+17 NVRVD, 3 JNWZP => 8 VPVL
+53 STKFG, 6 MNCFX, 46 VJHF, 81 HVMC, 68 CXFTF, 25 GNMV => 1 FUEL
+22 VJHF, 37 MNCFX => 5 FWMGM
+139 ORE => 4 NVRVD
+144 ORE => 7 JNWZP
+5 MNCFX, 7 RFSQX, 2 FWMGM, 2 VPVL, 19 CXFTF => 3 HVMC
+5 VJHF, 7 MNCFX, 9 VPVL, 37 CXFTF => 6 GNMV
+145 ORE => 6 MNCFX
+1 NVRVD => 8 CXFTF
+1 VJHF, 6 MNCFX => 4 RFSQX
+176 ORE => 6 VJHF

+ 17 - 0
14/sample_5.dat

@@ -0,0 +1,17 @@
+171 ORE => 8 CNZTR
+7 ZLQW, 3 BMBT, 9 XCVML, 26 XMNCP, 1 WPTQ, 2 MZWV, 1 RJRHP => 4 PLWSL
+114 ORE => 4 BHXH
+14 VRPVC => 6 BMBT
+6 BHXH, 18 KTJDG, 12 WPTQ, 7 PLWSL, 31 FHTLT, 37 ZDVW => 1 FUEL
+6 WPTQ, 2 BMBT, 8 ZLQW, 18 KTJDG, 1 XMNCP, 6 MZWV, 1 RJRHP => 6 FHTLT
+15 XDBXC, 2 LTCX, 1 VRPVC => 6 ZLQW
+13 WPTQ, 10 LTCX, 3 RJRHP, 14 XMNCP, 2 MZWV, 1 ZLQW => 1 ZDVW
+5 BMBT => 4 WPTQ
+189 ORE => 9 KTJDG
+1 MZWV, 17 XDBXC, 3 XCVML => 2 XMNCP
+12 VRPVC, 27 CNZTR => 2 XDBXC
+15 KTJDG, 12 BHXH => 5 XCVML
+3 BHXH, 2 VRPVC => 7 MZWV
+121 ORE => 7 VRPVC
+7 XCVML => 6 RJRHP
+5 BHXH, 4 VRPVC => 5 LTCX