結果

問題 No.1225 I hate I hate Matrix Construction
ユーザー mlihua09
提出日時 2020-09-11 22:40:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 686 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-12-27 16:45:34
合計ジャッジ時間 4,080 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22 WA * 13
権限があれば一括ダウンロードができます

ソースコード

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