#B. [HAOI2009] 逆序对数列

    Type: RemoteJudge 1000ms 125MiB

[HAOI2009] 逆序对数列

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

对于一个数列 {ai}\{a_i\},如果有 i<ji<jai>aja_i>a_j,那么我们称 aia_iaja_j 为一对逆序对数。若对于任意一个由 1n1 \sim n 自然数组成的数列,可以很容易求出有多少个逆序对数。那么逆序对数为 kk 的这样自然数数列到底有多少个?

输入格式

第一行为两个整数n,k。

输出格式

写入一个整数,表示符合条件的数列个数,由于这个数可能很大,你只需输出该数对10000求余数后的结果。

4 1
3

提示

样例说明:

下列3个数列逆序对数都为1;分别是1 2 4 3 ;1 3 2 4 ;2 1 3 4;

测试数据范围

30%的数据 n12n\le 12

100%的数据 n1000n\le 1000k1000k\le 1000

ch09 - DP 优化 I

Not Claimed
Status
Done
Problem
8
Open Since
2023-12-30 0:00
Deadline
2024-3-3 23:59
Extension
2400 hour(s)