TheNotoriousGB's blog

By TheNotoriousGB, history, 4 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • +21
  • Vote: I do not like it

By TheNotoriousGB, history, 4 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • +16
  • Vote: I do not like it