結果

問題 No.975 ミスターマックスバリュ
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-01-31 21:23:12
言語 Ruby
(3.3.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 11,956 KB
実行使用メモリ 19,664 KB
最終ジャッジ日時 2023-10-17 08:33:01
合計ジャッジ時間 1,614 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
16,080 KB
testcase_01 AC 79 ms
16,080 KB
testcase_02 AC 79 ms
16,080 KB
testcase_03 AC 79 ms
16,080 KB
testcase_04 AC 79 ms
16,080 KB
testcase_05 AC 80 ms
16,080 KB
testcase_06 AC 86 ms
16,080 KB
testcase_07 AC 82 ms
16,080 KB
testcase_08 AC 103 ms
19,664 KB
testcase_09 AC 79 ms
16,080 KB
testcase_10 AC 79 ms
16,080 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:14: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Main.rb:1: warning: assigned but unused variable - n
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

x, n, m = gets.chomp.split.map(&:to_i)
a = gets.chomp.split.map(&:to_i)
b = gets.chomp.split.map(&:to_i)
f1 = a.include?(x)
f2 = b.include?(x)

if f1 & f2
  puts 'MrMaxValu'
elsif f1 & !f2
  puts 'MrMax'
elsif !f1 & f2
  puts 'MaxValu'
else
  puts -1
end
0