AtCoder Regular Contest 212 (Div. 2)
A
Four TSP
AtCoder
⌀ 957
原题
←B →
翻译中…

Problem Statement

翻译中…

There is a complete graph with four vertices numbered $1, 2, 3, 4$.

翻译中…

You will now assign weights to each of the six edges. Each weight should be a positive integer, and the sum of the six weights should be exactly $K$. More formally, you choose positive integers $x_{i,j} \ (1\leq i<j\leq 4)$ such that $\sum_{1\leq i<j\leq 4}x_{i,j}=K$, and assign weight $x_{i,j}$ to the edge connecting $i$ and $j$.

翻译中…

For this weighted graph $G$, let $f(G)$ be the minimum sum of edge weights in a cycle that passes through all vertices. Find the sum, modulo $998244353$, of $f(G)$ over all possible $G$.

翻译中…

What is a complete graph? A complete graph is a graph with an edge between every pair of two distinct vertices.

翻译中…

Constraints

翻译中…
  • $6 \le K \le 5000$
  • All input values are integers.
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

K

翻译中…

Output

翻译中…

Output the answer.

翻译中…

样例

Input #1
7
Output #1
24
The possible graphs are the ones where one of the six edges has weight $2$ and the other edges have weight $1$. There are six such graphs $G$, and we have $f(G)=4$ for each of them, so the answer is $24$.
Input #2
2026
Output #2
513760748
题目信息
题号
arc212_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。