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



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.

asked 16 Jan '13, 22:22

c0dect's gravatar image

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.


answered 17 Jan '13, 01:32

anton_lunyov's gravatar image

6★anton_lunyov ♦
accept rate: 12%

Thanks a lot.. :)

(17 Jan '13, 16:43) c0dect3★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 16 Jan '13, 22:22

question was seen: 662 times

last updated: 17 Jan '13, 16:43