您当前的位置: 首页 > 

多源bfs Spicy Restaurant

钟钟终 发布时间:2022-05-01 14:22:13 ,浏览量:2

Spicy Restaurant 多源bfs+一个递推 做了好多题,这道题算做的比较少的题。

#include 

using namespace std;
int n,m,q,cnt,head[200005],w[100005],inf,dis[100005][105];
struct node
{
    int to,nxt;
}e[200005];

void add(int u,int v)
{
    e[++cnt].to=v;
    e[cnt].nxt=head[u];
    head[u]=cnt;
}
void bfs(int val)
{
    queueq;
    for(int i=1;i            
关注
打赏
1688896170
查看更多评论
0.0500s