title: Delete all the characters in string S1 that occured in string S2
body: <p>Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. How to calculate S1 - S2 for any given strings as fast as possible?</p>
  
  <p>for example :</p>
  
  <p>Input:</p>
  
  <p>They are students.</p>
  
  <p>aeiou</p>
  
  <p>Output:</p>
  
  <p>Thy r stdnts.</p>
  
  <p>I've tried the hash map,sadlly the judger said that it is too slow,but can any solution be faster ?</p>
  
  <p>Here is my code :</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  bool occur[300]={false};
  int main()
  {
      char str1[10002];
      gets(str1);
      char ch;
      while((ch=getchar())!='\n')
          occur[ch]=true;
      int i;
      for(i=0;i&lt;strlen(str1);i++)
          if(occur[str1[i]])
              continue;
          else
              putchar(str1[i]);
      putchar('\n');
      return 0;
  }
  </code></pre>