Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using ll=long long;
- int main()
- {
- string x;
- cin>>x;
- string t;
- cin>>t;
- int p=10;
- for(auto cl:t)
- {
- bool w=false;
- while(x.find(cl)!=string::npos)
- {
- x.erase(x.begin()+x.find(cl));
- w=true;
- }
- if(w==false){
- p--;
- }
- if(x.size()==0)
- {
- cout<<"WIN";
- return 0;
- }
- if(p==0)
- {
- cout<<"LOSE";
- return 0;
- }
- }
- cout<<"LOSE";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment