結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
uni_python
|
| 提出日時 | 2020-09-12 19:13:57 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 472 bytes |
| 記録 | |
| コンパイル時間 | 258 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-06-06 03:00:22 |
| 合計ジャッジ時間 | 2,493 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
mod=10**9+7
N=I()
S=LI()
T=LI()
s2=S.count(2)
t2=T.count(2)
ans=s2*N + t2*N - (s2*t2)
s1=S.count(1)
t1=T.count(1)
if s2!=0:
t1=0
if t2!=0:
s1=0
ans+=max(s1,t1)
print(ans)
main()
uni_python