HDU 3585 maximum shortest distance 二分+最大团

基于SHIS凝视型短波红外高光谱相机(900-1700nm)区分不同宝石的差异性和可分性(宝石分选) SHIS系列凝视型高光谱相机基于液晶可调谐滤波器(LCTF),通过电控LCTF进行连续细分窄波段分光,对每个波段进行高分辨率的二维面阵成像,进行图像处理后,获得完整的高光谱高清图像序列。具有低功耗、小型化、使用方便和易于扩展的优势。其工作波段覆盖400nm至1000nm,能够捕捉宝石在不同波长下的光谱特征,为宝石鉴定提供了新的工具。 阅读详情
题意:n个点中找k个点使得它们最短距离最长。
思路:二分,二分这个距离。(如果一条边的长度>=这个距离,就可以连边。)然后看看最大团的大小,比k大还是比k小。

http://acm.hdu.edu.cn/showproblem.php?pid=3585

/*********************************************
    Problem : HDU 3585
    Author  : NMfloat
    InkTime (c) NM . All Rights Reserved .
********************************************/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <string>
#include <cstdio>
#include <vector>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>

#define rep(i,a,b)  for(int i = (a) ; i <= (b) ; i ++) //遍历
#define rrep(i,a,b) for(int i = (b) ; i >= (a) ; i --) //反向遍历
#define repS(it,p) for(auto it = p.begin() ; it != p.end() ; it ++) //遍历一个STL容器
#define repE(p,u) for(Edge * p = G[u].first ; p ; p = p -> next) //遍历u所连接的点
#define cls(a,x)   memset(a,x,sizeof(a))
#define eps 1e-8

using namespace std;

const int MOD = 1e9+7;
const int INF = 0x3f3f3f3f;
const int MAXN = 55;
const int MAXE = 2e5+5;

typedef long long LL;
typedef unsigned long long ULL;

int T,n,m;

int fx[] = {0,1,-1,0,0};
int fy[] = {0,0,0,-1,1};

struct Point {
    double x,y;
    double dist(const Point & B) const {
        return sqrt((x-B.x) * (x-B.x) + (y-B.y) * (y-B.y));
    } 
}A[MAXN];

double M[MAXN][MAXN];
int dp[MAXN];
int best;

bool dfs(int * id,int top,int cnt,double r) { 
    //id是和当前点有连接的数组,top是这个数组的长度,cnt已经找到的最大团的大小
    //id数组从1到n
    if(!top) { //dfs的结束标志
        if(best < cnt) {
            best = cnt ;
            return true; //代表这次搜索更新了结果
        }
        return false;
    }
    int a[MAXN];
    rep(i,1,top) {
        if(cnt+top-i+1<=best) return false; 
        //(top-1)-i+1是后继节点生效的个数 因为i是从0开始的 , top-i是在逐渐减少的,所有不用考虑后面的状态
        if(cnt+dp[id[i]]<=best) return false; 
        //cnt现在找到的最大团的个数 + dp[id[i]] , dp[id[i]] 是以id[i]开头最大的最大团个数
        //如果cnt+dp[id[i]]<=best就没有搜索的必要了 , 因为dp[id[i+k]] (k >= 1) 必然 <=dp[id[i]];
        int lan = 0;
        rep(j,i+1,top) if(M[id[i]][id[j]] >= r) a[++lan] = id[j]; 
        //有多少个点和id[i]这个点是连接 , a数组是不能预处理的,因为id[]是不确定的  
        if(dfs(a,lan,cnt+1,r)) return true;
        //因为每一次搜索最多只会让最大独立团的个数+1,所以如果更新过一次,就不用继续搜了。
    }
    return false;
}

int max_clique(double r) {
    int id[MAXN];
    best = 0;
    rrep(i,1,n) {
        int top = 0;
        rep(j,i+1,n) if(M[i][j] >= r) id[++top] = j;
        dfs(id,top,1,r);
        dp[i] = best;
    }
    return best;
}

int k;

void debug() {
    rep(i,1,n) {
        rep(j,1,n) printf("%f ",M[i][j]);
        puts("");
    }
}

void input() {
    rep(i,1,n) scanf("%lf %lf",&A[i].x,&A[i].y);
}

void solve() {
    rep(i,1,n) rep(j,1,n) M[i][j] = A[i].dist(A[j]);
    // debug();
    double l = 0 ; //二分长度
    double r = 20000;
    while(fabs(l-r)>eps) {
        double mid = (l + r) / 2;
        if(max_clique(mid) >= k) l = mid; 
        else r = mid;
    }
    printf("%.2f\n",l);
}

int main(void) {
    // freopen("a.in","r",stdin);
    while(~scanf("%d %d",&n,&k)) {
        input();
        solve();
    }
    return 0;
}
毕设别再硬肝了:我用 GPT + Codex 做项目、写论文,效率直接起飞 这个也是神器。你项目做完之后,最怕的是老师一问就懵。这时候你直接把你的项目发给它,让它模拟老师提问。这是我的毕业设计题目和项目简介,请你站在答辩老师角度,提出20个高频问题,并给出简洁好背的回答。要求:问题尽量贴近计算机专业本科毕业答辩。为什么选这个题目?技术选型为什么这样定?你的创新点是什么?系统难点是什么?数据库怎么设计的?你的模型为什么选这个?如果继续优化,下一步怎么做?这个对答辩真的帮助很大。说实话,如果没有 GPT + Codex, 阅读详情

相关推荐

STM32H743VIT6最小系统板PCB设计全流程(AD09实战教程+封装库分享)

本文详细介绍了基于STM32H743VIT6高性能MCU的最小系统板PCB设计全流程。内容涵盖从项目规划、原理图设计到PCB布局布线的AD09实战操作,重点解析了高速电路设计中的电源、时钟、去耦等关键模块的处理要点与常见陷阱,并分享了经过验证的封装库资源,旨在为工程师提供一套完整、可靠的设计方法与实战参考。

weixin_29194693的博客 118

HDU 3585 Maximum Shortest Distance 最大团 二分答案

平面上有N个点,确定k个点使其中各点对距离的最小值最大。有多组数据。 这个最优化问题本身似乎不好解决,所以还是二分一下吧。。 如果已知距离的最小值mid,判定是否存在k个点且两两距离均超过mid。 将距离超过mid的点连起来求一下最大团即可。 二分的时候跪了。。 判断二分结束的条件r - l > 1e-4,写1e-3就WA了。。 这个故事告诉我们不要吝啬。。开够保证正确性为好。

とある黄鱼のOIブログ 1122

Calibre电子书阅读器个性化样式定制指南

本文详细介绍了如何通过Calibre电子书阅读器的用户样式表功能进行深度个性化样式定制。从修改全局字体、行距、背景配色(包括深色/浅色模式)到美化代码块、引用等特殊元素,本指南提供了完整的CSS代码示例与实战技巧,帮助用户打造专属的舒适阅读环境,显著提升电子书阅读体验。

vv45678的博客 920

HDOJ 2585 maximum shortest distance(求最大团+二分)

maximum shortest distance Time Limit: 2000/1000 MS(Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1879    Accepted Submission(s): 643 Problem Description There

Dust_heart的博客 413

工业音频故障检测:从CNN到Transformer的技术演进

音频信号处理是工业设备预测性维护的核心技术之一,通过分析设备运行时产生的声波特征实现故障预警。传统方法依赖梅尔频率倒谱系数(MFCC)等手工特征,而深度学习技术尤其是Transformer架构,通过自注意力机制突破了CNN在跨频段特征提取上的局限。Audio Spectrogram Transformer(AST)等先进模型在工业场景中展现出91.2%的高召回率,显著优于传统方案。这种非接触式监测技术结合边缘计算优化,已成功应用于石油化工、电力能源等领域,实现提前72小时预测轴承故障,单项目可避免数百万元的

weixin_30467861的博客 326

保姆级教程:在RK3568开发板上手把手配置RMII百兆以太网DTS节点

本文提供了一份详细的RK3568开发板RMII百兆以太网DTS节点配置教程,涵盖基础概念解析、关键参数设置、实际操作步骤及常见问题排查。通过手把手指导,帮助开发者快速完成RK3568开发板的以太网配置,特别适合嵌入式系统开发者参考。

weixin_33686714的博客 137

集训队专题(5.1)1003 maximum shortest distance

maximum shortest distance Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1386    Accepted Submission(s): 469 Problem Description T

RaAlGhul的博客 462

【图像超分】论文复现:Pytorch实现ESPCN

论文精读:由于ESPCN没有公布源码,我们选择github上一个高star的项目来复现。准备数据集,以及数据预处理搭建网络模型设置参数并训练测试训练好的模型用训练好的模型测试自己的数据本文我们使用pycharm链接服务器训练。

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 1万+

hdu3585 二分最大团(dp优化)

题意 给你一些点( <= 50),让你找到k个点,使得他们之间的最小距离最大。 思路: 求最小的最大,我们可以直接二分去枚举距离,但是要注意,不要去二分double找距离,要知道,最后的答案肯定是其中某个点的两点距离,所以我们直接把所有点的距离求出来,放一个数组里面,然后so...

墨鱼菜鸡 312

21天学会基于 Linux 的 NPU 固件开发--12.3 如何参与 Linux 内核 NPU 子系统开发

从修复一个简单的文档拼写错误开始,或者为现有的开源 NPU 驱动(如 Sophgo, StarFive, Etinix 等厂商已上游化的驱动)添加一个缺失的 IOCTL 支持或优化一个算子,都是伟大的第一步。在 2026 年的 Linux Kernel (v6.12+) 中,NPU 驱动不再是孤立的字符设备,而是深度集成在 DRM 和 DMA-BUF 生态中,实现了与 GPU 类似的资源管理和调度能力。内核驱动必须提供清晰的 UAPI (User API),通常定义在。Step 4: 合并 (Merge)

amy_mhd的博客 66

SpringBoot4.0+JDK25+GraalVM实战:云原生新纪元,微服务性能翻倍的落地指南

三者的组合不是偶然,而是“框架优化+JDK升级+虚拟机革新”的必然结果——SpringBoot4.0完善了对GraalVM原生镜像的支持,JDK25强化了云原生与AOT编译能力,GraalVM则提供了极致的启动速度和资源利用率,三者协同,刚好命中云原生微服务的核心痛点。SpringBoot4.0+JDK25+GraalVM的组合,不是简单的版本升级,而是云原生微服务的一次性能革命。

2601_94871597的博客 1141

HDU 3585 maximum shortest distance 最大团+简单的二分思想

题意:给你n个点,然后你可以从里面找出k个点,然后使得k个点中的最短距离最大。 想法:直接二分枚举最大距离,然后把满足的边找出来,然后就看看这些点的最大独立点集,如果个数>=k,那么显然长度可能可以更长一些,所以继续枚举,如果 #include #include #include #include #include using namespace std; const int

猫ER 891

ArcGIS:景观指数和景观单元关联生成景观指数遥感图像

优快云@_养乐多_本文将记录,使用由 Fragstats V4.2 软件计算的景观指数和瓦片 tif 数据生成景观指数图像的操作步骤。本教程的操作均在ArcGIS上进行,最后生成一个研究区内指定景观单元大小的景观指数图像。结果如下所示,

养乐多的博客 4929

【二分+最大团】【HDU3585】【maximum shortest distance】

题目大意 在N个点钟 选出K个点 使得这K个点间的最小距离最大 二分距离,然后如果两点间距离小于它的边当做不存在,求出最大团,如果最大团>=K,向上缩小区间 OK~ #include #include #include #define eps 1e-7 using namespace std; int n,k,vis[55],tmax,dp[55],ji; i

学习之路 813

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

HDU 3585 maximum shortest distance (二分+最大团)

题意:有n个点。选取k个点(k> = 2),并在这k点中最近的两个点距离最远。 题解:二分+最大团 最近的最远,往二分上面靠。 由于最近的两个点所连的边是k点构成完全图中边权最小的,那么其他的边必然大于等于该值,那么我们二分这个答案即可。 对于二分的mid,每次将大于等于mid的边连上,然后跑最大团(点点直接相连才能保证最短边权,若不是完全图则必然存在小于mid的边),若最大团的结点数大于等于k,则最大团存在结点数等于k,且最小边权大于等于mid的子图。 #define _CRT_SECURE_NO_

gongyuandaye的博客 222

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

Maximum Shortest Distance 最大团 二分答案 HDU 3585

题意:给出n个点 要求取k个点 这k个点中 距离最小的两个点要求距离最大 拿到手看不出是最大团 也看不出是二分答案(第一次用) 因为答案必然存在 一定有一个最值 所以用二分答案来做 最大距离为根号二乘10000 所以R=20000 且R-L>1e-4; #include<bits/stdc++.h> using namespace std; ...

weixin_30911809的博客 165

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

HDU - 3585 maximum shortest distance 最大团高效模板 + 二分

题意: 从n个点中选取k个点,使得在选取的所有边的距离中最短的最长,求出这个距离。 如果看成一个图的话就可以全部连边成完全图,就可以二分答案用最大团去做。 图论真的是模板效率重要哇,刚一开始我的板子一直t。。。 链接:hdu - 3585 AC代码: /* 最大团 = 补图G的最大独立集数 ———&gt;最大独立集数 = 补图G'最大团 */ //最大团模板 #include &lt;...

陌离将离 346

HDU - 3585 maximum shortest distance(二分+最大团)

maximum shortest distanceTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2385    Accepted Submission(s): 783Problem DescriptionThere are n point...

LP_Cong 552

hdu 3585 maximum shortest distance(二分+最大团)

二分距离,求最大团,看是否>=K View Code #include<iostream> #include<algorithm> #include<string> #include<math.h> using namespace std; const int N = 50+10; int dis[N][N],dd[N*N...

weixin_30725467的博客 149

HDU - 3585 maximum shortest distance

There are n points in the plane. Your task is to pick k points (k>=2), and make the closest points in these k points as far as possible. Input For each case, the first line contains two integers n ...

青烟绕指柔的博客 547

hdu 3585 maximum shortest distance 二分小技巧

这道题是学习了最大团过程中遇到的一道题目,最大团学习中的体会就是搜索的基本功还是不扎实,最大团是一个NP完全问题(不懂装懂了),现在还没多项式算法,只能靠启发式搜索或者是回溯来实现了。回溯法也可以通过各种剪枝来优化。     回到这道题目,意思就是给定平面上一些点,求出K个点满足其实每个点的距离都大于M,求M.     通过不断的二分距离,如果距离大于二分出来的距离,那么就建边,求出最大团,就

春天小猪 732

HDU3585 最大团+二分

maximum shortest distance Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1777Accepted Submission(s): 589 Problem Description There ...

anuancong1219的博客 173

hdu3585 maximum shortest distance

maximum shortest distance Problem Description There are n points in the plane. Your task is to pick k points (k>=2), and make the closest points in these k points as far as possible.  

_zidaoziyan的博客 803

HDU3585-二分+最大团

maximum shortest distance Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1819    Accepted Submission(s): 609 Problem Description T

Code-Dreamer的博客 663

HDU - 3585 最大团 + 二分

题意: 给出n个点,要求在其中找到k个点,使得任意两个点的最短距离最大。 思路: 最大化最小值,很明显要二分答案判断是否可行,关键是判断可行的方案,直接对于这n个点求一个最大团,这个团满足任意两个点的距离都要大于等于当前二分的答案,看这样求出的最大团的大小是否大于等于k。 代码: #include #include #include #include #include

Bahuia的博客 461

hdu3585(最大团)

链接;点击打开链接 题意:给出n个点找出k个点两两相连并使得最短边最长 代码:#include #include #include #include #include #include using namespace std; const int INF=0x3f3f3f3f; int V,K,bestn; double len[105*105],x[105],y[105],tmp

stay_accept的专栏 762
上一篇: HDU 1914 The Stable Marriage Problem 稳定婚姻问题 (接着水)
下一篇: SICP 习题1.3
_NMfloat_
博客等级 码龄12年 7粉丝 315原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值