結果

問題 No.1225 I hate I hate Matrix Construction
ユーザー mlihua09mlihua09
提出日時 2020-09-11 22:40:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 71,560 KB
最終ジャッジ日時 2023-08-27 15:39:09
合計ジャッジ時間 5,209 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,492 KB
testcase_01 AC 64 ms
71,308 KB
testcase_02 AC 65 ms
71,272 KB
testcase_03 AC 69 ms
71,472 KB
testcase_04 AC 63 ms
71,024 KB
testcase_05 AC 64 ms
71,172 KB
testcase_06 AC 64 ms
71,132 KB
testcase_07 AC 64 ms
71,388 KB
testcase_08 AC 64 ms
71,248 KB
testcase_09 AC 63 ms
71,452 KB
testcase_10 AC 62 ms
71,316 KB
testcase_11 AC 62 ms
71,208 KB
testcase_12 AC 64 ms
71,488 KB
testcase_13 AC 62 ms
71,208 KB
testcase_14 AC 61 ms
71,240 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 63 ms
71,200 KB
testcase_18 AC 63 ms
71,080 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 64 ms
71,292 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 66 ms
71,176 KB
testcase_26 WA -
testcase_27 AC 64 ms
71,348 KB
testcase_28 AC 65 ms
71,316 KB
testcase_29 AC 64 ms
71,304 KB
testcase_30 AC 62 ms
71,064 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 63 ms
71,080 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())

S = list(map(int, input().split()))

T = list(map(int, input().split()))

s = S.count(2)
t = T.count(2)

ans = (s + t) * N - s * t

ans += max(sum([(i + t) % 2 if i != 2 else 0 for i in S]), sum([(i + s) % 2 if i != 2 else 0 for i in T]))

print(ans)
0