結果
| 問題 |
No.1041 直線大学
|
| コンテスト | |
| ユーザー |
wattaihei
|
| 提出日時 | 2020-05-01 21:26:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 222 ms / 2,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-16 07:44:01 |
| 合計ジャッジ時間 | 3,422 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
import sys
input = sys.stdin.readline
N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for i in range(N):
x1, y1 = XY[i]
for j in range(i+1, N):
x2, y2 = XY[j]
count = 0
for x, y in XY:
if (y1-y)*(x2-x) == (y2-y)*(x1-x):
count += 1
ans = max(ans, count)
print(ans)
wattaihei