摘要: 洛谷P1345 假设原来的点编号为i,总共有n个点,那么我们就把每个点拆成两个点,编号分别为i和i+n。其中点i负责连接原图中连入这个点的边,点i+n负责连原图中连出这个点的边。 add ( i, i+n, 1 ) ; add ( i+n, i, 0 ) ; 对于原图中本来就存在的边,它们只是有一个 阅读全文
posted @ 2025-10-09 18:56 xdhking 阅读(6) 评论(0) 推荐(0)
摘要: 洛谷p4014 #include<bits/stdc++.h> using namespace std; const int N=120; const int M=N*N+(N<<1); struct edge{int v,c,w,ne;}e[M]; int h[N],id=1; int n,s,t 阅读全文
posted @ 2025-10-09 15:05 xdhking 阅读(16) 评论(0) 推荐(0)