题目链接:传送门 题意: 给定n个圆。m个三角形求把这些图形所有覆盖的图形的最小的周长。 分析: 刚開始看到就想到了求凸包,但是圆怎么求了?就暴力把圆切割成1000个点然后求凸包就能够了。水过了。正解是找圆与圆的切点圆与三角形上的点与圆引得切线的切点。 代码例如以下: #include<stdio. ...
分类:
其他好文 时间:
2017-06-10 18:18:15
阅读次数:
244
C# 内存模型 This is the first of a two-part series that will tell the long story of the C# memory model. The first part explains the guarantees the C# mem ...
篱笆修理(Fence Repair) 代码(C)本文地址: http://blog.csdn.net/caroline_wendy题目: 把一块木板切成N块, 每次切两块, 分割的开销是木板长度, 求将木板分割完的最小开销.即霍夫曼编码(Huffman).贪心算法, 相似二叉树型结构, 最短板和次短 ...
分类:
编程语言 时间:
2017-06-03 12:56:36
阅读次数:
286
最近测试了RedHat6.5上RHCS,搭建了一个双机HA群集,在此将配置过程和测试过程分享给大家,主要包括节点配置、群集管理服务器配置、群集创建与配置、群集测试等内容。一、测试环境计算机名操作系统IP地址群集IP安装的软件包HAmanagerRedHat
6.5192.168.10.150-luci、iscsitarge..
分类:
其他好文 时间:
2017-06-02 01:09:40
阅读次数:
1518
本文主要简单介绍一下如何在RHEL 7 Pacemaker中配置一个fence_vmware_soap类型的STONITH设备(仅供测试学习)。 STONITH是Shoot-The-Other-Node-In-The-Head的简称,并且它能够保护数据使其不会因为节点异常或者同时访问而遭到损坏。 节 ...
分类:
系统相关 时间:
2017-06-01 23:35:24
阅读次数:
365
题目链接:http://poj.org/problem?id=3253 题意:哈夫曼最优编码 贪心策略:尽可能让花费大的路径短。 总花费=每个花费*路径之和。也等于每次加上去得到的数之和。(每次都排序一下,把最小的两个相加) ...
分类:
其他好文 时间:
2017-05-29 09:53:54
阅读次数:
136
本文主要简单介绍一下如何在RHEL 7 Pacemaker中配置一个fence_vmware_soap类型的STONITH设备(仅供测试学习)。 STONITH是Shoot-The-Other-Node-In-The-Head的简称,并且它能够保护数据使其不会因为节点异常或者同时访问而遭到损坏。 节 ...
分类:
系统相关 时间:
2017-05-23 19:42:45
阅读次数:
548
Problem statement: There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden. Your job is to fence the enti ...
分类:
其他好文 时间:
2017-05-21 10:50:18
阅读次数:
186
Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,00 ...
分类:
其他好文 时间:
2017-05-11 13:26:50
阅读次数:
216
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door ...
分类:
其他好文 时间:
2017-05-06 00:49:31
阅读次数:
324