summaryrefslogtreecommitdiff
path: root/prolog/problems/clp_r/bounding_box_3/common.py
blob: 94be5eee1c9e53a7b9c91d889d8097aa5ec41e2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding=utf-8

id = 157
number = 67
visible = True
facts = None

solution = '''\
bounding_box([], Xa/Ya, Xb/Yb) :-
    minimize(Xb - Xa),
    minimize(Yb - Ya).
bounding_box([X/Y|L], Xa/Ya, Xb/Yb) :-
    { Xa =< X, X =< Xb,
      Ya =< Y, Y =< Yb },
    bounding_box(L, Xa/Ya, Xb/Yb).'''