是不是在存图的时候可以优化一下,但蒟蒻不会qwq,望各位指教
by KonJAC_xrs @ 2021-09-25 21:19:23
![qq_emoji: bx](https://z3.ax1x.com/2021/05/30/2VNbwQ.png)
by int32 @ 2021-09-25 21:29:09
这题卡 A*,我写的时候下了两个点
by Isshiki·Iroha @ 2021-09-25 21:31:55
@[Isshiki·Iroha](/user/414386) 问题是它蚌的测试点挺多啊qwq
by KonJAC_xrs @ 2021-09-25 21:48:53
@[int32](/user/142548) ![](https://xn--9zr.tk/tyt)
by KonJAC_xrs @ 2021-09-25 21:49:50
giegie们帮帮我 ![](https://xn--9zr.tk/kel)
![](https://xn--9zr.tk/kel)
by KonJAC_xrs @ 2021-09-25 21:53:14
@[xrs蒟蒻](/user/385349) Astar()里的q.top().first是用来干什么的啊
by hjxhjx @ 2021-09-26 10:23:47
@[xrs蒟蒻](/user/385349)
啊不对当我没说
Astar里面那个`pair<double,pair<double,ll> >`的第一个double显然是可以省掉的吧...
by hjxhjx @ 2021-09-26 10:28:50
@[hjxhjx](/user/178480) 为啥嘞,这不是正着跑吗,删掉它怎么更新啊qwq
by KonJAC_xrs @ 2021-09-26 10:36:45
@[xrs蒟蒻](/user/385349)
改成这样:
```cpp
struct node{
int now; //当前节点
double g; //从 1 到 now 的实际代价
node(int x,double d){
now = x;
g = d;
}
friend bool operator>(node a,node b){
return a.g+dis[a.now]>b.g+dis[b.now]; //dis[a.now]是从 now 到 n 的估计代价
}
};
```
by hjxhjx @ 2021-09-26 10:52:11