結果

問題 No.162 8020運動
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-03-06 00:26:53
言語 Ruby
(3.2.2)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 237 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 11,272 KB
実行使用メモリ 15,468 KB
最終ジャッジ日時 2023-08-26 23:14:08
合計ジャッジ時間 4,107 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,348 KB
testcase_01 AC 96 ms
15,160 KB
testcase_02 AC 94 ms
15,200 KB
testcase_03 AC 98 ms
15,380 KB
testcase_04 AC 98 ms
15,200 KB
testcase_05 AC 96 ms
15,456 KB
testcase_06 AC 97 ms
15,464 KB
testcase_07 AC 98 ms
15,236 KB
testcase_08 AC 97 ms
15,356 KB
testcase_09 AC 84 ms
15,136 KB
testcase_10 AC 93 ms
15,260 KB
testcase_11 AC 92 ms
15,424 KB
testcase_12 AC 86 ms
15,044 KB
testcase_13 AC 100 ms
15,420 KB
testcase_14 AC 86 ms
15,152 KB
testcase_15 AC 86 ms
15,352 KB
testcase_16 AC 89 ms
15,236 KB
testcase_17 AC 85 ms
15,028 KB
testcase_18 AC 94 ms
15,280 KB
testcase_19 AC 94 ms
15,464 KB
testcase_20 AC 95 ms
15,384 KB
testcase_21 AC 95 ms
15,360 KB
testcase_22 AC 94 ms
15,192 KB
testcase_23 AC 95 ms
15,468 KB
testcase_24 AC 95 ms
15,420 KB
testcase_25 AC 95 ms
15,256 KB
testcase_26 AC 84 ms
15,276 KB
testcase_27 AC 91 ms
15,188 KB
testcase_28 AC 98 ms
15,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N=80-gets.to_i
P=gets.split.map &:to_i
f=(0..14).to_a
N.times{m=14
(q=[1]+(1..m).map{|k|P[m<2?0:k<2||k>m-1?1:2]/1e2}+[1]
s=0
1.upto(m){|i|i.upto(m+1){|j|t=f[j-i]*q[i-1]*q[j];q[i...j].map{|r|t*=1-r};s+=t}}
f[m]=s
m-=1)until m<0}
p f[14]*2
0