No.2991 Hypercubic Graph Flow
レベル :
/ AI推定難易度 : 1950
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : / 解いたユーザー数 24
作問者 :
とりゐ
タグ : / 解いたユーザー数 24
作問者 :
とりゐ
問題文最終更新日: 2024-12-15 17:45:25
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
Advent Calendar Contest 2024
(順位表)
の他の問題:
Problem Statement
This problem was proposed at a graph theory seminar at Tohoku University and solved by the writer.
This is a problem of finding the flow number $\phi(Q_N)$ of the Hypercube Graph $Q_N$.
You are given a positive integer $N$. Determine whether there exists a $2^N\times 2^N$ matrix $f$ satisfying all of the following conditions.- $f(i,j)\ (0\leq i,j\lt 2^N)$ is an integer
- For $0\leq i,j\lt 2^N$, $f(i,j)\neq 0$ if $\mathrm{popcount}(i\ \mathrm{xor}\ j)=1$, and $f(i,j)=0$ otherwise
- For $0\leq i,j\lt 2^N$, $f(i,j)=-f(j,i)$
- For each $i=0,1,\ldots,2^N-1$, $\displaystyle \sum_{j=0}^{2^N-1}f(i,j)=0$
Input
$N$
- $1\leq N\leq 10$
- $N$ is an integer
Output
If no matrix $f$ satisfying the conditions exists, print No on the first line.
If one exists, print Yes on the first line, then print $f$ over the following $2^N$ lines.
$f(0,0)\ \ldots\ f(0,2^{N}-1)$
$\vdots$
$f(2^{N}-1,0)\ \ldots\ f(2^{N}-1,2^{N}-1)$
Sample
Sample 1
Input
2
Output
Yes 0 -1 1 0 1 0 0 -1 -1 0 0 1 0 1 -1 0
$\phi(Q_2)=2$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。