UVa 494

From Algorithmist
Jump to navigation Jump to search

494 - Kindergarten Counting Game[edit]

Summary[edit]

  • Given a few sentences you are supposed to count the number of words in the sentence.

Explanation[edit]

  • This is pretty straight forward just another regular expression problem if you use Java and if you're using C/C++ this involves just parsing strings.

Input[edit]

Meep Meep!
I tot I taw a putty tat.
I did! I did! I did taw a putty tat.
Shsssssssssh ... I am hunting wabbits. Heh Heh Heh Heh ...
Woot I have hair
Look it care1fully.
abcd88efgh.......
mom's

Output[edit]

2
7
10
9
4
4
2
2

Solution[edit]