Happy Coding

This blog is for my memorandum about programming and English.

Happy Coding

This blog is for my memorandum

2通りの全列挙 AtCoder Regular Contest 049 B - 高橋ノルム君

Problem

arc049.contest.atcoder.jp

Note

想定解のやり方と違うみたい。 nこの頂点から最も遠い2組の点が最小になるようにすればよいわけで、ある2点に対して、その2点間の間にあってそれぞれの点と距離が等しくなる任意の点との距離は、

(a.c * b.c) / (a.c + b.c) * max(fabs(a.x - b.x), fabs(a.y - b.y));

でも止まる。

code