結果
| 問題 |
No.1447 Greedy MtSaka
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2021-03-31 16:27:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 2,000 ms |
| コード長 | 409 bytes |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 82,628 KB |
| 実行使用メモリ | 54,460 KB |
| 最終ジャッジ日時 | 2024-12-15 03:40:53 |
| 合計ジャッジ時間 | 1,477 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
mod = 1000000007
eps = 10**-9
def main():
import sys
input = sys.stdin.readline
N = int(input())
ans = 0
x0, y0 = map(int, input().split())
x1, y1 = map(int, input().split())
for _ in range(N-2):
x, y = map(int, input().split())
ans += abs((x - x0) * (y1 - y0) - (x1 - x0) * (y - y0))
x1, y1 = x, y
print(ans)
if __name__ == '__main__':
main()
tamato