結果
| 問題 | No.1041 直線大学 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-09-25 14:21:14 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 256 ms / 2,000 ms | 
| コード長 | 346 bytes | 
| コンパイル時間 | 109 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-11-16 08:08:59 | 
| 合計ジャッジ時間 | 3,713 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 37 | 
ソースコード
from itertools import combinations
N = int(input())
XY = [list(map(int, input().split())) for i in range(N)]
cnt = 0
for P, Q in combinations(XY, 2):
    x1, y1 = P[0], P[1]
    x2, y2 = Q[0], Q[1]
    tmp = 0
    for x, y in XY:
        if (x1 - x) * (y1 - y2) == (x1 - x2) * (y1 - y):
            tmp += 1
    cnt = max(cnt, tmp)
print(cnt)
            
            
            
        