2018d1 solution, slow, very slow, missing framework

This commit is contained in:
Stefan Harmuth 2021-12-14 15:07:31 +01:00
parent 8d6cfe70ee
commit 520791da78
2 changed files with 1045 additions and 5 deletions

View File

@ -1,4 +1,18 @@
import std/sequtils
import tools/aoc
var test: AOCDay = initAOCDay(1)
echo test.getInput()
let test: AOCDay = initAOCDay(1)
echo test.getInputInt().foldl(a + b)
var seen: seq[int]
var freq: int = 0
var found: bool = false
while not found:
for x in test.getInputInt():
freq += x
if freq notin seen:
seen.add(freq)
else:
echo freq
found = true
break

File diff suppressed because it is too large Load Diff