This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
It was difficult today! I wandered around for hours because I couldn't fix the bug.
Part 2 macro : flooding
P1 was rather straightforward and working on P2 now.
Part 1 was nice today... Need to wrap my head around part 2 but have to hop off my laptop for a bit so will come back to it later!
I liked this challenge
It was good to wake up today with one that I finally felt comfortable with (well it turns out for part 1 at least), to get back into the pattern - a lot of catching up to do on the missed days!
For part 2 I got a solve which works for the example, but based on previous days the example doesn't cover all scenarios so I need a bit more work on that.
Only Part1 is completed.
One of my favorites this year.
easy for part 1.
part 2 is tricky as example is not that detail.
keep using outer join and generate 6 sides.
part2:
find closed area, instead of closed spot.
1. generate whole 20x20x20
2. generate 6 side for each point as well.
3. compare lava with x. y and z axis. to identify whether it blocked.
now, we have list of open and closed point (directly, have lava in front of all 6 sides.).
to settle the indirect open point, I used influence method, which
create a loop macro to check if one of the sides is open, change to open.
now we have a cleaned closed point, we just need to outer join against the part1 answers.
.
Started out by trying to do this using Spatial, but it turned out to be easier to do with a simple iterator.
Walk from the edges to find everything visible from outside
Joining it all together