結果

問題 No.709 優勝可能性
ユーザー letrangerjpletrangerjp
提出日時 2018-06-30 01:30:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,764 ms / 3,500 ms
コード長 196 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 11,292 KB
実行使用メモリ 62,060 KB
最終ジャッジ日時 2023-09-13 16:04:33
合計ジャッジ時間 17,595 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,084 KB
testcase_01 AC 79 ms
15,248 KB
testcase_02 AC 77 ms
15,240 KB
testcase_03 AC 76 ms
15,116 KB
testcase_04 AC 76 ms
15,300 KB
testcase_05 AC 77 ms
15,156 KB
testcase_06 AC 77 ms
15,336 KB
testcase_07 AC 76 ms
15,044 KB
testcase_08 AC 77 ms
15,120 KB
testcase_09 AC 76 ms
15,144 KB
testcase_10 AC 736 ms
24,896 KB
testcase_11 AC 596 ms
25,488 KB
testcase_12 AC 1,218 ms
41,556 KB
testcase_13 AC 1,764 ms
56,432 KB
testcase_14 AC 1,645 ms
56,932 KB
testcase_15 AC 1,622 ms
56,964 KB
testcase_16 AC 1,552 ms
57,884 KB
testcase_17 AC 1,594 ms
62,060 KB
testcase_18 AC 77 ms
15,268 KB
testcase_19 AC 77 ms
15,052 KB
testcase_20 AC 1,707 ms
56,468 KB
testcase_21 AC 1,551 ms
56,468 KB
testcase_22 AC 77 ms
15,172 KB
testcase_23 AC 77 ms
15,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

(N,M),*R=$<.map{|s|s.split.map &:to_i}
m=M.times.map{[0,[]]}
c=[i=a=0]*N
R.map{|r|m=m.zip(r).map{|(d,s),x|x>d&&(s.map{|j|(c[j]-=1)<1&&a-=1};d=x;s=[])
x<d||(c[i]+=1;s<<i)
[d,s]}
p a+=c[i]<=>0
i+=1}
0