結果 : deterministic and non deterministic polynomial time algorithm