結果
| 問題 |
No.1225 I hate I hate Matrix Construction
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2020-09-11 22:06:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 309 bytes |
| コンパイル時間 | 424 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-12-27 13:01:43 |
| 合計ジャッジ時間 | 3,051 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 WA * 3 |
ソースコード
n = int(input())
s = list(map(int, input().split()))
t = list(map(int, input().split()))
ans = 0
cnt2_s = s.count(2)
cnt2_t = t.count(2)
ans += cnt2_s * n + cnt2_t * n - cnt2_s * cnt2_t
if cnt2_s:
ans += s.count(1)
elif cnt2_t:
ans += t.count(1)
else:
ans += max(s.count(1), t.count(1))
print(ans)
Kude