http://www.codechef.com/viewsolution/5463660
Above code shows wrong answer…
can anyone plz check it …
http://www.codechef.com/viewsolution/5463660
Above code shows wrong answer…
can anyone plz check it …
printf("%lld\n",ans[i]);
^
you can directly do printf("%lld\n",n*(n-1)/2);
there is no need to use array.
thanks bro …
i didnt see that comin