"That code is a weird mix of C++ and pointlessly-low-level/opaque code." There is an important lesson in there, @RakeshKarandikar . Online judges rarely reward for code that passes a code review, but good code is what get you hired and keeps you hired. Learn what you can from competition sites, but also read up on and practice good software engineering. —
user4581301 21 secs ago