結果
| 問題 |
No.1225 I hate I hate Matrix Construction
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-01-24 01:04:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 249 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 82,144 KB |
| 実行使用メモリ | 53,680 KB |
| 最終ジャッジ日時 | 2024-06-25 18:19:20 |
| 合計ジャッジ時間 | 2,959 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
N = int(input())
S = list(map(int, input().split()))
T = list(map(int, input().split()))
s2 = S.count(2)
t2 = T.count(2)
cnt = 0
if not s2:
cnt = max(cnt, T.count(1))
if not t2:
cnt = max(cnt, S.count(1))
print((s2 + t2) * N - s2 * t2 + cnt)
rlangevin