代写 game /*

/*
SPLITABLE

Succeeds if the list of integers can be cleved into two sublists that both sum to
the same value.

Successful queries:
splitable([1,2,3,4,10]).
splitable([2,1,1]).
splitable([0]).

Unsuccessful queries:
splitable([1,4,8]).
splitable([1,3,2]).
splitable([2,2,1,1]).
*/

/*
DOMINOS

Each domino is unique and is oriented left to right, but can be flipped. So, the domino
3-4 can appear as 4-3. The dominos in this particular rendition of the game are:
1-4 4-2 9-8 7-8 15-7 10-12 2-12 10-4
These dominos are shown below. When you submit, the dominos must appear as they are
originally given to you.
*/

dom(1, 4).
dom(4, 2).
dom(9, 8).
dom(7, 8).
dom(15, 7).
dom(10, 12).
dom(2, 12).
dom(10, 4).

dom(100, 101).

dom(50, 51).
dom(52, 51).
dom(53, 52).
dom(55, 54).
dom(55, 55).
dom(54, 56).
dom(56, 53).
dom(55, 60).
dom(55, 61).
dom(60, 51).

/*
The dominos can be sequenced if the numbers on the adjacent dominos match. For example,
here is a legal sequence of three dominos: 4-2 2-12 12-10
The game is played by determining if a sequence of dominos exist that start and end with
particular values. For example, there exists a sequence of dominos that start with 4 and
end with 10. Write a rule that succeeds if a sequence exists. The dominos can be used
at most once in a sequence.

Successful queries:
dominos(4, 10).
dominos(10, 4).
dominos(15, 7).
dominos(7, 9).

Unsuccessful queries:
dominos(1, 15).
dominos(15, 1).
*/