Comments
On culver0412Codeforces Round 865, 3 years ago
0

You're not alone... I also noticed the solution but I'm not sure, and I searched for evidence that led to nothing.

Hello all ! Anyone can teach me or give some ideas of how to solve the problem C with DFS iterative ? Thanks a lot !

0

Hello world !

I'm still a beginner and I'm exercising and I have a WA on test 11 on the "White sheet" problem. And I wonder what's wrong with my algorithm. My algorithm is as follows:

My solution is, is there still an area of ​​the white sheet remaining after the 2 black sheets cover it?

1) I ask if white overlap with black1 and black2 but black1 and black2 not overlap.

white_are -= intersect_area(white, black1) + intersect_area(white, black2)

2) white overlap with black1 and black2 and black1 and black2 overlap too.

white_area -= intersect_area(white, black1)+intersect_area(white, black2)-intersect_area(black1, black2)

3) white overlap with black1 and not overlap with black 2.

white_area -= intersect_area(white, black1)

4) white overlap with black2 and not overlap with black1.

white_area -= intersect_area(white, black2)

5) if white_area>0 then "YES" otherwise, "NO"

My algorithm is true? Thank you

My code is here: https://mirror.codeforces.com/contest/1216/submission/155029214