bool camping(int row){
 int bad[20]={},losses=0;const int upper=eligible_upper();
 for(int source=0;source<=row;source++)if(D[source]>=2)
  for(int cop=0;cop<=row;cop++)if(cop!=source&&!(O[source]&~(O[cop]|1<<cop))&&!bad[source]){
   bad[source]=all;losses+=__builtin_popcount(unsigned(Bmask&~(O[source]|1<<source)));
   if(upper-losses<=threshold)return false;
  }
 for(int target=0;target<n;target++)if((Bmask>>target&1)&&used[target]==E[target])
  for(int cop=0;cop<=row;cop++)if(!(P[target]&~(O[cop]|1<<cop)))
   for(int source=0;source<n;source++)if(source!=cop&&source!=target&&(Amask>>source&1)&&!((O[source]|bad[source])>>target&1)){
    bad[source]|=1<<target;++losses;if(upper-losses<=threshold)return false;
   }
 return upper-losses>threshold;
}
