結果

問題 No.1863 Xor Sum 2...?
ユーザー shobonvipshobonvip
提出日時 2022-03-04 22:57:45
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 100,812 KB
最終ジャッジ日時 2023-09-26 02:11:06
合計ジャッジ時間 5,833 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,488 KB
testcase_01 AC 70 ms
71,068 KB
testcase_02 AC 73 ms
71,444 KB
testcase_03 AC 73 ms
71,140 KB
testcase_04 AC 72 ms
71,068 KB
testcase_05 AC 91 ms
78,400 KB
testcase_06 AC 87 ms
76,856 KB
testcase_07 AC 101 ms
82,040 KB
testcase_08 AC 101 ms
81,872 KB
testcase_09 AC 137 ms
100,228 KB
testcase_10 AC 131 ms
97,292 KB
testcase_11 AC 108 ms
86,044 KB
testcase_12 AC 97 ms
81,780 KB
testcase_13 AC 120 ms
92,068 KB
testcase_14 AC 128 ms
97,532 KB
testcase_15 AC 120 ms
91,752 KB
testcase_16 AC 119 ms
92,028 KB
testcase_17 AC 101 ms
83,204 KB
testcase_18 AC 88 ms
76,948 KB
testcase_19 AC 96 ms
80,696 KB
testcase_20 AC 112 ms
87,656 KB
testcase_21 AC 127 ms
94,796 KB
testcase_22 AC 95 ms
79,756 KB
testcase_23 AC 139 ms
100,024 KB
testcase_24 AC 142 ms
100,080 KB
testcase_25 AC 145 ms
100,520 KB
testcase_26 AC 146 ms
100,600 KB
testcase_27 AC 147 ms
100,472 KB
testcase_28 AC 143 ms
100,600 KB
testcase_29 AC 145 ms
100,812 KB
testcase_30 AC 141 ms
100,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0

for i in range(n):
	tmp1 = 0
	tmp2 = 0
	tmp3 = 0
	for j in range(32):
		if i + j < n:
			tmp1 += a[i + j]
			tmp2 ^= a[i + j]
			tmp3 ^= b[i + j]
			if tmp1 - tmp2 == tmp3:
				ans += 1


print(ans)
0