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

×

Not getting AC in Warmhole problem.

I have been trying to solve Warmhole problem but I am getting not getting AC in two cases. I am getting NZEC for this two cases.

Here is the link to my solution, anyone please help me to figure out what is wrong in my solution.

asked 28 Jan '18, 10:21

arpit728's gravatar image

1★arpit728
6831968
accept rate: 10%

Anyone please answer this.

(28 Jan '18, 20:10) arpit7281★

@utkalsinha @vijju123 @kauts_kanu

Help me in solving this problem.

(02 Feb '18, 23:18) arpit7281★

I am unable to make out why you are getting runtime error :/ Everything looks fine to my eye.

(03 Feb '18, 10:14) vijju123 ♦♦5★

@mathecodician

Please help me with this.

(04 Feb '18, 17:20) arpit7281★

I'm having a look at your solution. (Expecting an index out of bounds error).

Meanwhile, you might try to find the bug using my java AC solution.

https://ideone.com/yBpEb3

(04 Feb '18, 19:04) taran_14076★

The problem was with your IO (and might be with binary search, but not sure).

I have edited your binary search part (only a bit) + replaced IO with my template (feel free to copy, if you need) and here's the link to your corrected solution.

https://ideone.com/viFI0u

link

answered 04 Feb '18, 19:38

taran_1407's gravatar image

6★taran_1407
4.0k31104
accept rate: 22%

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,664
×862
×435

question asked: 28 Jan '18, 10:21

question was seen: 311 times

last updated: 04 Feb '18, 19:38