From c8d92c7874083dc178de686123068f886cb62827 Mon Sep 17 00:00:00 2001 From: Philippe Zwietering Date: Tue, 4 Jan 2022 01:18:55 +0100 Subject: [PATCH] Bit stuck on day 9 part 2, don't know best way to solve this --- advent_of_code/d9/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/advent_of_code/d9/main.cpp b/advent_of_code/d9/main.cpp index 55a2f4b..fe64098 100644 --- a/advent_of_code/d9/main.cpp +++ b/advent_of_code/d9/main.cpp @@ -67,6 +67,20 @@ int main(){ cout << result << endl; + // For the second part we need to do some kind of scanning of all points line by line + // in which we need to make sure we don't scan points multiple times. + // Im thinking of something akin to line segment intersection with a scan line + // So keep track of which regions are currently present on the scan line + // One region can occur multiple times on the scane line, + // so we have to look into which events exist + + // But now we have to keep track of the previous lines all the time as well, + // so it is not exactly the same as a scanning line thing + + // I think this doesn't work, in the worst case I think you can have situations + // in which each points gets visited n times or n / 2 or something + + cout << flush; return 0;