結果

問題 No.1447 Greedy MtSaka
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-03-31 18:03:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 1,251 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-08-21 16:31:38
合計ジャッジ時間 3,674 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,316 KB
testcase_01 AC 71 ms
71,248 KB
testcase_02 AC 68 ms
71,220 KB
testcase_03 AC 70 ms
71,032 KB
testcase_04 AC 70 ms
71,316 KB
testcase_05 AC 70 ms
71,436 KB
testcase_06 AC 68 ms
71,216 KB
testcase_07 AC 70 ms
71,056 KB
testcase_08 AC 69 ms
71,400 KB
testcase_09 AC 69 ms
71,452 KB
testcase_10 AC 69 ms
71,360 KB
testcase_11 AC 68 ms
71,292 KB
testcase_12 AC 69 ms
71,460 KB
testcase_13 AC 69 ms
71,432 KB
testcase_14 AC 70 ms
71,308 KB
testcase_15 AC 69 ms
71,320 KB
testcase_16 AC 68 ms
71,392 KB
testcase_17 AC 71 ms
71,320 KB
testcase_18 AC 69 ms
71,396 KB
testcase_19 AC 70 ms
71,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xy = [list(map(int,input().split())) for i in range(n)]
ans = 0
x,y = xy[0]
for i in range(n):
    a,b = xy[i]
    xy[i] = a-x,b-y

for (a,b),(c,d) in zip(xy[1:],xy[2:]):
    ans += abs(a*d-b*c)
print(ans)
0