Getting wrong answer in SPOJ
val ka size should be n
Problem still persists! Getting compilation error in your code as well. And after making the said change, I’m getting TLE. https://ide.codingblocks.com/s/285162
convert data type to long
and instead of dynamic allocation using new operator for array use static definition
Getting compilation error in your code
i tried it again it submits well
https://ide.codingblocks.com/s/285581 Please try submitting the code in this link. I’ve tried numerous times, it is always showing wrong answer.
I used the following two compilers: gcc 8.3 and g++ 4.3.2
i guess u skipped this