A problem is in P if it can be solved quickly by a computer, and in NP if a solution can be verified quickly.