結果

問題 No.1338 Giant Class
ユーザー yuruhiyayuruhiya
提出日時 2021-01-15 21:50:08
言語 Ruby
(3.3.0)
結果
AC  
実行時間 652 ms / 2,000 ms
コード長 100 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 30,804 KB
最終ジャッジ日時 2023-08-17 16:46:39
合計ジャッジ時間 9,992 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,160 KB
testcase_01 AC 81 ms
15,156 KB
testcase_02 AC 611 ms
25,740 KB
testcase_03 AC 81 ms
15,336 KB
testcase_04 AC 80 ms
15,084 KB
testcase_05 AC 81 ms
15,232 KB
testcase_06 AC 425 ms
24,896 KB
testcase_07 AC 572 ms
30,804 KB
testcase_08 AC 402 ms
24,648 KB
testcase_09 AC 385 ms
24,620 KB
testcase_10 AC 626 ms
29,888 KB
testcase_11 AC 130 ms
17,132 KB
testcase_12 AC 476 ms
28,520 KB
testcase_13 AC 395 ms
24,140 KB
testcase_14 AC 161 ms
18,776 KB
testcase_15 AC 200 ms
19,824 KB
testcase_16 AC 122 ms
17,960 KB
testcase_17 AC 399 ms
24,264 KB
testcase_18 AC 161 ms
18,868 KB
testcase_19 AC 220 ms
19,980 KB
testcase_20 AC 642 ms
29,612 KB
testcase_21 AC 652 ms
29,592 KB
testcase_22 AC 622 ms
29,588 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - q
Syntax OK

ソースコード

diff #

(h,w,q),*x=$<.map{_1.split.map &:to_i}
a=h*w
b=Hash.new(h+1)
x.map{b[_2]-=x=[b[_2]-_1,0].max;p a-=x}
0