* divided algo from problem (onemax)