Can someone help me with this MLE issue ?

Revision en1, by Meguhine, 2025-10-13 12:42:27

Code Link

element size
e $$$n$$$
a $$$S$$$
sp $$$n$$$
sp_id $$$\sqrt{S}$$$
sp_qry $$$Q$$$
qry $$$Q\cdot 2$$$
nm_qry $$$Q\cdot\sqrt{S}$$$
ans $$$Q$$$
mp $$$K$$$
rua $$$Q$$$
pp $$$S$$$
pt $$$S$$$
pa $$$n$$$
fa $$$n$$$
sz $$$n$$$
ok $$$n$$$

total: $$$6n + 3S + 5Q + K + (Q+1)\cdot \sqrt{S}$$$

if we take $$$3\cdot 10^5$$$ for $$$n,S,Q,K$$$, there would be

$$$ \begin{eqnarray} &&15\cdot 3\cdot10^5+(3\cdot10^5+1)*\sqrt{3\cdot10^5}\\ &=&4500000+164317314\\ &=&168817314\enspace\text{ints} \end{eqnarray} $$$

which would take $$$\dfrac{168817314\cdot 4}{1024\cdot 1024}=644\enspace\text{MB}$$$

that's way smaller than $$$1\enspace\text{GB}$$$

so why did my code get MLE ???

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Meguhine 2025-10-13 12:42:27 1121 Initial revision (published)