fork download
  1. // no worky
  2. for (var didx = 0; didx < domains[idx].Count; ++didx) {
  3. var domainValue = domains[idx][didx];
  4. if (value == domainValue || OptMath.Abs(domainValue - value) == OptMath.Abs(current - idx)) {
  5. domains[idx][didx] = -1;
  6. }
  7. }
  8. domains[idx].RemoveAll((x) => x == -1);
  9.  
  10. // worky
  11. domains[idx] = (
  12. from domainValue in domains[idx]
  13. where domainValue != value
  14. where OptMath.Abs(domainValue - value) != OptMath.Abs(current - idx)
  15. select domainValue
  16. ).ToList();
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty