#include#include#includetypedef struct port{ char name[2];} Port;typedef struct route{ int size; Port ports[20];} Route;Route routes[10];int n;int stackRoute[3],sp;Port stackPort[3];bool isHave;void show(){ int i; printf("\n方案\n"); for(i=0;i=sp){ for(j=0;j=3) printf("没有适合的路线\n"); } return 0;}/*67a e d t u x z3d k m5l e o t k6k b c n m y3y u i7p a n y c q op t*/匆匆忙忙写完的,应该没什么问题/*...*/中为测试数据(你自己也可以照着编),今天没时间了,明天给你加注释.