diff options
author | June McEnroe <june@causal.agency> | 2018-12-21 15:00:42 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-12-21 15:00:42 -0500 |
commit | 544eb9a9f0e721b6430146696e9d994aeaf0213f (patch) | |
tree | 267303fdeb4d010414b62adda75a68c94da7b9d1 /2018 | |
parent | "Solve" day 17 part 1 (diff) | |
download | aoc-544eb9a9f0e721b6430146696e9d994aeaf0213f.tar.gz aoc-544eb9a9f0e721b6430146696e9d994aeaf0213f.zip |
"Solve" day 17 part 2
Diffstat (limited to '')
-rw-r--r-- | 2018/day17.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/2018/day17.c b/2018/day17.c index d2fd02c..4128d2e 100644 --- a/2018/day17.c +++ b/2018/day17.c @@ -78,10 +78,13 @@ int main(void) { draw(); uint count = 0; + uint settled = 0; for (uint y = minY; y <= maxY; ++y) { for (uint x = 0; x < 2048; ++x) { if (map[y][x] != '.' && map[y][x] != '#') count++; + if (map[y][x] == '~') settled++; } } printf("%u\n", count); + printf("%u\n", settled); } |