結果

問題 No.975 ミスターマックスバリュ
ユーザー yocto_sothoth
提出日時 2020-08-10 05:23:35
言語 Ruby
(3.4.1)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 15,104 KB
最終ジャッジ日時 2024-10-06 01:26:45
合計ジャッジ時間 1,709 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:15: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

x, _n, _m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
b = gets.split.map(&:to_i)

cond1 = a.member?(x)
cond2 = b.member?(x)

if cond1 && !cond2
  puts :MrMax
elsif !cond1 && cond2
  puts :MaxValu
elsif cond1 && cond2
  puts :MrMaxValu
else
  puts -1
end
0