Hey guys, I have ran across a very interesting geometry problem(at least for me). However, I am not that good at geometry and I want to ask for some help!
So the statement is the following:
We have N squares in the xy-plane given by their left bottom and right top corners. We have to count the number of visible and partially visible squares looking from the point (0,0). A square is visible(the same is for partially visible) if at least one of its segments is visible. A segment AB is visible from point O if there are no other points in the triangle OAB. So you can easily deduct that a segment is partially visible if some part of that segment is visible. Note that if a segment is visible it is partially visible too! So, anyways, I hope the problem will be interesting to solve for those have an idea and thank you in advance for your help! PS: I have an idea for full visibility but not for partial one.
Let's just give you some restrictions: N<=1000 and all coordinates given are integers and are smaller than 30 000