很多人一看到“CSTC”,就发颤,其实这道题就是一道超超超级水题。
不多说,上代码:
源代码 复制
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
namespace FGF{
int n,m,V;
const int N=1e5+5;
const ll INF=0x3f3f3f3f3f3f3f3f;
struct edg{
int to,nxt,w;
}e[N<<1];
int cnt,head[N],pre[N],ro,is[N],q[N];
ll dis[N],L[N],d[N];
namespace shortcut {
bool check(ll x){
ll PN,PP,NN,NP,PX,NX,cur;
int h=1,t=0;
PN=PP=NN=NP=PX=NX=-INF;
for(

本文介绍了洛谷P3771题目的详细解题过程,使用C++语言进行实现。文章通过源代码解析,展示了如何解决这道题目,包括数据结构和算法的应用。
最低0.47元/天 解锁文章
454

被折叠的 条评论
为什么被折叠?



