Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <cstring>
- using namespace std;
- char x[55], y[55];
- int main()
- {
- cin>>x>>y;
- int l=strlen(x);
- sort(x, x+l);
- sort(y, y+l);
- bool ok=true;
- for(int i=0; i<l && ok; i++)
- {
- if(x[i]!=y[i])
- ok=false;
- }
- if(ok)
- cout<<1;
- else
- cout<<0;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement