The repository full of solutions to questions hosted on SPOJ
It is NOT advisable to directly copy and paste the solution and make them work for you, but I would recommend you to first try out finding right, efficient and optimized solution by yourself and in case after a lot of tries you are unable to do so then you can anyday take help from this repository.
All the solutions that you find here are also hosted on my personal website arpitbhayani.me/programming.html
Happy Coding :)