题目来源:http://poj.org/problem?id=3525分析:题意:给定一个凸多边形,求多边形中距离边界最远的点到边界的距离。思路 :
每次将凸多边形每条边往里平移d,判断是否存在核;二分d即可。多边形边上的点(x , y)往里平移d 后的 坐标: s , e 为向量的 起点和终点, ...
分类:
其他好文 时间:
2014-05-01 16:27:16
阅读次数:
335
//
查找满足指定条件的结果中的第一行$post=Post::model()->find($condition,$params);//
查找具有指定主键值的那一行$post=Post::model()->findByPk($postID,$condition,$params);//
查找具有指定属性...
分类:
数据库 时间:
2014-05-01 01:59:01
阅读次数:
411
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:
其他好文 时间:
2014-04-29 13:47:20
阅读次数:
251
Mrs Little likes digits most of all. Every year she tries to make the best number of the year. She tries to become more and more intelligent and every year studies a new digit. And the number she make...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
309
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-04-28 10:46:41
阅读次数:
311
题目描述
Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he attends ACM Asia Regional Contest because he always can find some famous ACMers there.
C...
分类:
其他好文 时间:
2014-04-28 10:33:40
阅读次数:
340
http://acm.hdu.edu.cn/showproblem.php?pid=1595
大致题意:
给一个图,让输出从中删除任意一条边后所得最短路径中最长的。。
思路:
直接枚举每条边想必是不行的。其实有些边是不需要枚举的,因为删除它们并不影响起点到终点的最短路。起作用的边都是未删边前的最短路径上的边,删除它们最短距离肯定增大,只需在这些最短距离中求最大的即可。
记录最短路...
分类:
Web程序 时间:
2014-04-28 10:24:42
阅读次数:
393
RSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow:
> choose two large prime integer p, q
> calculate n = p × q, calculate F(n) = (p - 1) × (q - 1)
...
分类:
其他好文 时间:
2014-04-27 21:37:59
阅读次数:
315
" checking for SSL headers... configure: error: Cannot find ssl headers"
原因是缺少openssl-devel,安装这个库就可以解决问题。
yum -y install openssl-devel...
分类:
其他好文 时间:
2014-04-27 21:32:05
阅读次数:
283
The blocks in the city of Fishburg are of square form. N avenues running south to north and Mstreets running east to west bound them. A helicopter took off in the most southwestern
crossroads and fl...
分类:
其他好文 时间:
2014-04-27 21:16:59
阅读次数:
255