No tags yet

No tag edit access

Time limit per test: 0.5 second(s)

Memory limit: 262144 kilobytes

Memory limit: 262144 kilobytes

input: standard

output: standard

output: standard

A member

Compute the total number of extremal permutations of the integers from 1 to

sample input | sample output |

3 10 | 4 |

sample input | sample output |

3 3 | 1 |

Note. The extremal permutations of 1·s3 are (1, 3, 2), (2, 1, 3), (2, 3, 1) and (3, 1, 2).

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/22/2019 23:15:55 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|