#include #include #include using namespace std; bool dp[1<<14][14][14]; int N,A,B; int X[14],Y[14],K[14]; int dist(int i,int j) { return abs(X[i]-X[j])+abs(Y[i]-Y[j]); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin>>N>>A>>B; for(int i=0;i>X[i]>>Y[i]>>K[i]; int ans=1; for(int i=0;i>l&1)) { bool ok=false; {//3 if(B<=abs(K[l]-K[k]))ok=true; } {//4 if(A<=dist(j,l)+dist(k,l))ok=true; } if(ok) { dp[i|1<