Note: It is in your own benifit that I suggest you not to directly use these solutions in spoj. I use it as a backup for my own code as I keep switching systems from lab to my PC while coding. Warning: A few of the solutions might not be correct or complete Incase anyone wants to use these code, I don't have any issues.