#include using namespace std; double dp[1<<14][14]; double weight[1<<14]; int main(){ int sx,sy; cin>>sx>>sy; int n; cin>>n; vector x(n),y(n); vector w(n); for(int i=0;i>x[i]>>y[i]>>w[i]; int sw=0; for(int i=0;i>j)%2) weight[i]+=w[j]; } weight[i]=sw-weight[i]; } for(int i=0;i<(1<>j)%2==0) continue; for(int k=0;k