Latest version

This commit is contained in:
Anthony Wang 2020-05-30 23:37:44 +00:00 committed by repl.it user
parent d8881d65c3
commit 6310ca3384
3 changed files with 17 additions and 0 deletions

7
problems/55-D.txt Normal file
View file

@ -0,0 +1,7 @@
smmr is clsng in,you have set your eyes on a smmr ntrnshp with your fvrt fruit cnfdrcy,ctrs.what you rlly want is to take over ntr rgnstn on your way to world fruit dmntn,but gttng an ntrnshp is a nice first step.you know that there is a sngl prsn in ctrs dcdng who gets ntrnshp,but nfrtntly,you dont know who that prsn is.thus,you dcd to nfltrt ntr rgnztn by brbng some sbst of mmbrs,so that you are grntd to get ntrnshp.you have lrdy gthrd rgnztn map,as well as stmtd mnt of money each mmbr would rqr to aid your cnddcy.only thing rmnng is dcdng who to rcrt.when you bribe a ctrs mmbr,that mmbr will be able to mnplt both their sprr as well as their drct sbrdnts to spprt your cnddcy.in this way it is not ncssry to bribe vryn in ctrs,as long as vryn in rgnstn is thr brbd or mnpltd by smn who is.in ddtn,you want to take an extra prctn.you do not want two dffrnt ppl to both be brbd if they ever talk to each other,then they might rlz what your final plan is,start blckmlng you.ctrs prtcl dctts that nbdy shld ever dscss nythng with nyn who is not their mmdt boss or sbrdnt,so you fgr your schm will be sffcntly safe as long as you avoid brbng mmdt sprr of smn else you bribe.to ntt nfltrtn you are to write a prgrm that given rgnztnl map of ctrs as well as cost of rcrtng each of its mmbrs,tpts mnmm mnt of money rqrd to cmplt task.bcs ctrs is so wll-rgnzd,every mmbr has xctly one mmdt sprvsr,xcpt one,only most sour xcllnc,who has only sbrdnts.ipf first line cnssts of an ntgr 1<=n<=100000,nmbr of mmbrs in ctrs.then fllws n lines,each dscrbng a mmbr,bgnnng with mmbr 0,ndng with mmbr n1.line dscrbng mmbr i bgns with two ntgrs 0<=c_<=1000000,0<=_<n,cost of rcrtng mmbr i,nmbr of mmdt sbrdnts of mmbr i rspctvly.then fllws u_i nmbrs on same line,dntfctn nmbrs of sbrdnts.note that all dntfctn nmbrs are btwn 0,n1.opf mnmm cost of nfltrtng ntr rgnztn while dhrng to rstrctns above.bsrv that nswr might very well be lrgr than 2^32.spi 8 2 2 1 2 4 0 3 0 20 1 6 20 1 3 3 2 0 4 5 1 7 1 0 spo 15
Original length: 2250
Compressed length: 1012
Percent compression: 55.0222%
T<>;<3B>5|t<>OW<4F><7A>~<7E>6~<7E>:|yyu<79>w7<77>5<EFBFBD>sս<73>6<EFBFBD>Z?<3F>=kZ<6B>M<EFBFBD>1<1F><1C>P<EFBFBD>`K<><12>P<EFBFBD>4U<34>@<40>B<EFBFBD>5<EFBFBD>Y<EFBFBD><>c<EFBFBD>z翵2<E7BFB5>u<&[% <09>b*{<7B>+<2B>*<2A>^<5E>-<2D>(I<>(N<>܉?<3F>K<EFBFBD>n_ʲ<5F><1B><07>2<EFBFBD>#<23>% <09>V&Ζ<>l<EFBFBD>
<EFBFBD>o<EFBFBD>X<EFBFBD>_<EFBFBD>2Y<EFBFBD><17>5 <0A>;<3B>ee(I<>e<EFBFBD>o+<13>Ζ<>X|<<3C>&a(I<> ;<3B>c<EFBFBD>w<EFBFBD><14>ݾ<EFBFBD>J<EFBFBD>8df <0C>a<EFBFBD>p<EFBFBD>JJW<4A>9<EFBFBD>^oX<6F>$<24>T%<25>x<EFBFBD>O<EFBFBD>QL<51>č<>{<7B>̐<EFBFBD>Z<EFBFBD>e <0C>L<EFBFBD>xsB<73>?J<>F<EFBFBD>k<EFBFBD>͊<EFBFBD>~_z<5F>LV8<56>u<EFBFBD>c<EFBFBD>uQ<75>ڻJA_c<>6Ζc <0C>L>g\<5C>\9a<39>'g9[}f7%<25><6A>l<EFBFBD><08>^pB<70>fJ<>F<EFBFBD>k<EFBFBD>YLE<4C><1F><1C>#Zq<5A>k<EFBFBD>*<2A>V<EFBFBD>_<EFBFBD>u%Ȳ/%H<>Z<EFBFBD>->8۸v?Ҍ5<D28C>8E<38>e<EFBFBD>_<EFBFBD>P<EFBFBD>0<EFBFBD>=N<>R<EFBFBD>`<60>}(I<>c*{<7B>$<24>{<7B>f<EFBFBD>'gq<15>Ϝ<EFBFBD>͕<EFBFBD>j<>9[<5B>8[<5B>U1<55>k<EFBFBD>_<EFBFBD>l9<6C>$<24>d<EFBFBD>\F\<5C>e<EFBFBD>m<EFBFBD>}Q<><<3C>u`<60>̯<CCAF>X<EFBFBD>+<2B><EFBFBD>:<3A>Ug<55>e<EFBFBD>gY<67>LV<4C>q<EFBFBD>f<EFBFBD>p<12>4<EFBFBD>3BP<42>0<EFBFBD> m<07>W<>y<EFBFBD>{Ye<> ˾<>@IBI<42>q<EFBFBD>e<EFBFBD><08><1B>% <09><13>-JJWN<57>_<EFBFBD>`<60>ۃ<EFBFBD>x}<7D>.<2E>(&2<>L5gJ<67>%<0E>iݷ/<2F>h<EFBFBD> <0B>pƙ<17><1D> ٪<> z<><12>N<07>:<3A>AS<>~<7E><18>5<EFBFBD>i<>e<EFBFBD>le<6C><08>S<EFBFBD>FZm<1E>Ր͊!q<>$MZ<4D>jc<6A>-<2D>lV<6C>/ޜ<><>V<EFBFBD>F\ 3e<33>{<7B>ϯ<1F>|;\#3c<33><0E>q<EFBFBD>.s<>S<EFBFBD>d<EFBFBD>5<EFBFBD>Z<EFBFBD><0F>n_
c<EFBFBD><EFBFBD>/<2F>?<3F><18>y<1A>2<EFBFBD>k<EFBFBD>V<EFBFBD>e <0C><78>r<EFBFBD>v<EFBFBD>A<41>|><3E><EFBFBD>%<0E>iݷ/c<>;\#3c<33>G<EFBFBD><02><19>5<EFBFBD>S_*<2A>ٺ<EFBFBD>9OA<4F>g<EFBFBD>@<40>(<28>

9
problems/55-H.txt Normal file
View file

@ -0,0 +1,9 @@
logo is an old prgrmmng lngg with a trtl that holds a pen.cmmnds in lngg allow trtl to move in drctn he is pstnd.if pen is down,then a line is drawn in his path of mvmnt.ucf prgrmmng team has dcdd that it wants to rsrrct logo,mrkt new tool to mddl schls in hope of nsprng next wave of ucf prgrmmng team chmpns.in nwlg,trtl draws on a grid,20 chrctrs high,30 chrctrs wide with top left crnr with crdnts,0,0,bttm right crnr with crdnts,19,29.each grid sqr will cntn a sngl text chrctr.at bgnnng of any nwlg prgrm,grid cntns all blank sqrs,trtl is lctd at,0,0,hdd right with his pen down.in ddtn to being able to put his pen up,down,trtl can chng chrctr with which his pen draws,his strtng chrctr is '*'.this will allow dsply to have more vrty than bfr.fnlly,trtl can turn right or left in ncrmnts of 45 dgrs,so it is pssbl to move dgnlly.here are nwlg cmmnds,start pen up pen down chng chrctr C move X right turn R left turn L end start cmmnd smply ndcts start of a nwlg prgrm while end cmmnd ndcts end of a nwlg prgrm.both pen cmmnds do not move trtl at all,but smply chng state of trtls pen to thr up,not wrtng,or down,wrtng,as ndctd.chng chrctr cmmnd does not move trtl at all or draw nythng.it smply chngs chrctr with which pen will draw,if it is down,on sbsqnt cmmnds after this cmmnd is xctd.move cmmnd smply moves trtl from its crrnt spot X nmbr of steps.if pen is down,then this chrctr is drawn in each grid sqr on path.only sqr for which this isnt ncssrly true is ntl sqr of path.if this ntl sqr was prvsly drawn on,then we dont draw over it with ptntlly new chrctr.if this ntl sqr was prvsly blank,then we do draw over sqr with new chrctr.thus,if first line after start in a prgrm is move 5,then 6 stars are drawn.hwvr,if this is fllwd by move 3,only 3 more stars will be drawn.right turn,left turn cmmnds turns trtl,in place,R dgrs to right or L dgrs to left,rspctvly,R,L are given in mltpls of 45 dgrs.if a nwlg prgrm cmmnds trtl to go off 20 x 30 grid,prgrm has csd a trtl out of bnds error.prblm,for each nwlg prgrm,prdc opt of prgrm.you are grntd that these prgrms are syntctclly crrct.nmly,only cmmnds lstd above will be used,ngls for turns will be pstv ntgrs that are mltpls of 45,vls for mvmnt will be pstv ntgrs,chrctr for chng chrctr cmmnd will lwys be a nn-whtspc prntbl chrctr,these are chrctrs with ascii vls in btwn 33,126,nclsv.if prgrm prdcs a trtl out of bnds error,then smply dsply this error mssg nstd.ipf first line of ipt file will cntn a sngl pstv ntgr,n,n<=100,dsgntng nmbr of nwlg prgrms your prgrm will have to ntrprt.all of prgrms fllw,with one cmmnd per line.you are grntd that first line of each prgrm is cmmnd start,that last line of each prgrm is cmmnd end.on each line of code,all words,nmbrs will be sprtd by a sngl space from each other.no extra spcs will be ncldd at bgnnng or end of any lines.opf first line of opt for each prgrm shld have fllwng frmt,prgrm #k where k rprsnts prgrm nmbr,strtng at 1.if there is no error in prgrm,then opt ntr grid.in order for opt of a prgrm to be ccrt,there must be spcs,not tabs or other chrctrs,in each spot where no opt was wrttn drng crs of prgrm.in ddtn,place grid nsd of a rctngl of +,-,| chrctrs where - makes up hrzntl line,| makes up vrtcl line,+ rprsnts crnrs,see spo.each grid will be opt as 22 lines of 32 chrctrs each,which is 20 by 30 grid srrndd by rctngl.if there is a trtl out of bnds error in prgrm,smply dntfy line nmbr of first time error ccrs,opt a sngl line with fllwng frmt,line x,trtl out of bnds error where x rprsnts line nmbr of first line of code in prgrm that css a trtl out of bnds error.start line is line nmbr 0.all sbsqnt lines are nmbrd in rglr cntng order.skip a blank line in btwn opt for each prgrm.spi 2 start move 5 right turn 90 chng chrctr & move 4 right turn 45 chng chrctr @ move 3 end start move 25 right turn 90 move 5 left turn 90 move 6 right turn 45 end spo prgrm #1 +------------------------------+ |****** | | & | | & | | & | | & | | @ | | @ | | @ | | | | | | | | | | | | | | | | | | | | | | | | | +------------------------------+ prgrm #2 line 5,trtl out of bnds error
Original length: 4396
Compressed length: 1978
Percent compression: 55.0045%
T5ñðçõyrU¯¦Õ£mÍ\Z«Æ»u»êðãÝ5ºÎ_¯ا±¯«æÝëáús϶O¯šÕ®êئã][vzyýnó÷f_~Ǧ’ó,rÍzŸ†—ÆpÏ.zûÑ%4å<«äÏQô>­2“—ÆÞ;7½ýèƒ?õÏLìÆNÊg*R;íh^ÈŸLÅž;‡.? ¼™Ÿ©Ø w2“2ºp.|Ýg<C39D>ªñB®YïÓÐ?xJPl´.¡™Í²•>¬îÆæs¿5ü7}ΣÞÚ‡Æò”™”#?ç"Unò;mîPÿœ<6A>kÖû4ôžX¼LÍ$ïg†Þ~Ø ·r€Ùi‡ñÎIJ±W)Ó”¡¶3±lìUîi?÷ìBÉûW7—{v!®ÍÖÁypÄnÏNSš¸¹Ü³ qm¶cÔ:Œ¯uôC,˜<>»Üó=bvÐ4<C390>þNX6öŽB#šÌ4œ<C593>ò~¹fý`vZbv*á=IJ&:vuèíÇT^lKèÁypŠµì4¥¹gÊTäOì¹s4k;éƒøg‚ø>}<7D>Õ¦LEþ¤*CKbÙØË=»p— e*ò'víC™ŠövbÙØËTjä¤F£.S¹ç{„÷Î<C3B7>Uù*ô¡„úÇŸýÔ·+t ‰xíèÊ÷*Co?bHººÉNSš³¼53ɸ>[9ÇaÍê ‡ÙLEªŠ<C2AA>>øSÿX“ïUFåï'ì'ïgˆÞ§ÕA;l#R•ÈŸØs'±¤!<>½ÔþÔ?5f§)MW7qœ÷¯¦«8ÆOvØ&zŸõòUHÛœ‹@ÞÏ ×¬ç.ó}~Z¢÷iI[ùi9<17>¼ŸA®Y?OäO¢÷i{ÈÓøSÿôö#4á½A¬6êå«K´CÎEo?Eþ¤]–ªò4÷všá,öÜ9ÜÛi† ¤<C2A0>mG±¤!<>½DïÓbÏWò4þÔ?½ýMx<4D>³Ø 7Yéf4õòUˆ%<25>ËÆ^îÙ…»ÌX<C38C>?¹ç{Ø ÷0/f3N¢¢ŽÍ&zŸV Wÿ¥ËT¢÷i™ŠÓØväOý½Ozù*øSÿJo?®=žÙJÜÍFåijLzq9Ú_êh^ÈŸLÅž;‡.?é2•X6ö2»áNfòC,˜<>»œD†.£“¯‚Ž]®³ÜeÆB—©LÍ&£ê¾
½ÕÏT²:v92tÍ‹.SÉ~èØåŠÜº¾
<EFBFBD>œºüäþØ“<C398>Ýpsê™Í=» ;û½
ùobÙØ;š]¦’ýб˹u}IJæÐå'÷Çì†SÿŽ]îÙ…ü7±lìu©ê0/®¹Ú¼™Ÿpõ_´Ã63 È5뙊?õϸ¡ËOE;¬öc7Ü9*w}‡yÑe*S¹Þ»-bêŸÚÃÉW¡6þìG;¬rÏ÷?vÃ<76>£<EFBFBD>¦4]ÝÞ¿š®n½O«tuSéí7ÌD¾ÿà8Ö¬Ò‡<C392>¦4gq kVéÃûW«2výUÇÇû1³þ“™ø×ò)çÂá8¬YÍ‹@ÞÏ ×¬'zŸVéíGÌá\ã<>qJmgÌN;È5ë)A‰j ôöãTs!¦UþîÙ\ñùá:˱<>÷3È5ë¹6rds.äšõ£Ê©öc6ÛÒ%4]¾~äšõJØ<4A>V²cÇ÷*ÄÝØ£ô¯2œ|¢÷i•§m â©îù⧪ßižr<C5BE>¥«Ê=ßCüHí:Ùf•.¡ ûñ¯åSÎ…ÃqCý)×Y|ÝgsÏ÷?R»N¶YbÙØËuËÆ^¢÷i¹ç{¼»¢ˆŸ@¦{—V->bÙØ;tùú û‰ec¯rÏ.<04>sRÊLľ“Úµ‡1Æ;:d|ZÍ ¹f=rmT½ý8Õæ\ˆi•¿{vèòõòU°*_….Sù»gñª†Ô¶£)/®¹Ú¼™Ÿs1esÍ÷¹ç{Äì$ iR»N¶Ù!‡¬…ZÃÙy°j²Ó<C2B2>^\ÎEÞÏ ×¬W*§ºÈ5ë¹ç{”Pÿô!{åö(¼Ç¹<C387>kÖ+×{÷pÏ.œüDïÓ"ÿòfþQåT û1šk®6oæç\ü rÍz¦½Oº„æmÞÌϹø!äšõL%zŸŸvtbáÍüœÂ{Üg­éÅUîùâGå¶E¬Ð4•!~®=žbátù;ÊÃwÚP•{¾‡øÉø¬%4¢ÉLÃY~ZÎEÈ
×Ñ×\mÞÌϹ8²¹ÎòC,È5ëÑò,%Ô?×{w®õ=È5ëq¤&wùû©ÉÊÕlE®YOzqíí4„fŒÑ¼èò÷3•<üݳÌD®Y?tùÉMöbvÚÑLÎÚ¿\g9²9¹f=}?1n]þ~|Uñ£2ê<32>§é *g9]þËÆ^fòC,¨<Í]þ~òpdsåÞîÄnâ*çB®Y?š‰µ<E280B0>ƒ|!~ÌNKªå\6všÇ¹p0¸ƒ@,{•»üý¸øPó+UIÙZÎ~¼™ð¡æWªúv|¼™pÀÊÕl%n®ú?*Ïè‡X0;-÷|ñsd”ñãy3¿r.j<>'<>½Ê± w™±0•ñΈj;cvZt7­E¬°±Ó¼Ñ¼èò÷3•@o?Nµ9bZåïže&rÍúA½|löUáÍü¤—sqÍÕ¦§ÿüݳĸ:Ù4Íã

1
problems/D.out Normal file
View file

@ -0,0 +1 @@
summer is closing in,you have set your eyes on a summer internship with your fvrt fruit cnfdrcy,ctrs.what you really want is to take over ntr rgnstn on your way to world fruit dmntn,but gttng an internship is a nice first step.you know that there is a sngl prsn in ctrs dcdng who gets ntrnshp,but nfrtntly,you dont know who that prsn is.thus,you dcd to nfltrt ntr rgnztn by brbng some sbst of members,so that you are grntd to get internship.you have already gathred organization map,as well as stmtd mnt of money each member would rqr to aid your cnddcy.only thing remaining is deciding who to recruit.when you bribe a ctrs member,that member will be able to mnplt both their sprr as well as their drct sbrdnts to spprt your cnddcy.in this way it is not ncssry to bribe vryn in ctrs,as long as vryn in rgnstn is thr brbd or mnpltd by smn who is.in ddtn,you want to take an extra prctn.you do not want two dffrnt ppl to both be bribed if they ever talk to each other,then they might rlz what your final plan is,start blckmlng you.ctrs prtcl dctts that nbdy shld ever dscss nythng with nyn who is not their mmdt boss or sbrdnt,so you fgr your schm will be sffcntly safe as long as you avoid brbng mmdt sprr of smn else you bribe.to ntt nfltrtn you are to write a prgrm that given organizational map of ctrs as well as cost of rcrtng each of its members,tpts mnmm mnt of money rqrd to cmplt task.bcs ctrs is so wll-rgnzd,every member has xctly one mmdt sprvsr,xcpt one,only most sour xcllnc,who has only sbrdnts.ipf first line cnssts of an ntgr 1<=n<=100000,number of members in ctrs.then fllws n lines,each dscrbng a member,bgnnng with member 0,ndng with member n1.line dscrbng member i bgns with two ntgrs 0<=c_<=1000000,0<=_<n,cost of rcrtng member i,number of mmdt sbrdnts of member i rspctvly.then fllws u_i numbers on same line,dntfctn numbers of sbrdnts.note that all dntfctn numbers are btwn 0,n1.opf mnmm cost of nfltrtng ntr rgnztn while dhrng to rstrctns above.bsrv that nswr might very well be lrgr than 2^32.spi 8 2 2 1 2 4 0 3 0 20 1 6 20 1 3 3 2 0 4 5 1 7 1 0 spo 15