You have begun working at a start-up company called FindIt.com. Your company which sells customized web search engines and web servers. Your lead programmer caught the flu right before product ship deadline, and you have been called in to finish implementing a web search engine. The existing code crawls through the web, fetching web pages. Your job is to rank them, based on keywords.
For each web page, you need to score the page by finding the number of times a specific keyword appears in the page. Keywords are allowed to be part of other words, so the keyword net appears twice in the sentence ``Networks and intranets''. Keywords are allowed to overlap, so ana should be reported as appearing twice in ``banana''.
The input will consist of a keyword on its own line, followed by words from a web page on one or more lines. The input will be terminated by a line containing only -1. You may assume the keyword and all input will be in lowercase.
Your program should output the result of your
search in the following form:
net surfing the net today to learn etiquette about networks and intranets -1
Found 3 net
ana bananas can be found in anapolis -1
Found 3 ana
|Input 1||Output 1|
|Input 2||Output 2|