Man accused in deadly triple stabbing pleads no contest