結果

問題 No.2656 XOR Slimes
ユーザー 👑 p-adicp-adic
提出日時 2024-02-04 19:03:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 203 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 66,508 KB
最終ジャッジ日時 2024-02-26 23:21:50
合計ジャッジ時間 12,264 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,588 KB
testcase_01 AC 37 ms
53,588 KB
testcase_02 AC 38 ms
53,588 KB
testcase_03 AC 35 ms
53,588 KB
testcase_04 AC 34 ms
53,588 KB
testcase_05 AC 38 ms
53,588 KB
testcase_06 AC 35 ms
53,588 KB
testcase_07 AC 34 ms
53,588 KB
testcase_08 AC 197 ms
66,508 KB
testcase_09 AC 199 ms
66,508 KB
testcase_10 AC 195 ms
66,508 KB
testcase_11 AC 195 ms
66,508 KB
testcase_12 AC 195 ms
66,508 KB
testcase_13 AC 196 ms
66,508 KB
testcase_14 AC 195 ms
66,508 KB
testcase_15 AC 199 ms
66,508 KB
testcase_16 AC 198 ms
66,508 KB
testcase_17 AC 197 ms
66,508 KB
testcase_18 AC 196 ms
66,508 KB
testcase_19 AC 199 ms
66,508 KB
testcase_20 AC 200 ms
66,508 KB
testcase_21 AC 196 ms
66,508 KB
testcase_22 AC 200 ms
66,508 KB
testcase_23 AC 203 ms
66,508 KB
testcase_24 AC 194 ms
66,508 KB
testcase_25 AC 201 ms
66,508 KB
testcase_26 AC 196 ms
66,508 KB
testcase_27 AC 196 ms
66,508 KB
testcase_28 AC 195 ms
66,508 KB
testcase_29 AC 198 ms
66,508 KB
testcase_30 AC 202 ms
66,508 KB
testcase_31 AC 197 ms
66,508 KB
testcase_32 AC 195 ms
66,508 KB
testcase_33 AC 196 ms
66,508 KB
testcase_34 AC 197 ms
66,508 KB
testcase_35 AC 195 ms
66,508 KB
testcase_36 AC 200 ms
66,508 KB
testcase_37 AC 195 ms
66,508 KB
testcase_38 AC 194 ms
66,508 KB
testcase_39 AC 195 ms
66,508 KB
testcase_40 AC 196 ms
66,508 KB
testcase_41 AC 195 ms
66,508 KB
testcase_42 AC 196 ms
66,508 KB
testcase_43 AC 197 ms
66,508 KB
testcase_44 AC 195 ms
66,508 KB
testcase_45 AC 196 ms
66,508 KB
testcase_46 AC 195 ms
66,508 KB
testcase_47 AC 195 ms
66,508 KB
testcase_48 AC 201 ms
66,508 KB
testcase_49 AC 196 ms
66,508 KB
testcase_50 AC 196 ms
66,504 KB
testcase_51 AC 195 ms
66,500 KB
testcase_52 AC 197 ms
66,504 KB
testcase_53 AC 198 ms
66,504 KB
testcase_54 AC 195 ms
66,504 KB
testcase_55 AC 196 ms
66,504 KB
testcase_56 AC 197 ms
66,508 KB
testcase_57 AC 196 ms
66,504 KB
testcase_58 AC 195 ms
66,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R=input,range
J=lambda:list(map(int,I().split()))
N=int(I())
X=J()
A=J()
D=[0]*N
a=D[0]=A[0]
for i in R(1,N):
	for j in R(i):D[j]+=(A[j]^A[i])-A[j]+X[i]-X[i-1]
	a+=A[i]
	D[i]=a
	for j in R(i):
		A[j]^=A[i]
		a=min(a,D[j])
print(a)
0