結果
問題 | No.1225 I hate I hate Matrix Construction |
ユーザー |
👑 ![]() |
提出日時 | 2020-09-11 22:03:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 435 bytes |
コンパイル時間 | 1,419 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-12-27 12:51:07 |
合計ジャッジ時間 | 4,135 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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:if Y[2]:print(X[1]*Y[2]+Y[1])else:print(max(X[1],Y[1]))else:if X[2]:print(Y[1]*X[2]+X[1])else:print(max(X[1],Y[1]))