Fortunately our company gives us the option to reject a candidate if we feel they are cheating and can provide an explanation. Once had a candidate solve a problem extremely quickly but they could not explain how they solved it all. I then made a small modification to the problem which wouldn't have changed the solution much and they were completely lost.