2018-08-27

import math;

N = input();

positions = []

for i in range(N):

  pos = raw_input().split();

  positions.append(pos);

x_max = 0;

y_max = 0;

j = 0;

while j < N - 1:

if x_max < abs(float(positions[j][0]) - float(positions[j + 1][0])):

x_max = abs(float(positions[j][0]) - float(positions[j + 1][0]));

if y_max < abs(float(positions[j][1]) - float(positions[j + 1][1])):

y_max = abs(float(positions[j][1]) - float(positions[j + 1][1]));

j = j + 1;

if not x_max:

area = y_max * y_max;

if not y_max:

area = x_max * x_max;

if x_max and y_max:

area = x_max * y_max;

print(area);

你可能感兴趣的:(2018-08-27)