//
// Created by 55062 on 2024/3/16.
//
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,m,a,b,vv,w,ans[100010],vis[100010],cnt;
struct node{
ll x,value;
bool operator<(const node & a) const{
return value>=a.value;
}
};
priority_queue<node> q;
vector<ll> v[100010];
void BFS(){
while(!q.empty()){
ll x=q.top().x,value=q.top().value;
q.pop();
if(x==b){
cout<<value;
exit(0);
}
for(int i=0;i<v[x].size();i++){
ll nx=v[x][i];
if(vis[nx]==0){
q.push({nx,value+1+(ans[nx]-ans[x])});
vis[nx]=1;
}
}
}cout<<"No solution";
exit(0);
}
int main() {
cin>>n>>m>>a>>b;
for(int i=0;i<n;i++) cin>>ans[i];
for(int i=1;i<=m;i++){
cin>>vv>>w;
v[vv].push_back(w);
}vis[a]=1;
q.push({a,0});
cout<<"No solution";
return 0;
}
这是我的蒟蒻代码,求反例呀