第十三届JAVAB组决赛——8.围栏
import java.io.*;
import java.util.*;
public class Main{
public static BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
public static PrintWriter stdOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
public static final int N = 110;
public static double[][][] f = new double[N][N][N];
public static int[] x = new int[N];
public static int[] y = new int[N];
public static int n;
public static double getArea(int i, int j, int h) {
int ax = x[i]; int ay = y[i];
int bx = x[j]; int by = y[j];
int cx = x[h]; int cy = y[h];
return 0.5 * Math.abs((long)(bx - ax) * (cy - ay) - (long)(by - ay) * (cx - ax));
}
public static void main(String[] args) throws IOException{
n = Integer.parseInt(stdIn.readLine());
for(int i = 0; i < n; i++) {
String[] sp = stdIn.readLine().split(" ");
x[i] = Integer.parseInt(sp[0]); y[i] = Integer.parseInt(sp[1]);
}
double res = 0;
for(int k = 2; k < n - 2; k++) {
for(int i = 0; i < n; i++) {
for(int j = i + k; j < n; j++) {
for(int h = i; h <= j; h++) {
f[i][j][k] = Math.max(f[i][j][k], f[i][h][k-1] + getArea(i, j, h));
res = Math.max(f[i][j][k], res);
}
}
}
}
stdOut.println(String.format("%.0f", res * 2));
stdOut.flush();
}
}