結果

問題 No.231 めぐるはめぐる (1)
ユーザー kyo1kyo1
提出日時 2020-10-04 19:49:54
言語 Ruby
(3.2.2)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 275 bytes
コンパイル時間 883 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 15,336 KB
最終ジャッジ日時 2023-09-27 00:08:42
合計ジャッジ時間 2,449 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
15,164 KB
testcase_01 AC 87 ms
15,024 KB
testcase_02 AC 85 ms
15,336 KB
testcase_03 AC 88 ms
15,136 KB
testcase_04 AC 91 ms
15,080 KB
testcase_05 AC 87 ms
15,164 KB
testcase_06 AC 86 ms
15,132 KB
testcase_07 AC 86 ms
15,144 KB
testcase_08 AC 84 ms
15,148 KB
testcase_09 AC 83 ms
15,260 KB
testcase_10 AC 83 ms
15,028 KB
testcase_11 AC 82 ms
15,036 KB
testcase_12 AC 87 ms
15,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
G, D = N.times.map { gets.split.map(&:to_i) }.transpose

m = N.times.map { |i| G[i] - 30000 * D[i] }.max
idx = 0
N.times do |i|
  if m == G[i] - 30000 * D[i]
    idx = i
  end
end

if m * 6 < 3000000
  puts "NO"
else
  puts "YES"
  6.times { puts idx + 1 }
end
0