結果
| 問題 |
No.2991 Hypercubic Graph Flow
|
| コンテスト | |
| ユーザー |
あじゃじゃ
|
| 提出日時 | 2024-12-16 18:23:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 576 bytes |
| コンパイル時間 | 515 ms |
| コンパイル使用メモリ | 82,372 KB |
| 実行使用メモリ | 87,748 KB |
| 最終ジャッジ日時 | 2024-12-16 18:23:34 |
| 合計ジャッジ時間 | 2,512 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 9 |
ソースコード
n=int(input())
if n%2:
print("No")
else:
print("Yes")
ans=[[] for _ in range(1<<n)]
for i in range(1<<(n-1)):
cnt=0
for j in range(1<<n):
if(i^j).bit_count()==1 and cnt%2:
ans[i].append(1)
ans[-i-1].append(-1)
cnt+=1
elif (i^j).bit_count()==1 and cnt%2==0:
ans[i].append(-1)
ans[-i-1].append(1)
cnt+=1
else:
ans[i].append(0)
ans[-i-1].append(0)
for a in ans:
print(*a)
あじゃじゃ