#include<stdio.h> #include<stdlib.h> #include<string.h> #define leftChild(i) (2*(i)+1) //交换 void swap(int *a, int i, int j) { int tmp = a[i]; a[i] = a[j]; a[j] = tmp; } //堆下溯 void maxHeapify(int *a, int i, int n) { int child, tmp; for (t
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4123 Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 问题描述 Bob wants to hold a race to encourage people to do sports. He has got trouble in choosing the route. There are