Solved longestlines cpp