atcoder#ARC115E. [ARC115E] LEQ and NEQ
[ARC115E] LEQ and NEQ
Score : points
Problem Statement
Given is a sequence of integers . Print the number, modulo , of sequences of integers satisfying all of the following conditions:
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
3
2 3 2
6
The following six sequences satisfy all of the conditions.
10
158260522 877914575 602436426 24979445 861648772 623690081 433933447 476190629 262703497 211047202
524691026