結果

問題 No.572 妖精の演奏
ユーザー YosukeKawadaYosukeKawada
提出日時 2017-12-29 12:45:38
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 260 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 11,180 KB
実行使用メモリ 21,064 KB
最終ジャッジ日時 2023-08-23 08:57:55
合計ジャッジ時間 6,021 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,348 KB
testcase_01 AC 80 ms
15,124 KB
testcase_02 AC 77 ms
15,128 KB
testcase_03 AC 78 ms
15,140 KB
testcase_04 AC 82 ms
15,556 KB
testcase_05 AC 90 ms
15,568 KB
testcase_06 AC 106 ms
15,720 KB
testcase_07 AC 78 ms
15,036 KB
testcase_08 AC 80 ms
15,032 KB
testcase_09 AC 81 ms
15,084 KB
testcase_10 AC 204 ms
16,952 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def gl
  $stdin.gets.chomp
end

N = gl.to_i
M = gl.to_i

scores = (0...M).map{ gl.split(" ").map{ |a| a.to_i } }
status = (0...M).map{ 0 }
(N-1).times {
  ns = (0...M).map{ |j| (0...M).map{ |i| scores[i][j] + status[i] }.max }
  status = ns
}
puts status.max

0