ADDSQURE - Editorial

upd: My solution is wrong, thanks to @vg_codechef for pointing it out.
If there is any nlogn solution, please @ me and Thanks very much.

11 Likes