結果
| 問題 |
No.1041 直線大学
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2020-05-01 21:28:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 49 ms / 2,000 ms |
| コード長 | 392 bytes |
| コンパイル時間 | 148 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,776 KB |
| 最終ジャッジ日時 | 2024-11-16 07:44:57 |
| 合計ジャッジ時間 | 2,679 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
N=int(input())
P=[tuple(map(int,input().split())) for i in range(N)]
ANS=2
from collections import Counter
from fractions import Fraction
for i in range(N-2):
x,y=P[i]
C=Counter()
for j in range(i+1,N):
x2,y2=P[j]
if x2==x:
C["a"]+=1
else:
C[Fraction((y2-y),(x2-x))]+=1
#print(C)
ANS=max(ANS,max(C.values())+1)
print(ANS)
titia