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

×

CHEFHACK WA

Hi! I can't seem to figure out the error in the logic for this code. It seems pretty close to the editorial given. Could anyone just give me any direction or even a test case for which this would fail? I tried both, the DFS and the BFS implementation. Below is the link for the BFS implementation.

http://www.codechef.com/viewsolution/1724561

asked 16 Jan '13, 22:22

c0dect's gravatar image

3★c0dect
613
accept rate: 0%


You should print long long variable using specifier "%lld". Or just use cout.
It is fine to mix scanf and cout.

Also your implementation appears to be too slow. It gets TLE for some cases.

link

answered 17 Jan '13, 01:32

anton_lunyov's gravatar image

6★anton_lunyov ♦
6.7k62119138
accept rate: 12%

Thanks a lot.. :)

(17 Jan '13, 16:43) c0dect3★
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,070
×21

question asked: 16 Jan '13, 22:22

question was seen: 662 times

last updated: 17 Jan '13, 16:43