Need help for some problems

Revision en1, by DooIt, 2015-08-10 11:58:14

I've encountered some interesting problems but I couldn't solve them. I really need some help.
First problem is: Given 3 integers N, M, X (1 <= N, M <= 105, 1 <= X <= m). Calculate the number of ways to create n segments [L1, R1], [L2, R2], …, [Ln, Rn] (Li <= Hi) such that they satisfy two conditions:

  • there is no i and k (i != k) that Li <= Lk <= Hk <= Hi
  • There is at least one segment which has Li = s

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English DooIt 2015-08-10 12:35:13 825 (published)
en1 English DooIt 2015-08-10 11:58:14 714 Initial revision (saved to drafts)