시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 (언어별 추가 시간 없음) 512 MB (언어별 추가 메모리 없음) 10 9 9 100.000%

문제

A group of contest writers have written n problems and want to use k of them in an upcoming contest. Each problem has a difficulty level. A contest is valid if all of its k problems have different difficulty levels.

Compute how many distinct valid contests the contest writers can produce. Two contests are distinct if and only if there exists some problem present in one contest but not present in the other.

Print the result modulo 998,244,353.

입력

The first line of input contains two space-separated integers n and k (1 ≤ k ≤ n ≤ 1000).

The next line contains n space-separated integers representing the difficulty levels. The difficulty levels are between 1 and 109 (inclusive).

출력

Print the number of distinct contests possible, modulo 998,244,353.

예제 입력 1

5 2
1 2 3 4 5

예제 출력 1

10

예제 입력 2

5 2
1 1 1 2 2

예제 출력 2

6

예제 입력 3

12 5
3 1 4 1 5 9 2 6 5 3 5 8

예제 출력 3

316