Header Ads Widget

Will she accept him?


A love Guru determines "whether a guy's proposal is going to be accepted by his crush or not" just by doing some mysterious calculation on their names, but it takes too much time for him. So, he hired you as a programmer and now your task is to write a program that helps the Guru.

He reveals his mystery with you and that is:

If the guy's name is a subsequence of his crush's name, then she is going to accept him, otherwise she will reject him.


First line contains T, the number of test cases.
Next T lines contain two strings S1 and S2 which are the guy's name and his crush's name respectively.


For each test case, according to Guru's mystery, if the crush is going to accept the guy then print "Love you too", otherwise print "We are only friends".


strings contain only lowercase Latin letters. 







Sample Input
kalyan nobodyintheworld
rahul allgirlsallhunontheplanet
physicsguy nobodynobodylikesitbetter
lal llaggyel
Sample Output
We are only friends
Love you too
We are only friends
Love you too
Time Limit: 1
Memory Limit: 256
Source Limit:


using namespace std;
int main()
  int n;
  string s1,s2;
    int j=0;
    int l;
    for(int i=0;s2[i];i++)
     cout<<"Love you too"<<endl;
     cout<<"We are only friends"<<endl;
  return 0;

Post a Comment