Can somebody explain the solution to this geometry problem ? (AtCoder Grand Contest)

Link to the problem : - https://atcoder.jp/contests/agc001/tasks/agc001_b

Link to the editorial : - http://agc001.contest.atcoder.jp/data/agc/001/editorial.pdf

I am not able to visualize how that formula comes, can somebody explain in a simpler manner ?

Tagging @l_returns as he is good at math problems. :slight_smile:

2 Likes