• + 2 comments

    I tried using an integer vector with the same approach. The only difference being vector int a(n+1); instead of long int *a=new long intN+1;

    It did not work. Wrong answer on TCs 5 to last. The same happened on using long int vector instead of int. Could somebody enlighten me as to why?