BAT2 SPOJ

Правка en1, от rhezo, 2016-03-15 09:02:04

How to solve BAT2-SPOJ?

My idea is that you need to find all increasing subsequences from left (1->n), and all increasing subsequences from right (n->1). Since n can be <=100, this will take 2^100 time, which is too slow. How can it be done efficiently? Or am I thinking in the wrong direction?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский rhezo 2016-03-15 09:02:04 344 Initial revision (published)