daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Oct 21st, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     char c;
  6.     string s="",s1;
  7.  
  8.     freopen("nenokku_easy.in", "r", stdin);
  9.     freopen("nenokku_easy.out", "w", stdout);
  10.      while(cin >> c >>s1)
  11.     {
  12.         transform(s1.begin(), s1.end(), s1.begin(), ::tolower);
  13.         if(c=='?')
  14.         {
  15.             if(s.find(s1) != -1)
  16.                 cout<<"YES";
  17.             else
  18.                 cout<<"NO";
  19.         }
  20.         else if(c=='A')
  21.         {
  22.             s+=s1;
  23.         }
  24.     }
  25.     fclose(std)
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top