Professional Documents
Culture Documents
Problem - D - Codeforces
Problem - D - Codeforces
alfa_flex
| Logout
HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP
Mashup
D. Count Permutations Contest is running
time limit per test: 1 second
04:57:05
memory limit per test: 256 megabytes
input: standard input Contestant
output: standard output
Since number of permutations can be extremeply large, please print it modulo 998244353 . Choose
Choose File No file chosen
file:
Input
Submit
The first line contains a single integer n(1 ≤ n ≤ 1000) , the length of the array a.
Output
Print number of permutations of a that are good.
Example
input Copy
2 4 3
output Copy
Supported by
https://codeforces.com/gym/382540/problem/D 1/1