結果
| 問題 |
No.1041 直線大学
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-05-01 21:26:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 221 ms / 2,000 ms |
| コード長 | 460 bytes |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-16 07:44:25 |
| 合計ジャッジ時間 | 4,147 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read
#n,m,s = [int(i) for i in readline().split()]
n = int(input())
xy = [[int(i) for i in readline().split()] for _ in range(n)]
ans = 2
for i in range(n):
a,b = xy[i]
for j in range(i+1,n):
c,d = xy[j]
res = 0
for x,y in xy:
if (d-b)*(x-a) == (c-a)*(y-b):
res += 1
ans = max(res,ans)
print(ans)
convexineq