I guess I should clarify what I mean by â€śbigâ€ť

I think \log{10^{18}} is important because itâ€™s based on a constraint on the input. 10^{18} was a derived number based on the input constraints being 10^9. If the input was instead 10^4 or something, then the corresponding \log{10^8} could also be considered important.

Whatâ€™s not big is stuff like algorithmic details. For example, see the github solution. It has two O(n \log{10^{18}}) loops, but I donâ€™t include the 2 because itâ€™s based on the algorithm and not the input.

Uhhâ€¦ I can see this getting more and more unclear by the second. I guess order-of-magnitude factor of 10 is an okay rule of thumb for â€śbigâ€ť, since the most detail you should really put into time complexity should be some quick calculation. For example, something like â€śthis algorithm will take around 5 \cdot 10^7 operations, which is fine for 2 secondsâ€ť. Maybe thereâ€™s some extra constant in there somewhere, maybe itâ€™s actually half that, but it wonâ€™t matter unless youâ€™re cutting it really close to TL.

To keep in mind, this is all *my* preference. Youâ€™re free to think about complexity however you want.