Giantneco's solutions for Sphere Online Judge