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

×

[LEAD GAME]Please help getting wrong answer

I tried this program on my compiler with different test cases, It worked fine. But it is showing wrong answer on CodeChef. Here is the link to the solution -> http://www.codechef.com/viewsolution/5437498

asked 19 Nov '14, 18:18

angad_singh95's gravatar image

2★angad_singh95
4026
accept rate: 0%

edited 19 Nov '14, 18:37


Yoy have written

if(abs(d-e)>abs(c))
        {   c=a[t]-b[t];
        }

Instead it should be

if(abs(d-e)>abs(c))
        {   c=d-e;                              
        }
link

answered 19 Nov '14, 18:40

ads_123's gravatar image

3★ads_123
81114
accept rate: 10%

it worked thanks....(y)

(20 Nov '14, 18:59) angad_singh952★
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:

×3,820
×2,739
×1,491
×690
×558
×140
×63
×45

question asked: 19 Nov '14, 18:18

question was seen: 884 times

last updated: 20 Nov '14, 18:59