Dijkstra: Shortest Reach 2

  • + 1 comment

    OK, I got it. There is problem of precision in using cin and cout.

    So, I would like to know two things :

    (1) Is only cout creating problem, or both cin & cout? What I mean by this, is if cin is giving correct input value to variable with correct precision or not ?

    (2) How to make cout give correct precision (if cin is also responsible, then how to use both of them )? I would like to know a uniform way (if possible), which works with every floating point value.