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i=0;i<100;i++)
      scanf("%d",prob+i),ans[i]=0;
    for(i=0;i<100;i++)
      if(prob[i])
        for(j=0;j<100;j++)
          ans[j]^=table[i][j];
    for(j=0;j<10;printf("\n"),j++)
      for(i=0;i<10;i++)
        printf(i<9?"%d ":"%d",ans[i+j*10]);
  }
  return 0;
}

Measured memory_bytes: 0