結果
| 問題 |
No.1225 I hate I hate Matrix Construction
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-09-11 22:07:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 82,312 KB |
| 実行使用メモリ | 54,540 KB |
| 最終ジャッジ日時 | 2024-12-27 13:08:46 |
| 合計ジャッジ時間 | 3,055 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 WA * 3 |
ソースコード
N=int(input())
S=list(map(int,input().split()))
T=list(map(int,input().split()))
X=[S.count(i) for i in range(N)]
Y=[T.count(j) for j in range(N)]
if X[2]==Y[2]==0:
print(max(X[1],Y[1]))
elif X[2]*Y[2]!=0:
print(N*N-X[1]*Y[2])
elif X[2]==0 and Y[2]!=0:
print(X[1]*Y[2]+Y[1])
else:
print(Y[1]*X[2]+X[1])
Kazun