結果
| 問題 | No.1041 直線大学 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-24 02:33:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 595 bytes |
| コンパイル時間 | 433 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-16 08:08:47 |
| 合計ジャッジ時間 | 2,251 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
from collections import Counter
N = int(input())
l = []
ans = 0
for i in range(N):
l.append(list(map(int, input().split())))
# print(l)
for i in range(N-1):
momx = l[i][0]
momy = l[i][1]
ckl = []
# print(i)
for j in range(i + 1,N):
# print(j)
childx = l[j][0]
childy = l[j][1]
if childy - momy == 0:
ckl.append("a")
else:
ckl.append((childx - momx) / (childy - momy))
# print(ckl)
c = Counter(ckl).most_common(1)
# print(c)
if ans < c[0][1]:
ans = c[0][1]
print(ans + 1)