結果
| 問題 | No.1041 直線大学 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-25 14:21:14 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 150 ms / 2,000 ms |
| + 573µs | |
| コード長 | 346 bytes |
| 記録 | |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-24 08:14:37 |
| 合計ジャッジ時間 | 4,406 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)