{"id":23976,"date":"2012-12-24T16:20:40","date_gmt":"2012-12-24T13:20:40","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=23976"},"modified":"2012-12-24T16:20:40","modified_gmt":"2012-12-24T13:20:40","slug":"%d0%b8%d1%81%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%bf%d1%80%d0%b5%d0%b4%d0%b8%d0%ba%d0%b0%d1%82%d0%be%d0%b2-fail-not-cut-%d0%bd%d0%b5%d1%83%d1%81%d0%bf%d0%b5%d1%85-2","status":"publish","type":"post","link":"https:\/\/studentpmr.ru\/?p=23976","title":{"rendered":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 fail, not, cut (\u043d\u0435\u0443\u0441\u043f\u0435\u0445, \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435)."},"content":{"rendered":"<p>\u041b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u2116 2.<\/p>\n<p>\u0422\u0435\u043c\u0430: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 fail, not, cut (\u043d\u0435\u0443\u0441\u043f\u0435\u0445, \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435).<br \/>\n\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430<\/p>\n<p>2. \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430\u043c\u0438:<br \/>\n&#8212; \u041d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b.<br \/>\n&#8212; \u041d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0447\u0438\u0441\u0435\u043b.<br \/>\n&#8212; \u041d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u0447\u0438\u0441\u0435\u043b.<br \/>\n<!--more--><br \/>\npredicates<br \/>\n\tmin(integer,integer).<br \/>\n\tmax(integer,integer).<br \/>\n\tmin(integer,integer,integer).<br \/>\n\tmax(integer,integer,integer).<br \/>\n\tmin(integer,integer,integer,integer,integer,integer).<br \/>\n\tmax(integer,integer,integer,integer,integer,integer).<br \/>\nclauses<br \/>\n\tmin (X,Y):- X<Y , write (\"1.Minimalnoe chislo = \",X,\"\\n\"), ! .\n\tmin (X,Y):- Y<X , write (\"1.Minimalnoe chislo = \",Y,\"\\n\").\n\tmax (X,Y):- X>Y , write (&#171;1.Maximalnoe chislo = &#171;,X,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y):- Y>X , write (&#171;1.Maximalnoe chislo = &#171;,Y,&#187;\\n&#187;).<\/p>\n<p>\tmin (X,Y,Z):- X<Y , X<Z, write (\"2.Minimalnoe chislo = \",X,\"\\n\"), ! .\n\tmin (X,Y,Z):- Y<X , Y<Z, write (\"2.Minimalnoe chislo = \",Y,\"\\n\"), ! .\n\tmin (X,Y,Z):- Z<X , Z<Y, write (\"2.Minimalnoe chislo = \",Z,\"\\n\").\n\tmax (X,Y,Z):- X>Y , X>Z, write (&#171;2.Maximalnoe chislo = &#171;,X,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z):- Y>X , Y>Z, write (&#171;2.Maximalnoe chislo = &#171;,Y,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z):- Z>X , Z>Y, write (&#171;2.Maximalnoe chislo = &#171;,Z,&#187;\\n&#187;).<\/p>\n<p>\tmin (X,Y,Z,V,W,Q):- X<Y , X<Z, X<V, X<W, X<Q, write (\"3.Minimalnoe chislo = \",X,\"\\n\"), ! .\n\tmin (X,Y,Z,V,W,Q):- X<Y , Y<Z, Y<V, Y<W, Y<Q, write (\"3.Minimalnoe chislo = \",Y,\"\\n\"), ! .\n\tmin (X,Y,Z,V,W,Q):- Z<X , Z<Y, Z<V, Z<W, Z<Q, write (\"3.Minimalnoe chislo = \",Z,\"\\n\"), ! .\n\tmin (X,Y,Z,V,W,Q):- V<Y , V<Z, V<X, V<W, V<Q, write (\"3.Minimalnoe chislo = \",V,\"\\n\"), ! .\n\tmin (X,Y,Z,V,W,Q):- W<Y , W<Z, W<V, W<X, W<Q, write (\"3.Minimalnoe chislo = \",W,\"\\n\"), ! .\n\tmin (X,Y,Z,V,W,Q):- Q<X , Q<Y, Q<Z, Q<V, Q<W, write (\"3.Minimalnoe chislo = \",Q,\"\\n\") .\n\tmax (X,Y,Z,V,W,Q):- X>Y , X>Z, X>V, X>W, X>Q, write (&#171;3.Maximalnoe chislo = &#171;,X,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z,V,W,Q):- X>Y , Y>Z, Y>V, Y>W, Y>Q, write (&#171;3.Maximalnoe chislo = &#171;,Y,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z,V,W,Q):- Z>X , Z>Y, Z>V, Z>W, Z>Q, write (&#171;3.Maximalnoe chislo = &#171;,Z,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z,V,W,Q):- V>Y , V>Z, V>X, V>W, V>Q, write (&#171;3.Maximalnoe chislo = &#171;,V,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z,V,W,Q):- W>Y , W>Z, W>V, W>X, W>Q, write (&#171;3.Maximalnoe chislo = &#171;,W,&#187;\\n&#187;), ! .<br \/>\n\tmax (X,Y,Z,V,W,Q):- Q>X , Q>Y, Q>Z, Q>V, Q>W, write (&#171;3.Maximalnoe chislo = &#171;,Q,&#187;\\n&#187;) .<\/p>\n<p>GOAL:<br \/>\n\trandom(100,A),random(100,B),<br \/>\n\tmin(A, B),<br \/>\n\tmax(A, B),<\/p>\n<p>\trandom(100,C), random(100,D), random(100,E),<br \/>\n\tmin( C, D, E),<br \/>\n\tmax( C, D, E),<\/p>\n<p>\trandom(100,G), random(100,K), random(100,L), random(100,M), random(100,N), random(100,P),<br \/>\n\tmin(G,K,L,M,N,P),<br \/>\n\tmax(G,K,L,M,N,P).<\/p>\n<p>18. \u0412 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043f\u043b\u0430\u0432\u0430\u043d\u0438\u044e \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0410\u043d\u0434\u0440\u0435\u0439, \u0412\u0438\u043a\u0442\u043e\u0440, \u0421\u0430\u0448\u0430 \u0438 \u0414\u0438\u043c\u0430. \u0418\u0445 \u0434\u0440\u0443\u0437\u044c\u044f \u0432\u044b\u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044f\u0445:<br \/>\n1) \u043f\u0435\u0440\u0432\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0421\u0430\u0448\u0430, \u0412\u0438\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u0442\u043e\u0440\u044b\u043c;<br \/>\n2) \u0432\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0421\u0430\u0448\u0430, \u0414\u0438\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0435\u0442\u044c\u0438\u043c;<br \/>\n3) \u0410\u043d\u0434\u0440\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u0442\u043e\u0440\u044b\u043c, \u0414\u0438\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u043c.<br \/>\n\u041f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u0434\u0440\u0443\u0433\u043e\u0435 \u043b\u043e\u0436\u043d\u043e. \u041a\u0430\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0437\u0430\u043d\u044f\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044e\u043d\u043e\u0448\u0435\u0439, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0437\u0430\u043d\u044f\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. <\/p>\n<p>predicates<\/p>\n<p>\tfakt(symbol,integer)<br \/>\n\tfak(symbol,integer)<br \/>\n\tfa(symbol,integer)<br \/>\n\tman(symbol)<br \/>\n\tl().<\/p>\n<p>clauses<\/p>\n<p>\tman(sasha).<br \/>\n\tman(viktor).<br \/>\n\tman(dima).<br \/>\n\tman(andrei).<\/p>\n<p>\tfakt(sasha,1).<br \/>\n\tfakt(viktor,2).<br \/>\n\tfak(sasha,2).<br \/>\n\tfak(dima,3).<br \/>\n\tfa(andrei,2).<br \/>\n\tfa(dima,4).<\/p>\n<p>\tl():-<br \/>\n\t\tfakt(Z,X),<br \/>\n\t\tfak(C,V),<br \/>\n\t\tfa(B,N),<\/p>\n<p>\t\tZ<>C,Z<>B,C<>B,<br \/>\n\t\tX<>V,X<>N,V<>N,<br \/>\n\t\tR=10-X-V-N,<br \/>\n\t\tfakt(_,T),T<>R,<br \/>\n\t\tfak(_,Y),Y<>R,<br \/>\n\t\tfa(_,U),U<>R,<\/p>\n<p>\t\tman(K),K<>Z,K<>C,K<>B,<br \/>\n\t\twrite(Z,&#187;- &#171;,X,&#187;,&#187;,B,&#187;- &#171;,N,&#187;,&#187;,C,&#187;- &#171;,V,&#187;,&#187;,K,&#187;- &#171;,R,&#187;.\\n&#187;).<\/p>\n<p>goal<br \/>\n\tl().<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u2116 2. \u0422\u0435\u043c\u0430: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 fail, not, cut (\u043d\u0435\u0443\u0441\u043f\u0435\u0445, \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435). \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430 2. \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430\u043c\u0438: &#8212; \u041d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b. &#8212; \u041d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0447\u0438\u0441\u0435\u043b. &#8212; \u041d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u0447\u0438\u0441\u0435\u043b.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"_links":{"self":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23976"}],"collection":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23976"}],"version-history":[{"count":1,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23976\/revisions"}],"predecessor-version":[{"id":23977,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/23976\/revisions\/23977"}],"wp:attachment":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}