Jogging TrailsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2122Accepted: 849DescriptionGord is training for a marathon. Behind his house i...
分类:
其他好文 时间:
2014-08-06 14:31:41
阅读次数:
364
树的直径即树中最长的路径的长度。
用两次dfs,第一次从任意点出发求得一个最远点p,
第二次从p出发求得最远点,这条路径就是最长路,即所求。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define inf 0x3f3f3f3f
#define...
分类:
其他好文 时间:
2014-07-10 19:46:15
阅读次数:
197
Jogging Trails
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 2122
Accepted: 849
Description
Gord is training for a marathon. Behind his house is a park wit...
分类:
其他好文 时间:
2014-07-09 12:10:17
阅读次数:
229
Description
The Broken Pedometer
The Problem
A marathon runner uses a pedometer with which he is having problems. In the pedometer the symbols are represented by seven s...
分类:
其他好文 时间:
2014-06-18 12:31:09
阅读次数:
203