結果

問題 No.1447 Greedy MtSaka
ユーザー mrngmrng
提出日時 2021-12-15 22:06:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 71,400 KB
最終ジャッジ日時 2023-10-01 02:34:19
合計ジャッジ時間 3,208 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,332 KB
testcase_01 AC 69 ms
71,108 KB
testcase_02 AC 70 ms
71,320 KB
testcase_03 AC 72 ms
71,000 KB
testcase_04 AC 72 ms
71,368 KB
testcase_05 AC 69 ms
71,252 KB
testcase_06 AC 71 ms
71,224 KB
testcase_07 AC 69 ms
71,152 KB
testcase_08 AC 73 ms
71,400 KB
testcase_09 AC 70 ms
71,240 KB
testcase_10 AC 71 ms
71,292 KB
testcase_11 AC 71 ms
71,092 KB
testcase_12 AC 70 ms
71,148 KB
testcase_13 AC 71 ms
71,176 KB
testcase_14 AC 69 ms
71,240 KB
testcase_15 AC 70 ms
71,220 KB
testcase_16 AC 70 ms
71,324 KB
testcase_17 AC 68 ms
71,096 KB
testcase_18 AC 69 ms
71,292 KB
testcase_19 AC 70 ms
70,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x,y = [0]*n,[0]*n
for i in range(n):
	x[i],y[i] = map(int,input().split())
ans = 0
for i in range(1,n-1):
	a = [x[i]-x[0],y[i]-y[0]]
	b = [x[i+1]-x[0],y[i+1]-y[0]]
	ans += abs(a[0]*b[1]-a[1]*b[0])
print(ans)
0