結果

問題 No.504 ゲーム大会(ランキング)
ユーザー sei0osei0o
提出日時 2017-05-19 17:48:23
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 161 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 11,880 KB
実行使用メモリ 69,284 KB
最終ジャッジ日時 2023-10-19 02:48:57
合計ジャッジ時間 4,507 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
20,448 KB
testcase_01 AC 85 ms
16,100 KB
testcase_02 AC 86 ms
16,100 KB
testcase_03 AC 86 ms
16,100 KB
testcase_04 AC 89 ms
16,100 KB
testcase_05 AC 86 ms
16,100 KB
testcase_06 AC 87 ms
16,100 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
k = gets.to_i
scores = [k]
puts 1
(n-1).times do |i|
  scores << gets.to_i
  scores = scores.sort { |a, b| b - a }

  puts scores.index(k) + 1
end
0