QOJ.ac

QOJ

時間限制: 3 s 記憶體限制: 512 MB 總分: 100

#834. 서로소 LIS

统计

어떤 순열의 LIS를 그 순열의 최장 증가 부분 수열의 길이라고 하자.

순열이 좋은(good) 순열이라는 것은, 길이가 LIS인 두 개의 증가 부분 수열을 찾을 수 있고, 이 두 수열이 서로 공통된 원소를 공유하지 않는 경우를 말한다.

$n$이 주어질 때, $n$개의 원소를 가진 좋은 순열의 개수를 구하시오. 답이 클 수 있으므로 $998\,244\,353$으로 나눈 나머지를 구하면 된다.

입력

첫 번째 줄에 정수 $n$ ($1 \le n \le 75$)이 주어진다: 원소의 개수.

출력

$n$개의 원소를 가진 좋은 순열의 개수를 $998\,244\,353$으로 나눈 나머지를 출력한다.

예제

예제 입력 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.