pepi 10 лет назад
Родитель
Сommit
b0eacb24fe
4 измененных файлов с 436 добавлено и 75 удалено
  1. 86 75
      template/templateTP.log
  2. BIN
      template/templateTP.pdf
  3. 23 0
      template/templateTP.tex
  4. 327 0
      template/templateTP.tex~

+ 86 - 75
template/templateTP.log

@@ -1,15 +1,15 @@
-This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2016.9.3)  4 SEP 2016 20:09
+This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2016.9.4)  4 SEP 2016 21:05
 entering extended mode
 entering extended mode
  restricted \write18 enabled.
  restricted \write18 enabled.
  %&-line parsing enabled.
  %&-line parsing enabled.
 **templateTP.tex
 **templateTP.tex
 (./templateTP.tex
 (./templateTP.tex
-LaTeX2e <2014/05/01>
-Babel <3.9l> and hyphenation patterns for 5 languages loaded.
+LaTeX2e <2011/06/27>
+Babel <3.9h> and hyphenation patterns for 5 languages loaded.
 (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
 (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
+Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
 (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
 (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
+File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
 )
 )
 \c@part=\count79
 \c@part=\count79
 \c@section=\count80
 \c@section=\count80
@@ -24,30 +24,31 @@ File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
 \bibindent=\dimen102
 \bibindent=\dimen102
 )
 )
 (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
 (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
-Package: babel 2014/09/25 3.9l The Babel package
+Package: babel 2013/12/03 3.9h The Babel package
 
 
 (/usr/share/texlive/texmf-dist/tex/generic/babel-spanish/spanish.ldf
 (/usr/share/texlive/texmf-dist/tex/generic/babel-spanish/spanish.ldf
-Language: spanish.ldf 2014/04/24 v5.0n Spanish support from the babel system
+Language: spanish.ldf 2014/01/29 v5.0m Spanish support from the babel system
 
 
 (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
 (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
-File: babel.def 2014/09/25 3.9l Babel common definitions
+File: babel.def 2013/12/03 3.9h Babel common definitions
 \babel@savecnt=\count87
 \babel@savecnt=\count87
 \U@D=\dimen103
 \U@D=\dimen103
 )
 )
+\es@datefmt=\count88
 \es@quottoks=\toks14
 \es@quottoks=\toks14
-\es@quotdepth=\count88
-Package babel Info: Making " an active character on input line 516.
-Package babel Info: Making . an active character on input line 617.
-Package babel Info: Making < an active character on input line 662.
-Package babel Info: Making > an active character on input line 662.
+\es@quotdepth=\count89
+Package babel Info: Making " an active character on input line 496.
+Package babel Info: Making . an active character on input line 599.
+Package babel Info: Making < an active character on input line 644.
+Package babel Info: Making > an active character on input line 644.
 ))
 ))
 (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
 (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
-Package: inputenc 2014/04/30 v1.2b Input encoding file
+Package: inputenc 2008/03/30 v1.1d Input encoding file
 \inpenc@prehook=\toks15
 \inpenc@prehook=\toks15
 \inpenc@posthook=\toks16
 \inpenc@posthook=\toks16
 
 
 (/usr/share/texlive/texmf-dist/tex/latex/base/latin1.def
 (/usr/share/texlive/texmf-dist/tex/latex/base/latin1.def
-File: latin1.def 2014/04/30 v1.2b Input encoding file
+File: latin1.def 2008/03/30 v1.1d Input encoding file
 ))
 ))
 (/usr/share/texlive/texmf-dist/tex/latex/framed/framed.sty
 (/usr/share/texlive/texmf-dist/tex/latex/framed/framed.sty
 Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
 Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
@@ -58,7 +59,7 @@ Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
 \FrameSep=\dimen107
 \FrameSep=\dimen107
 ) (./Algo1Macros.tex
 ) (./Algo1Macros.tex
 (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty
 (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty
-Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
+Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
 )
 )
 (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
 (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
 Package: amssymb 2013/01/14 v3.01 AMS font symbols
 Package: amssymb 2013/01/14 v3.01 AMS font symbols
@@ -72,15 +73,15 @@ LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
 (Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
 (Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
 ))
 ))
 (/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty
 (/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty
-Package: multicol 2014/10/28 v1.8i multicolumn formatting (FMi)
-\c@tracingmulticols=\count89
+Package: multicol 2011/06/27 v1.7a multicolumn formatting (FMi)
+\c@tracingmulticols=\count90
 \mult@box=\box26
 \mult@box=\box26
 \multicol@leftmargin=\dimen108
 \multicol@leftmargin=\dimen108
-\c@unbalance=\count90
-\c@collectmore=\count91
-\doublecol@number=\count92
-\multicoltolerance=\count93
-\multicolpretolerance=\count94
+\c@unbalance=\count91
+\c@collectmore=\count92
+\doublecol@number=\count93
+\multicoltolerance=\count94
+\multicolpretolerance=\count95
 \full@width=\dimen109
 \full@width=\dimen109
 \page@free=\dimen110
 \page@free=\dimen110
 \premulticols=\dimen111
 \premulticols=\dimen111
@@ -89,7 +90,6 @@ Package: multicol 2014/10/28 v1.8i multicolumn formatting (FMi)
 \multicolbaselineskip=\skip45
 \multicolbaselineskip=\skip45
 \partial@page=\box27
 \partial@page=\box27
 \last@line=\box28
 \last@line=\box28
-\maxbalancingoverflow=\dimen113
 \mult@rightbox=\box29
 \mult@rightbox=\box29
 \mult@grightbox=\box30
 \mult@grightbox=\box30
 \mult@gfirstbox=\box31
 \mult@gfirstbox=\box31
@@ -111,20 +111,20 @@ Package: multicol 2014/10/28 v1.8i multicolumn formatting (FMi)
 \@tempa=\box47
 \@tempa=\box47
 \@tempa=\box48
 \@tempa=\box48
 \@tempa=\box49
 \@tempa=\box49
-\c@columnbadness=\count95
-\c@finalcolumnbadness=\count96
-\last@try=\dimen114
-\multicolovershoot=\dimen115
-\multicolundershoot=\dimen116
+\c@columnbadness=\count96
+\c@finalcolumnbadness=\count97
+\last@try=\dimen113
+\multicolovershoot=\dimen114
+\multicolundershoot=\dimen115
 \mult@nat@firstbox=\box50
 \mult@nat@firstbox=\box50
 \colbreak@box=\box51
 \colbreak@box=\box51
-\mc@col@check@num=\count97
+\multicol@sort@counter=\count98
 )
 )
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
+Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
 
 
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 2014/05/08 v1.15 key=value parser (DPC)
+Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
 \KV@toks@=\toks18
 \KV@toks@=\toks18
 )
 )
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
@@ -147,10 +147,10 @@ Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
 (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
 (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
 Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
 Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
 )
 )
-\Gread@gobject=\count98
+\Gread@gobject=\count99
 ))
 ))
-\Gin@req@height=\dimen117
-\Gin@req@width=\dimen118
+\Gin@req@height=\dimen116
+\Gin@req@width=\dimen117
 )
 )
 (/usr/share/texlive/texmf-dist/tex/latex/textpos/textpos.sty
 (/usr/share/texlive/texmf-dist/tex/latex/textpos/textpos.sty
 Package: textpos 2014/01/03 v1.7j
 Package: textpos 2014/01/03 v1.7j
@@ -161,17 +161,17 @@ Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
 )
 )
 \TP@textbox=\box52
 \TP@textbox=\box52
 \TP@holdbox=\box53
 \TP@holdbox=\box53
-\TPHorizModule=\dimen119
-\TPVertModule=\dimen120
-\TP@margin=\dimen121
-\TP@absmargin=\dimen122
+\TPHorizModule=\dimen118
+\TPVertModule=\dimen119
+\TP@margin=\dimen120
+\TP@absmargin=\dimen121
 
 
 Grid set 16 x 16 = 37.34424pt x 52.81541pt
 Grid set 16 x 16 = 37.34424pt x 52.81541pt
-\TPboxrulesize=\dimen123
-\TP@ox=\dimen124
-\TP@oy=\dimen125
+\TPboxrulesize=\dimen122
+\TP@ox=\dimen123
+\TP@oy=\dimen124
 \TP@tbargs=\toks19
 \TP@tbargs=\toks19
-\TP@prevdepth=\dimen126
+\TP@prevdepth=\dimen125
 TextBlockOrigin set to 0pt x 0pt
 TextBlockOrigin set to 0pt x 0pt
 ) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
 ) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
 Package: geometry 2010/09/12 v5.6 Page Geometry
 Package: geometry 2010/09/12 v5.6 Page Geometry
@@ -187,29 +187,29 @@ Package ifvtex Info: VTeX not detected.
 (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
 (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
 Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
 Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
 )
 )
-\Gm@cnth=\count99
-\Gm@cntv=\count100
-\c@Gm@tempcnt=\count101
-\Gm@bindingoffset=\dimen127
-\Gm@wd@mp=\dimen128
-\Gm@odd@mp=\dimen129
-\Gm@even@mp=\dimen130
-\Gm@layoutwidth=\dimen131
-\Gm@layoutheight=\dimen132
-\Gm@layouthoffset=\dimen133
-\Gm@layoutvoffset=\dimen134
+\Gm@cnth=\count100
+\Gm@cntv=\count101
+\c@Gm@tempcnt=\count102
+\Gm@bindingoffset=\dimen126
+\Gm@wd@mp=\dimen127
+\Gm@odd@mp=\dimen128
+\Gm@even@mp=\dimen129
+\Gm@layoutwidth=\dimen130
+\Gm@layoutheight=\dimen131
+\Gm@layouthoffset=\dimen132
+\Gm@layoutvoffset=\dimen133
 \Gm@dimlist=\toks20
 \Gm@dimlist=\toks20
 )
 )
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
 (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
-Package: color 2014/04/23 v1.1a Standard LaTeX Color (DPC)
+Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
 
 
 (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
 (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
 File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
 File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
 )
 )
-Package color Info: Driver file: pdftex.def on input line 137.
+Package color Info: Driver file: pdftex.def on input line 130.
 )
 )
-\c@exercise=\count102
-\c@consigna=\count103
+\c@exercise=\count103
+\c@consigna=\count104
 )
 )
 (./templateTP.aux
 (./templateTP.aux
 LaTeX Info: Redefining \. on input line 6.
 LaTeX Info: Redefining \. on input line 6.
@@ -234,16 +234,16 @@ LaTeX Info: Redefining \% on input line 17.
 
 
 (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
 (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
 [Loading MPS to PDF converter (version 2006.09.02).]
 [Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count104
-\scratchdimen=\dimen135
+\scratchcounter=\count105
+\scratchdimen=\dimen134
 \scratchbox=\box54
 \scratchbox=\box54
-\nofMPsegments=\count105
-\nofMParguments=\count106
+\nofMPsegments=\count106
+\nofMParguments=\count107
 \everyMPshowfont=\toks21
 \everyMPshowfont=\toks21
-\MPscratchCnt=\count107
-\MPscratchDim=\dimen136
-\MPnumerator=\count108
-\makeMPintoPDFobject=\count109
+\MPscratchCnt=\count108
+\MPscratchDim=\dimen135
+\MPnumerator=\count109
+\makeMPintoPDFobject=\count110
 \everyMPtoPDFconversion=\toks22
 \everyMPtoPDFconversion=\toks22
 ) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
 ) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
 Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
 Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
@@ -331,7 +331,7 @@ LaTeX Font Info:    Font shape `OT1/cmtt/bx/n' in size <10> not available
 LaTeX Font Info:    Try loading font information for OMS+cmr on input line 1.
 LaTeX Font Info:    Try loading font information for OMS+cmr on input line 1.
 
 
 (/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
 (/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
-File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
+File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
 )
 )
 LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <10> not available
 LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <10> not available
 (Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 1.
 (Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 1.
@@ -348,7 +348,7 @@ File: umsb.fd 2013/01/14 v3.01 AMS symbols B
 (./tipos/competencia.tex [1
 (./tipos/competencia.tex [1
 
 
 {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]) (./tipos/jjoo.tex [2])
 {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]) (./tipos/jjoo.tex [2])
-Overfull \hbox (12.46289pt too wide) in paragraph at lines 120--120
+Overfull \hbox (12.46289pt too wide) in paragraph at lines 122--122
  \OT1/cmr/m/n/10 [Atleta] = $[\OML/cmm/m/it/10 atl\OMS/cmsy/m/n/10 j\OML/cmm/m/
  \OT1/cmr/m/n/10 [Atleta] = $[\OML/cmm/m/it/10 atl\OMS/cmsy/m/n/10 j\OML/cmm/m/
 it/10 dia \OMS/cmsy/m/n/10   \OT1/cmr/m/n/10 [1\OML/cmm/m/it/10 ::cantDias\OT1/
 it/10 dia \OMS/cmsy/m/n/10   \OT1/cmr/m/n/10 [1\OML/cmm/m/it/10 ::cantDias\OT1/
 cmr/m/n/10 (\OML/cmm/m/it/10 j\OT1/cmr/m/n/10 )]\OML/cmm/m/it/10 ; comp \OMS/cm
 cmr/m/n/10 (\OML/cmm/m/it/10 j\OT1/cmr/m/n/10 )]\OML/cmm/m/it/10 ; comp \OMS/cm
@@ -359,18 +359,29 @@ T1/cmr/m/n/10 (\OML/cmm/m/it/10 atl; participantes\OT1/cmr/m/n/10 (\OML/cmm/m/i
 t/10 comp\OT1/cmr/m/n/10 ))]$\OT1/cmr/bx/n/10 ; 
 t/10 comp\OT1/cmr/m/n/10 ))]$\OT1/cmr/bx/n/10 ; 
  []
  []
 
 
-[3] [4] (./auxiliaresTipos.tex [5]) [6] (./templateTP.aux
+[3] [4]
+Overfull \hbox (6.0771pt too wide) in paragraph at lines 244--244
+ \OML/cmm/m/it/10 ifthenelse\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 contar\OT1/cmr/m/
+n/10 (\OML/cmm/m/it/10 cab\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 mejoresPaises\OT1/c
+mr/m/n/10 (\OML/cmm/m/it/10 j\OT1/cmr/m/n/10 ))) ==  1  \OMS/cmsy/m/n/10 ^  j\O
+ML/cmm/m/it/10 mejoresPaises\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 j\OT1/cmr/m/n/10 
+)\OMS/cmsy/m/n/10 j \OML/cmm/m/it/10 > \OMS/cmsy/m/n/10 j\OML/cmm/m/it/10 sinRe
+pes\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 mejoresPaises\OT1/cmr/m/n/10 (\OML/cmm/m/i
+t/10 j\OT1/cmr/m/n/10 )))\OMS/cmsy/m/n/10 j\OML/cmm/m/it/10 ; false; [] 
+ []
+
+[5] (./auxiliaresTipos.tex) [6] (./templateTP.aux
 LaTeX Info: Redefining \. on input line 6.
 LaTeX Info: Redefining \. on input line 6.
 LaTeX Info: Redefining \% on input line 6.
 LaTeX Info: Redefining \% on input line 6.
 ) ) 
 ) ) 
 Here is how much of TeX's memory you used:
 Here is how much of TeX's memory you used:
- 3624 strings out of 494958
- 49091 string characters out of 6179387
- 128894 words of memory out of 5000000
- 6769 multiletter control sequences out of 15000+600000
+ 3526 strings out of 494966
+ 47633 string characters out of 6179560
+ 126702 words of memory out of 5000000
+ 6666 multiletter control sequences out of 15000+600000
  7923 words of font info for 31 fonts, out of 8000000 for 9000
  7923 words of font info for 31 fonts, out of 8000000 for 9000
  40 hyphenation exceptions out of 8191
  40 hyphenation exceptions out of 8191
- 38i,8n,30p,272b,384s stack positions out of 5000i,500n,10000p,200000b,80000s
+ 38i,8n,26p,442b,220s stack positions out of 5000i,500n,10000p,200000b,80000s
 </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></u
 </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></u
 sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/sha
 sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/sha
 re/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/share/tex
 re/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/share/tex
@@ -384,7 +395,7 @@ s/cm/cmss10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
 msy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.p
 msy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.p
 fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></u
 fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></u
 sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb>
 sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb>
-Output written on templateTP.pdf (6 pages, 163530 bytes).
+Output written on templateTP.pdf (6 pages, 165053 bytes).
 PDF statistics:
 PDF statistics:
  79 PDF objects out of 1000 (max. 8388607)
  79 PDF objects out of 1000 (max. 8388607)
  56 compressed objects within 1 object stream
  56 compressed objects within 1 object stream

BIN
template/templateTP.pdf


+ 23 - 0
template/templateTP.tex

@@ -240,6 +240,29 @@
 \end{problema}
 \end{problema}
 
 
 \begin{problema}{uyOrdenadoAs\'iHayUnPatr\'on}{j: JJOO}{\bool}
 \begin{problema}{uyOrdenadoAs\'iHayUnPatr\'on}{j: JJOO}{\bool}
+ %written by Pepi
+\asegura { res == ifthenelse |mejoresPaises(j)|== |sinRepes(mejoresPaises(j))|, true, \newline ifthenelse (contar(cab(mejoresPaises(j)))==\,1\, \wedge\, |mejoresPaises(j)|>|sinRepes(mejoresPaises(j)))|, false, \newline (\forall  i \leftarrow [0..|mejorespaises(j)|-1], k	\leftarrow [0..|mejoresPaises(j)|-1], i\,mod \newline |patron(mejoresPaises(j))| == k\,mod  |patron(mejoresPaises(j))|) s[i] == s[k]}
+
+
+	\aux{mejoresPaises}{j :JJOO}{[Pais]}{ [ cab(ordenar(masOrosDelDia(j,d) ) \newline | d \leftarrow  [1.. jornadaActual(j) - 1], cronograma(j,d) \neq [\;\;], masOrosDelDia(j,d) \neq [\;\;] ]}
+
+	\aux{patron}{(ls: [T])}{[T]}{\newline ifthenelse(|ls|==1, ls, sub(ls, 0, min ( [ i | i \leftarrow [1..|ls|-1], ls[i] == ls[0] ] ) )}
+
+
+	\aux{masOrosDelDia}{j:JJOO, d: dia}{[Pais]}{\newline filtrarTuplaPorPrmMax(j, uniqSgdLista( tuplasMedallOroComaPais(j,d) ), d)}
+
+	\aux{tuplasMedallaOroComaPais}{j : JJOO, d: Dia}{[(\ent, Pais)]}{\newline [( contar(pais,PaisesConOroTalDia(j,d)), p ) | p \leftarrow paisesConOroTalDia(j,d) ]}
+
+	\aux{paisesConOroTalDia}{j:JJOO, d: Dia}{[Pais]}{\newline [pais(cab(ranking(c)) | c \leftarrow cronograma (j,d), finalizada(c)  \wedge |ranking(c)|>0 ]}
+
+	\aux{uniqSgdLista}{ls:[(\ent,\ent)]}{[(\ent,\ent)]}{\newline [ ls(i) | i \leftarrow [0..|ls|-1], j\leftarrow [0..|ls|-1], i \neq j, sgd(ls[i]) \neq sgd(ls[j]) ]}
+
+	\aux{filtrarTuplaPorPrmMax}{j:JJOO, ls:[(\ent,Pais)], d:Dia}{[Pais]}{\newline [sgd(tupla) | tupla \leftarrow tuplasMedallaOroComaPais(j,d), prm(tupla) \geq \newline maxListaTuplas(tuplasMedallaOroComaPais(j,d))]}
+
+	\aux{maxListaTuplas}{ ls: [(ent, Pais)]}{\ent}{max([ prm(tupla) | tupla \leftarrow ls ])}
+
+
+
 \end{problema}
 \end{problema}
 
 
 %Fixed by martu
 %Fixed by martu

+ 327 - 0
template/templateTP.tex~

@@ -0,0 +1,327 @@
+\documentclass[a4paper]{article}
+
+\usepackage[spanish]{babel}
+\usepackage[latin1]{inputenc}
+
+\usepackage{framed}
+\input{Algo1Macros}
+
+\newcommand{\comen}[2]{%
+\begin{framed}	
+\noindent \textsf{#1:} #2
+\end{framed}
+}
+
+
+
+\begin{document}
+
+\materia{Algoritmos y Estructura de Datos I}
+\cuatrimestre{2}
+\anio{2016}
+
+%\fecha{26 de agosto de 2016}
+
+\nombre{\LARGE TPE OJOTA (Organizaci\'on de Juegos Ol\'impicos Tp de Algoritmos 1) v1.0}
+
+\titulotp
+
+
+\section{Tipos}
+
+\input{tipos/tipos.tex}
+
+\section{Atleta}
+\input{tipos/atleta.tex}
+
+%Seen by martu
+\begin{problema}{especialidad}{a: Atleta}{Deporte}
+	\asegura{res \in deportes(a)}
+	\asegura{capacidad(a,res)==maximoLista(listarCapacidades(a))}
+	\aux{listarCapacidades}{a:Atleta}{[\ent]}{[capacidad(a,x) | x \leftarrow deportes(a) ]}
+	\aux{maximoLista}{ls:[\ent]}{\ent}{[x|x\leftarrow ls, (\forall y \leftarrow ls) x \geq y][0]}
+\end{problema}
+
+%Seen by martu
+\begin{problema}{entrenarNuevoDeporte}{a: Atleta, d: Deporte, c: \ent}{}
+	\requiere{c \geq 0 \wedge c \leq 100}
+	\requiere{d \notin deportes(a)}
+	\modifica{a}
+	\asegura{nombre(a)==nombre(pre(a))}
+	\asegura{sexo(a) == sexo(pre(a))}
+	\asegura{anoNacimiento(a)==anoNacimiento(pre(a))}
+	\asegura{nacionalidad(a)==nacionalidad(pre(a))}
+	\asegura{ciaNumber(a)==ciaNumber(pre(a))}
+	\asegura{(\forall d' \leftarrow deportes(pre(a)))capacidad(a,d')==capacidad(pre(a),d')}
+
+	\asegura{mismos(deportes(a),d:deportes(pre(a)))}
+	\asegura{ordenada(deportes(a))}
+	\asegura{capacidad(a,d)==c}
+\end{problema}
+
+
+\section{Competencia}
+
+\input{tipos/competencia.tex}
+
+%Seen by martu
+\begin{problema}{finalizarCompetencia}{c: Competencia, posiciones: [Atleta], control: [(Atleta, \bool)]}{}
+	\requiere{\neg finalizada(c)}
+	\requiere{contenida(posiciones,participantes(c))}
+	\requiere{sinRepetidos(posiciones)}
+	\requiere{(\forall x \leftarrow control) prm(x) \in participantes(c)}
+	\requiere{sinRepetidos([prm(x) | x \leftarrow control])}
+	\modifica{c}
+	\asegura{finalizada(c)}
+	\asegura{ranking(c)==posiciones}
+	\asegura{participantes(c)==participantes(pre(c))}
+	\asegura{mismos(LesTocoControlAntiDoping(c), [prm(x) | x \leftarrow control])}
+	\asegura{(\forall x \leftarrow control) leDioPositivo(prm(x))==sgn(x)}
+	\asegura{categoria(c)==categoria(pre(c))}
+\end{problema}
+
+%Seen by martu
+\begin{problema}{linfordChristie}{c: Competencia, a: Atleta}{}
+	\requiere{\neg finalizada(c)}
+	\requiere{a \in participantes(c)}
+	\modifica{c}
+	\asegura{mismos(participantes(pre(c)), a:participantes(c))}
+	\asegura{categoria(c)==categoria(pre(c))}
+	\asegura{\neg finalizada(c)}
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{gananLosMasCapaces}{c: Competencia}{\bool}
+	\requiere{finalizada(c)}
+	\asegura{res==(\forall x \leftarrow[0..|ranking(c)|-2]) \newline
+		capacidad(ranking(c)[x],prm(categoria(c))) \geq capacidad(ranking(c)[x+1],prm(categoria(c)))}
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{sancionarTramposos}{c: Competencia}{}
+	\requiere{finalizada(c)}
+	\modifica{c}
+	\asegura{finalizada(c)}
+	\asegura{categoria(c)==categoria(pre(c))}
+	\asegura{mismos(participantes(c),participantes(pre(c)))}
+	\asegura{incluida(ranking(c),participantes(c))}
+	\asegura{incluida(LesTocoControlAntiDoping(c),participantes(c))}
+	\asegura{mismos(ranking(pre(c)),ranking(c)++listaDoping(c, LesTocoControlAntiDoping(c)))}
+	\asegura{ranking==[ el | el \leftarrow ranking(pre(c)), el \notin listaDoping(c,LesTocoControlAntiDoping(c))]}
+	\aux{listaDoping}{c:competencia, a:[atleta]}{[atleta]}{[x | x \leftarrow a, leDioPositivo(c,x)]}
+\end{problema}
+
+\section{JJOO}
+\input{tipos/jjoo.tex}
+
+%Fixed by martu
+\begin{problema}{dePaseo}{j: JJOO}{[Atleta]} 
+	\asegura{mismos(res,noParticiparon(j))}
+	\aux{noParticiparon}{j: JJOO}{[Atleta]}{[x | x \leftarrow atletas(j), \neg en(x, participaronConRepes(j))]}
+	\aux{participaronConRepes}{j: JJOO}{\newline
+		[Atleta]}{[atl | dia \leftarrow [1..cantDias(j)], comp \leftarrow cronograma(j, dia), atl \leftarrow atletas(j), en(atl, participantes(comp))]}
+\end{problema}
+
+%Written by martu
+\begin{problema}{medallero}{j: JJOO}{[(Pais, [\ent])]}
+	\asegura{mismos(result, sacarSinMedallas(crearMedallero(j)))}
+	\asegura{medalleroOrdenado(result)}
+	\aux{listaNacionalidadesAtletas}{j: JJOO}{[Pais]}{[nacionalidad(at) | at \leftarrow atletas(j)]}
+	\aux{sacarRepeticiones}{ls : [T]}{[T]}{[ls[x] | x \leftarrow [0..|ls|-1], \neg en(ls[x], ls[0..x-1])]}
+	\aux{listaPaises}{j: JJOO}{[Pais]}{sacarRepeticiones(listaNacionalidadesAtletas(j))}
+	\aux{cuenta}{x: T, a: [T]}{\ent}{|[y | y \leftarrow a, y == x]|}
+	\aux{nacionalidadPrimerosTres}{c:Competencia}{[Pais]}{\newline
+	[ifthenelse(i \leq |ranking (c)|-1, nacionalidad(ranking(c)[i]), "Narnia") | i \leftarrow [0..2]]}
+	\aux{ganadoresMTotales}{M: \ent, j: JJOO}{[Pais]}{\newline
+	[nacionalidadPrimerosTres(c)[M] | dia \leftarrow [1.. jornadaActual(j)], c \leftarrow cronograma(j, dia), finalizada(c)]}
+	\aux{crearMedallero}{j: JJOO}{[(Pais, [\ent])]}{\newline
+	[(p, [cuenta(p, ganadoresMTotales(0,j)), cuenta(p, ganadoresMTotales(1,j)),\newline cuenta(p, ganadoresMTotales(2,j))]) | p \leftarrow listaPaises(j)]}
+	\aux{sacarSinMedallas}{lista : [(Pais, [\ent])]}{[(Pais, [\ent])]}{[x | x \leftarrow lista, sgn(x) \neq [0,0,0]]}
+	\aux{medalleroOrdenado}{lista : [(Pais, [\ent])]}{Bool}{\newline
+	(\forall x \leftarrow [0..|lista|-2]) ((sgd(lista[x])[0] \geq sgd(lista[x+1])[0]) \newline
+	\vee ((sgd(lista[x])[0]==sgd(lista[x+1])[0]) \wedge (sgd(lista[x])[1] \geq sgd(lista[x+1])[1]))\newline
+	\vee ((sgd(lista[x])[0]==sgd(lista[x+1])[0]) \wedge (sgd(lista[x])[1]==sgd(lista[x+1])[1])\newline
+	\wedge (sgd(lista[x])[2] \geq sgd(lista[x+1])[2])))}
+\end{problema}
+
+\begin{problema}{boicotPorDisciplina}{j: JJOO, cat: (Deporte, Sexo), p: Pais}{\ent}
+	\requiere{existe (c \leftarrow todasLasCompetencias(j)) categoria(c) == cat}
+	\requiere{finalizada (competenciaFiltrada(j,cat)) == false}
+	// asumimos que se saca a los participantes antes de finalizar la competencia\newline
+	\modifica{j}
+	\asegura{finalizada ( competenciaFiltrada(j,cat) ) == finalizada (competenciaFiltrada(pre(j),cat))}
+	\asegura{ano(j) == ano(pre(j))}
+	\asegura{mismos(atletas(j), atletas(pre(j)))}
+	\asegura{cantDias(j) == cantDias(pre(j))}
+	\asegura{jornadaActual(j) == jornadaActual(pre(j))}
+	\asegura{(\forall dia \leftarrow [1..cantDias (j)] ) \newline
+		|cronograma(j,dia) | == |cronograma(pre(j), dia)|}
+
+	\asegura{ (\forall dia \leftarrow [1..cantDias(j)])
+		(\forall( x \leftarrow [1..(long(cronograma(j,dia))-1)])) \newline
+		((cronograma((j,dia)[x] == cronograma (pre(j),dia) [x]) \newline \vee ( categoria(cronograma(j,dia)[x]) == (categoria(cronograma(pre(j),dia)[x])) \newline \wedge  (categoria(cronograma(j,dia)[x]) == cat )))}
+
+	\asegura{ (\forall comp \leftarrow todasLasCompetencias(j), categoria(comp) == cat)
+		\newline (\forall( atl \leftarrow participantes(comp)) nacionalidad (atl) \neq p}
+
+	\asegura{ mismos (participantes(competenciaFiltrada(j,cat)), \newline[x | x \leftarrow participantes(competenciaFiltrada(pre(j),cat)), nacionalidad(x) \neq p])}
+	\asegura{ res == |[x | comp \leftarrow todasLasCompetencias(pre(j)),\newline x \leftarrow participantes(comp), (categoria(comp) == cat \wedge nacionalidad(x) == p)]|}
+	\aux{todasLasCompetencias}{j:JJOO}{[competencia]}{[x | y \leftarrow [1..cantDIas(j)], x \leftarrow cronogramas(j,y) ] }
+	\aux{competenciaFiltrada}{j:JJOO, c:(deporte,sexo)}{competencia}{\newline cab( [x | x \leftarrow todasLasCompetencias(j), c== categoria(x) ] )}
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{losMasFracasados}{j: JJOO, p: Pais}{[Atleta]}
+	\asegura{noGanaronMedallas: (\forall x \leftarrow [noGanoMedallas(atl, comp)\newline
+		| atl \leftarrow result, comp \leftarrow todasLasCompetencias(j), finalizada(comp)]) x}
+	\asegura{todosDelPais: (\forall x \leftarrow result) nacionalidad(x) == p}
+	\asegura{(\forall x \leftarrow result, y \leftarrow atletas(j), nacionalidad(y)==p)\newline
+		competenciasEnLasQueParticipo(j, x) >= competenciasEnLasQueParticipo(j, y)}
+	\aux{competenciasEnLasQueParticipo}{j: JJOO, a:Atleta}{\ent}{\newline
+		long([z | z\leftarrow todasLasCompetencias(j), en(a, participantes(z))])}
+	\aux{noGanoMedallas}{atl: Atleta, comp: Competencia}{Bool}{\newline
+		ciaNumber(ranking(comp)[0]) \neq ciaNumber(atl) \wedge ciaNumber(ranking(comp)[1]) \neq ciaNumber(atl)\newline
+	\wedge ciaNumber(ranking(comp)[2]) \neq ciaNumber(atl)}
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{liuSong}{j: JJOO, a: Atleta, p: Pa\'is}{}
+	\requiere{a \in atletas(j)}
+	\modifica{j}
+	\asegura{ano(j)==ano(pre(j))}
+	\asegura{(\forall i  \leftarrow  [0..|atletas(pre(j))|-1], atletas(pre(j))_i!= a)
+		atletas(pre(j))_i==atletas(j)_i}
+	\asegura{(\forall x  \leftarrow atletas(j), ciaNumber(x)==ciaNumber(a))\newline
+		(nombre(x)==nombre(a) \wedge sexo(x)==sexo(a) \wedge a\tilde{n}oNacimiento(x)==a\tilde{n}oNacimiento(a)\newline
+		\wedge nacionalidad(x)==p \wedge deportes(x)==deportes(a) \wedge capacidad(x)==capacidad(a))}
+	\asegura{cantDias(j)==cantDias(pre(j))}
+	\asegura{jornadaActual(j)==jornadaActual(pre(j))}
+	\asegura{(\forall d  \leftarrow  [1..cantDias(j)]) |cronograma(d,j)|==|cronograma(d,pre(j))|\newline
+		\wedge (\forall i  \leftarrow  [0..|cronograma(d,j)|-1] )\newline
+		categoria(cronograma(d,j)[i])==categoria(cronograma(d,pre(j))[i])\newline
+		\wedge finalizada(cronograma(d,j)[i])==finalizada(cronograma(d,pre(j))[i])}
+	\asegura{todosIgualesMenosLiuSong(partComp(j), $part$Comp(pre(j)))}
+	\asegura{todoIgualMenosNacionalidad(partComp(j))}
+	\asegura{todosIgualesMenosLiuSong(rankComp(j), $rank$Comp(pre(j)))}
+	\asegura{todoIgualMenosNacionalidad(rankComp(j))}
+	\asegura{todosIgualesMenosLiuSong(doppComp(j), $dopp$Comp(pre(j)))}
+	\asegura{todoIgualMenosNacionalidad(doppComp(j))}
+	\asegura{\forall(dia  \leftarrow  [1..jornadaActual(j)], comp  \leftarrow  [0..|cronograma(j, dia)-1|], finalizada(cronograma(j, dia)))\newline
+		leDioPositivo(cronograma(j, dia)[comp], atl) == leDioPositivo(cronograma(pre(j), dia)[comp], atl)}
+	\aux{rankComp}{j: JJOO}{[Atleta]}{\newline
+		[atl | dia  \leftarrow  [1..cantDias(j)], comp  \leftarrow  cronograma(j, dia), atl  \leftarrow  ranking(comp), finalizada(comp)]}
+	\aux{doppComp}{j: JJOO}{[Atleta]}{\newline
+		[atl | dia  \leftarrow  [1..cantDias(j)], comp  \leftarrow  cronograma(j, dia),\newline
+		atl \leftarrow lesTocoControlAntiDopping(comp), finalizada(comp)]}
+	\aux{partComp}{j: JJOO}{[Atleta]}{\newline
+		[atl | dia  \leftarrow  [1..cantDias(j)], comp  \leftarrow  cronograma(j, dia), atl  \leftarrow  participantes(comp)]}
+	\aux{todosIgualesMenosLiuSong}{ls : [Atleta], lsOld : [Atleta]}{Bool}{\newline
+		\forall(x  \leftarrow  [0..|ls|-1]) (ls[x]==lsOld[x]  \vee  ciaNumber(ls)==ciaNumber(a))}
+	\aux{todoIgualMenosNacionalidad}{ls: [Atleta]}{Bool}{\newline
+		\forall(x  \leftarrow  ls, ciaNumber(x) == ciaNumber(a)) (nombre(x)==nombre(a) \wedge sexo(x)==sexo(a)\newline
+		\wedge anoNacimiento(x)==anoNacimiento(a) \wedge nacionalidad(x)==p \wedge deportes(x)==deportes(a)\newline
+		\wedge capacidad(x)==capacidad(a))}
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{stevenBradbury}{j: JJOO}{Atleta}
+	\requiere{algunOro:\newline
+		long([comp | comp \leftarrow todasLasCompetencias(j), finalizada(comp)\wedge|ranking(comp)|>0])>0}
+	\asegura{ganoOro:\newline
+		existe(f \leftarrow [ranking(comp)[0] | comp \leftarrow todasLasCompetencias(j),\newline
+		finalizada(comp)\wedge|ranking(comp)|>0]) ciaNumber(result)==ciaNumber(f)}
+	\asegura{esElPeor:\newline
+		existe(dep \leftarrow deportesEnLosQueGano(j, result))\newline
+		paraTodo(f \leftarrow [ranking(comp)[0] | comp \leftarrow todasLasCompetencias(j),\newline
+		finalizada(comp)\wedge|ranking(comp)|>0]) capacidad(result, dep) <= capacidad(f, prm(categoria(comp))}
+	\aux{deportesEnLosQueGanoOro}{j: JJOO, a: Atleta}{[Deportes]}{\newline
+		[prm(categoria(comp)) | comp \leftarrow todasLasCompetencias(j), finalizada(comp)\newline
+		\wedge|ranking(comp)|>0 \wedge ciaNumber(ranking(comp)[0])==ciaNumber(a)]}
+\end{problema}
+
+\begin{problema}{uyOrdenadoAs\'iHayUnPatr\'on}{j: JJOO}{\bool}
+
+\asegura { res == ifthenelse |mejoresPaises(j)|== |sinRepes(mejoresPaises(j))|, true, \newline ifthenelse (contar(cab(mejoresPaises(j)))==\,1\, \wedge\, |mejoresPaises(j)|>|sinRepes(mejoresPaises(j)))|, false, \newline (\forall  i \leftarrow [0..|mejorespaises(j)|-1], k	\leftarrow [0..|mejoresPaises(j)|-1], i\,mod \newline |patron(mejoresPaises(j))| == k\,mod  |patron(mejoresPaises(j))|) s[i] == s[k]}
+
+
+	\aux{mejoresPaises}{j :JJOO}{[Pais]}{ [ cab(ordenar(masOrosDelDia(j,d) ) \newline | d \leftarrow  [1.. jornadaActual(j) - 1], cronograma(j,d) \neq [\;\;], masOrosDelDia(j,d) \neq [\;\;] ]}
+
+	\aux{patron}{(ls: [T])}{[T]}{\newline ifthenelse(|ls|==1, ls, sub(ls, 0, min ( [ i | i \leftarrow [1..|ls|-1], ls[i] == ls[0] ] ) )}
+
+
+	\aux{masOrosDelDia}{j:JJOO, d: dia}{[Pais]}{\newline filtrarTuplaPorPrmMax(j, uniqSgdLista( tuplasMedallOroComaPais(j,d) ), d)}
+
+	\aux{tuplasMedallaOroComaPais}{j : JJOO, d: Dia}{[(\ent, Pais)]}{\newline [( contar(pais,PaisesConOroTalDia(j,d)), p ) | p \leftarrow paisesConOroTalDia(j,d) ]}
+
+	\aux{paisesConOroTalDia}{j:JJOO, d: Dia}{[Pais]}{\newline [pais(cab(ranking(c)) | c \leftarrow cronograma (j,d), finalizada(c)  \wedge |ranking(c)|>0 ]}
+
+	\aux{uniqSgdLista}{ls:[(\ent,\ent)]}{[(\ent,\ent)]}{\newline [ ls(i) | i \leftarrow [0..|ls|-1], j\leftarrow [0..|ls|-1], i \neq j, sgd(ls[i]) \neq sgd(ls[j]) ]}
+
+	\aux{filtrarTuplaPorPrmMax}{j:JJOO, ls:[(\ent,Pais)], d:Dia}{[Pais]}{\newline [sgd(tupla) | tupla \leftarrow tuplasMedallaOroComaPais(j,d), prm(tupla) \geq \newline maxListaTuplas(tuplasMedallaOroComaPais(j,d))]}
+
+	\aux{maxListaTuplas}{ ls: [(ent, Pais)]}{\ent}{max([ prm(tupla) | tupla \leftarrow ls ])}
+
+
+
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{sequ\'iaOl\'impica}{j: JJOO}{[Pa\'is]}
+	\asegura{(\forall p \leftarrow result) sequiaPais(j,p) == maximaSequia(j)}
+	\asegura{(\forall p \leftarrow listaPaisesConSequia(j), sequiaPais(j,p)==maximaSequia(j)) p \in result }
+	\aux{sequiaPais}{j:JJOO, p:pais}{\ent}{\newline
+		cerosSeguidos([ ganoEnElDia(j,dia,p) | dia \leftarrow [1..cantDias(j)] ])}
+	\aux{ganoEnElDia}{j: JJOO, dia: \ent,pais: Pais}{Bool}{\newline
+		long([ 1 | c \leftarrow cronograma(j, dia), en(pais, paisesQueGanaronCompetencia(c)) ])>0}
+	\aux{listaPaisesConSequia}{j: JJOO}{[(Pais, Int)]}{\newline
+		[(p, sequiaPais(j,p)) | p \leftarrow listaPaises(j)]}
+	\aux{maximaSequia}{j: JJOO}{\ent}{\newline
+		maximoLista([ sequiaPais(j,p) | p \leftarrow listaPaises(j)])}
+	\aux{paisesQueGanaronCompetencia}{c:Competencia}{[paises]}{\newline
+		[ pais(ranking(c)[a]) | a  \leftarrow [0.. |ranking(c) |-1 ], a <= 2 ]}
+	\aux{generoTodosLosParesCeroComaUno}{ls:[Bool]}{[(\ent,\ent)]}{\newline
+		[ (c,c1) | c \leftarrow [0..|ls|-1], c1 \leftarrow [c.. |ls|-1], ls[c]==False \wedge ls[c1]==True ]}
+	\aux{uniqPrmLista}{ls:[(\ent,\ent)]}{[(\ent,\ent)]}{\newline
+		[ ls(i) | i \leftarrow [0..|ls|-1], j\leftarrow [0..|ls|-1], i \neq j, prm(ls[i]) \neq prm(ls[j]) ]}
+	\aux{uniqSgdLista}{ls:[(\ent,\ent)]}{[(\ent,\ent)]}{\newline
+		[ ls(i) | i \leftarrow [0..|ls|-1], j\leftarrow [0..|ls|-1], i \neq j, sgd(ls[i]) \neq sgd(ls[j]) ]}
+	\aux{diferenciaPrmSgd}{ls:[(\ent,\ent)]}{[\ent]}{[ sgd(el) - prm(el) | el \leftarrow ls]}
+	\aux{cerosSeguidos}{ls:[Bool]}{\ent}{\newline
+		max(diferenciaPrmSgd(uniqSgdLista(uniqPrmLista(generoTodosLosParesCeroComaUno(ls)))))}
+\end{problema}
+
+%Fixed by martu
+\begin{problema}{transcurrirDia}{j: JJOO}{}
+	\modifica{j}
+	\asegura{cantDias(j) == cantDias(pre(j))}
+	\asegura{jornadaActual(j) == jornadaActual(pre(j))+1}
+	\asegura{a\tilde{n}o (j) == a\tilde{n}o(pre(j))}
+	\asegura{mismos(atletas(j),atletas(pre(j)))}
+	\asegura{(\forall dia \leftarrow [1..jornadaActual(j))-1])\newline mismos(cronograma(j,dia), cronograma(pre(j),dia))}
+	\asegura{|cronograma(j,jornadaActual(j))|==|cronograma(pre(j),jornadaActual(j))|}
+	\asegura{(\forall i \leftarrow [0, |cronograma(j, jornadaActual(j))|-1])\newline
+		categoria(cronograma(j,jornadaActual(j))[i]) == categoria(cronograma(pre(j),jornadaActual(j))[i])}
+	\asegura{(\forall i \leftarrow [0, |cronograma(j, jornadaActual(j))| -1])\newline
+		mismos(participantes(cronograma(j,jornadaActual(j))[i]),\newline
+		participantes(cronograma(pre(j),jornadaActual(j))[i]))}
+	\asegura{(\forall c \leftarrow cronograma(j, jornadaActual(j)))\newline
+		finalizada(c) == True \wedge incluida(ranking(c), participantes(c))\newline
+		\wedge (\forall x \leftarrow [0..|ranking(c)|-2]) capacidadEnOrden(x,c)}
+	\asegura{asegura (\forall c \leftarrow cronograma(j, jornadaActual(j)))\newline
+		(|lesTocoControlAntiDoping(c)|==1 \wedge lesTocoControlAntiDoping(c)[0] \in atletas(c))\newline
+		\vee (|lesTocoControlAntiDoping(c)|==0 \wedge |atletas(c)| == 0)}
+
+	\asegura{(\forall c \leftarrow cronograma(j, jornadaActual(j)))\newline
+		|listaDoping(c,atletas(c))|*20 \leq \newline \sum([long(lesTocoControlAntiDoping(comp))
+		| comp \leftarrow cronograma(j,jornadaActual(j))])}
+	\aux{capacidadEnOrden}{x: \ent, c:Competencia}{Bool}{\newline
+	capacidad(ranking(c)[x], prm(categoria(c))) \geq capacidad(ranking(c)[x + 1], prm(categoria(c)))}
+	\aux{listaDoping}{c:Competencia, a:[Atleta]}{[Atleta]}{[x|x \leftarrow a, leDioPositivo(c, x)]}
+\end{problema}
+
+\section{Auxiliares}
+
+\input{auxiliaresTipos.tex}
+
+\end{document}
+