By precedent of 1801, a President needs a pure majority of State delegations. And a State delegation only casts a vote if one candidate gets a pure majority of State delegates. Otherwise the State vote is "divided".
In 1801, with just 2 candidates, Congress deadlocked: 8 States for Jefferson, 6 for Burr, 2 "divided". They were stuck for several days - and no one knew what would happen if deadlock was not broken.
In 1825, after the "corrupt bargain", Representatives elected President in a single vote - 13 for Adams, 7 for Jackson, 4 for Crawford. Switch just one delegation from Adams to anyone else, OR "divided", and the House would have been deadlocked as it was in 1801. And there were several delegation that could easily have been switched: New York voted 18 for Adams, 2 for Jackson, 14 for Crawford. One voter, and New York would have been "divided". Rhode Island was 2:0:0, so again 1 vote for Adams, Maryland 5:3:1, so again 1 vote, Louisiana 2:1:0, Missouri and Illinois both 1:0:0. Total 6 states that Adams could have lost by 1 vote, and losing any of the 6 would have meant deadlock.
In 1836, a contingent election that Van Buren was going to lose was a deliberate electoral strategy. It failed - narrowly. Faithless electors did send his running mate Mentor Johnson to Senate.