Every time to use a value, its data type must be given attention.
I want to calculate the Dijkstra shortest path with using input graph. However, I carelessly use "int snd, rcv, num; fin >> snd >> rcv >> num" and later I use "100/num" to modify the "num" to be a distance between two nodes. That is the minor but huge mistake! It took me two days and made me feel so disappointed about my algorithm. Thank God. I finally found this bug and hope the updating result will be good.
This stupid mistake had been made before. Next time, take very carefully about the data type! It is worth checking!