#include#include #include using namespace std;int n,m,q;int dis[300][300],t[99999];int k;void work(int x,int y,int z){ while(t[k]<=z) { for(int i=0;i z||t[y]>z||dis[x][y]==2139062143) printf("%d\n",-1); else printf("%d\n",dis[x][y]);}int main(){ scanf("%d%d",&n,&m); for(int i=0;i
优化后的floyed,否则超时