結果
問題 | No.1142 XOR と XOR |
ユーザー | qumazaki |
提出日時 | 2020-09-08 18:27:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 672 bytes |
コンパイル時間 | 400 ms |
コンパイル使用メモリ | 86,560 KB |
実行使用メモリ | 110,248 KB |
最終ジャッジ日時 | 2023-08-20 03:12:45 |
合計ジャッジ時間 | 7,028 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 91 ms
76,152 KB |
testcase_01 | AC | 91 ms
76,380 KB |
testcase_02 | AC | 92 ms
76,292 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 151 ms
110,248 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 92 ms
76,416 KB |
testcase_12 | AC | 93 ms
76,456 KB |
testcase_13 | AC | 92 ms
76,552 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 141 ms
108,744 KB |
testcase_18 | AC | 102 ms
82,464 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 128 ms
103,024 KB |
testcase_26 | AC | 148 ms
104,112 KB |
testcase_27 | AC | 139 ms
104,536 KB |
ソースコード
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) mod = 10**9+7 ax = [0]*1024 bx = [0]*1024 for xx,x in zip([ax,bx],[a,b]): tmp = 0 xx[0] += 1 for xi in x: tmp = tmp^xi xx[tmp] += 1 ax2 = [0]*1024 bx2 = [0]*1024 for xx,xx2 in zip([ax,bx],[ax2,bx2]): for i in range(1024-1): for j in range(i,1024): if(i==j): xx2[0] += (xx[i]*(xx[i]-1))//2 xx2[0] %= mod else: xx2[i ^ j] += xx[i]*xx[j] xx2[i ^ j] %= mod ans = 0 for i in range(1024): ans += ax2[i] * bx2[k^i] ans %= mod print(ans)