ON alg for zeroone problem