結果

問題 No.1447 Greedy MtSaka
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-09-13 09:39:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 71,512 KB
最終ジャッジ日時 2023-09-07 14:29:50
合計ジャッジ時間 3,330 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,232 KB
testcase_01 AC 66 ms
71,476 KB
testcase_02 AC 66 ms
71,232 KB
testcase_03 AC 68 ms
71,324 KB
testcase_04 AC 65 ms
71,296 KB
testcase_05 AC 67 ms
71,292 KB
testcase_06 AC 64 ms
71,340 KB
testcase_07 AC 69 ms
71,512 KB
testcase_08 AC 66 ms
71,044 KB
testcase_09 AC 65 ms
71,392 KB
testcase_10 AC 65 ms
71,292 KB
testcase_11 AC 67 ms
71,056 KB
testcase_12 AC 67 ms
71,480 KB
testcase_13 AC 67 ms
71,424 KB
testcase_14 AC 66 ms
71,424 KB
testcase_15 AC 67 ms
71,212 KB
testcase_16 AC 71 ms
71,212 KB
testcase_17 AC 72 ms
71,204 KB
testcase_18 AC 65 ms
71,336 KB
testcase_19 AC 68 ms
71,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
ans = 0.0
for i in range(1,n-1):
    ans += abs((xy[0][0] - xy[i+1][0]) * (xy[i][1] - xy[i+1][1]) - (xy[i][0] - xy[i+1][0]) * (xy[0][1] - xy[i+1][1])) * 0.5
print(int(ans*2))
0