您当前的位置: 首页 >  蓝桥杯

不牌不改

暂无认证

  • 0浏览

    0关注

    422博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

[蓝桥杯][历届试题]邮局

不牌不改 发布时间:2021-08-03 10:57:41 ,浏览量:0

题目

添加链接描述

题解

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             
关注
打赏
1662186765
查看更多评论
0.0383s