結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-11 22:16:53 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 24 ms / 2,000 ms |
| + 601µs | |
| コード長 | 323 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 80,964 KB |
| 実行使用メモリ | 56,316 KB |
| 最終ジャッジ日時 | 2026-10-08 15:45:24 |
| 合計ジャッジ時間 | 3,264 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()))
if s.count(2)>0 and t.count(2):
print(s.count(2)*n+t.count(2)*n-s.count(2)*t.count(2))
elif s.count(2)>0:
print(s.count(2)*n+s.count(1))
elif t.count(2)>0:
print(t.count(2)*n+t.count(1))
else:
print(max(s.count(1),t.count(1)))