結果

問題 No.975 ミスターマックスバリュ
ユーザー keiden
提出日時 2024-09-17 10:26:14
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 421 ms / 2,000 ms
コード長 627 bytes
コンパイル時間 34 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 37,564 KB
最終ジャッジ日時 2024-09-17 10:26:18
合計ジャッジ時間 2,559 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

(use scheme.list)
(use srfi.217)

(define yuki975
  (let*
    (
      (x (read))
      (n (read))
      (m (read))
      (_ (read-line))
      (mrmax (list->iset (list-tabulate n (^_ (read)))))
      (maxvalu (list->iset (list-tabulate m (^_ (read)))))
      (mr-has-x (iset-member mrmax x 0))
      (va-has-x (iset-member maxvalu x 0))
    )
    (display
      (cond
        ((and (zero? mr-has-x) (zero? va-has-x))
          "-1\n"
        )
        ((zero? mr-has-x)
          "MaxValu\n"
        )
        ((zero? va-has-x)
          "MrMax\n"
        )
        (else
          "MrMaxValu\n"
        )
      )
    )
  )
)

0