摘要:
题解: 第一题,水题,把点拆了,dis[i][j]表示当前在i点经过了j个城市的最小距离,然后建一个大的S,T,跑一遍SPFA就可以了,dijstra巨慢(好多人都被卡了,数据很绝); #include<bits/stdc++.h> using namespace std; const int M 阅读全文
摘要:
题解: 第一题:二分+贪心;二分距离上限,两端的人能从两端取就从两端取,这样可以为中间的做贡献; #include<bits/stdc++.h> using namespace std; const int M = 10005; int a[M], b[M], pos[M], x, n, m; bo 阅读全文