A man who killed three people by opening fire at a Minneapolis homeless encampment and was shot the next day during an encounter with St. Paul police has been sentenced to 86½ years in prison.