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

×

[closed] WALK prob WA

I tried solving the WALK problem using the editorial but I am getting WA. Kindly tell me the error :)

www.codechef.com/viewsolution/3649113

asked 27 Mar '14, 16:18

sandy999's gravatar image

2★sandy999
39111638
accept rate: 10%

closed 18 Jan '15, 12:56

The question has been closed for the following reason "The question is answered, right answer was accepted" by sandy999 18 Jan '15, 12:56


@sandy999 : You logic is wrong . The answer to the problem is max(a[i]+i) for i from 0 to n-1 .

link

answered 27 Mar '14, 16:33

vineetpaliwal's gravatar image

6★vineetpaliwal
12.4k47107171
accept rate: 12%

edited 27 Mar '14, 16:33

Thanks @vineetpaliwal I finally got AC :D

(27 Mar '14, 19:28) sandy9992★

try this test case:

1

6

6 1 2 3 4 5

your output is 6 but correct answer is 10

link

answered 27 Mar '14, 17:00

anshkhanna7's gravatar image

4★anshkhanna7
1933927
accept rate: 23%

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:

×21
×4

question asked: 27 Mar '14, 16:18

question was seen: 558 times

last updated: 18 Jan '15, 12:56