diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-07-04 16:45:46 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-07-04 16:45:46 +0200 |
| commit | 433efb35ed49be9f2a05e7b8bf2d1cc3987b6bb3 (patch) | |
| tree | ab5a8befcc44be71f8cb2e2e42f14bce7f1f0c51 /2022/18/b.rs | |
| parent | 19b7ee46b55ed25f77fd030ccc473c8cf95e07b5 (diff) | |
| download | aoc-433efb35ed49be9f2a05e7b8bf2d1cc3987b6bb3.tar.gz aoc-433efb35ed49be9f2a05e7b8bf2d1cc3987b6bb3.zip | |
Day 18 2022
Diffstat (limited to '2022/18/b.rs')
| -rw-r--r-- | 2022/18/b.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/2022/18/b.rs b/2022/18/b.rs new file mode 100644 index 0000000..a82c213 --- /dev/null +++ b/2022/18/b.rs | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | mod common; | ||
| 2 | use common::*; | ||
| 3 | |||
| 4 | fn main() { | ||
| 5 | let mut map = Map::from_stdin(); | ||
| 6 | let total_free = map.total_free_area(); | ||
| 7 | map.fill_exterior(); | ||
| 8 | let interior_free = map.total_free_area() - 6*MAX_LEN*MAX_LEN; | ||
| 9 | println!("{}", total_free - interior_free); | ||
| 10 | } | ||
