Marks :30
: 3 | : 0
Sam is visiting a shopping mall. If this mall is mapped to a 2D plane - each coordinate point inside this mall (including the borders) would represent a shop. The bottom-left and top-right coordinates of this mall are (x1,y1) and (x2,y2) respectively.
Sam's wife is standing at a point (xC,yC) either inside or outside the mall.
Sam, being a caring husband, wants to always be within a distance of R from his wife. What are the total number of shops that Sam can visit?
The first line contains four integers x1,y1,x2,y2 (x1<x2) and (y1<y2) The second line contains three integers xC,yC, R.(−100000≤x1,y1,x2,y2≤100000)(−100000≤xC,yC≤100000) (0≤R≤100000).
Print one number denoting the total number of shops that Sam can visit considering the above restrictions.
-4 -9 109 213 4 4 4
49
0 0 1 1 2 2 2
1
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.