結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-11 22:44:10 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 24 ms / 2,000 ms |
| + 819µs | |
| コード長 | 261 bytes |
| 記録 | |
| コンパイル時間 | 130 ms |
| コンパイル使用メモリ | 80,732 KB |
| 実行使用メモリ | 54,528 KB |
| 最終ジャッジ日時 | 2026-10-08 16:38:04 |
| 合計ジャッジ時間 | 3,032 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
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
if s:
x = 0
else:
x = T.count(1)
if t:
y = 0
else:
y = S.count(1)
ans += max(x, y)
print(ans)