title: What exactly is the SIGABRT error?- Codechef
body: <p>//The problem is not on my computer, the problem is "SIGABRT Run time error" When I post it //on the codechef page. Please help.<br>
  //No details are actually required as the required output is coming on my laptop. Its only //on codechef that the problem exists.</p>
  
  <pre><code>#include &lt;cstdlib&gt; 
  #include &lt;cstdio&gt;
  #include &lt;ctime&gt;
  #include &lt;iostream&gt;
  </code></pre>
  
  <p>//Alien Chefs question on codechef</p>
  
  <pre><code>using namespace std;
  
  int check(int, int[], int[]);
  
  int *grpDone = 0;
  int n, q, k, s[100001], e[100001], alienTime[21];
  </code></pre>
  
  <p>// Please see where I should make changes as this is the 1st time i posted something on codechef.
      struct timeDetail
      {
          int count;
          int curr;
          int *vids;</p>
  
  <pre><code>    timeDetail() {
          count = 0;
          curr = 0;
          vids = (int*)calloc(n, sizeof(int));
      }
  
      ~timeDetail() {
          free(vids);
      }
  
      void addVid(int n) {
          vids[curr++] = n;
      }
  
      int getNumVids() {
          return curr;
      }
  }*atTime ;
  int main() {
      int maxTime = 0;
      scanf(" %d", &amp;n);
      for(int i=1; i&lt;=n; i++) {
          scanf(" %d %d", &amp;s[i], &amp;e[i]);
          if(e[i] &gt; maxTime)
              maxTime = e[i];
      }
  
      atTime = new timeDetail[maxTime+1];
      scanf(" %d", &amp;q);
      for(int i=1; i&lt;=q; i++) {
          scanf(" %d", &amp;k);
  
          ::grpDone = (int*)calloc(n+1, sizeof(int));
          int totVids = 0;
          for(int j=1;j&lt;=k;j++) {
              scanf(" %d", &amp;alienTime[j]);
              int numVids = 0;
              numVids = check(alienTime[j], s, e);
              totVids += numVids;
          }
          printf("%d\n", totVids);
          free(::grpDone);
      }
      return 0;
  }
  
  int check(int t, int s[], int e[]) {
      int prevFound = atTime[t].getNumVids();
      int numVids = 0;
      if(prevFound &gt; 0) {
          for(int i = 1; i&lt;=prevFound; i++) {
              if(::grpDone[atTime[t].vids[i]] == 1)
                  continue;
              else {
                  ::grpDone[atTime[t].vids[i]] = 1;
                  numVids++;
              }
          }
          return numVids;
      }
      for(int i=1; i&lt;=n; i++) {
          if(t&gt;=s[i] &amp;&amp; t&lt;=e[i]) {
              atTime[t].addVid(i);
              if(::grpDone[i] == 1) {
                  continue;
              } else {
                  ::grpDone[i] = 1;
                  numVids++;
              }
          }
      }
      return numVids;
  }
  </code></pre>