#include<stdio.h> #include<string.h> #define N 200 int Min(int a,int b) { return a>b?b:a; } int Max(int a,int b) { return a>b?a:b; } int map[N][N],flag,visit[N][N],n,min,max; int dis[4][2]={1,0,-1,0,0,1,0,-1}; void init() { int i,j; min=…
D. Alyona and a tree Problem Description: Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an positive integer, in the vertex i she wrote ai. Moreover, the girl wrote a positive integer to every edg…
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5652 Problem Description A long time ago there are no himalayas between India and China, the both cultures are frequently exchanged and are kept in sync at that time, but eventually himalayas rise…