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

×

Not getting AC in video game problem, help me.

I have been trying to solve this question but my solution is failing one test case and I am not able to figure out what is wrong with my solution.

Here is link to my solution, please help me in figuring out what is wrong with my solution.

asked 26 Jan '18, 19:58

arpit728's gravatar image

1★arpit728
6831868
accept rate: 10%


Check your case 2 " if (cranePosition < commands.length - 1) " rather than "command.length-1" shouldnt it be a.length-1 .

link

answered 27 Jan '18, 02:30

phantomhive's gravatar image

4★phantomhive
944
accept rate: 0%

edited 27 Jan '18, 02:31

Thanks @phantomhive

Such a silly mistake I did.

(27 Jan '18, 10:05) arpit7281★
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:

×2,474
×856
×427

question asked: 26 Jan '18, 19:58

question was seen: 233 times

last updated: 27 Jan '18, 10:05