[关闭]
@lychee123 2017-02-15T03:00:45.000000Z 字数 418 阅读 992

Codeforces Round#396 (Div.2) A(两个字符串的最长的不相等子串的长度)

思维题


  1. #include<stdio.h>
  2. #include<iostream>
  3. #include<string.h>
  4. #include<algorithm>
  5. using namespace std;
  6. string a,b;
  7. int main()
  8. {
  9. cin>>a>>b;
  10. int l=max(a.length(),b.length());
  11. if(a==b)
  12. printf("-1\n");
  13. else
  14. printf("%d\n",l);
  15. return 0;
  16. }

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注