結果
| 問題 |
No.1225 I hate I hate Matrix Construction
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-09-11 22:01:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 692 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-12-27 12:43:23 |
| 合計ジャッジ時間 | 3,460 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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