这道题比较简单,就是一个最短路(SSSP).数据水,用Floyd即可AC.这里用了Dijkstra. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace std; #define re register #define rep(i, a, b) for (re int i = a
1060 Are They Equal (25 分) If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0 with simple chopping. Now given the number of significant digits on a machine and tw