#include #include double dp[1<<13][14], weight[1<<13]; double X[14], Y[14], W[14]; int N; double dist(int i, int j){ return std::abs(X[i] - X[j]) + std::abs(Y[i] - Y[j]); } double rec(int state, int index){ if(state == 0){ return 100.0 / 120 * dist(0, index); } if(dp[state][index] > 0.0){return dp[state][index];} double res = 1e20; for(int i=0;i> i & 1)){continue;} res = std::min(res, (weight[state] + 100) / 120 * dist(index, i+1) + W[i+1] + rec(state & ~(1 << i), i+1)); } return dp[state][index] = res; } int main(){ scanf("%lf %lf", &X[0], &Y[0]); scanf("%d", &N); for(int i=0;i<1<> j & 1)){continue;} sum += W[j+1]; } weight[i] = sum; } printf("%.6f\n", rec((1<