Universal Cup Judging System

Universal Cup

حد الوقت: 1.5 s حد الذاكرة: 1024 MB مجموع النقاط: 100 قابلة للهجوم ✓
الإحصائيات

Đối với một hoán vị $p$ có độ dài $n$, ta định nghĩa $f(p)$ biểu thị tập hợp các vị trí đạt giá trị lớn nhất trên tiền tố. Cụ thể, $f(p) = \{i \mid 1 \le i \le n, \text{ s.t. } \forall 1 \le j < i, p_i > p_j\}$.

Tương tự, gọi $g(p)$ biểu thị tập hợp các giá trị lớn nhất trên tiền tố, tức là $g(p) = \{p_i \mid i \in f(p)\}$.

Bây giờ có $k$ hoán vị $p_1, p_2, \ldots, p_k$ được chọn ngẫu nhiên phân bố đều và độc lập từ tất cả các hoán vị có độ dài $n$ (có thể trùng nhau). Little A muốn biết kỳ vọng có bao nhiêu $g(p)$ thực sự khác nhau trong số các hoán vị này. Mục tiêu là tìm xem kỳ vọng có bao nhiêu tập hợp thực sự khác nhau trong số $g(p_1), g(p_2), \ldots, g(p_k)$? Kết quả cần được in ra theo modulo $998244353$.

Dữ liệu vào

Một dòng duy nhất chứa hai số nguyên $n, k$ ($1 \le n, k \le 5000$).

Dữ liệu ra

Một dòng duy nhất chứa một số nguyên biểu thị kết quả của đáp án theo modulo $998244353$.

Ví dụ

Dữ liệu vào 1

1 1

Dữ liệu ra 1

1

Dữ liệu vào 2

3 2

Dữ liệu ra 2

388206139

Dữ liệu vào 3

3 4

Dữ liệu ra 3

408232647

Dữ liệu vào 4

112 646

Dữ liệu ra 4

928854225

Ghi chú

Đối với ví dụ thứ nhất, đáp án là $1$.

Đối với ví dụ thứ hai, đáp án là $\frac{31}{18}$.

Đối với ví dụ thứ ba, đáp án là $\frac{1711}{648}$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.