結果
| 問題 | No.1041 直線大学 |
| コンテスト | |
| ユーザー |
wattaihei
|
| 提出日時 | 2020-05-01 21:26:20 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 223 ms / 2,000 ms |
| コード長 | 367 bytes |
| 記録 | |
| コンパイル時間 | 552 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-11 12:36:45 |
| 合計ジャッジ時間 | 8,299 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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