結果

問題 No.1447 Greedy MtSaka
ユーザー あかりきあかりき
提出日時 2021-04-11 20:25:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-09-09 22:23:29
合計ジャッジ時間 3,302 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,232 KB
testcase_01 AC 71 ms
71,180 KB
testcase_02 AC 71 ms
71,328 KB
testcase_03 AC 72 ms
71,252 KB
testcase_04 AC 76 ms
71,444 KB
testcase_05 AC 72 ms
71,180 KB
testcase_06 AC 71 ms
71,004 KB
testcase_07 AC 70 ms
71,192 KB
testcase_08 AC 70 ms
71,312 KB
testcase_09 AC 70 ms
71,460 KB
testcase_10 AC 70 ms
71,336 KB
testcase_11 AC 71 ms
71,260 KB
testcase_12 AC 69 ms
71,344 KB
testcase_13 AC 70 ms
71,408 KB
testcase_14 AC 71 ms
71,372 KB
testcase_15 AC 69 ms
71,008 KB
testcase_16 AC 71 ms
71,156 KB
testcase_17 AC 70 ms
71,364 KB
testcase_18 AC 69 ms
71,004 KB
testcase_19 AC 70 ms
71,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[list(map(int,input().split())) for i in range(n)]
ans=0
for i in range(1,n-1):
  x1=l[i][0]-l[0][0];y1=l[i][1]-l[0][1]
  x2=l[i+1][0]-l[0][0];y2=l[i+1][1]-l[0][1]
  ans+=abs(x1*y2-y1*x2)
print(ans)
0