constint maxn = 55; int n, cas; double x[maxn], y[maxn], d[maxn][maxn];
doublecntArea(int a, int b, int c){ returnfabs((x[b]-x[a])*(y[c]-y[a])-(y[b]-y[a])*(x[c]-x[a]))/2; }
boolisOK(int x,int y, int z){ double s = cntArea(x, y, z); for (int i = 0; i < n; ++i) { if (i == x || i == y || i ==z) continue; double tmp = cntArea(x,y,i)+cntArea(x,z,i)+cntArea(y,z,i); if (fabs(s-tmp) < 1e-6) returnfalse; } returntrue; }
intmain(){ ios::sync_with_stdio(false); cin.tie(NULL); //freopen("input.txt" , "r", stdin ); //freopen("output.txt", "w", stdout); cin >> cas; while(cas--) { cin >> n; double ans = 0x3f3f3f3f; for (int i = 0; i < n; ++i) cin >> x[i] >> y[i]; for (int i = 2; i < n; ++i) { for(int j = 0; j < n; ++j) { int a = (i+j) % n; d[j][a] = 0x3f3f3f3f; for (int k = (j+1)%n; k != a; k = (k+1)%n) { if (!isOK(j,k,a)) continue; d[j][a] = min(d[j][a], max(max(d[j][k],d[k][a]),cntArea(j,k,a))); } if (i == n-1) ans = min(ans, d[j][a]); } } cout.setf(ios::fixed); cout << setprecision(1) << ans << '\n'; } return0; }