题目
添加链接描述
题解dfs+剪枝。
剪不出来,45%。看做出来的网上的题解也少,还看不懂。 就先这样吧。
有大佬会的话可以评论一下,请教一下。
代码#include
using namespace std;
const int N = 100;
struct node{
double x, y;
}a[N], b[N];
double ans = 1e18, dis[N][N], minpath;
int vis[N], op[N], out[N], n, m, k;
void dfs(int x, int step) {
if(step>k) {
double res = 0;
for(int i = 1;i m>>k;
for(int i = 1;i >a[i].x>>a[i].y;
for(int i = 1;i >b[i].x>>b[i].y;
for(int i = 1;i
关注
打赏