Medeali's blog

By Medeali, history, 6 months ago, In English

I am trying to solve this problem https://www.spoj.com/problems/NDIV/ this is my code https://www.ideone.com/c9uEMT i got SIGKILL but i am confused what is wrong with my code

  • Vote: I like it
  • -3
  • Vote: I do not like it

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

You can not allocate an array of size $$$\max(a, b)$$$ since $$$a$$$ and $$$b$$$ can be up to $$$10^9$$$.

int*A=new int[max(a,b)+1];
bool*B=new bool[max(a,b)+1];