An algorithm decided a US congressional race in Maine