#include #include #define min(x,y) ((x)<(y) ? (x) : (y)) void main(void); int move(int start, int money, int time, int maxtime); int strtoint(char str[5]); int g_towns = 0; int g_money = 0; int g_roads = 0; int g_departure[1500] = {0}; int g_arrival[1500] = {0}; int g_cost[1500] = {0}; int g_time[1500] = {0}; void main(void) { char temp[5]; int i, ret; scanf("%d", &g_towns); scanf("%d", &g_money); scanf("%d", &g_roads); for ( i=0; i