Codeforces Round 396 (Div. 2) 766A - Mahmoud and Longest Uncommon Subsequence Solution
Problem Link : https://codeforces.com/problemset/problem/766/A
Solution in C++:
- /// La ilaha illellahu muhammadur rasulullah
- ///******Bismillahir-Rahmanir-Rahim******///
- /// Abul Hasnat Tonmoy
- /// Department of CSE,23rd batch
- /// Islamic University,Bangladesh
- ///**********ALLAH IS ALMIGHTY************///
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- string a, b ;
- cin >> a >> b ;
- if ( a == b ) cout <<"-1"<<endl;
- else cout <<max(a.size(),b.size())<<endl;
- return 0;
- }
No comments