Saleh127

codeforces 801B.cpp

May 29th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define pi acos(-1)
  6. int main()
  7. {
  8. string a,c,d="";
  9. cin>>a>>c;
  10. for(int i=0;i<a.size();i++)
  11. {
  12. if(a[i]<c[i])
  13. {
  14. cout<<-1<<endl;
  15. return 0;
  16. }
  17. }
  18. cout<<c<<endl;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment