美文网首页
2018-08-27

2018-08-27

作者: zkeenly | 来源:发表于2018-08-27 20:24 被阅读0次

    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

          本文链接:https://www.haomeiwen.com/subject/pwotwftx.html