結果

問題 No.462 6日知らずのコンピュータ
ユーザー yuppe19 😺yuppe19 😺
提出日時 2016-12-13 00:19:52
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-05-07 05:15:30
合計ジャッジ時間 3,327 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
from math import factorial as fact

mod = 10**9 + 7

n, k = map(int, raw_input().split())
if k == 0:
    res = fact(n) % mod
    print res
    exit(0)
a = sorted(map(int, raw_input().split()))
val = a[0]
xor = a[0]
for i in xrange(1, k):
    val |= a[i]
    xor ^= a[i]
    if val != a[i]:
        print 0
        exit(0)

bit = bin(xor)[2:].zfill(n)
cnt = bit.count('0')
res = fact(cnt) % mod
print res
0