Just iterate through all the strings in 's' and count the letters.
I used function isalpha( s[i][j] ). Since there are just letters and dashes in the input strings you can use this condition too if( s[i][j] != '-' ) sum ++;
I describe my solution or give some hints about the solution for algorithmic problems used in ICPC or online sites for programming contests.
I just skimmed the problem statement and panicked of the high boundary of the input, but something inside told me don't worry everyth...
No comments:
Post a Comment