parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Focm":[function(require,module,exports) {
var n={};!function(t){"use strict";(n["Control.Apply"]=n["Control.Apply"]||{}).arrayApply=function(n){return function(t){for(var r=n.length,e=t.length,o=new Array(r*e),u=0,a=0;a<r;a++)for(var i=n[a],c=0;c<e;c++)o[u++]=i(t[c]);return o}}}(),function(t){"use strict";(n["Data.Functor"]=n["Data.Functor"]||{}).arrayMap=function(n){return function(t){for(var r=t.length,e=new Array(r),o=0;o<r;o++)e[o]=n(t[o]);return e}}}(),function(n){"use strict";n["Data.Functor"]=n["Data.Functor"]||{};var t=n["Data.Functor"],r=function(n){this.map=n},e=new r(n["Data.Functor"].arrayMap);t.Functor=r,t.map=function(n){return n.map},t.functorArray=e}(n),function(n){"use strict";n["Control.Apply"]=n["Control.Apply"]||{};var t=n["Control.Apply"],r=n["Control.Apply"],e=n["Data.Functor"],o=function(n,t){this.Functor0=n,this.apply=t},u=new o(function(){return e.functorArray},r.arrayApply);t.Apply=o,t.apply=function(n){return n.apply},t.applyArray=u}(n),function(n){"use strict";n["Control.Applicative"]=n["Control.Applicative"]||{};var t=n["Control.Applicative"],r=n["Control.Apply"],e=function(n){return n.pure};t.Applicative=function(n,t){this.Apply0=n,this.pure=t},t.pure=e,t.liftA1=function(n){return function(t){return function(o){return r.apply(n.Apply0())(e(n)(t))(o)}}}}(n),function(t){"use strict";(n["Control.Bind"]=n["Control.Bind"]||{}).arrayBind=function(n){return function(t){for(var r=[],e=0,o=n.length;e<o;e++)Array.prototype.push.apply(r,t(n[e]));return r}}}(),function(n){"use strict";n["Control.Bind"]=n["Control.Bind"]||{};var t=n["Control.Bind"],r=n["Control.Bind"],e=n["Control.Apply"],o=function(n,t){this.Apply0=n,this.bind=t},u=new o(function(){return e.applyArray},r.arrayBind);t.Bind=o,t.bind=function(n){return n.bind},t.bindArray=u}(n),function(n){"use strict";n["Control.Monad"]=n["Control.Monad"]||{};var t=n["Control.Monad"],r=n["Control.Applicative"],e=n["Control.Bind"];t.Monad=function(n,t){this.Applicative0=n,this.Bind1=t},t.ap=function(n){return function(t){return function(o){return e.bind(n.Bind1())(t)(function(t){return e.bind(n.Bind1())(o)(function(e){return r.pure(n.Applicative0())(t(e))})})}}}}(n),function(n){"use strict";n.map_=function(n){return function(t){return function(){return n(t())}}},n.pure_=function(n){return function(){return n}},n.bind_=function(n){return function(t){return function(){return t(n())()}}},n.for=function(n){return function(t){return function(r){return function(){for(var e=n;e<t;e++)r(e)()}}}}}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(n){"use strict";n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{};var t=n["Control.Monad.ST.Internal"],r=n["Control.Monad.ST.Internal"],e=n["Control.Applicative"],o=n["Control.Apply"],u=n["Control.Bind"],a=n["Control.Monad"],i=new n["Data.Functor"].Functor(r.map_),c=new a.Monad(function(){return l},function(){return f}),f=new u.Bind(function(){return s},r.bind_),s=new o.Apply(function(){return i},a.ap(c)),l=new e.Applicative(function(){return s},r.pure_);t.functorST=i,t.applyST=s,t.applicativeST=l,t.bindST=f,t.monadST=c,t.for=r.for}(n),(n.DPB=n.DPB||{}).modify=function(n){return function(t){return function(r){return function(){return r[n]=t(r[n]),{}}}}},function(n){"use strict";n.replicate="function"==typeof Array.prototype.fill?function(n){return function(t){return n<1?[]:new Array(n).fill(t)}}:function(n){return function(t){for(var r=[],e=0,o=0;o<n;o++)r[e++]=t;return r}},n.length=function(n){return n.length}}(n["Data.Array"]=n["Data.Array"]||{}),function(n){"use strict";n["Data.Function"]=n["Data.Function"]||{};n["Data.Function"].flip=function(n){return function(t){return function(r){return n(r)(t)}}}}(n),function(n){"use strict";n["Data.Maybe"]=n["Data.Maybe"]||{};var t=n["Data.Maybe"],r=function(){function n(){}return n.value=new n,n}(),e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Nothing=r,t.Just=e,t.maybe=function(n){return function(t){return function(o){if(o instanceof r)return n;if(o instanceof e)return t(o.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,t.constructor.name,o.constructor.name])}}},t.fromJust=function(n){return function(n){if(n instanceof e)return n.value0;throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): "+[n.constructor.name])}}}(n),function(n){"use strict";n["Data.Array"]=n["Data.Array"]||{};var t=n["Data.Array"],r=n["Data.Array"],e=n["Control.Bind"],o=n["Data.Function"],u=n["Data.Maybe"],a=function(n){return[n]},i=o.flip(e.bind(e.bindArray));t.singleton=a,t.concatMap=i,t.mapMaybe=function(n){return i(function(t){return u.maybe([])(a)(n(t))})},t.replicate=r.replicate,t.length=r.length}(n),function(n){"use strict";n["Data.Array.Partial"]=n["Data.Array.Partial"]||{};var t=n["Data.Array.Partial"],r=n["Data.Array"];t.head=function(n){return function(n){return n[0]}},t.last=function(n){return function(n){return n[r.length(n)-1|0]}}}(n),function(n){"use strict";n["Data.Array.ST"]=n["Data.Array.ST"]||{};var t=n["Data.Array.ST"],r=n["Control.Applicative"],e=n["Control.Monad.ST.Internal"];t.unsafeThaw=function(n){return r.pure(e.applicativeST)(n)}}(n),function(n){"use strict";n.peekImpl=function(n){return function(t){return function(){return t[n]}}},n.pokeImpl=function(n){return function(t){return function(r){return function(){return r[n]=t,{}}}}}}(n["Data.Array.ST.Partial"]=n["Data.Array.ST.Partial"]||{}),function(n){"use strict";n["Data.Array.ST.Partial"]=n["Data.Array.ST.Partial"]||{};var t=n["Data.Array.ST.Partial"],r=n["Data.Array.ST.Partial"];t.peek=function(n){return r.peekImpl},t.poke=function(n){return r.pokeImpl}}(n),function(n){"use strict";n.topInt=2147483647,n.bottomInt=-2147483648}(n["Data.Bounded"]=n["Data.Bounded"]||{}),function(t){"use strict";(n["Data.Eq"]=n["Data.Eq"]||{}).refEq=function(n){return function(t){return n===t}}}(),function(n){"use strict";n["Data.Eq"]=n["Data.Eq"]||{};var t=n["Data.Eq"],r=function(n){this.eq=n},e=new r(n["Data.Eq"].refEq);t.Eq=r,t.eq=function(n){return n.eq},t.eqInt=e}(n),function(t){"use strict";(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}).unsafeCompareImpl=function(n){return function(t){return function(r){return function(e){return function(o){return e<o?n:e===o?t:r}}}}}}(),function(n){"use strict";n["Data.Ordering"]=n["Data.Ordering"]||{};var t=n["Data.Ordering"],r=function(){function n(){}return n.value=new n,n}(),e=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}();t.LT=r,t.GT=e,t.EQ=o}(n),function(n){"use strict";n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{};var t=n["Data.Ord.Unsafe"],r=n["Data.Ord.Unsafe"],e=n["Data.Ordering"],o=r.unsafeCompareImpl(e.LT.value)(e.EQ.value)(e.GT.value);t.unsafeCompare=o}(n),function(t){"use strict";(n["Data.Ring"]=n["Data.Ring"]||{}).intSub=function(n){return function(t){return n-t|0}}}(),function(n){"use strict";n.intAdd=function(n){return function(t){return n+t|0}},n.intMul=function(n){return function(t){return n*t|0}}}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(n){"use strict";n["Data.Semiring"]=n["Data.Semiring"]||{};var t=n["Data.Semiring"],r=n["Data.Semiring"],e=function(n,t,r,e){this.add=n,this.mul=t,this.one=r,this.zero=e},o=new e(r.intAdd,r.intMul,1,0);t.Semiring=e,t.add=function(n){return n.add},t.zero=function(n){return n.zero},t.mul=function(n){return n.mul},t.one=function(n){return n.one},t.semiringInt=o}(n),function(n){"use strict";n["Data.Ring"]=n["Data.Ring"]||{};var t=n["Data.Ring"],r=n["Data.Ring"],e=n["Data.Semiring"],o=function(n,t){this.Semiring0=n,this.sub=t},u=function(n){return n.sub},a=new o(function(){return e.semiringInt},r.intSub);t.Ring=o,t.sub=u,t.negate=function(n){return function(t){return u(n)(e.zero(n.Semiring0()))(t)}},t.ringInt=a}(n),function(n){"use strict";n["Data.Ord"]=n["Data.Ord"]||{};var t=n["Data.Ord"],r=n["Data.Eq"],e=n["Data.Ord.Unsafe"],o=n["Data.Ordering"],u=n["Data.Ring"],a=n["Data.Semiring"],i=function(n,t){this.Eq0=n,this.compare=t},c=new i(function(){return r.eqInt},e.unsafeCompare),f=function(n){return n.compare},s=function(n){return function(t){return function(r){return!(f(n)(t)(r)instanceof o.LT)}}};t.Ord=i,t.compare=f,t.greaterThanOrEq=s,t.min=function(n){return function(t){return function(r){var e=f(n)(t)(r);if(e instanceof o.LT)return t;if(e instanceof o.EQ)return t;if(e instanceof o.GT)return r;throw new Error("Failed pattern match at Data.Ord (line 119, column 3 - line 122, column 12): "+[e.constructor.name])}}},t.max=function(n){return function(t){return function(r){var e=f(n)(t)(r);if(e instanceof o.LT)return r;if(e instanceof o.EQ)return t;if(e instanceof o.GT)return t;throw new Error("Failed pattern match at Data.Ord (line 128, column 3 - line 131, column 12): "+[e.constructor.name])}}},t.abs=function(n){return function(t){return function(r){return s(n)(r)(a.zero(t.Semiring0()))?r:u.negate(t)(r)}}},t.ordInt=c}(n),function(n){"use strict";n["Data.Bounded"]=n["Data.Bounded"]||{};var t=n["Data.Bounded"],r=n["Data.Bounded"],e=n["Data.Ord"],o=function(n,t,r){this.Ord0=n,this.bottom=t,this.top=r},u=new o(function(){return e.ordInt},r.bottomInt,r.topInt);t.Bounded=o,t.bottom=function(n){return n.bottom},t.top=function(n){return n.top},t.boundedInt=u}(n),function(t){"use strict";(n["Data.Int"]=n["Data.Int"]||{}).fromStringAsImpl=function(n){return function(t){return function(r){var e;e=r<11?"[0-"+(r-1).toString()+"]":11===r?"[0-9a]":"[0-9a-"+String.fromCharCode(86+r)+"]";var o=new RegExp("^[\\+\\-]?"+e+"+$","i");return function(e){if(o.test(e)){var u=parseInt(e,r);return(0|u)===u?n(u):t}return t}}}}}(),function(n){"use strict";n["Data.Int"]=n["Data.Int"]||{};var t=n["Data.Int"],r=n["Data.Int"],e=n["Data.Maybe"],o=r.fromStringAsImpl(e.Just.create)(e.Nothing.value),u=o(10);t.fromString=u,t.fromStringAs=o}(n),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showIntImpl=function(n){return n.toString()}}(),function(n){"use strict";n["Data.Show"]=n["Data.Show"]||{};var t=n["Data.Show"],r=function(n){this.show=n},e=new r(n["Data.Show"].showIntImpl);t.Show=r,t.show=function(n){return n.show},t.showInt=e}(n),function(n){"use strict";n.split=function(n){return function(t){return t.split(n)}},n.trim=function(n){return n.trim()}}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(n){"use strict";n["Data.String.Common"]=n["Data.String.Common"]||{};var t=n["Data.String.Common"],r=n["Data.String.Common"];t.split=r.split,t.trim=r.trim}(n),function(t){"use strict";(n["Data.Unit"]=n["Data.Unit"]||{}).unit={}}(),function(n){"use strict";n["Data.Unit"]=n["Data.Unit"]||{};var t=n["Data.Unit"],r=n["Data.Unit"];t.unit=r.unit}(n),function(n){"use strict";n.pureE=function(n){return function(){return n}},n.bindE=function(n){return function(t){return function(){return t(n())()}}}}(n.Effect=n.Effect||{}),function(n){"use strict";n.Effect=n.Effect||{};var t=n.Effect,r=n.Effect,e=n["Control.Applicative"],o=n["Control.Apply"],u=n["Control.Bind"],a=n["Control.Monad"],i=n["Data.Functor"],c=new a.Monad(function(){return l},function(){return f}),f=new u.Bind(function(){return s},r.bindE),s=new o.Apply(function(){return p},a.ap(c)),l=new e.Applicative(function(){return s},r.pureE),p=new i.Functor(e.liftA1(l));t.functorEffect=p,t.applyEffect=s,t.applicativeEffect=l,t.bindEffect=f,t.monadEffect=c}(n),function(n){"use strict";n["Node.Encoding"]=n["Node.Encoding"]||{};var t=n["Node.Encoding"],r=n["Data.Show"],e=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),s=function(){function n(){}return n.value=new n,n}(),l=new r.Show(function(n){if(n instanceof e)return"ASCII";if(n instanceof o)return"UTF8";if(n instanceof u)return"UTF16LE";if(n instanceof a)return"UCS2";if(n instanceof i)return"Base64";if(n instanceof c)return"Latin1";if(n instanceof f)return"Binary";if(n instanceof s)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});t.ASCII=e,t.UTF8=o,t.UTF16LE=u,t.UCS2=a,t.Base64=i,t.Latin1=c,t.Binary=f,t.Hex=s,t.showEncoding=l}(n),function(t){"use strict";(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}).unsafeRequireFS=require("fs")}(),function(t){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(n){"use strict";n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{};var t=n["Unsafe.Coerce"],r=n["Unsafe.Coerce"];t.unsafeCoerce=r.unsafeCoerce}(n),function(n){"use strict";n["Node.FS.Internal"]=n["Node.FS.Internal"]||{};var t=n["Node.FS.Internal"],r=n["Node.FS.Internal"],e=n["Unsafe.Coerce"].unsafeCoerce;t.mkEffect=e,t.unsafeRequireFS=r.unsafeRequireFS}(n),function(n){"use strict";n["Node.FS.Sync"]=n["Node.FS.Sync"]||{};var t=n["Node.FS.Sync"],r=n["Data.Show"],e=n["Node.Encoding"],o=n["Node.FS.Internal"],u=o.unsafeRequireFS;t.readTextFile=function(n){return function(t){return o.mkEffect(function(o){return u.readFileSync(t,{encoding:r.show(e.showEncoding)(n)})})}}}(n),function(t){"use strict";(n["Node.Process"]=n["Node.Process"]||{}).process=process}(),function(n){"use strict";n["Node.Process"]=n["Node.Process"]||{};var t=n["Node.Process"],r=n["Node.Process"].process.stdout;t.stdout=r}(n),function(n){"use strict";n.write=function(n){return function(t){return function(r){return function(){return n.write(t,null,r)}}}},n.writeStringImpl=function(n){return function(t){return function(r){return function(e){return function(){return n.write(r,t,e)}}}}}}(n["Node.Stream"]=n["Node.Stream"]||{}),function(n){"use strict";n["Node.Stream"]=n["Node.Stream"]||{};var t=n["Node.Stream"],r=n["Node.Stream"],e=n["Data.Show"],o=n["Node.Encoding"];t.writeString=function(n){return function(t){return r.writeStringImpl(n)(e.show(o.showEncoding)(t))}}}(n),function(n){"use strict";n.DPB=n.DPB||{};var t=n.DPB,r=n.DPB,e=n["Control.Applicative"],o=n["Control.Monad.ST.Internal"],u=n["Data.Array"],a=n["Data.Array.Partial"],i=n["Data.Array.ST"],c=n["Data.Array.ST.Partial"],f=n["Data.Bounded"],s=n["Data.Int"],l=n["Data.Maybe"],p=n["Data.Ord"],d=n["Data.Ring"],D=n["Data.Show"],m=n["Data.String.Common"],S=n["Data.Unit"],y=n.Effect,v=n["Node.Encoding"],w=n["Node.FS.Sync"],g=n["Node.Process"],h=n["Node.Stream"],A=m.split(" "),C=p.min(p.ordInt),I=p.max(p.ordInt),E=p.abs(p.ordInt)(d.ringInt),F=function(n){var t,e=(t=n,m.split("\n")(m.trim(t))),p=A(a.head()(e)),d=l.fromJust()(s.fromString(p[0])),S=l.fromJust()(s.fromString(p[1])),y=function(n){return u.mapMaybe(s.fromString)(A(n))}(a.last()(e));return D.show(D.showInt)(function(n){return function(t){return function(e){return a=i.unsafeThaw(u.replicate(n)(f.top(f.boundedInt)))(),c.poke()(0)(0)(a)(),o.for(1)(n)(function(n){return o.for(I(0)(n-t|0))(n)(function(t){return function(){var o=c.peek()(t)(a)();return r.modify(n)(C(o+E(e[t]-e[n]|0)|0))(a)()}})})(),c.peek()(n-1|0)(a)();var a}}}(d)(S)(y))+"\n"};t.main=function(){var n=w.readTextFile(v.UTF8.value)("/dev/stdin")();h.writeString(g.stdout)(v.UTF8.value)(F(n))(e.pure(y.applicativeEffect)(S.unit))();return S.unit},t.solve=F}(n),n.DPB.main();
},{}]},{},["Focm"], null)