結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-13 09:30:53 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 2,000 ms |
| コード長 | 201 bytes |
| 記録 | |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 20,792 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-05-16 05:11:11 |
| 合計ジャッジ時間 | 5,235 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
n=int(input()) S=list(map(int,input().split())) T=list(map(int,input().split())) s=t=u=v=0 for i,j in zip(S,T): s+=(i==1)+(i==2)*n t+=(j==1)+(j==2)*n u+=(i==2) v+=(j==2) print(max(s,t,(u+v)*n-u*v))