18 lines
367 B
JavaScript
18 lines
367 B
JavaScript
|
var m = sat.solver()
|
||
|
sat.R(m,sat.L.atMostOne("Alice", "Bob"))
|
||
|
sat.R(m,sat.L.or("Bob", "Charlie"))
|
||
|
sat.solve(m);
|
||
|
print(sat.solve(m))
|
||
|
print(sat.solve(m,'Alice'))
|
||
|
|
||
|
var m1 = sat.solver()
|
||
|
sat.R(m1,sat.L.atMostOne("Alice", "Bob"))
|
||
|
|
||
|
var m2 = JSON.parse(JSON.stringify(m1))
|
||
|
|
||
|
m2.id=null;
|
||
|
sat.R(m2,sat.L.or("Bob", "Charlie"))
|
||
|
print(sat.solve(m2))
|
||
|
print(sat.solve(m2,'Alice'))
|
||
|
|