POJ 1113 WALL

医疗器械软件测试输出内容(1) *单元测试(Unit Testing):**单元测试是软件测试的最底层,用于验证软件中最小的可测试单元——函数、方法或模块。系统测试是在集成测试之后进行的,它对整个系统进行测试,验证系统在不同部分集成在一起后是否满足需求和规格。: 集成测试是在单元测试之后进行的,它关注不同单元之间的交互和集成。对于不同安全级别的软件(IEC 62304 A类、B类、C类),在体系上要求输出的文件内容有所区别。**说明:**将集成测试和软件系统测试合并为一项单一的计划和一组活动是可接收的。 阅读详情

 

Wall
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 13254 Accepted: 4217

Description

Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect shape and nice tall towers. Instead, he ordered to build the wall around the whole castle using the least amount of stone and labor, but demanded that the wall should not come closer to the castle than a certain distance. If the King finds that the Architect has used more resources to build the wall than it was absolutely necessary to satisfy those requirements, then the Architect will loose his head. Moreover, he demanded Architect to introduce at once a plan of the wall listing the exact amount of resources that are needed to build the wall.

Your task is to help poor Architect to save his head, by writing a program that will find the minimum possible length of the wall that he could build around the castle to satisfy King's requirements.

The task is somewhat simplified by the fact, that the King's castle has a polygonal shape and is situated on a flat ground. The Architect has already established a Cartesian coordinate system and has precisely measured the coordinates of all castle's vertices in feet.

Input

The first line of the input file contains two integer numbers N and L separated by a space. N (3 <= N <= 1000) is the number of vertices in the King's castle, and L (1 <= L <= 1000) is the minimal number of feet that King allows for the wall to come close to the castle.

Next N lines describe coordinates of castle's vertices in a clockwise order. Each line contains two integer numbers Xi and Yi separated by a space (-10000 <= Xi, Yi <= 10000) that represent the coordinates of ith vertex. All vertices are different and the sides of the castle do not intersect anywhere except for vertices.

Output

Write to the output file the single number that represents the minimal possible length of the wall in feet that could be built around the castle to satisfy King's requirements. You must present the integer number of feet to the King, because the floating numbers are not invented yet. However, you must round the result in such a way, that it is accurate to 8 inches (1 foot is equal to 12 inches), since the King will not tolerate larger error in the estimates.

Sample Input

9 100
200 400
300 400
300 300
400 300
400 400
500 400
500 200
350 200
200 200

Sample Output

1628

Hint

结果四舍五入就可以了

Source

 

http://acm.pku.edu.cn/JudgeOnline/problem?id=1113

 

 

YOLOv8/v9工业零件缺陷检测实战指南:从原理到产线部署 摘要:本文系统介绍基于YOLOv8/v9的工业零件缺陷检测技术,从工业质检背景与需求出发,详解缺陷检测原理、算法构建与模型训练,提供从数据集准备到移动端部署的全流程实操方案。包含多尺度检测、纹理分析等高级技术,适配工业相机的环境优化策略,以及完整质检系统代码实现。适合工业视觉领域新手与进阶开发者,助力快速构建高鲁棒性的缺陷检测系统。 阅读详情

相关推荐

ESP32 IDF开发 应用篇⑲ 空中升级OTA

在实际产品开发过程中,在线升级可以远程解决产品软件开发引入的问题,更好地满足用户需求。OTA(空中)更新是使用 Wi-Fi 连接而不是串行端口将固件加载到 ESP 模块的过程。(1)、ESP32 的 OTA 升级有三种方式:·Arduino IDE:主要用于软件开发阶段,实现不接线固件烧写·Web Browser:通过 Web 浏览器手动提供应用程序更新模块·HTTP Server:自动使用http服务器 - 针对产品应用在三种升级情况下,必须通过串行端口完成第一个固件上传。

lu330274924的博客 3324

poj1113Wall【凸包】

Language: Default Wall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 32437   Accepted: 11008 Description Once upon a time there was a greedy King who o

走一步再走一步 1748

以TMS320F28069为例,如何使用CCS建立DSP工程文件

以TMS320F28069为例,本文主要介绍了使用CCS建立DSP工程的流程

Honglong 2556

ACM-计算几何之Wall——poj1113

ACM 计算几何 Wall poj1113 求凸包周长

继续激情,继续奋斗。 1891

AI大模型探索之路-应用篇11:AI大模型应用智能评估(Ragas)

随着人工智能技术的飞速发展,AI大模型(LLM)已经成为了推动技术创新和应用的关键因素。这些大模型在语言理解、图像识别、自然语言生成等领域展现出了惊人的能力。然而,随着模型规模的增大,它们对计算资源的消耗、环境适应性、模型稳定性、安全性和可解释性等方面也提出了新的挑战。因此,对AI大模型进行智能评估变得至关重要,以确保它们在实际应用中的稳定性、可靠性和有效性。本文将详细介绍Ragas框架,一个专为AI大模型设计的智能评估工具。

寻道AI,探索AI无限可能! 5546

UE5、CesiumForUnreal实现加载GeoJson绘制多面(MultiPolygon)功能(支持点选高亮)

UE5、CesiumForUnreal实现加载GeoJson实现多面(MultiPolygon)的绘制功能,并且支持点选高亮和属性查询。

专注GIS开发 4628

POJ 1113 Wall 题解 《挑战程序设计竞赛》

为什么80%的码农都做不了架构师?>>> ...

weixin_33881753的博客 286

点云目标检测:open3d多窗口联动可视化

多个模型之间的对比除了指标之外,还需要可以直接直观的对比可视化结果,这次介绍一下如何使用open3d同时打开两个窗口分别加载两个模型的结果进行对比,同时实现两个窗口的联动,也就是当一个窗口拖动或者缩放时另外一个窗口也跟着做同样的变换。

zhaoguanhua的博客 4688

POJ 1113 Wall(凸包应用)

POJ 1113 Wall(凸包应用) http://poj.org/problem?id=1113 题意: ZOJ1456        给你一个多边形X的所有点,要你用一个另一个图形A把这个多边形围起来,使得该多边形的周长最小且该图形A上的每一个点离原始边行的距离>=L. 要你求图形A的最小周长? 分析:        首先该图形A的最小周长肯定是X的凸包长度+半径为L的圆周长之和.

code 1023

2020年大连理工大学《计算机控制技术》期末试卷

2020年大连理工大学《计算机控制技术》期末试卷 2020年大连理工大学《计算机控制技术》期末试卷 2020年大连理工大学《计算机控制技术》期末试卷 2020年大连理工大学《计算机控制技术》期末试卷 ...

无名何许人的博客 650

Vue+Echarts监控大屏实例四:智慧农业监控模板实例

本实例通过Vue-Echarts实现了智慧农业监控模板实例界面,学习并使用了vue-echarts的使用,接入高德地图并展示,添加了全屏切换、加载动画小鼓、站点切换及退出等相关功能,提供源码下载。

Java、前端、小程序学习笔记、问题汇总、项目实例分享,有需要请联系。 7667

poj1113Wall(凸包周长计算)

poj1113Wall(凸包周长计算):http://poj.org/problem?id=1113 题目描述: Wall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 35235   Accepted: 11996 Description Onc

而濡木染 791

抖音移动端Web用户主页视频列表爬虫实战:逆向加密参数与高频采集方案

App端Hook/抓包:需要安卓逆向、Xposed或Frida,门槛高且容易被风控。官方开放API:限制极多,几乎不开放用户级视频列表。PC端Web:页面加载方式繁杂,且大量依赖懒加载与内部状态。移动端Web(:接口相对稳定,加密逻辑集中,且适合使用Requests/HTTPSession模拟,无需渲染引擎。本文聚焦于移动端Web下的用户主页视频列表爬取,采用Python 3.11 + httpx + PyExecJS + 正则/JSON解析的组合,破解X-Bogus签名和_signature。

2201_76125261的博客 851

POJ 1113 Wall(求凸包周长)

题目链接: POJ 1113 Walla//228K 0MS #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <climits> #include <cmath> using namespace std; const double PI=acos(-1.0); const

ramay7 500

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

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

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

POJ 1113 Wall (凸包求周长)

题意:在距城堡距离大于L的地方建围墙将城堡围起来求所要围墙的长度 思路:这道题的答案是凸包周长加上一个圆周长,即包围凸包的一个圆角多边形,但是没弄明白那些圆角加起来为什么恰好是一个圆。每个圆角是以凸包对应的顶点为圆心,给定的L为半径,与相邻两条边的切点之间的一段圆弧。每个圆弧的两条半径夹角与对应的凸包的内角互补。假设凸包有n条边,则所有圆弧角之和为180°*n-180°*(n-2)=360°。故

qq_36782366的博客 401

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

【POJ1113】Wall

Wall Time Limit:1000MS Memory Limit:10000K Total Submissions:24604 Accep...

diludiliang27877的博客 202

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

poj 1113 Wall (凸包)

题意:给定多边形城堡的n个顶点,绕城堡外面建一个围墙,围住所有点, 并且墙与所有点的距离至少为L,求这个墙最小的长度 思路:最小长度=城堡顶点构成的凸包的总边长+半径为L的圆的周长 先用Graham算法求出凸包,再枚举其顶点求两两之间的边长,记得加上第一个顶点和最后一个顶点的边长 最后要输出四舍五入的整数结果,可以用double存,最后用%.0lf输出

happy_lcj 1272

【poj1113】 Wall

http://poj.org/problem?id=1113 (题目链接)题意:给定多边形城堡的n个顶点,绕城堡外面建一个围墙,围住所有点,并且墙与所有点的距离至少为L,求这个墙最小的长度。Solution   凸包裸题。凸包的构造的话,有一篇博客写得很好,就是看着有点乱,界面太丑了= =。   很容易发现,所求的的墙的最小长度实际上就是平面凸包的周长加上以L为半径的圆的周长。这个圆是怎么来的呢

MashiroSky的博客 589

Poj 1113 Wall

地址:http://poj.org/problem?id=1113 题目: Wall Time Limit:1000MS Memory Limit:10000K Total Submissions:36064 Accepted:12315 Description Once upon a time there was a g...

weixin_30726161的博客 103

POJ1113 Wall

求凸包

H992109898的博客 610

POJ1113 Wall + CodeForces166B Polygons 凸包问题

第一次写凸包的代码,虽然过了,但是这个原理emmmm... 用的Graham和Andrew算法,记录下来方便以后看吧。。   1.POJ1113  Wall  凸包 就是用的kuangbin的模板,附AC代码: #include&lt;cstdio&gt; #include&lt;cstring&gt; #include&lt;cstdlib&gt; #include&lt;cmath...

A confused programmer 333

HDU 1348 和 POJ 1113 wall

首先,这次换了个算法来写,我用了Melkman 问题就来了,不知道怎么的,POJ1113的话,代码上去倒是可以AC。。。 但是在HDU的时候自己就o(╯□╰)o。。。 到底是怎么疑惑ing。。。。 View Code 1 #include <iostream> 2 #include <algorithm> 3 #i...

dicuanjiang7084的博客 181

POJ1113:Wall

POJ1113求完凸包算总长度,然后+2piL。结束。 我还sb的把每个角都求了一遍加起来。。后来发现其实就是360°。 重要的事情说三遍:用C++!用C++!用C++!【代码】#include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #define N 10005 #define INF 0x7fff

Heret1c 382

Wall POJ - 1113

Wall POJ - 1113 (凸包) Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King’s castle. The King was so greedy, that he would not listen to his Architec...

qq_45014570的博客 155

POJ 1113 wall

POJ上题目原文     题目大意就是给你一些点,然后你找出将他们包围所需要的最少的代价,相当于就是求用一根绳子将他们包围起来,求绳子的长度。有个特殊的要求就是,必须绳子与最外面的构成的多边形的距离必须大于等于 L 。其实就是将多边形的周长加上以 L 为半径的圆的周长即可。     裸的凸包,要是对求凸包的代码熟悉的话,直接上模板,由于本人刚写凸包没多久,所以还是自己老老实实的写了一遍凸包,当

蛤蛤~ 562

POJ 1113 Wall 【凸包入门】

原题连接:http://poj.org/problem?id=1113 题意:给 n 个点,你见一个围墙,使所有的点到围墙的距离不小于 l 。求围墙长度。。 思路:先求出n个点的 凸包,然后根据凸包建一个围墙,围墙的一部分就是 凸包长度,另一部分 是一个 以 l 为半径的 圆!! 代码: #include #include #include #include using namespa

nyist_飘谊 1483
上一篇: POJ 1112 Team Them Up
下一篇: POJ 1119 Start Up the Startup
bobten2008
博客等级 码龄18年 153粉丝 157原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值