結果
| 問題 | 
                            No.803 Very Limited Xor Subset
                             | 
                    
| コンテスト | |
| ユーザー | 
                             convexineq
                         | 
                    
| 提出日時 | 2021-03-25 05:10:01 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 67 ms / 2,000 ms | 
| コード長 | 383 bytes | 
| コンパイル時間 | 258 ms | 
| コンパイル使用メモリ | 81,920 KB | 
| 実行使用メモリ | 76,260 KB | 
| 最終ジャッジ日時 | 2024-11-27 02:27:11 | 
| 合計ジャッジ時間 | 3,860 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 43 | 
ソースコード
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))
            
            
            
        
            
convexineq