#include#include #include using namespace std;const int INF=0x3f3f3f3f;int e[15][15];int dp[1<<15][15];int main(){ int n; while(scanf("%d",&n)&&n!=0) { n++; for(int i=0; i e[i][k]+e[k][j]) e[i][j]=e[i][k]+e[k][j]; } memset(dp,INF,sizeof(dp)); for(int i=0; i