結果
| 問題 | No.1041 直線大学 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-07 14:45:43 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 669 bytes |
| 記録 | |
| コンパイル時間 | 607 ms |
| コンパイル使用メモリ | 31,104 KB |
| 実行使用メモリ | 22,528 KB |
| 最終ジャッジ日時 | 2026-05-07 22:43:24 |
| 合計ジャッジ時間 | 2,635 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 07 MAY 2026 10:43:21 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.091
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(x (make-array n :element-type 'integer))
(y (make-array n :element-type 'integer))
(res 0))
(dotimes (i n)
(setf (aref x i) (read)
(aref y i) (read)))
(dotimes (i n)
(dotimes (j i)
(let ((a 0))
(dotimes (k n)
(incf a (if (zerop (- (* (- (aref x k) (aref x j)) (- (aref y i) (aref y j)))
(* (- (aref x i) (aref x j)) (- (aref y k) (aref y j)))))
1
0)))
(setq res (max res a)))))
(format t "~d~%" res)))
(main)
Common Lisp