GSFEB18D - Editorial

PROBLEMLink :

Contest

DIFFICULTY:

Simple

PROBLEM:

Based on the count of vowels in the Question string and Answer string decide if the output is “jane” or “secretbff”

PREREQUISITES :

String processing.

EXPLANATION :

The entire solution of this problem revolves around processing of strings.

The problem simply demands us to calculate the occurrence of vowels in the Question S and Answer M.

If the count of vowels in the question and answer are equal, the count of truths should be incremented else, the count of lies should be incremented.

At the end of each test case T, we need to check if the aggregate of truths is greater than or equal to that of lies. If it’s greater than or equal to the sum of lies, then, string “jane” must be printed as the output, else “secretbff” must be reproduced in the output.

AUTHOR’S AND TESTER’S SOLUTIONS :

Solution to this problem is available here.