QOJ.ac

QOJ

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

#834. 素なLIS

Statistics

ある順列の LIS を、その最長増加部分列の長さとします。

ある順列が「良い」とは、長さが LIS であるような2つの増加部分列であって、共通の要素を一切持たないものが存在することを指します。

$n$ が与えられたとき、$n$ 個の要素を持つ「良い」順列の個数を求めてください。答えは非常に大きくなる可能性があるため、$998\,244\,353$ で割った余りを求めてください。

入力

入力の最初の行には、要素の数である整数 $n$ ($1 \le n \le 75$) が含まれます。

出力

$n$ 個の要素を持つ「良い」順列の個数を $998\,244\,353$ で割った余りを1つの整数で出力してください。

入出力例

入力 1

6

出力 1

132

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.