結果

問題 No.709 優勝可能性
ユーザー kotatsugamekotatsugame
提出日時 2018-06-29 23:54:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 945 ms / 3,500 ms
コード長 198 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 11,260 KB
実行使用メモリ 25,512 KB
最終ジャッジ日時 2023-09-13 15:50:55
合計ジャッジ時間 11,008 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
16,696 KB
testcase_01 AC 79 ms
16,916 KB
testcase_02 AC 80 ms
16,696 KB
testcase_03 AC 79 ms
16,736 KB
testcase_04 AC 82 ms
16,728 KB
testcase_05 AC 81 ms
16,732 KB
testcase_06 AC 80 ms
16,920 KB
testcase_07 AC 79 ms
16,924 KB
testcase_08 AC 80 ms
16,704 KB
testcase_09 AC 80 ms
16,684 KB
testcase_10 AC 602 ms
17,916 KB
testcase_11 AC 522 ms
18,108 KB
testcase_12 AC 755 ms
18,076 KB
testcase_13 AC 857 ms
17,988 KB
testcase_14 AC 820 ms
18,024 KB
testcase_15 AC 821 ms
18,132 KB
testcase_16 AC 877 ms
20,332 KB
testcase_17 AC 945 ms
25,512 KB
testcase_18 AC 80 ms
16,884 KB
testcase_19 AC 79 ms
16,624 KB
testcase_20 AC 844 ms
17,968 KB
testcase_21 AC 841 ms
18,056 KB
testcase_22 AC 80 ms
16,884 KB
testcase_23 AC 80 ms
16,676 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,M="+gets.split*?,;U=[n=0]*M;t=[[]]*M;c=[0]*2e5;$<.map{|s|i=0;s.split.map{|x|a=x.to_i;(U[i]=a;t[i].map{|b|1>(c[b]-=1)&&n-=1};t[i]=[])if U[i]<a;(t[i]<<$.;c[$.]+=1)<2&&n+=1 if U[i]==a;i+=1};p n}
0