acmsguru |
---|

Finished |

No tags yet

No tag edit access

The problem statement has recently been changed. View the changes.

×
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-2023 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/10/2023 01:22:37 (l1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|