WA in SUMTRIAN

The codechef compiler shows wrong answer, while on my compiler it works completely fine. What am I missing?
Here’s my submission:
http://www.codechef.com/viewsolution/4397508

Minor mistake.
here’s the link to your AC code(done in C but that’s irrelevant).

http://www.codechef.com/viewsolution/4398960

You just have to initialise m=0 inside your while loop(while(t–)).
ie

m=0;

for(j=0;j<=n;j++)
{

if(m<=b[n-1][j])
{

m=b[n-1][j];

}

}

1 Like

Thanks!! It worked perfectly, phew!

//