結果
| 問題 |
No.709 優勝可能性
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-29 23:01:51 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 376 bytes |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 154,780 KB |
| 最終ジャッジ日時 | 2024-07-01 00:09:02 |
| 合計ジャッジ時間 | 6,561 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 10 TLE * 1 -- * 11 |
コンパイルメッセージ
Syntax OK
ソースコード
N, M = gets.split.map &:to_i
R = $<.map{|s| s.split.map &:to_i }
maximum = M.times.map{ [0, 0]}
R.each_with_index{|r, i|
maximum = maximum.zip(r).map{|(max, idxs), x|
flg = 1<<i
case x <=> max
when 1
[x, flg]
when -1
[max, idxs]
else
[max, idxs|flg]
end
}
p maximum.map{|max, idxs|
idxs
}.inject(:|).to_s(2).count(?1)
}