結果

問題 No.975 ミスターマックスバリュ
ユーザー yocto_sothothyocto_sothoth
提出日時 2020-08-10 05:23:35
言語 Ruby
(3.3.0)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 15,232 KB
最終ジャッジ日時 2024-04-15 20:43:59
合計ジャッジ時間 1,643 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
12,288 KB
testcase_01 AC 81 ms
12,288 KB
testcase_02 AC 81 ms
12,160 KB
testcase_03 AC 82 ms
12,288 KB
testcase_04 AC 82 ms
12,160 KB
testcase_05 AC 82 ms
12,288 KB
testcase_06 AC 81 ms
12,288 KB
testcase_07 AC 81 ms
12,288 KB
testcase_08 AC 105 ms
15,232 KB
testcase_09 AC 81 ms
12,288 KB
testcase_10 AC 81 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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