All submissions for this problem are available.A man is trying to impress his wife by speaking few sentences to her. Whenever his wife smiles after the sentence, it means that she is impressed else if she doesn't smile then it means that she is not impressed.
Given a few sentences and the word "yes", if she smiles, or "no", if she doesn't, print how many words makes her smile. (quotes for clarity).
Example: "you are pretty" doesn't make her smile. And "you are very pretty", makes her smile means the word "very" makes her smile.
Note: If she smiles at a sentence, then it would guarantee that there would be at least one word in that sentence that is not there in sentences that doesn't make her smile.
Input:Input starts with an integer T, the number of test cases.
Each test case would have an integer S on a newline representing the number of sentences in that case. There would be S sentences after that, each on a newline, and between each sentence would be a word "yes" or "no" on a newline. Sentences would be words containing letters 'a' to 'z', inclusive, separated by single spaces. (Quotes for clarity).
Output:Print the number of words that makes her smile for each case on a newline.
1<=characters in sentence<=100
you are pretty
how are you
you are good
Explanation for example 1: She smiles at the word "pretty"
|Tags||, bruteforce, keteki, maths|
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions