結果

問題 No.709 優勝可能性
ユーザー maimai
提出日時 2018-06-29 22:40:59
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 388 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 11,240 KB
実行使用メモリ 15,348 KB
最終ジャッジ日時 2023-09-13 15:26:58
合計ジャッジ時間 6,977 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,140 KB
testcase_01 AC 76 ms
15,048 KB
testcase_02 AC 76 ms
15,348 KB
testcase_03 AC 77 ms
15,056 KB
testcase_04 AC 76 ms
15,060 KB
testcase_05 AC 76 ms
15,248 KB
testcase_06 AC 77 ms
15,328 KB
testcase_07 AC 76 ms
15,044 KB
testcase_08 AC 76 ms
15,088 KB
testcase_09 AC 76 ms
15,300 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def ascan; gets.split.map(&:to_i); end

N, M = ascan

params = nil

N.times do |i|
    player = ascan
    if !params
        params = player.map{|e| [e,[i]]}
    else
        M.times do |j|
            params[j] = [player[j], []] if params[j][0] < player[j]
            params[j][1] << i if params[j][0] <= player[j]
        end
    end
    p params.map{|e| e[1]}.reduce(:+).uniq.size
end
0