結果

問題 No.504 ゲーム大会(ランキング)
ユーザー sei0osei0o
提出日時 2017-05-19 17:46:03
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 170 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 11,856 KB
実行使用メモリ 45,412 KB
最終ジャッジ日時 2023-10-19 02:48:44
合計ジャッジ時間 5,725 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
20,416 KB
testcase_01 AC 85 ms
16,068 KB
testcase_02 AC 87 ms
16,068 KB
testcase_03 AC 86 ms
16,068 KB
testcase_04 AC 87 ms
16,068 KB
testcase_05 AC 85 ms
16,068 KB
testcase_06 AC 85 ms
16,068 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
scores = []
n.times do |i|
  scores << [i, gets.to_i]
  scores = scores.sort { |a, b| b[1] - a[1] }

  puts scores.index(scores.find{|a|a[0] == 0}) + 1
end
0