結果

問題 No.231 めぐるはめぐる (1)
ユーザー maimai
提出日時 2016-05-13 17:11:45
言語 Ruby
(3.3.0)
結果
AC  
実行時間 112 ms / 1,000 ms
コード長 231 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 14,976 KB
最終ジャッジ日時 2024-04-25 12:47:44
合計ジャッジ時間 2,208 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
14,976 KB
testcase_01 AC 93 ms
12,288 KB
testcase_02 AC 92 ms
12,288 KB
testcase_03 AC 99 ms
13,440 KB
testcase_04 AC 101 ms
14,080 KB
testcase_05 AC 97 ms
12,672 KB
testcase_06 AC 100 ms
13,440 KB
testcase_07 AC 91 ms
12,288 KB
testcase_08 AC 96 ms
12,544 KB
testcase_09 AC 92 ms
12,160 KB
testcase_10 AC 93 ms
12,288 KB
testcase_11 AC 91 ms
12,288 KB
testcase_12 AC 96 ms
12,928 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i

stage=[]

n.times{|i|
    g,d=gets.split(" ").map!(&:to_i)
    stage+=[[g-30000*d,i]]
}
stage.sort!{|l,r| r[0]<=>l[0]}

if (stage[0][0]*6<30000*100)
    puts "NO"
else
    puts "YES"
    6.times{puts stage[0][1]+1}
end
0