QOJ.ac

QOJ

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

#834. LIS rời nhau

Statistics

Gọi LIS của một hoán vị là độ dài của dãy con tăng dài nhất của nó.

Một hoán vị được gọi là tốt (good) nếu có thể tìm được hai dãy con tăng có độ dài bằng LIS mà không có bất kỳ phần tử chung nào.

Cho $n$, hãy tìm số lượng hoán vị tốt với $n$ phần tử. Vì kết quả có thể rất lớn, bạn chỉ cần tìm kết quả theo modulo $998\,244\,353$.

Dữ liệu vào

Dòng đầu tiên của dữ liệu vào chứa một số nguyên $n$ ($1 \le n \le 75$): số lượng phần tử.

Dữ liệu ra

In ra một số nguyên duy nhất: số lượng hoán vị tốt với $n$ phần tử, theo modulo $998\,244\,353$.

Ví dụ

Dữ liệu vào 1

6

Dữ liệu ra 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.