summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-12-21 15:00:42 -0500
committerJune McEnroe <june@causal.agency>2020-11-22 00:14:26 -0500
commite6f8d30c6b0db6130951b47b37cc2e0ced3a1fde (patch)
treed67cfdbcc54b3f0949c3c6b3289fc1db503e807c
parent"Solve" day 17 part 1 (diff)
downloadaoc-e6f8d30c6b0db6130951b47b37cc2e0ced3a1fde.tar.gz
aoc-e6f8d30c6b0db6130951b47b37cc2e0ced3a1fde.zip
"Solve" day 17 part 2
Diffstat (limited to '')
-rw-r--r--2018/day17.c3
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);
 }
e for file diff functionsLars Hjemli 2007-05-13Show number of changed files in log viewLars Hjemli 2007-05-13Use standard tree-diff function when showing diffstat for single commitLars Hjemli 2007-05-13Add shared diff-handling functionsLars Hjemli 2007-05-12css: fix bad rendering in Internet ExplorerLars Hjemli 2007-05-11Add links to enable downloading of tagged blobsLars Hjemli 2007-05-11Makefile: add support for building w.o. preinstalled gitLars Hjemli 2007-05-11Tag release v0.3Lars Hjemli 2007-05-11Update README with submodule build infoLars Hjemli 2007-05-11Add submodule links in tree listingLars Hjemli 2007-05-11Add submodules.sh and use it during buildsLars Hjemli 2007-05-11Added git as a submoduleLars Hjemli 2007-05-09Add support for downloading single blobsLars Hjemli 2007-05-08ui-view: show pathname if specified in querystringLars Hjemli 2007-05-08Update to libgit 1.5.2-rc2Lars Hjemli 2007-02-21Layout updateLars Hjemli 2007-02-08Make snapshot feature configurableLars Hjemli 2007-02-08Add support for snapshotsLars Hjemli 2007-02-05cgit v0.2Lars Hjemli 2007-02-05Add support for prefix and gitsrc arguments to 'make'Lars Hjemli 2007-02-04Update cgitrc templateLars Hjemli 2007-02-04Add support for lightweight tagsLars Hjemli 2007-02-04Read repo-info from /etc/cgitrcLars Hjemli 2007-02-04Do not die if tag has no messageLars Hjemli 2007-02-03Fix search for non-virtual urlsLars Hjemli 2007-01-28Update README with install/config informationLars Hjemli