hdu5189.cc
#include #include #include #include using namespace std; typedef pair <double, int> dpr; const int maxn = 30009; const int maxl = 15; const int max_buf = maxn * maxl * 2; const double eps = 1e-7; const double finf = 1e20; int ibuf_arr[max_buf], *ibuf; double fbuf_arr[max_buf], *fbuf; struct edge { int t; edge *next; }; struct line { double k, b; inline double xCross(const line& a) { return (a. b - b) / (k - a....