solutions for spoj-UPSUB, VOCV