結果

問題 No.216 FAC
ユーザー Common Lisp
提出日時 2024-10-08 17:17:20
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 10 ms / 1,000 ms
コード長 544 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 37,404 KB
実行使用メモリ 21,888 KB
最終ジャッジ日時 2024-10-08 17:17:22
合計ジャッジ時間 1,610 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 OCT 2024 05:17:20 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.085

ソースコード

diff #

; 全ての参加者の得点表を作り記録していく
; プロの得点が最大値であれば YES その他は NO を出力する
(defun main ()
  (let* ((n (read))
         (scores (loop repeat n collect (read)))
         (score-table (make-array 101 :initial-element 0)))
    (loop for score in scores
          for solver = (read)
          do (incf (aref score-table solver) score))
    (princ (if (= (aref score-table 0)
                  (reduce #'max score-table))
               "YES"
               "NO"))
    (terpri)))
(main)
0