Justified Text

Limits 1s, 512 MB

Given a long string of text, you will have to print it following these rules:


This is a companion discussion topic for the original entry at https://toph.co/p/justified-text

What is wrong with my .go solution whether .cpp solution got Accepted?