結果

問題 No.231 めぐるはめぐる (1)
ユーザー Naoki_M_Naoki_M_
提出日時 2015-11-05 21:57:41
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 11,360 KB
実行使用メモリ 15,396 KB
最終ジャッジ日時 2023-10-11 14:08:38
合計ジャッジ時間 3,951 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 78 ms
15,072 KB
testcase_10 AC 80 ms
15,272 KB
testcase_11 AC 79 ms
15,188 KB
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i
is = []
exp = 0
for i in 1..n
  g, d = gets.chomp.split.map(&:to_i)
  if (3E5 - exp) / (6 - is.size) <= g - 3E4 * d
    exp += g - 3E4 * d
    is << i 
  end
end

if is.size == 0
  puts 'NO'
else
  puts 'YES'
  for i in 0..5
    puts is[i % is.size]
  end
end
0