title: somehow testcase 0 does not take any input nor does it do anything
body: <p>So i am suppose to get line of word and then sort it. but somehow it only worked when j is 1 or above, which means testcase 0 does not do anything... can you tell me how to fix it?</p>
  
  <pre><code>#include &lt;bits/stdc++.h&gt;
  #include &lt;algorithm&gt;
  #include &lt;unordered_set&gt;
  using namespace std;
  
  
  int main() {
      int tcase, j;
      vector&lt;string&gt; ars;
      cin&gt;&gt;tcase;
      for(j=0; j&lt;=tcase; j++){
          ars.clear();
          string t;
          getline(cin,t);
          istringstream iss(t);
          string word;
          while(iss &gt;&gt; word) {
              ars.push_back(word);
          }
  
          sort(ars.begin(), ars.end());
          auto it = unique(ars.begin(), ars.end());
          ars.erase(it, ars.end());
  
          for(int i=0; i&lt;ars.size(); i++){
              cout&lt;&lt;ars[i]&lt;&lt;" ";
          }
          cout&lt;&lt;'\n';
      }
      return 0;
  }`
  Edit: also initializing j to 1 does not work, which means it need 3 times of looping if there is 2 lines of input
  </code></pre>