結果

問題 No.2663 Zero-Sum Submatrices
ユーザー chineristACchineristAC
提出日時 2024-03-08 23:58:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 73,684 KB
最終ジャッジ日時 2024-03-08 23:58:56
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
56,112 KB
testcase_01 AC 51 ms
56,112 KB
testcase_02 AC 47 ms
56,112 KB
testcase_03 AC 46 ms
56,112 KB
testcase_04 AC 59 ms
67,028 KB
testcase_05 AC 69 ms
71,332 KB
testcase_06 AC 45 ms
56,112 KB
testcase_07 AC 46 ms
56,112 KB
testcase_08 AC 46 ms
56,112 KB
testcase_09 AC 70 ms
69,096 KB
testcase_10 AC 77 ms
73,400 KB
testcase_11 AC 47 ms
56,112 KB
testcase_12 AC 46 ms
56,112 KB
testcase_13 AC 70 ms
71,308 KB
testcase_14 AC 47 ms
56,112 KB
testcase_15 AC 63 ms
69,100 KB
testcase_16 AC 66 ms
71,328 KB
testcase_17 AC 48 ms
56,112 KB
testcase_18 AC 57 ms
66,776 KB
testcase_19 AC 68 ms
71,328 KB
testcase_20 AC 64 ms
69,096 KB
testcase_21 AC 68 ms
71,328 KB
testcase_22 AC 59 ms
67,320 KB
testcase_23 AC 79 ms
71,328 KB
testcase_24 AC 73 ms
73,380 KB
testcase_25 AC 62 ms
69,376 KB
testcase_26 AC 76 ms
73,644 KB
testcase_27 AC 74 ms
73,388 KB
testcase_28 AC 67 ms
71,452 KB
testcase_29 AC 75 ms
73,684 KB
testcase_30 AC 72 ms
73,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import permutations
from heapq import heappop,heappush
from collections import deque
import random
import bisect

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

n,m = mi()
A = [[0]*(2**m) for i in range(2**n)]

for i in range(2**n):
    for j in range(2**m):

        for b in range(n):
            if i>>b & 1:
                A[i][j] ^= 1<<(b)
        for b in range(m):
            if j>>b & 1:
                A[i][j] ^= 1<<(b+n)
    
    print(*A[i])
0