You are not logged in. Please login at www.codechef.com to post your questions!

×

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

asked 28 Jul '14, 19:07

ayushi_jha's gravatar image

3★ayushi_jha
114
accept rate: 0%


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];

}

}

link

answered 29 Jul '14, 01:14

ironmandhruv's gravatar image

4★ironmandhruv
333239
accept rate: 20%

edited 29 Jul '14, 03:37

Thanks!! It worked perfectly, phew!

(29 Jul '14, 07:54) ayushi_jha3★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,044
×829
×328
×53

question asked: 28 Jul '14, 19:07

question was seen: 726 times

last updated: 29 Jul '14, 07:54