#include #include #include #include using namespace std; typedef long long llong; int n,k; pair pts[52]; pair p[52]; int L = 0; int pivot; llong dist(llong x,llong y) { return x*x + y*y; } llong CP(llong x1,llong y1,llong x2,llong y2) { return x1 * y2 - x2 * y1; } llong ABS(llong a) { if (a < 0) return -a; else return a; } llong area(pair p1,pair p2,pair p3) { return ABS(CP(p1.first-p3.first,p1.second-p3.second,p2.first-p3.first,p2.second-p3.second)); } bool SP(pair p1,pair p2) { llong cval = CP(p1.first - pts[pivot].first, p1.second - pts[pivot].second, p2.first - pts[pivot].first, p2.second - pts[pivot].second); if (cval != 0) return cval > 0; else return dist(p1.first - pts[pivot].first, p1.second - pts[pivot].second) > dist(p2.first - pts[pivot].first, p2.second - pts[pivot].second); } bool leftTurn(pair p1,pair p2,pair p3) { return CP(p2.first-p1.first,p2.second-p1.second,p3.first-p1.first,p3.second-p1.second) > 0; } llong F[52][52][52]; llong solve(int ind1, int ind2, int cnt) { if (cnt < 2) return -2LL; if (cnt == 2) { if (ind1 == 1) return 0LL; else return -2LL; } if (cnt == k) { if (!leftTurn(p[ind1],p[ind2],p[1])) return -2LL; } if (F[ind1][ind2][cnt] != -1LL) return F[ind1][ind2][cnt]; llong ans = -2LL; int i; for (i=1;i ans) ans = res; } } if (ans != -2LL) ans += area(p[ind1], p[ind2], p[1]); F[ind1][ind2][cnt] = ans; return ans; } int main() { freopen("farm.in","r",stdin); freopen("farm.out","w",stdout); int i,j,in; llong ans = -1; llong cur; scanf("%d %d",&n,&k); for (i=1;i<=n;i++) { scanf("%d %d",&pts[i].first,&pts[i].second); } for (i=1;i<=n;i++) { pivot = i; L = 0; L = 1; p[1] = pts[i]; for (j=1;j<=n;j++) { if (j == i) continue; if (pts[j].second < pts[i].second || (pts[j].second == pts[i].second && pts[j].first < pts[i].first)) continue; L++; p[L] = pts[j]; } if (L < k) continue; if (L > 2) sort(p+2,p+1+L,SP); memset(F,-1,sizeof(F)); for (j=2;j<=L;j++) { for (in=1;in ans) ans = cur; } } } printf("%lld\n",ans); return 0; }