結果

問題 No.1863 Xor Sum 2...?
ユーザー NaHCO314NaHCO314
提出日時 2021-04-05 21:22:15
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 374 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 100,772 KB
最終ジャッジ日時 2023-09-25 22:31:24
合計ジャッジ時間 5,187 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,992 KB
testcase_01 AC 76 ms
71,172 KB
testcase_02 AC 75 ms
71,312 KB
testcase_03 AC 76 ms
71,252 KB
testcase_04 AC 76 ms
71,132 KB
testcase_05 AC 103 ms
77,956 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 94 ms
81,672 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 89 ms
76,868 KB
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 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

max_a = max(a).bit_length()
ans = 0

for i in range(n):
    a_r = b_r = 0
    for j in range(i, min(n, i+max_a)):
        if a_r & a[j] != 0:
            break
        else:
            a_r |= a[j]
            b_r |= b[j]
            if b_r == 0:
                ans += 1

print(ans)
0