Este problema corresponde a la entrega intermedia de la práctica. Tened en cuenta que
esta no es la entrega definitiva de la práctica completa, ni siquiera es una entrega provisional de la práctica completa
en esta entrega se ha de proporcionar todo el código necesario (clases, programa principal y, opcionalmente, Makefile) para poder usar todas las funcionalidades de la práctica excepto "finalizar_torneo"
en esta entrega no pedimos carpetas generadas mediante
doxygen, pero los ficheros de las clases
pueden llevar todos los comentarios doxygen
que queráis; de hecho recomendamos que incluyáis las especificaciones de
todas las operaciones y que sean lo más definitivas posible
esta entrega no tendrá nota manual
Una secuencia de instrucciones y datos que siguen el formato del enunciado de la práctica y del juego de pruebas público.
Una secuencia de resultados que siguen el formato del enunciado de la práctica y del juego de pruebas público.
El Jutge prueba vuestras entregas mediante 4 juegos de pruebas:
sample: el juego de pruebas público
privat1: situaciones que no aparecen en el público
privat2: otras situaciones que no aparecen en el público
privat3: eficiencia
En un fichero llamado practica.tar tenéis
que entregar los ficheros .hh y .cc de las
clases y el programa principal. Opcionalmente, podéis entregar el
Makefile que estáis usando para generar y probar el ejecutable.
Tened en cuenta las siguientes restricciones:
el fichero que contiene el programa principal se ha de llamar
program.cc
el Makefile ha de generar un ejecutable llamado
program.exe
es importante que uséis las opciones de compilación definidas en
el menú Documentation
Compilers
PRO2 de www.jutge.org para funcionar en
igualdad de condiciones con el Jutge
no usar la opción -D_GLIBCXX_DEBUG o
usarla de forma incorrecta podrá ser penalizado
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. Os convendrá incluir 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
4 8 Grand_Slam Masters_1000 ATP_500 ATP_250 2000 1200 720 360 180 90 45 10 1000 600 360 180 90 45 25 10 500 300 180 90 45 20 0 0 250 150 90 45 20 0 0 0 5 Wimbledon 1 Indian_Wells 2 Barcelona 3 Estoril 4 Cincinnati 2 50 Djokovic Medvedev Zverev Tsitsipas Nadal Berrettini Rublev Ruud Auger-Aliassime Sinner Hurkacz Norrie Schwartzman Shapovalov Bautista Fritz Carreno Opelka Basilashvili Alcaraz Sonego Karatsev Isner Cilic Monfils Khachanov Garin Evans Federer Bublik Ramos De-Minaur Dimitrov Tiafoe Harris Fucsovics Delbonis Fognini Paul Korda Humbert Nishikori Davidovich Krajinovic Ivashka Lajovic Brooksby Goffin Paire Thiem listar_categorias iniciar_torneo Barcelona 14 4 5 6 13 15 17 20 24 25 26 27 31 33 37 nuevo_jugador Duckworth nj Bublik consultar_jugador Nadal cj Popyrin bj Paire it Cincinnati 32 1 2 3 7 8 9 10 11 12 14 16 18 19 21 22 23 28 29 30 32 34 35 36 38 40 42 44 45 46 47 48 49 nj Popyrin nuevo_torneo Casablanca 5 nt Casablanca 4 nt Estoril 4 baja_jugador Duckworth bj Bonzi baja_torneo Kiev bt Estoril listar_torneos listar_ranking listar_jugadores fin
Output
#listar_categorias 4 8 Grand_Slam 2000 1200 720 360 180 90 45 10 Masters_1000 1000 600 360 180 90 45 25 10 ATP_500 500 300 180 90 45 20 0 0 ATP_250 250 150 90 45 20 0 0 0 #iniciar_torneo Barcelona (((1.Tsitsipas (8.Cilic 9.Monfils)) ((4.Schwartzman 13.Dimitrov) (5.Bautista 12.Ramos))) ((2.Nadal (7.Alcaraz 10.Khachanov)) ((3.Berrettini 14.Delbonis) (6.Carreno 11.Garin)))) #nuevo_jugador Duckworth 51 #nj Bublik error: ya existe un jugador con ese nombre #consultar_jugador Nadal Nadal Rk:5 Ps:0 Ts:0 WM:0 LM:0 WS:0 LS:0 WG:0 LG:0 #cj Popyrin error: el jugador no existe #bj Paire 50 #it Cincinnati (((((1.Djokovic 32.Thiem) (16.Isner 17.Evans)) ((8.Hurkacz 25.Korda) (9.Norrie 24.Fognini))) (((4.Rublev 29.Lajovic) (13.Basilashvili 20.De-Minaur)) ((5.Ruud 28.Ivashka) (12.Opelka 21.Tiafoe)))) ((((2.Medvedev 31.Goffin) (15.Karatsev 18.Federer)) ((7.Sinner 26.Nishikori) (10.Shapovalov 23.Fucsovics))) (((3.Zverev 30.Brooksby) (14.Sonego 19.Bublik)) ((6.Auger-Aliassime 27.Krajinovic) (11.Fritz 22.Harris))))) #nj Popyrin 51 #nuevo_torneo Casablanca 5 error: la categoria no existe #nt Casablanca 4 6 #nt Estoril 4 error: ya existe un torneo con ese nombre #baja_jugador Duckworth 50 #bj Bonzi error: el jugador no existe #baja_torneo Kiev error: el torneo no existe #bt Estoril 5 #listar_torneos 5 Barcelona ATP_500 Casablanca ATP_250 Cincinnati Masters_1000 Indian_Wells Masters_1000 Wimbledon Grand_Slam #listar_ranking 1 Djokovic 0 2 Medvedev 0 3 Zverev 0 4 Tsitsipas 0 5 Nadal 0 6 Berrettini 0 7 Rublev 0 8 Ruud 0 9 Auger-Aliassime 0 10 Sinner 0 11 Hurkacz 0 12 Norrie 0 13 Schwartzman 0 14 Shapovalov 0 15 Bautista 0 16 Fritz 0 17 Carreno 0 18 Opelka 0 19 Basilashvili 0 20 Alcaraz 0 21 Sonego 0 22 Karatsev 0 23 Isner 0 24 Cilic 0 25 Monfils 0 26 Khachanov 0 27 Garin 0 28 Evans 0 29 Federer 0 30 Bublik 0 31 Ramos 0 32 De-Minaur 0 33 Dimitrov 0 34 Tiafoe 0 35 Harris 0 36 Fucsovics 0 37 Delbonis 0 38 Fognini 0 39 Paul 0 40 Korda 0 41 Humbert 0 42 Nishikori 0 43 Davidovich 0 44 Krajinovic 0 45 Ivashka 0 46 Lajovic 0 47 Brooksby 0 48 Goffin 0 49 Thiem 0 50 Popyrin 0 #listar_jugadores 50 Alcaraz Rk:20 Ps:0 Ts:0 WM:0 LM:0 WS:0 LS:0 WG:0 LG:0 Auger-Aliassime Rk:9 Ps:0 Ts:0 W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