結果
問題 | No.1041 直線大学 |
ユーザー |
![]() |
提出日時 | 2020-05-01 21:41:55 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 582 bytes |
コンパイル時間 | 3,934 ms |
コンパイル使用メモリ | 64,640 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-16 07:51:52 |
合計ジャッジ時間 | 4,488 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
import strutilslet read = iterator: string {.closure.} =while true:for s in stdin.readLine.split:yield sproc main() =let n = read().parseInttype P = tuple[x, y: int]var pts = newSeq[P]()for i in 0..<n:let x, y = read().parseIntpts.add((x, y))var ans = 0for p in pts:for q in pts:var cnt = 2if p == q:continuefor r in pts:if p == r or q == r:continueif (r.y - p.y) * (r.x - q.x) == (r.y - q.y) * (r.x - p.x):cnt += 1ans = max(ans, cnt)echo ansmain()