/*
tle十几次,最后发现当i从1开始时,给环赋值时要注意啊!
最小树形图
*/
#include
#include
#include
#define N 110
#define inf 0x3fffffff
#define eps 1e-10
struct node {
int u,v;
double w;
}edge[N*N*2];
double distance (double x,do...
分类:
其他好文 时间:
2014-08-27 18:52:24
阅读次数:
307
题意: 题目撰写者的英语真是艰难晦涩,看了别人题解,才知道这题题意。 两个forger 一个froger 要蹦到另外一个froger处,他们的最短距离是这样定义的 : The frog distance (humans also call it minimax distance) between t...
分类:
其他好文 时间:
2014-08-26 19:02:16
阅读次数:
232
Description
{p1,..., pk : p1 <
p2 pk} is called a prime
k -tuple of distance s if
p1, p2,..., pk are consecutive prime numbers and
pk - p1 = s . For example, with
k = 4 , s = 8 ,
{11, 13, 1...
分类:
其他好文 时间:
2014-08-26 17:25:13
阅读次数:
217
1 #include 2 #include 3 #include 4 5 char explode( char * str , char symbol ); 6 7 8 double distance ( int x1 , int y1 , int x2 , int y...
分类:
编程语言 时间:
2014-08-26 06:24:05
阅读次数:
302
原题戳我Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha...
分类:
其他好文 时间:
2014-08-26 00:14:25
阅读次数:
334
Description Gibbs: Next! First Pirate: My wife ran off with my dog and I'm drunk for a month. Gibbs: Perfect. Next! Second Pirate: Me hav...
分类:
其他好文 时间:
2014-08-23 11:12:50
阅读次数:
224
https://oj.leetcode.com/problems/edit-distance/Edit DistanceGiven two wordsword1andword2, find the minimum number of steps required to convertword1tow...
分类:
编程语言 时间:
2014-08-23 09:56:50
阅读次数:
213
A really classic 2D DP problem. And I'm glad that I figured out the transfer function without checking any other resources.After that, everything is s...
分类:
其他好文 时间:
2014-08-22 15:46:38
阅读次数:
232
function?radian($d)?{
????????????$d?*?3.1415926535898?/?180.0;??
}
function?distance_calculate($longitude1,?$latitude1,?$longitude2,?$latitude2)?{
???????????...
分类:
Web程序 时间:
2014-08-22 13:10:19
阅读次数:
209
与Edit Distance问题类似, 纯dp状态转移方程如下在poj上找了一道题目 poj1458, 水过代码如下 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #...
分类:
其他好文 时间:
2014-08-22 12:52:28
阅读次数:
204