結果

問題 No.2212 One XOR Matrix
ユーザー 👑 p-adicp-adic
提出日時 2023-06-25 08:57:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,292 KB
実行使用メモリ 79,236 KB
最終ジャッジ日時 2023-09-15 06:43:54
合計ジャッジ時間 4,926 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,092 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=1<<int(input())
R=range(N)
M=[[[i%2,[[1,1,1,0],[0,1,0,0],[0,0,1,0],[0,1,1,1]][i][j]][i//4==j//4]for j in R]for i in R]
a=b=0
for i in R:
	for j in R:
		c=M[i][j]
		M[i][j],a,b=c+[a,b][c]*2+(i//2)*N*2,(a+1-c)%N,(b+c)%N
if N<3:M=[[-1]]
for m in M:print(*m)
0