Bit stuck on day 9 part 2, don't know best way to solve this
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user