結果
問題 |
No.1225 I hate I hate Matrix Construction
|
ユーザー |
![]() |
提出日時 | 2021-08-19 09:10:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 1,104 ms |
コンパイル使用メモリ | 82,536 KB |
実行使用メモリ | 52,596 KB |
最終ジャッジ日時 | 2024-10-12 06:54:25 |
合計ジャッジ時間 | 2,918 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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) ssum = 0 tsum = 0 for s in S: if s==1: ssum+=max(1,t2) if s==2: ssum+=N for t in T: if t==1: tsum+=max(1,s2) if t==2: tsum+=N print(max(ssum,tsum))