Codeforces Round 396 (Div. 2) 766A - Mahmoud and Longest Uncommon Subsequence Solution


 

 Problem Link : https://codeforces.com/problemset/problem/766/A

Solution in C++:

  1. /// La ilaha illellahu muhammadur rasulullah
  2. ///******Bismillahir-Rahmanir-Rahim******///
  3. /// Abul Hasnat Tonmoy
  4. /// Department of CSE,23rd batch
  5. /// Islamic University,Bangladesh
  6. ///**********ALLAH IS ALMIGHTY************///
  7. #include<bits/stdc++.h>
  8. using namespace std;
  9. int main()
  10. {
  11. string a, b ;
  12. cin >> a >> b ;
  13. if ( a == b ) cout <<"-1"<<endl;
  14. else cout <<max(a.size(),b.size())<<endl;
  15. return 0;
  16. }

No comments

Most View Post

Recent post

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.