Useful functions for competitive programming for me.