#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<> typedef long long ll; using namespace std; const ll mod=1e9+7; const int inf=1e9; pair yx[13]; double W[13]; double dp[1<<13][13]; double cost(int a, int b, double w){ return (abs(yx[a].first-yx[b].first) + abs(yx[a].second-yx[b].second)) * (w+100.0)/120.0 + W[a]; } int main() { int sx,sy,n; cin>>sx>>sy>>n; double sum=0; REP(i,0,n){ int x,y; cin>>x>>y>>W[i]; yx[i] = {y,x}; sum += W[i]; } REP(mask,0,1< ca; REP(i,0,n){ if((mask & (1<