| 5 | return abs(real(a) - real(b)) > EPS ? |
| 6 | real(a) < real(b) : imag(a) < imag(b); } }; |
| 7 | struct cmpy { bool operator ()(const point &a, |
| 8 | const point &b) const { |
| 9 | return abs(imag(a) - imag(b)) > EPS ? |
| 10 | imag(a) < imag(b) : real(a) < real(b); } }; |
| 11 | double closest_pair(vector<point> pts) { |
| 12 | sort(pts.begin(), pts.end(), cmpx()); |
| 13 | set<point, cmpy> cur; |
nothing calls this directly
no outgoing calls
no test coverage detected