Este problema permite hacer entregas de prueba de la práctica completa. Tened en cuenta que:
Observación
El Jutge prueba vuestras entregas mediante 4 juegos de pruebas:
En un fichero llamado practica.tar tenéis que entregar
Tened en cuenta las siguientes restricciones:
Producid el fichero practica.tar con la instrucción Linux
tar -cvf practica.tar fitxer1 fitxer2 fitxer3 ...
desde el directorio/carpeta donde tengáis los ficheros que vais a entregar. Incluid en vuestro Makefile una regla con esta instrucción, de forma que el .tar se pueda generar ejecutando make practica.tar. Con eso reduciréis el riesgo de error en sucesivas entregas. El Jutge no acepta .tar donde los ficheros estén dentro de carpetas. Recomendamos usar GNU tar para reducir el riesgo de que el fichero practica.tar sea incompatible con el Jutge.
Input
10
Resistire_1
Cuando pierda todas las partidas.
Resistire_2
Cuando duerma con la soledad.
Resistire_3
Cuando se me cierren las salidas.
Resistire_4
Y la noche no me deje en paz.
Itaca_1
Quan surts per fer el viatge cap a Itaca
Qualsevol_nit_1
Fa una nit clara i tranquila,
Qualsevol_nit_2
hi ha la lluna que fa llum,
Qualsevol_nit_3
els convidats van arribant
Qualsevol_nit_4
i van omplint tota la casa
Qualsevol_nit_5
de colors i de perfums.
2
4 4
1 3 3 2 2 4 4 1
6 9
4 2 2 4 3 1 4 4 5 1 1 3 1 5 5 5 6 6
2
7 0 -1 12 -1 -1 -1
94 31 -1 -1 63 -1 -1
listar_mensajes
listar_rejillas
listar_patrones
nuevo_mensaje
Resistire_1
Cuando tenga miedo del silencio.
nuevo_mensaje
Let_it_be_1
When I find myself in times of trouble, Mother Mary comes to me
nm
Let_it_be_2
Speaking words of wisdom, let it be.
nuevo_mensaje
vie_en_rose_1
Quand il me prend dans ses bras
nm
vie_en_rose_2
Il me parle tout bas
nm
vie_en_rose_3
Je vois la vie en rose
nuevo_mensaje
Hotel_California_5
So I called up the Captain, "Please bring me my wine". He said, "We haven't had that spirit here since nineteen sixty nine". And still those voices are calling from far away, wake you up in the middle of the night, just to hear them say...
nueva_rejilla
6 6
4 4 2 4 3 1 4 2 5 5 1 5
nr
4 4
1 1 3 1 2 4 4 2
nueva_rejilla
4 4
1 2 3 2 3 4 1 4
nr
6 9
1 1 1 2 2 1 2 5 3 5 3 6 4 3 4 5 4 6
nuevo_patron
1 2 4 -1 -1 -1 3 -1 5 -1 -1
np
22 88 77 55 -1 -1 -1 -1 -1
borra_mensaje Resistire_1
borra_mensaje vie_en_rose
bm vie_en_rose_2
lm
lr
lp
codificar_rejilla 1
Hola, amigo, que tal?
codificar_rejilla 5
Hola, amigo, que tal?
cr 2
Hola, amigo, que tal?
codificar_guardado_rejilla Let_it_be_1 4
cgr Let_it_be_3 1
cgr vie_en_rose_1 3
cgr vie_en_rose_1 0
codificar_guardado_rejilla Qualsevol_nit_1 4
cgr Qualsevol_nit_1 1
cgr Resistire_2 2
cgr Resistire_2 3
cgr Itaca_1 2
cgr Hotel_California_5 4
cgr Hotel_California_5 1
decodificar_rejilla 4
Whnd oe mynf i n I t sfieitromlfubesler ,Mar me sMo ttyhe o co me
decodificar_rejilla 2
a H ogol l,?a q u, a em ti
dr 6
a H ogol l,?a q u, a em ti
dr 3
a H ogol l,?a q u, a em ti
dr 3
dCouuae adnrcmo ns e.d ollaa d
dr 1
lnFiaata rucan,r ua iil n ta q
dr 1
u Slcpeod a I tl"ahipPne, tlC ea bagrm smeiy e ni"we.d isn ,ea Hhh"naa'Wtevd eh trseihtaprt eiec ieensei nnt n ysn Aei"xnnt.di l hlvosst oieitiaccrnaelseg l y f f,arwoa mawrnyauo pk eut ih tde dho fmlei ettnu,ositg h hj.te h.saare. y m
codificar_patron 2 15
Al despertar Gregorio Samsa una man~ana, tras un suen~o intranquilo, se encontro' en su cama convertido en un monstruoso insecto.
cp 0 15
No por mucho madrugar...
cp 3 20
amanece ma's temprano
cp 4 32
no more bla, bla, bla; no more bla, bla, bla; no more bla, bla, bla
codificar_guardado_patron Resistire_2 1 31
codificar_guardado_patron Let_it_be_2 5 10
cgp Hotel_California_5 4 64
cgp Hotel_California_1 4 64
cgp Itaca_1 1 23
cgp Qualsevol_nit_5 2 3
cgp Let_it_be_1 3 7
decodificar_patron 3 20
bodrfdj!nc*u#ufostdrp
decodificar_patron 20 3
bodrfdj!nc*u#ufostdrp
dp 2 3
c%_b/Ln2S~)_c%_o%Re5MrM
dp 1 29
Juhupo'd|lytm jvz sa'svllkhk:
dp 4 32
%h6[&k{Wxewy6[#wBxxZw46F&x$])^6[#ZBmxewc6[#OQx%&6f&`{xxDw%6P#ZBxxew
dp 2 15
@,_cdro%R4A2_fRd'Oqhn~rA-S!_5N`?M`m}`.AK_4R!S~5N~rtd.^/_)N4R`.QthknK_3E?E.Cn.Tqn&~%N?S5_#Al!_bnmu%R4I$O?Em?Um~ln.S4R5O3O~)Nrdbs/m
fin
Output
#listar_mensajes
Itaca_1
"Quan surts per fer el viatge cap a Itaca"
Qualsevol_nit_1
"Fa una nit clara i tranquila,"
Qualsevol_nit_2
"hi ha la lluna que fa llum,"
Qualsevol_nit_3
"els convidats van arribant"
Qualsevol_nit_4
"i van omplint tota la casa"
Qualsevol_nit_5
"de colors i de perfums."
Resistire_1
"Cuando pierda todas las partidas."
Resistire_2
"Cuando duerma con la soledad."
Resistire_3
"Cuando se me cierren las salidas."
Resistire_4
"Y la noche no me deje en paz."
#listar_rejillas
Rejilla 1:
4 4
(1,3) (2,4) (3,2) (4,1)
(1,2) (2,1) (3,3) (4,4)
(1,4) (2,3) (3,1) (4,2)
(1,1) (2,2) (3,4) (4,3)
Rejilla 2:
6 9
(1,3) (1,5) (2,4) (3,1) (4,2) (4,4) (5,1) (5,5) (6,6)
(1,6) (2,1) (2,5) (3,2) (3,4) (4,1) (5,4) (6,3) (6,5)
(1,1) (2,2) (2,6) (3,3) (3,5) (4,6) (5,3) (6,2) (6,4)
(1,2) (1,4) (2,3) (3,6) (4,3) (4,5) (5,2) (5,6) (6,1)
#listar_patrones
Patron 1:
(7(0()(12()()))())
Patron 2:
(94(31()())(63()()))
#nuevo_mensaje Resistire_1
error: ya existe un mensaje con ese identificador
#nuevo_mensaje Let_it_be_1
11
#nm Let_it_be_2
12
#nuevo_mensaje vie_en_rose_1
13
#nm vie_en_rose_2
14
#nm vie_en_rose_3
15
#nuevo_mensaje Hotel_California_5
16
#nueva_rejilla
error: dimensiones incorrectas de la rejilla
#nr
error: la rejilla con sus giros no cubre todas las posiciones N x N
#nueva_rejilla
3
#nr
4
#nuevo_patron
3
#np
4
#borra_mensaje Resistire_1
15
#borra_mensaje vie_en_rose
error: el mensaje no existe
#bm vie_en_rose_2
14
#lm
Hotel_California_5
"So I called up the Captain, "Please bring me my wine". He said, "We haven't had that spirit here since nineteen sixty nine". And still those voices are calling from far away, wake you up in the middle of the night, just to hear them say..."
Itaca_1
"Quan surts per fer el viatge cap a Itaca"
Let_it_be_1
"When I find myself in times of trouble, Mother Mary comes to me"
Let_it_be_2
"Speaking words of wisdom, let it be."
Qualsevol_nit_1
"Fa una nit clara i tranquila,"
Qualsevol_nit_2
"hi ha la lluna que fa llum,"
Qualsevol_nit_3
"els convidats van arribant"
Qualsevol_nit_4
"i van omplint tota la casa"
Qualsevol_nit_5
"de colors i de perfums."
Resistire_2
"Cuando duerma con la soledad."
Resistire_3
"Cuando se me cierren las salidas."
Resistire_4
"Y la noche no me deje en paz."
vie_en_rose_1
"Quand il me prend dans ses bras"
vie_en_rose_3
"Je vois la vie en rose"
#lr
Rejilla 1:
4 4
(1,3) (2,4) (3,2) (4,1)
(1,2) (2,1) (3,3) (4,4)
(1,4) (2,3) (3,1) (4,2)
(1,1) (2,2) (3,4) (4,3)
Rejilla 2:
6 9
(1,3) (1,5) (2,4) (3,1) (4,2) (4,4) (5,1) (5,5) (6,6)
(1,6) (2,1) (2,5) (3,2) (3,4) (4,1) (5,4) (6,3) (6,5)
(1,1) (2,2) (2,6) (3,3) (3,5) (4,6) (5,3) (6,2) (6,4)
(1,2) (1,4) (2,3) (3,6) (4,3) (4,5) (5,2) (5,6) (6,1)
Rejilla 3:
4 4
(1,2) (1,4) (3,2) (3,4)
(1,1) (1,3) (3,1) (3,3)
(2,1) (2,3) (4,1) (4,3)
(2,2) (2,4) (4,2) (4,4)
Rejilla 4:
6 9
(1,1) (1,2) (2,1) (2,5) (3,5) (3,6) (4,3) (4,5) (4,6)
(1,3) (1,4) (2,2) (2,3) (2,4) (4,4) (5,1) (6,1) (6,2)
(3,1) (3,2) (3,4) (4,1) (4,2) (5,2) (5,6) (6,5) (6,6)
(1,5) (1,6) (2,6) (3,3) (5,3) (5,4) (5,5) (6,3) (6,4)
#lp
Patron 1:
(7(0()(12()()))())
Patron 2:
(94(31()())(63()()))
Patron 3:
(1(2(4()())())(3()(5()())))
Patron 4:
(22(88(77(55()())())())())
#codificar_rejilla 1
" ,Hi qgoolaua,em ? t a l "
#codificar_rejilla 5
error: la rejilla no existe
#cr 2
"a H ogol l,?a q u, a em ti"
#codificar_guardado_rejilla Let_it_be_1 4
"Whnd oe mynf i n I t sfieitromlfubesler ,Mar me sMo ttyhe o co me"
#cgr Let_it_be_3 1
error: el mensaje no existe
#cgr vie_en_rose_1 3
"dQ u pmrialnee nnds ersa dsa sb "
#cgr vie_en_rose_1 0
error: la rejilla no existe
#codificar_guardado_rejilla Qualsevol_nit_1 4
"Fat a, clau t rnaan rniaq u i il"
#cgr Qualsevol_nit_1 1
"lnFiaata rucan,r ua iil n ta q"
#cgr Resistire_2 2
"ldC.uera am nas o cd o l eod dna u"
#cgr Resistire_2 3
"dCouuae adnrcmo ns e.d ollaa d "
#cgr Itaca_1 2
" eQ us ecaplne rva ps iuaafr Itegrt t a c a "
#cgr Hotel_California_5 4
"Soed " upIP Cla cpta lltaeasihee n,brmy "i winW Heeg smne ea hai".ved,n'hanctt s et hhaerdp tienin rietsiee nthnine onds sistx"ty.ie vl Aoil cealayslin ,om arfaeg c rwak fre awyo t nuhe ileg upof mini ht,tdd jheusar t th ay .to.. ehem s "
#cgr Hotel_California_5 1
"u Slcpeod a I tl"ahipPne, tlC ea bagrm smeiy e ni"we.d isn ,ea Hhh"naa'Wtevd eh trseihtaprt eiec ieensei nnt n ysn Aei"xnnt.di l hlvosst oieitiaccrnaelseg l y f f,arwoa mawrnyauo pk eut ih tde dho fmlei ettnu,ositg h hj.te h.saare. y m"
#decodificar_rejilla 4
"When I find myself in times of trouble, Mother Mary comes to me "
#decodificar_rejilla 2
"Hola, amigo, que tal? "
#dr 6
error: la rejilla no existe
#dr 3
error: la dimension del mensaje es inadecuada para la rejilla
#dr 3
"Cuando duerma con la soledad. "
#dr 1
"Fa una nit clara i tranquila, "
#dr 1
"So I called up the Captain, "Please bring me my wine". He said, "We haven't had that spirit here since nineteen sixty nine". And still those voices are calling from far away, wake you up in the middle of the night, just to hear them say... "
#codificar_patron 2 15
"@,_cdro%R4A2_fRd'Oqhn~rA-S!_5N`?M`m}`.AK_4R!S~5N~rtd.^/_)N4R`.QthknK_3E?E.Cn.Tqn&~%N?S5_#Al!_bnmu%R4I$O?Em?Um~ln.S4R5O3O~)Nrdbs/m"
#cp 0 15
error: el patron no existe
#cp 3 20
"bodrfdj!nc*u#ufostdrp"
#cp 4 32
"%h6[&k{Wxewy6[#wBxxZw46F&x$])^6[#ZBmxewc6[#OQx%&6f&`{xxDw%6P#ZBxxew"
#codificar_guardado_patron Resistire_2 1 31
"Juhupo'd|lytm jvz sa'svllkhk:"
#codificar_guardado_patron Let_it_be_2 5 10
error: el patron no existe
#cgp Hotel_California_5 4 64
"ih676\wD#^zm,i6+~^61wi+9 gBm8I#^wl{mxk F}x$S6f06.b%S8'6 {x*O ]Bm8P{m~Z-=% +m~Zz6+awb6l'A)b+m~^)^6l \y^6F g{b{^%6*b/b0x%A%^8{6:%R6l+W#e6L~h*S6o& y^*mwk{WyZ#Z g}x|k&[6_wJ6Z.O0%6.wd{m0h,W,i6W%x+V{x$Wz]#=6h|m+a{6%b}V+%6B,l+m+h6a{Z)m+a{E6lwgD'D"
#cgp Hotel_California_1 4 64
error: el mensaje no existe
#cgp Itaca_1 1 23
"Xuhu,s|r{z'wqr'mqr'es }pa{nq jaw'h'Uthjm"
#cgp Qualsevol_nit_5 2 3
"c%_b/Ln2S~)_c%_o%Re5MrM"
#cgp Let_it_be_1 3 7
"Xjhr!J%gkqh!n~tgoj!js!vlqft%ph#xspzcnh0!Ntujhv!Nfs{#gpnjt"ws!nj"
#decodificar_patron 3 20
"amanece ma's temprano"
#decodificar_patron 20 3
error: el patron no existe
#dp 2 3
"de colors i de perfums."
#dp 1 29
"Cuando duerma con la soledad."
#dp 4 32
"no more bla, bla, bla; no more bla, bla, bla; no more bla, bla, bla"
#dp 2 15
"Al despertar Gregorio Samsa una man~ana, tras un suen~o intranquilo, se encontro' en su cama convertido en un monstruoso insecto."