結果

問題 No.803 Very Limited Xor Subset
ユーザー convexineqconvexineq
提出日時 2021-03-25 05:10:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 77,716 KB
最終ジャッジ日時 2023-08-18 00:49:01
合計ジャッジ時間 7,035 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,228 KB
testcase_01 AC 73 ms
71,128 KB
testcase_02 AC 72 ms
71,208 KB
testcase_03 AC 71 ms
71,412 KB
testcase_04 AC 78 ms
71,220 KB
testcase_05 AC 73 ms
71,284 KB
testcase_06 AC 72 ms
71,408 KB
testcase_07 AC 72 ms
71,260 KB
testcase_08 AC 72 ms
71,116 KB
testcase_09 AC 74 ms
71,256 KB
testcase_10 AC 74 ms
71,276 KB
testcase_11 AC 74 ms
71,264 KB
testcase_12 AC 74 ms
71,376 KB
testcase_13 AC 74 ms
71,340 KB
testcase_14 AC 100 ms
77,500 KB
testcase_15 AC 98 ms
77,436 KB
testcase_16 AC 98 ms
77,476 KB
testcase_17 AC 97 ms
77,512 KB
testcase_18 AC 97 ms
77,392 KB
testcase_19 AC 98 ms
77,612 KB
testcase_20 AC 98 ms
77,704 KB
testcase_21 AC 98 ms
77,484 KB
testcase_22 AC 98 ms
77,404 KB
testcase_23 AC 100 ms
77,440 KB
testcase_24 AC 98 ms
77,464 KB
testcase_25 AC 98 ms
77,388 KB
testcase_26 AC 98 ms
77,600 KB
testcase_27 AC 100 ms
77,368 KB
testcase_28 AC 99 ms
77,548 KB
testcase_29 AC 96 ms
77,520 KB
testcase_30 AC 98 ms
77,240 KB
testcase_31 AC 97 ms
77,372 KB
testcase_32 AC 96 ms
77,392 KB
testcase_33 AC 97 ms
77,444 KB
testcase_34 AC 71 ms
71,096 KB
testcase_35 AC 96 ms
77,524 KB
testcase_36 AC 84 ms
76,276 KB
testcase_37 AC 87 ms
76,264 KB
testcase_38 AC 79 ms
76,164 KB
testcase_39 AC 83 ms
75,872 KB
testcase_40 AC 97 ms
77,716 KB
testcase_41 AC 96 ms
77,408 KB
testcase_42 AC 96 ms
77,428 KB
testcase_43 AC 100 ms
77,436 KB
testcase_44 AC 73 ms
71,256 KB
testcase_45 AC 73 ms
71,196 KB
testcase_46 AC 73 ms
71,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,x = map(int,input().split())
*a, = [int(i)<<m for i in input().split()]
x <<= m
for k in range(m):
    v,L,R = map(int,input().split())
    x |= v<<k
    for i in range(L-1,R):
        a[i] |= 1<<k
basis = []
for e in a:
    for b in basis:
        if e > e^b: e ^= b
    if e: basis.append(e)
for b in basis:
    if x > x^b: x ^= b
print(0 if x else pow(2,n-len(basis),10**9+7))
0