結果

問題 No.1199 お菓子配り-2
ユーザー yuruhiyayuruhiya
提出日時 2020-08-30 10:41:06
言語 Ruby
(3.3.0)
結果
AC  
実行時間 357 ms / 1,000 ms
コード長 141 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 13,696 KB
最終ジャッジ日時 2024-04-27 01:44:40
合計ジャッジ時間 15,394 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
12,160 KB
testcase_01 AC 84 ms
12,416 KB
testcase_02 AC 79 ms
12,288 KB
testcase_03 AC 146 ms
13,184 KB
testcase_04 AC 246 ms
13,312 KB
testcase_05 AC 92 ms
12,672 KB
testcase_06 AC 97 ms
12,416 KB
testcase_07 AC 160 ms
12,800 KB
testcase_08 AC 196 ms
12,928 KB
testcase_09 AC 155 ms
12,928 KB
testcase_10 AC 107 ms
12,672 KB
testcase_11 AC 141 ms
12,800 KB
testcase_12 AC 138 ms
12,672 KB
testcase_13 AC 108 ms
12,672 KB
testcase_14 AC 107 ms
12,800 KB
testcase_15 AC 104 ms
12,544 KB
testcase_16 AC 196 ms
12,928 KB
testcase_17 AC 141 ms
13,056 KB
testcase_18 AC 199 ms
13,312 KB
testcase_19 AC 118 ms
13,056 KB
testcase_20 AC 287 ms
13,312 KB
testcase_21 AC 213 ms
13,440 KB
testcase_22 AC 156 ms
13,312 KB
testcase_23 AC 179 ms
13,184 KB
testcase_24 AC 217 ms
13,312 KB
testcase_25 AC 109 ms
12,416 KB
testcase_26 AC 227 ms
13,440 KB
testcase_27 AC 201 ms
13,568 KB
testcase_28 AC 347 ms
13,440 KB
testcase_29 AC 340 ms
13,568 KB
testcase_30 AC 338 ms
13,696 KB
testcase_31 AC 332 ms
13,440 KB
testcase_32 AC 340 ms
13,440 KB
testcase_33 AC 345 ms
13,440 KB
testcase_34 AC 346 ms
13,568 KB
testcase_35 AC 344 ms
13,440 KB
testcase_36 AC 342 ms
13,568 KB
testcase_37 AC 340 ms
13,440 KB
testcase_38 AC 340 ms
13,440 KB
testcase_39 AC 342 ms
13,440 KB
testcase_40 AC 341 ms
13,568 KB
testcase_41 AC 357 ms
13,440 KB
testcase_42 AC 339 ms
13,440 KB
testcase_43 AC 339 ms
13,568 KB
testcase_44 AC 339 ms
13,696 KB
testcase_45 AC 334 ms
13,696 KB
testcase_46 AC 337 ms
13,440 KB
testcase_47 AC 335 ms
13,440 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

n, m = gets.split.map &:to_i
x, y = 0, 0
(1..n).map do
	a = gets.split.sum &:to_i
	x, y = [x, y + a].max, [y, x - a].max
end
puts [x, y].max
0