結果

問題 No.462 6日知らずのコンピュータ
ユーザー rlangevinrlangevin
提出日時 2023-03-02 08:56:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 437 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 81,516 KB
実行使用メモリ 65,704 KB
最終ジャッジ日時 2023-10-17 07:10:00
合計ジャッジ時間 6,712 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,304 KB
testcase_01 AC 36 ms
53,304 KB
testcase_02 AC 39 ms
56,784 KB
testcase_03 AC 39 ms
56,784 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 36 ms
53,304 KB
testcase_07 WA -
testcase_08 RE -
testcase_09 AC 39 ms
53,304 KB
testcase_10 AC 35 ms
53,304 KB
testcase_11 AC 36 ms
53,304 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 37 ms
53,304 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 37 ms
53,304 KB
testcase_24 AC 37 ms
53,304 KB
testcase_25 AC 39 ms
56,784 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 37 ms
53,304 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 37 ms
53,304 KB
testcase_34 WA -
testcase_35 AC 37 ms
53,304 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 37 ms
53,304 KB
testcase_39 WA -
testcase_40 AC 36 ms
53,304 KB
testcase_41 AC 36 ms
53,304 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 37 ms
53,304 KB
testcase_45 AC 37 ms
53,304 KB
testcase_46 WA -
testcase_47 AC 37 ms
53,304 KB
testcase_48 WA -
testcase_49 AC 37 ms
53,304 KB
testcase_50 AC 37 ms
53,304 KB
testcase_51 AC 37 ms
53,304 KB
testcase_52 AC 37 ms
53,304 KB
testcase_53 AC 37 ms
53,304 KB
testcase_54 AC 37 ms
53,304 KB
testcase_55 AC 37 ms
53,304 KB
testcase_56 AC 37 ms
53,304 KB
testcase_57 AC 37 ms
53,304 KB
testcase_58 AC 36 ms
53,304 KB
testcase_59 AC 37 ms
53,304 KB
testcase_60 AC 37 ms
53,304 KB
testcase_61 AC 37 ms
53,304 KB
testcase_62 AC 36 ms
53,304 KB
testcase_63 AC 36 ms
53,304 KB
testcase_64 AC 37 ms
53,304 KB
testcase_65 AC 37 ms
53,304 KB
testcase_66 AC 36 ms
53,304 KB
testcase_67 AC 36 ms
53,304 KB
testcase_68 AC 37 ms
53,304 KB
testcase_69 AC 37 ms
53,304 KB
testcase_70 AC 36 ms
53,304 KB
testcase_71 AC 37 ms
53,304 KB
testcase_72 AC 36 ms
53,304 KB
testcase_73 AC 36 ms
53,304 KB
testcase_74 AC 38 ms
53,304 KB
testcase_75 AC 38 ms
53,304 KB
testcase_76 AC 37 ms
53,304 KB
testcase_77 AC 36 ms
53,304 KB
testcase_78 AC 37 ms
53,304 KB
testcase_79 RE -
testcase_80 RE -
testcase_81 RE -
testcase_82 RE -
testcase_83 RE -
testcase_84 AC 36 ms
53,304 KB
testcase_85 AC 37 ms
53,304 KB
testcase_86 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def popcount(n):
    cnt = 0
    while n:
        cnt += n & 1
        n >>= 1
    return cnt

N, K = map(int, input().split())
A = list(map(int, input().split()))
A.append((1 << N) - 1)
A.append(0)
A.sort()

M = 65
fact = [1] * M
for i in range(1, M):
    fact[i] = fact[i - 1] * i

ans = 1
for i in range(K + 1):
    if A[i] | A[i + 1] != A[i + 1]:
        print(0)
        exit()
    ans *= fact[popcount(A[i] ^ A[i + 1])]

print(ans)
0