766A Codeforces - Mahmoud and Longest Uncommon Subsequence






Solution in c++

#include <bits/stdc++.h>

using namespace std;

string a,b ;

int  as,bs;

int main()
{
    cin>>a>>b;

    as=a.size(),bs=b.size();

    if(as!=bs || a!=b){
        cout<<max(as,bs);
        return  0;
    }
   
    cout<<-1;

    return 0;

}

Share on Google Plus

About Mohamed Sobhi

My name is Mo.Sobhy ,I study at School excelling high school in Ain Shams ,Cairo
My hobbies is programming ,and web development ,playing chess and writing horror stories.
    Blogger Comment
    Facebook Comment

0 التعليقات:

إرسال تعليق