ssavi's blog

By ssavi, history, 8 years ago, In English

Hi Experts . I have about to Solve this Simple Floyd Warshall problem . I wrote the Code & Test the Random Inputs & Outputs of uDebug . They are okey for my Code . But I don't know Why I am getting Wrong Answer ??? What is the Critical Points I am missing ?? Please help me in finding out the Critical Points of the Problems ...

=> Problem Link :https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=1734&mosmsg=Submission+received+with+ID+16457817

=> My Code : http://ideone.com/ZRGBBr

[ Some Critical Tests and Points are Appreciable ]

Thanks in Advance . Thanks in Advance .

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't know exactly what is wrong with your code. I read it and the idea seems correct. Maybe there's something not working as expected in between all those variables and conditionals.

I implemented a similar idea and got accepted. Here is my code for reference, maybe it'll help you: C++ Code

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why did you used here unordered_set??

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I always use unordered_set when I don't need the elements to be ordered. Here, I just needed to check how many different elements there were, so unordered_set is the way to go.