### TheNotoriousGB's blog

By TheNotoriousGB, history, 5 years ago,

Hi ;) can you please help me with this problem , I think its an easy dp but i cant solve :

a permutation with numbers [1, n] is called extremal if for each i ( 1 < i < n ) one of this conditions be true :

1 : pi < pi - 1 and pi < pi + 1

2 : pi > pi - 1 and pi > pi + 1

count the number of extremal permutations with size n ( n  ≤  104 ) modulo m

• +21

By TheNotoriousGB, history, 5 years ago,

Hello :) from where I cant see solutions for problems that I hadnt solve , I want to ask solutions from peoples who solved this problems: 2015 ACM Amman Collegiate Programming Contest Problems :H,L . thanks :D