QOJ.ac

QOJ

Time Limit: 3 s Memory Limit: 512 MB Total points: 100

#10933. Wartość maksymalna

统计

Nasshitaka4692 ma $n$ zmiennych $a_1, \dots, a_n$, z których każda początkowo wynosi $0$. Następnie wykonuje $k$ rund operacji. W każdej rundzie wybiera losowo jedną zmienną z równym prawdopodobieństwem i zwiększa ją o $1$. Chce poznać wartość oczekiwaną $\max \{a_1, \dots, a_n\}$. Twoim zadaniem jest obliczenie tej wartości oczekiwanej pomnożonej przez $n^k$, modulo $998244353$.

Wejście

Na wejściu znajdują się dwie liczby całkowite dodatnie $n, k$.

Wyjście

Wypisz jedną liczbę będącą wynikiem.

Przykład

Przykład 1

Wejście:

2 5

Wyjście:

110

Przykład 2

Wejście:

4 6

Wyjście:

11544

Przykład 3

Wejście:

10 66

Wyjście:

686029191

Podzadania

Dla $100\%$ danych wejściowych spełnione są warunki $1\le n\le 10$ oraz $1\le k\le 10^5$.

  • Testy $1, 2$ gwarantują odpowiednio $n=1, 2$.
  • Dla testów $i$ ($3\le i\le 20$) gwarantowane jest $k\le 10^{(i+10)/6}$.

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.