3
double largestTriangleArea(vector<vector<int>> &points) {5
for (int i = 0; i < points.size(); ++i)6
for (int j = 0; j < points.size(); ++j)8
for (int k = 0; k < points.size(); ++k)9
if (k != i and k != j) {10
// For triangle formed by 3 points a,b and c: the area will be =11
// 1/2 * [(xa*yb + xb*yc + xc*ya) - (ya*xb + yb*xc + yc*xa)]12
ans = max(ans, 0.50000 * (points[i][0] * points[j][1] + points[j][0] * points[k][1] +13
points[k][0] * points[i][1] - points[i][1] * points[j][0] -14
points[j][1] * points[k][0] - points[k][1] * points[i][0]));