2019年9月16日

【简单的spfa+优先队列】

摘要: 题目是给出只有x和y构成的图,相同元素走路不花费,不同元素间花费1,给出起点终点,最少花费是 #include<cstdio>#include<algorithm>#include<math.h>#include<queue>#include<string.h>using namespace std 阅读全文

posted @ 2019-09-16 13:51 师姐的迷弟 阅读(342) 评论(0) 推荐(0) 编辑

【2019上海网络赛】

摘要: B题:分成两序列,A>B,A-(a[i]属于A里面的)<=B; #include<bits/stdc++.h>using namespace std;#define ll long longconst ll mod=1e9+7;const ll inf=1e18;ll dp[300*500+5];i 阅读全文

posted @ 2019-09-16 12:31 师姐的迷弟 阅读(106) 评论(0) 推荐(0) 编辑

导航