結果
| 問題 |
No.1041 直線大学
|
| ユーザー |
nadeshino
|
| 提出日時 | 2020-05-01 21:31:16 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 541 bytes |
| コンパイル時間 | 4,647 ms |
| コンパイル使用メモリ | 65,536 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 22:08:38 |
| 合計ジャッジ時間 | 6,295 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 11 |
ソースコード
import sequtils, strutils
let read* = iterator: string {.closure.} =
while true: (for s in stdin.readLine.split: yield s)
template input*(T: static[typedesc]): untyped =
when T is int: read().parseInt
elif T is float: read().parseFloat
elif T is string: read()
let N = input(int)
let P: seq[tuple[x: int, y: int]] =
newSeqWith(N, (input(int), input(int)))
var res = 0
for a in -200 .. 200:
for b in -200 .. 200:
var cnt = 0
for (x, y) in P:
if y == a * x + b:
cnt += 1
res = max(res, cnt)
echo res
nadeshino