結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-15 09:05:41 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 84,736 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-04-05 22:03:55 |
| 合計ジャッジ時間 | 2,395 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
N=int(input()) S=list(map(int,input().split())) T=list(map(int,input().split())) if 2 in S and 2 in T: print((S.count(2)+T.count(2))*N-S.count(2)*T.count(2)) elif 2 not in S and 2 not in T: print(max(S.count(1),T.count(1))) else: if 2 in T: S,T=T,S print(S.count(2)*N+S.count(1))