#P1952E. Sweep Line
Sweep Line
Description
Be careful not to make a mistake. You might have to start all over again.
— Someone, probably
The first line contains one integer () — the length of the array .
The second line contains integers () — the array .
Output a single integer — the number of solutions, modulo .
Input
The first line contains one integer () — the length of the array .
The second line contains integers () — the array .
Output
Output a single integer — the number of solutions, modulo .
Note
In the first sample, the array looks like this:
Obviously, the answer here is .
In the second sample, the array looks like this:
I do not know why the answer here is , I had to take a guess.
In the third sample, the array looks like this:
If the answer here is not , I am literally going to explode.