|洛谷|搜索|NOIP2002|P1034 矩形覆盖

洛谷P1034 当 k=2 时,可用如图二的两个矩形 s1,s2覆盖,s1,s2​ 面积和为 4。将数据划分为k部分,表示k个矩形,用数组a来存储两个相邻矩形的中间点(中间点属于 前一个矩形)a[0]=0,a[k]=n。例如:当 n=4 时,4 个点的坐标分另为:p1(1,1),p2(2,2),p3(3,6),p4(0,7),见图一。拿到题面读懂题意后,如此之小的数据范围就告诉我们,这道题不是状压就是暴搜,你说状压吧又没看出来有什么好转移的东西,那就是暴搜跑不脱了。共一行一个整数,为满足条件的最小的矩形面积之和。 阅读详情

https://www.luogu.org/problem/show?pid=1034

/*https://www.luogu.org/problem/show?pid=1034
(NOIP提高组2002), 搜索 
思路:
建立hx[k][2], hy[k][2],代表第k个矩形的左上、右下坐标 
area[k] 代表第k个矩形面积
ans 代表当前最优解
进行搜索,把每一个点放到k个矩形里
1、如果这个点已经在k个矩形里,继续搜索,不进行更改
2、不在,则搜索放在1~k矩形里的情况,搜完要回溯 
剪枝:当前面积大于ans,直接退出 
*/
#include<cstdio>    
#include<algorithm>    
#include<cstring>    
#include<queue>
#include<vector>    
#define ms(i,j) memset(i,j, sizeof i);    
using namespace std;
int n,k; 
struct point{int x, y;}p[55];//点
int ans = 100000000;
int hx[10][2], hy[10][2], area[10],now=0;//回溯数组 
bool isin(int x,int y, int i)//(x,y)在不在第i个矩形里 
{
	if (x>=hx[i][0]&&y>=hy[i][0]&&x<=hx[i][1]&&y<=hy[i][1]) return true;
	return false;
}
bool isnear(int a, int b)//x矩形和y矩形是否相交 
{
	int flag = false;
	if (isin(hx[b][0], hy[b][0] ,a)) flag = true;
	if (isin(hx[b][1], hy[b][1] ,a)) flag = true;
	if (isin(hx[b][0], hy[b][1] ,a)) flag = true;
	if (isin(hx[b][1], hy[b][0] ,a)) flag = true;
	if (isin(hx[a][0], hy[a][0] ,b)) flag = true;
	if (isin(hx[a][1], hy[a][1] ,b)) flag = true;
	if (isin(hx[a][0], hy[a][1] ,b)) flag = true;
	if (isin(hx[a][1], hy[a][0] ,b)) flag = true;
	return flag;
}
void dfs(int a)//搜索第a个点 
{
	int tot = 0;
	for (int i=1;i<=k;i++) tot += area[i];
	if (tot>=ans) return ;//剪枝 
	if (a==n+1) ans = min(ans, tot); 
	bool flag = false;
	for (int i=1;i<=k;i++)//在k个矩阵里 
	{
		if (isin(p[a].x,p[a].y,i))
		{
			flag = true;
			dfs(a+1);
			return ;
		}
	}
	if (!flag)
	{
		for (int i=1;i<=k;i++)//不在k个矩阵里 
		{
			int last1x=hx[i][0], last1y=hy[i][0], last2x=hx[i][1], last2y=hy[i][1];
			if (p[a].x<=hx[i][0]) hx[i][0] = p[a].x;
			if (p[a].x>=hx[i][1]) hx[i][1] = p[a].x;
			if (p[a].y>=hy[i][1]) hy[i][1] = p[a].y;
			if (p[a].y<=hy[i][0]) hy[i][0] = p[a].y;
			if (hx[i][0]<0) hx[i][0] = hx[i][1];
			if (hx[i][1]<0) hx[i][1] = hx[i][0];
			if (hy[i][0]<0) hy[i][0] = hy[i][1];
			if (hy[i][1]<0) hy[i][1] = hy[i][0];
			bool bj = false;
			for (int j=1;j<=k;j++) 
			if (j!=i)
			if (isnear(i,j)) {
				hx[i][0] = last1x;
				hx[i][1] = last2x;
				hy[i][0] = last1y;
				hy[i][1] = last2y;
				bj = true;
				break;
			}
			if (bj) continue; int lastarea = area[i];
			area[i] = (hx[i][1]-hx[i][0])*(hy[i][1]-hy[i][0]);
			dfs(a+1);
			area[i] = lastarea;
			hx[i][0] = last1x;
			hx[i][1] = last2x;
			hy[i][0] = last1y;
			hy[i][1] = last2y;
		} 
	}
}
int main()    
{    
	scanf("%d%d", &n, &k);
	for (int i=1;i<=n;i++) scanf("%d%d", &p[i].x, &p[i].y);
	ms(area,0);ms(hx,-1);ms(hy,-1);
	dfs(1);
	printf("%d\n", ans); 
    return 0;    
}    


题解:洛谷 P1034 [NOIP 2002 提高组] 矩形覆盖 等知名刷题平台精心挑选而来,并结合各平台提供的算法标签和难度等级进行了系统分类。题目涵盖了从基础到进阶的多种算法和数据结构,旨在为不同阶段的编程学习者提供一条清晰、平稳的学习提升路径。各个矩形必须完全分开(边线与顶点也都不能重合)。共一行一个整数,为满足条件的最小的矩形面积之和。个点,每个点用一对整数坐标表示。个矩形全部覆盖,矩形的边平行于坐标轴。覆盖平行于坐标轴直线上点的矩形面积也为。给出后,怎样才能使得覆盖所有点的。约定:覆盖一个点的矩形面积为。时,可用如图二的两个矩形。#普及+# #DFS-一维# 阅读详情

相关推荐

STM32C8T6HAL库实战:MAX30102心率血氧检测与OLED多级菜单一体化方案

本文详细介绍了基于STM32C8T6和HAL库的MAX30102心率血氧检测与OLED多级菜单一体化方案。内容涵盖硬件连接、CubeMX工程配置、传感器驱动移植、数据滤波算法、OLED显示驱动以及高效的多级菜单系统设计,旨在提供一个稳定、实用且易于移植的嵌入式健康监测项目参考。

weixin_29256771的博客 407

【NOIP2002提高组T4】矩形覆盖-DFS剪枝

【NOIP2002提高组T4】矩形覆盖-DFS剪枝

Maxwei_wzj的OI世界 1821

ROS中tf2_ros::Buffer.lookupTransform的正确使用姿势:从踩坑到填坑

本文深入解析了ROS中tf2_ros::Buffer.lookupTransform接口的正确使用方法,重点剖析了因tf2_ros::TransformListener生命周期管理不当导致的经典问题。文章提供了从理解Buffer与Listener共生关系、类成员设计黄金法则到参数详解与异常处理的完整避坑指南,并给出了构建健壮坐标变换工具类的实战方案,帮助开发者稳定实现机器人坐标系变换。

weixin_29253711的博客 145

[NOIP提高组2002]矩形覆盖

题目描述: 在平面上有 n 个点(n <= 50),每个点用一对整数坐标表示。例如:当 n=4 时,4个点的坐标分另为:p1(1,1),p2(2,2),p3(3,6),P4(0,7)。这些点可以用 k 个矩形(1<=k<=4)全部覆盖,矩形的边平行于坐标轴。当 k=2 时,可用如图二的两个矩形 s1,s2 覆盖,s1,s2 面积和为 4。问题是当 n 个点坐标和 k 给出后,怎样才能使得覆盖所有点

cx_lzx蒟蒻的博客 733

PyTorch ModelNet点云数据集加载实战:从下载到Dataset类完整实现

在三维视觉与点云处理领域,数据集是算法研发的基石。ModelNet作为三维物体分类的基准数据集,其地位类似于图像领域的MNIST,是入门和评估模型性能的通用标准。理解其数据格式与加载原理,是进行点云分类、分割等任务的关键前置步骤。通过PyTorch的Dataset类,开发者可以构建高效的数据管道,将原始点云文件转换为神经网络可直接处理的张量格式,这一过程涉及数据采样、归一化、特征组装等核心操作,直接影响模型的训练效率和最终性能。本文聚焦于ModelNet10/40数据集,详细解析其目录结构,并提供一套稳健的

weixin_29032337的博客 291

AT32F421玩转AM32电调:手把手教你调试过零点比较器,告别电机抖动

本文详细介绍了如何使用AT32F421芯片调试AM32电调的过零点比较器,解决电机抖动问题。通过硬件配置、软件环境搭建、比较器电路原理分析及filter_level参数动态调整等实战步骤,帮助开发者精准诊断和优化电机控制性能。

weixin_42525632的博客 283

信息学奥赛一本通【02NOIP提高组】题解

目录 1828:【02NOIP提高组】均分纸牌 【题目描述】 【输入】 【输出】 【输入样例】 【输出样例】 1829:【02NOIP提高组】自由落体 【题目描述】 【输入】 【输出】 【输入样例】 【输出样例】 1830:【02NOIP提高组】矩形覆盖 【题目描述】 【输入】 【输出】 【输入样例】 【输出样例】 1828:【02NOIP提高组】均分纸牌 时间限制: 1000 ms 内存限制: 65536 KB 提交...

qj20120522的博客 884

SD--根据订单创建出库单(相关的函数列表的介绍系列篇(2))

创建订单样例代码参见:http://blog.csdn.net/CompassButton/archive/2007/05/09/1601712.aspx 可以根据一个订单或者部分订单项来创建出库单,代码如下:* Populating the item data lx_sales_item-ref_doc = l_vbeln. lx_sales_item-ref_item = c_000010

SAP BLOG--Jack Wu 6236

P1034 [NOIP2002 提高组] 矩形覆盖

题目分析:拿到题面读懂题意后,如此之小的数据范围就告诉我们,这道题不是状压就是暴搜,你说状压吧又没看出来有什么好转移的东西,那就是暴搜跑不脱了。那么现在有两个方向来搜,一个是枚举每个矩形包含了哪些点,一个是枚举每个点属于哪个矩形。因为我们暴搜的结构需要资瓷回溯,无疑每次只加一个点的后一种结构对于回溯的操作更为友善。

dacongming123355的博客 1437

告别Mumu!在Mac(M1/M2)上免费搭建Android Emulator的保姆级避坑指南

本文提供在Mac(M1/M2)上免费搭建高性能Android模拟器的详细指南,特别针对Apple Silicon芯片优化。通过使用Google官方的ARM原生模拟器,开发者可以获得3-5倍的性能提升,降低CPU占用,并避免x86转译的兼容性问题。文章涵盖从环境准备、工具安装到AVD创建与优化的全流程,帮助用户避开常见陷阱,实现接近原生性能的体验。

weixin_42531886的博客 624

OpenCv —— 检测车牌号(附完整源码)

OpenCv —— 检测车牌号

5602

洛谷 P1034 [NOIP2002 T4] 矩形覆盖

dfs+剪枝

依然一笑作春温。 1096

疾风气象大模型4.0白皮书

《疾风气象大模型白皮书摘要》 疾风气象大模型(J-AFM)是国内首个基于3D建模的气象智能平台,突破传统二维气象分析的局限,采用体素化技术构建"x-y-z-t"四维统一模型,实现从分钟级短临到30天跨时效的连续预测。核心技术包括:1)多源数据三维同化,融合雷达、卫星、风廓线等异构数据;2)物理约束AI解码器,嵌入能量守恒、湍流封闭等气象原理;3)行业适配插件,服务风电、光伏、航空等领域,如山地风场尾流校正、云影短临预测。平台支持批流一体推理与边缘部署,提供概率化输出和误差溯源能力,显著降

专注AI大模型,软件混淆,授权 550

洛谷 P1034 [NOIP2002 提高组] 矩形覆盖

十分普通的DFS遍历,与一些做题时的思考(含代码)

m0_73547627的博客 480

深度学习工具包 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")

VB摄像头监控

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

[NOIP2002] 提高组 洛谷P1034 矩形覆盖

题目描述 在平面上有 n 个点(n <= 50),每个点用一对整数坐标表示。例如:当 n=4 时,4个点的坐标分另为:p1(1,1),p2(2,2),p3(3,6),P4(0,7),见图一。 这些点可以用 k 个矩形(1<=k<=4)全部覆盖,矩形的边平行于坐标轴。当 k=2 时,可用如图二的两个矩形 sl,s2 覆盖,s1,s2 面积和为 4。问题是当 ...

dezhen7015的博客 396

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

洛谷【P1034】[NOIP2002 提高组] 矩形覆盖

题目链接 练搜索的好题。 按一般思路来说,应该是按每一个矩形搜索,分别判断它会覆盖哪些点。当所有矩形都用完,并且覆盖了所有的点时,再判断矩形之间有没有遮挡,此时就得出了一个可能的解。但这样包含了大量的无效情况,因为在大多数情况下矩形用完时不能覆盖所有的点,因此大大浪费了时间。 用这种方法会 TLE 。 所以要换一个思路,想要去掉这些无效的情况,我们就需要按点进行搜索。对于某一个点,我们枚举它会被放到哪个矩形里,这样每次搜索到树根时矩形一定包含了所有的点,之后只需要判断矩形有没有互相遮挡就好了。 #inc

大家好~我是SP_FA~ 1045

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

洛谷 P1034 矩形覆盖 (NOIp提高组2002)

BFS注释非常详细 好几个坐标的运算要多画画图要注意第64行有一个非常简单的剪枝 然而没有就少了20分//P1034 矩形覆盖 //2017.5.16//#define LOCAL #include <cstdio> #include <iostream> using namespace std;int n, m, ans = 250000 + 2, num; struct Node{

DoloresL的博客 1095

Vijos 1126 矩形覆盖 洛谷 P1034

描述在平面上有 n 个点(n <= 50),每个点用一对整数坐标表示。例如:当 n=4 时,4个点的坐标分另为:p1(1,1),p2(2,2),p3(3,6),P4(0,7)。 这些点可以用 k 个矩形(1<=k<=4)全部覆盖,矩形的边平行于坐标轴。当 k=2 时,可用如图二的两个矩形 s1,s2 覆盖,s1,s2 面积和为 4。问题是当 n 个点坐标和 k 给出后,怎样才能使得覆盖所有点的 k

苦鬼·。 749

刷题-NOIP历年真题

-

uiqrm的博客 6049

NOIP 2002 矩形覆盖

搜索+剪枝

我要吃熊猫 1019

[Wikioi 1101][NOIP 2002提高组]矩形覆盖

题目描述 Description 在平面上有 n 个点(n 这些点可以用 k 个矩形(1 输入描述 Input Description n k xl y1 x2 y2 ... ... xn yn (0 输出描述 Output Description 一个整数,即满足条件的最小的矩形面积之和。 样例输入 Sam

某沙茶的OI代码库 2388

【NOIp2002】矩形覆盖

链接 数据范围很小,考虑搜索。 我最先想到的是枚举矩形,显然每个矩形的定点必然是输入中给出的点。 然而不仅复杂度不对,还贼难写。 冷静分析一下,不能枚举矩形包括哪个点,可以枚举点属于哪个矩形。 这样每个点有四种情况,复杂度O(n4),还有check的常数,可以说在TLE的边缘疯狂试探。 实际上,这么多情况是跑不满的,再加一些剪枝,就可以过了。 1 #include&l...

weixin_30655569的博客 191

动态规划11:矩形覆盖

动态规划11:矩形覆盖

小菜鸟也想飞的博客 1514

P1034 矩形覆盖

题目描述 在平面上有 n 个点(n 这些点可以用 k 个矩形(1 输入输出格式 输入格式: n k xl y1 x2 y2 ... ... xn yn (0 输出格式: 输出至屏幕。格式为: 一个整数,即满足条件的最小的矩形面积之和。 直接枚举每个点应该加在哪个矩形,通过最优性剪枝剪一下就好 注

CRZbulabula的博客 524
上一篇: |洛谷|搜索|NOIP2014|P2296 寻找道路
下一篇: |算法讨论|线段树1(大白书版本) 学习笔记
NotFound1
博客等级 码龄11年 20粉丝 290原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值