mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Apparantly, part 1 is fast enough for part 2.
This commit is contained in:
@@ -12,8 +12,7 @@ The current plan, in no particular order:
|
|||||||
- [x] C++ - [Day 01](./day-01/solution.cpp)
|
- [x] C++ - [Day 01](./day-01/solution.cpp)
|
||||||
- [x] C# - [Day 07](./day-07/solution.cs)
|
- [x] C# - [Day 07](./day-07/solution.cs)
|
||||||
- [x] Clojure - [Day 03](./day-03/solution.clj)
|
- [x] Clojure - [Day 03](./day-03/solution.clj)
|
||||||
- [ ] Coffeescript - [Day 21](./day-21/solution.coffee) (Need to finish
|
- [x] Coffeescript - [Day 21](./day-21/solution.coffee)
|
||||||
part 2)
|
|
||||||
- [x] Go - [Day 13](./day-13/solution.go)
|
- [x] Go - [Day 13](./day-13/solution.go)
|
||||||
- [x] Groovy - [Day 16](./day-16/solution.groovy)
|
- [x] Groovy - [Day 16](./day-16/solution.groovy)
|
||||||
- [x] Haskell - [Day 15](./day-15/solution.hs)
|
- [x] Haskell - [Day 15](./day-15/solution.hs)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ stdin.on 'end', () ->
|
|||||||
state = '.#./..#/###'
|
state = '.#./..#/###'
|
||||||
view state
|
view state
|
||||||
|
|
||||||
for _ in [1..5]
|
for _ in [1..18]
|
||||||
newrows = []
|
newrows = []
|
||||||
oldrows = state.split '/'
|
oldrows = state.split '/'
|
||||||
|
|
||||||
@@ -77,5 +77,4 @@ stdin.on 'end', () ->
|
|||||||
newrows.push row
|
newrows.push row
|
||||||
|
|
||||||
state = newrows.join '/'
|
state = newrows.join '/'
|
||||||
console.log(state.count(/#/g))
|
console.log _, state.count(/#/g)
|
||||||
view state
|
|
||||||
|
|||||||
Reference in New Issue
Block a user