結果
| 問題 | No.1041 直線大学 |
| コンテスト | |
| ユーザー |
wattaihei
|
| 提出日時 | 2020-05-01 21:26:20 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 141 ms / 2,000 ms |
| + 935µs | |
| コード長 | 367 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-24 06:57:02 |
| 合計ジャッジ時間 | 4,150 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_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