結果

問題 No.1041 直線大学
ユーザー anagohirameanagohirame
提出日時 2020-05-01 21:51:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 76,768 KB
最終ジャッジ日時 2023-08-26 09:17:08
合計ジャッジ時間 5,639 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,428 KB
testcase_01 AC 72 ms
71,152 KB
testcase_02 AC 72 ms
71,284 KB
testcase_03 AC 72 ms
71,420 KB
testcase_04 AC 71 ms
71,064 KB
testcase_05 AC 70 ms
71,276 KB
testcase_06 AC 72 ms
71,248 KB
testcase_07 AC 123 ms
76,520 KB
testcase_08 AC 79 ms
76,520 KB
testcase_09 AC 83 ms
76,520 KB
testcase_10 AC 92 ms
76,768 KB
testcase_11 AC 92 ms
76,512 KB
testcase_12 AC 86 ms
76,580 KB
testcase_13 AC 88 ms
76,496 KB
testcase_14 AC 88 ms
76,372 KB
testcase_15 AC 86 ms
76,672 KB
testcase_16 AC 88 ms
76,532 KB
testcase_17 AC 79 ms
76,264 KB
testcase_18 AC 88 ms
76,536 KB
testcase_19 AC 89 ms
76,532 KB
testcase_20 AC 72 ms
71,128 KB
testcase_21 AC 86 ms
76,532 KB
testcase_22 AC 72 ms
71,276 KB
testcase_23 AC 93 ms
76,520 KB
testcase_24 AC 87 ms
76,632 KB
testcase_25 AC 85 ms
76,376 KB
testcase_26 AC 81 ms
76,548 KB
testcase_27 AC 87 ms
76,644 KB
testcase_28 AC 74 ms
71,204 KB
testcase_29 AC 73 ms
71,204 KB
testcase_30 AC 71 ms
70,972 KB
testcase_31 AC 70 ms
71,240 KB
testcase_32 AC 70 ms
71,300 KB
testcase_33 AC 71 ms
71,324 KB
testcase_34 AC 71 ms
71,152 KB
testcase_35 AC 71 ms
71,212 KB
testcase_36 AC 71 ms
71,196 KB
testcase_37 AC 71 ms
70,968 KB
testcase_38 AC 95 ms
76,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

EPS = 1e-7

#外積
def OuterProduct(one, two):
	tmp = one.conjugate() * two
	return tmp.imag

#点が直線上にあるか
def IsOnLine(point, begin, end):
	return abs(OuterProduct(begin-point, end-point)) <= EPS

n = int(input())
d = []
for _ in range(n):
	x, y = map(int, input().split())
	d.append(complex(x, y))

ans = 0
for i in range(n):
	for j in range(i+1, n):
		tmp = 0
		for k in range(n):
			tmp += IsOnLine(d[k], d[i], d[j])
		ans = max(ans, tmp)
print(ans) 
0