結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-09-11 22:11:03 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 2,000 ms |
| + 186µs | |
| コード長 | 329 bytes |
| 記録 | |
| コンパイル時間 | 65 ms |
| コンパイル使用メモリ | 81,808 KB |
| 実行使用メモリ | 56,640 KB |
| 最終ジャッジ日時 | 2026-10-08 15:29:29 |
| 合計ジャッジ時間 | 3,149 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
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-X[0])*(N-Y[0])-X[1]*Y[1])
elif X[2]==0 and Y[2]!=0:
print(N*Y[2]+Y[1])
else:
print(N*X[2]+X[1])
Kazun