spoj accepted and other codes can be found here