結果
| 問題 |
No.1225 I hate I hate Matrix Construction
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-11 21:29:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 417 bytes |
| コンパイル時間 | 393 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-12-27 02:21:08 |
| 合計ジャッジ時間 | 3,709 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 WA * 9 |
ソースコード
N = int(input())
Ss = list(map(int, input().split()))
Ts = list(map(int, input().split()))
if 2 in Ss and 2 in Ts:
s = Ss.count(2)
t = Ts.count(2)
print(s * N + t * N - s * t)
elif 2 in Ss and 2 not in Ts:
s = Ss.count(2)
print(s * N + Ss.count(1))
elif 2 in Ss and 2 not in Ts:
Ss, Ts = Ts, Ss
s = Ss.count(2)
print(s * N + Ss.count(1))
else:
print(max(Ss.count(1), Ts.count(1)))