• 2024-11-29洛谷P1807 最长路
    洛谷P1807最长路#include<bits/stdc++.h>#defineintlonglongusingnamespacestd;constintinf=-1e6;constintmaxx=2550005;intn,m,head,tail,g[1505][1505],q[maxx];intdp[1505];boolflag[1505];//flag记录点是否在队内signedmain(){ cin>>n>>m; f