@jutge.org/toolkit 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/assets/images/jutge-toolkit.png +0 -0
- package/assets/images/jutge.png +0 -0
- package/assets/lua/fixCodeBlocks.lua +19 -0
- package/assets/lua/removeEnvs.lua +20 -0
- package/assets/lua/removeHtmlOnly.lua +11 -0
- package/assets/problems/function/valid-date.pbm/README.md +11 -0
- package/assets/problems/function/valid-date.pbm/award.html +1 -0
- package/assets/problems/function/valid-date.pbm/award.png +0 -0
- package/assets/problems/function/valid-date.pbm/ca/handler.yml +3 -0
- package/assets/problems/function/valid-date.pbm/ca/main.c +13 -0
- package/assets/problems/function/valid-date.pbm/ca/main.cc +14 -0
- package/assets/problems/function/valid-date.pbm/ca/main.java +16 -0
- package/assets/problems/function/valid-date.pbm/ca/main.py +6 -0
- package/assets/problems/function/valid-date.pbm/ca/problem.ca.tex +40 -0
- package/assets/problems/function/valid-date.pbm/ca/problem.ca.yml +3 -0
- package/assets/problems/function/valid-date.pbm/ca/random.inp +113976 -0
- package/assets/problems/function/valid-date.pbm/ca/sample.inp +4 -0
- package/assets/problems/function/valid-date.pbm/ca/solution.c +15 -0
- package/assets/problems/function/valid-date.pbm/ca/solution.cc +16 -0
- package/assets/problems/function/valid-date.pbm/ca/solution.java +17 -0
- package/assets/problems/function/valid-date.pbm/ca/solution.py +13 -0
- package/assets/problems/function/valid-date.pbm/en/handler.yml +3 -0
- package/assets/problems/function/valid-date.pbm/en/main.c +13 -0
- package/assets/problems/function/valid-date.pbm/en/main.cc +14 -0
- package/assets/problems/function/valid-date.pbm/en/main.java +16 -0
- package/assets/problems/function/valid-date.pbm/en/main.py +7 -0
- package/assets/problems/function/valid-date.pbm/en/problem.en.tex +46 -0
- package/assets/problems/function/valid-date.pbm/en/problem.en.yml +4 -0
- package/assets/problems/function/valid-date.pbm/en/random.inp +108200 -0
- package/assets/problems/function/valid-date.pbm/en/sample.inp +4 -0
- package/assets/problems/function/valid-date.pbm/en/solution.c +15 -0
- package/assets/problems/function/valid-date.pbm/en/solution.cc +16 -0
- package/assets/problems/function/valid-date.pbm/en/solution.java +20 -0
- package/assets/problems/function/valid-date.pbm/en/solution.py +13 -0
- package/assets/problems/graphic/japanese-flag.pbm/README.md +14 -0
- package/assets/problems/graphic/japanese-flag.pbm/award.png +0 -0
- package/assets/problems/graphic/japanese-flag.pbm/handler.yml +2 -0
- package/assets/problems/graphic/japanese-flag.pbm/problem.ca.tex +21 -0
- package/assets/problems/graphic/japanese-flag.pbm/problem.ca.yml +3 -0
- package/assets/problems/graphic/japanese-flag.pbm/sample-1.inp +1 -0
- package/assets/problems/graphic/japanese-flag.pbm/sample-2.inp +1 -0
- package/assets/problems/graphic/japanese-flag.pbm/solution.cc +25 -0
- package/assets/problems/graphic/japanese-flag.pbm/solution.py +11 -0
- package/assets/problems/graphic/tortuga.pbm/README.md +13 -0
- package/assets/problems/graphic/tortuga.pbm/award.png +0 -0
- package/assets/problems/graphic/tortuga.pbm/handler.yml +2 -0
- package/assets/problems/graphic/tortuga.pbm/problem.ca.tex +23 -0
- package/assets/problems/graphic/tortuga.pbm/problem.ca.yml +3 -0
- package/assets/problems/graphic/tortuga.pbm/sample.inp +0 -0
- package/assets/problems/graphic/tortuga.pbm/solution.py +11 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/README.md +15 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/award.html +1 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/award.png +0 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/campanar.png +0 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/handler.yml +2 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/problem.ca.tex +59 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/problem.ca.yml +3 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/problem.en.tex +52 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/problem.en.yml +4 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/sample.inp +7 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/slow.cc +29 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/solution.cc +48 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/test-1.inp +12 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/test-2.inp +100000 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/test-2.ops +1 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/test-b.inp +0 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/README.md +11 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/handler.yml +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/problem.ca.tex +17 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/problem.ca.yml +3 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/problem.en.tex +16 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/problem.en.yml +4 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/sample-1.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/sample-2.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/sample-3.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/solution.c +18 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/solution.cc +13 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/solution.java +16 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/solution.py +5 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/test-1.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/test-2.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/test-3.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/test-4.inp +1 -0
- package/assets/problems/standard/maximum-of-2-integers.pbm/test-5.inp +1 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/README.md +12 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/atzar.cc +85 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/award.png +0 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/generate-1.cc +26 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/generate-2.cc +26 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/generate-3.cc +26 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/generate-4.cc +26 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/handler.yml +1 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/problem.ca.tex +40 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/problem.ca.yml +3 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/problem.en.tex +40 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/problem.en.yml +4 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/random-1.inp +24 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/random-2.inp +27 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/random-3.inp +38 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/random-4.inp +50 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/sample-1.inp +9 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/sample-2.inp +6 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/sample-3.inp +7 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/solution.cc +38 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-1.inp +5 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-2.inp +6 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-3.inp +6 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-4.inp +9 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-5.inp +10 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-6.inp +9 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-7.inp +12 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-8.inp +3 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-9.inp +37 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-91.inp +52 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-92.inp +25 -0
- package/assets/problems/standard/treasures-in-a-map.pbm/test-93.inp +3 -0
- package/assets/prompts/creators/create-solution.tpl.txt +10 -0
- package/assets/prompts/creators/create-statement.tpl.txt +21 -0
- package/assets/prompts/creators/create-translation.tpl.txt +5 -0
- package/assets/prompts/creators/private-test-cases.txt +6 -0
- package/assets/prompts/creators/sample-test-cases.txt +6 -0
- package/assets/prompts/creators/system-prompt.txt +2 -0
- package/assets/prompts/examples/statement-coda.tex +7 -0
- package/assets/prompts/examples/statement.tex +19 -0
- package/assets/prompts/generators/efficiency.md +41 -0
- package/assets/prompts/generators/hard.md +47 -0
- package/assets/prompts/generators/random.md +39 -0
- package/assets/prompts/proglangs/cc.md +3 -0
- package/assets/prompts/proglangs/py.md +40 -0
- package/assets/python/pyexec.py +29 -0
- package/assets/sty/judgeit.ca.sty +54 -0
- package/assets/sty/judgeit.de.sty +61 -0
- package/assets/sty/judgeit.en.sty +60 -0
- package/assets/sty/judgeit.es.sty +54 -0
- package/assets/sty/judgeit.fr.sty +59 -0
- package/assets/sty/judgeit.sty +326 -0
- package/assets/sty/picins.sty +579 -0
- package/dist/index.js +4246 -0
- package/package.json +103 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
%\usepackage[spanish]{babel}
|
|
2
|
+
|
|
3
|
+
\newcommand{\TxtInput}{Entrada}
|
|
4
|
+
\newcommand{\TxtOutput}{Salida}
|
|
5
|
+
\newcommand{\TxtSampleSession}{Ejemplo de sessión}
|
|
6
|
+
\newcommand{\TxtSampleInput}{Ejemplo de entrada}
|
|
7
|
+
\newcommand{\TxtSampleOutput}{Ejemplo de salida}
|
|
8
|
+
\newcommand{\TxtPrecondition}{Precondición}
|
|
9
|
+
\newcommand{\TxtSamples}{Ejemplos}
|
|
10
|
+
\newcommand{\TxtObservation}{Observación}
|
|
11
|
+
\newcommand{\TxtObservations}{Observaciones}
|
|
12
|
+
\newcommand{\TxtSpecification}{Especificación}
|
|
13
|
+
\newcommand{\TxtHint}{Pista}
|
|
14
|
+
\newcommand{\TxtScores}{Puntuación}
|
|
15
|
+
\newcommand{\TxtInterface}{Interfície}
|
|
16
|
+
|
|
17
|
+
\newcommand{\TxtPoints}{Puntos}
|
|
18
|
+
\newcommand{\CheckerInformation}{
|
|
19
|
+
\subsection*{Información sobre el corrector}
|
|
20
|
+
}
|
|
21
|
+
\newcommand{\TxtObservationElastic}{
|
|
22
|
+
\CheckerInformation
|
|
23
|
+
Podéis escribir las soluciones de este ejercio en cualquier orden.
|
|
24
|
+
}
|
|
25
|
+
\newcommand{\TxtObservationElasticII}{
|
|
26
|
+
\CheckerInformation
|
|
27
|
+
Podéis escribir en cualquier orden
|
|
28
|
+
tanto las soluciones como los elementos dentro de cada solución.
|
|
29
|
+
}
|
|
30
|
+
\newcommand{\TxtObservationNoMain}{
|
|
31
|
+
Sólo tenéis que enviar el procedimiento requerido;
|
|
32
|
+
el programa principal será ignorado.
|
|
33
|
+
}
|
|
34
|
+
\newcommand{\TxtObservationNoMainPlural}{
|
|
35
|
+
Sólo tenéis que enviar los procedimientos requeridos;
|
|
36
|
+
el programa principal será ignorado.
|
|
37
|
+
}
|
|
38
|
+
\newcommand{\TxtTuples}{
|
|
39
|
+
Seguid estrictamente la definición de los tipos del enunciado.
|
|
40
|
+
}
|
|
41
|
+
\newcommand{\TxtObservationNoMainTuples}{
|
|
42
|
+
\TxtObservationNoMain
|
|
43
|
+
\TxtTuples
|
|
44
|
+
}
|
|
45
|
+
\newcommand{\TxtObservationNoMainTuplesPlural}{
|
|
46
|
+
\TxtObservationNoMainPlural
|
|
47
|
+
\TxtTuples
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
\newcommand{\TxtProblemInformation}{Información del problema}
|
|
52
|
+
\newcommand{\TxtAuthor}{Autor}
|
|
53
|
+
\newcommand{\TxtTranslator}{Traductor}
|
|
54
|
+
\newcommand{\TxtGeneration}{Generación}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
%\usepackage[catalan]{babel}
|
|
3
|
+
|
|
4
|
+
\newcommand{\TxtInput}{Entrée}
|
|
5
|
+
\newcommand{\TxtOutput}{Sortie}
|
|
6
|
+
\newcommand{\TxtSampleSession}{Exemple de session}
|
|
7
|
+
\newcommand{\TxtSampleInput}{Exemple d'entrée}
|
|
8
|
+
\newcommand{\TxtSampleOutput}{Exemple de sortie}
|
|
9
|
+
\newcommand{\TxtPrecondition}{Precondition}
|
|
10
|
+
\newcommand{\TxtSamples}{Exemples}
|
|
11
|
+
\newcommand{\TxtObservation}{Observation}
|
|
12
|
+
\newcommand{\TxtObservations}{Observations}
|
|
13
|
+
\newcommand{\TxtHint}{Piste}
|
|
14
|
+
\newcommand{\TxtSpecification}{Specification}
|
|
15
|
+
\newcommand{\TxtScores}{Pocntuation}
|
|
16
|
+
\newcommand{\TxtInterface}{Interface}
|
|
17
|
+
\newcommand{\CheckerInformation}{
|
|
18
|
+
\subsection*{Information sur le correcteur}
|
|
19
|
+
}
|
|
20
|
+
\newcommand{\TxtObservationElastic}{
|
|
21
|
+
\CheckerInformation
|
|
22
|
+
Vouz pouvez éscrire les solutions de ce probleme en n'importe quel ordre.
|
|
23
|
+
}
|
|
24
|
+
\newcommand{\TxtObservationElasticII}{
|
|
25
|
+
\CheckerInformation
|
|
26
|
+
Vouz pouvez éscrire les solutions de ce probleme en n'importe quel ordre,
|
|
27
|
+
ainsi comme les élements de chaque solution.
|
|
28
|
+
}
|
|
29
|
+
\newcommand{\TxtObservationNoMain}{
|
|
30
|
+
Il suffit d'envoyer le souprogramme requerit,
|
|
31
|
+
le programme principal sera ignoré.
|
|
32
|
+
}
|
|
33
|
+
\newcommand{\TxtObservationNoMainPlural}{
|
|
34
|
+
Il suffit d'envoyer les souprogrammes requerits,
|
|
35
|
+
le programme principal sera ignoré.
|
|
36
|
+
}
|
|
37
|
+
\newcommand{\TxtTuples}{
|
|
38
|
+
Suivez strictement la definition des tipus de l'énnoncé.
|
|
39
|
+
}
|
|
40
|
+
\newcommand{\TxtObservationNoMainTuples}{
|
|
41
|
+
\TxtObservationNoMain
|
|
42
|
+
\TxtTuples
|
|
43
|
+
}
|
|
44
|
+
\newcommand{\TxtObservationNoMainTuplesPlural}{
|
|
45
|
+
\TxtObservationNoMainPlural
|
|
46
|
+
\TxtTuples
|
|
47
|
+
}
|
|
48
|
+
\newcommand{\TxtObservationNoMainClasses}{
|
|
49
|
+
Il suffit d'envoyer les classes requerits,
|
|
50
|
+
le programme principal sera ignoré.
|
|
51
|
+
\TxtTuples
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
\newcommand{\TxtProblemInformation}{Informació del problema}
|
|
56
|
+
\newcommand{\TxtAuthor}{Autor}
|
|
57
|
+
\newcommand{\TxtTranslator}{Traductor}
|
|
58
|
+
\newcommand{\TxtGeneration}{Generació}
|
|
59
|
+
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
% \usepackage{html}
|
|
2
|
+
|
|
3
|
+
% added for xelatex
|
|
4
|
+
\usepackage{fontspec}
|
|
5
|
+
\setmainfont{texgyrepagella-regular.otf}[
|
|
6
|
+
BoldFont=texgyrepagella-bold.otf,
|
|
7
|
+
ItalicFont=texgyrepagella-italic.otf,
|
|
8
|
+
BoldItalicFont=texgyrepagella-bolditalic.otf
|
|
9
|
+
]
|
|
10
|
+
\setsansfont{texgyreheros-regular.otf}[
|
|
11
|
+
BoldFont=texgyreheros-bold.otf,
|
|
12
|
+
ItalicFont=texgyreheros-italic.otf,
|
|
13
|
+
BoldItalicFont=texgyreheros-bolditalic.otf
|
|
14
|
+
]
|
|
15
|
+
\setmonofont{texgyrecursor-regular.otf}[
|
|
16
|
+
BoldFont=texgyrecursor-bold.otf,
|
|
17
|
+
ItalicFont=texgyrecursor-italic.otf,
|
|
18
|
+
BoldItalicFont=texgyrecursor-bolditalic.otf
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
%remove for xelatex
|
|
22
|
+
%\usepackage{mathpazo}
|
|
23
|
+
%\usepackage{helvet}
|
|
24
|
+
%\usepackage{courier}
|
|
25
|
+
|
|
26
|
+
\usepackage{mdwlist}
|
|
27
|
+
\usepackage{shortvrb}
|
|
28
|
+
\usepackage{picins}
|
|
29
|
+
\usepackage{pstricks}
|
|
30
|
+
\usepackage{pst-tree}
|
|
31
|
+
\usepackage{graphicx}
|
|
32
|
+
\usepackage{amsmath}
|
|
33
|
+
\usepackage{geometry}
|
|
34
|
+
\usepackage{moreverb}
|
|
35
|
+
\usepackage{multicol}
|
|
36
|
+
%\usepackage[utf8]{inputenc} %remove for xelatex
|
|
37
|
+
\usepackage{listings}
|
|
38
|
+
\usepackage{textcomp}
|
|
39
|
+
\usepackage{chessboard}
|
|
40
|
+
\usepackage{tikz}
|
|
41
|
+
\usepackage{wasysym}
|
|
42
|
+
\usepackage{eurosym}
|
|
43
|
+
\usepackage{color}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
\geometry{
|
|
48
|
+
a4paper,twoside,
|
|
49
|
+
left=2.75cm,right=2.75cm,
|
|
50
|
+
top=3cm,bottom=3cm,
|
|
51
|
+
marginparwidth=3cm,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
\setlength{\parindent}{0cm}
|
|
55
|
+
\pagestyle{empty}
|
|
56
|
+
|
|
57
|
+
\MakeShortVerb\|
|
|
58
|
+
|
|
59
|
+
\newenvironment{NoShortVerb}{\DeleteShortVerb\|}{\MakeShortVerb\|}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
\newcommand{\mysection}[1]{\subsection*{#1}}
|
|
63
|
+
|
|
64
|
+
\newcommand{\Problem}[1]{
|
|
65
|
+
\def\PbmTitle{#1}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
\newcommand{\ProblemId}[1]{
|
|
69
|
+
\def\PbmId{#1}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
\def\PbmEvent{}
|
|
73
|
+
\newcommand{\ProblemEvent}[1]{
|
|
74
|
+
\def\PbmEvent{\\#1}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
\newcommand{\Statement}{
|
|
78
|
+
\vspace*{-2cm}
|
|
79
|
+
{\LARGE{\emph{\textbf{Jutge.org}}}}
|
|
80
|
+
\\[1.5mm]
|
|
81
|
+
The Virtual Learning Environment for Computer Programming
|
|
82
|
+
|
|
83
|
+
\vspace*{1.5cm}
|
|
84
|
+
|
|
85
|
+
\hrule~\\[1mm]
|
|
86
|
+
{\Large{\textbf{\PbmTitle\hfill\PbmId}}}
|
|
87
|
+
\PbmEvent
|
|
88
|
+
\vspace*{2mm}
|
|
89
|
+
\hrule
|
|
90
|
+
\bigskip
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
\newcommand{\Specification}{
|
|
94
|
+
\mysection{\TxtSpecification}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
\newcommand{\Input}{
|
|
98
|
+
\mysection{\TxtInput}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
\newcommand{\Output}{
|
|
102
|
+
\mysection{\TxtOutput}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
\newcommand{\Sample}{
|
|
106
|
+
\SampleTwoCol
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
\newcommand{\SampleSession}{
|
|
110
|
+
\mysection{\TxtSampleSession}
|
|
111
|
+
{\footnotesize\verbatimtabinput{sample.dt}}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
\newcommand{\SampleInput}[2]{
|
|
115
|
+
\mysection{\TxtSampleInput\ #2}
|
|
116
|
+
{\footnotesize\verbatimtabinput{#1.inp}}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
\newcommand{\SampleOutput}[3][]{
|
|
122
|
+
\mysection{\TxtSampleOutput\ #3}
|
|
123
|
+
\ifthenelse{\equal{#1}{}}{
|
|
124
|
+
\footnotesize\verbatimtabinput{#2.cor}
|
|
125
|
+
}{
|
|
126
|
+
\includegraphics[width=7cm]{#2.cor.png}
|
|
127
|
+
\\{\footnotesize #1}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
\newcommand{\SampleTwoColInputOutput}[3][]{
|
|
132
|
+
\setlength{\columnseprule}{0.5pt}
|
|
133
|
+
\begin{multicols}{2}\raggedcolumns
|
|
134
|
+
\SampleInput{#2}{#3}%\vfill
|
|
135
|
+
\columnbreak
|
|
136
|
+
\SampleOutput[#1]{#2}{#3}%\vfill
|
|
137
|
+
\end{multicols}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
\newcommand{\SampleOneColInputOutput}[3][]{
|
|
141
|
+
\SampleInput{#2}{#3}
|
|
142
|
+
\SampleOutput[#1]{#2}{#3}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
\newcommand{\Precondition}{
|
|
147
|
+
\mysection{\TxtPrecondition}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
\newcommand{\Samples}{
|
|
151
|
+
\mysection{\TxtSamples}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
\newcommand{\Observation}{
|
|
155
|
+
\mysection{\TxtObservation}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
\newcommand{\Observations}{
|
|
159
|
+
\mysection{\TxtObservations}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
\newcommand{\Hint}{
|
|
163
|
+
\mysection{\TxtHint}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
\newcommand{\Scoring}{
|
|
167
|
+
\mysection{\TxtScores}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
\newcommand{\Interface}{
|
|
171
|
+
\mysection{\TxtInterface}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
\newcommand{\Score}[3]{
|
|
176
|
+
\begin{itemize}
|
|
177
|
+
|
|
178
|
+
\setlength{\fboxrule}{0.05pt}
|
|
179
|
+
\item \textbf{#1:} \hfill \fbox{\textbf{~#2 \TxtPoints~}}
|
|
180
|
+
|
|
181
|
+
#3
|
|
182
|
+
\end{itemize}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
\newcommand{\ShortScore}[3]{
|
|
186
|
+
\begin{itemize}
|
|
187
|
+
\setlength{\fboxrule}{0.05pt}
|
|
188
|
+
\item \textbf{#1:} ~ #3 \hfill \fbox{\textbf{~#2 \TxtPoints~}}
|
|
189
|
+
\end{itemize}
|
|
190
|
+
}
|
|
191
|
+
\newcommand{\ObservationElastic}{
|
|
192
|
+
\TxtObservationElastic
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
\newcommand{\ObservationElasticII}{
|
|
196
|
+
\TxtObservationElasticII
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
\newcommand{\ObservationNoMain}{
|
|
200
|
+
\Observation
|
|
201
|
+
\TxtObservationNoMain
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
\newcommand{\ObservationNoMainPlural}{
|
|
205
|
+
\Observation
|
|
206
|
+
\TxtObservationNoMainPlural
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
\newcommand{\ObservationNoMainTuples}{
|
|
210
|
+
\Observation
|
|
211
|
+
\TxtObservationNoMainTuples
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
\newcommand{\ObservationNoMainClasses}{
|
|
215
|
+
\Observation
|
|
216
|
+
\TxtObservationNoMainClasses
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
\newcommand{\ObservationNoMainTuplesPlural}{
|
|
220
|
+
\Observation
|
|
221
|
+
\TxtObservationNoMainTuplesPlural
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
\newcommand{\ProblemInformation}{
|
|
226
|
+
\mysection{\TxtProblemInformation}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
\newcommand{\Author}{{\TxtAuthor{}}}
|
|
230
|
+
|
|
231
|
+
\newcommand{\Translator}{
|
|
232
|
+
{\TxtTranslator}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
\newcommand{\Generation}{
|
|
236
|
+
{\TxtGeneration}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
\newcommand{\DoProblem}[1]{
|
|
241
|
+
\clearpage
|
|
242
|
+
\input{problem.#1.tex}
|
|
243
|
+
\Solution
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
\newcommand{\Solution}{
|
|
247
|
+
% empty
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
\newcommand{\FigureL}[2]{
|
|
251
|
+
\parpic[l]{\includegraphics[#1]{#2}}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
\newcommand{\FigureC}[2]{
|
|
255
|
+
\begin{center}
|
|
256
|
+
\includegraphics[#1]{#2}
|
|
257
|
+
\end{center}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
\newcommand{\FigureR}[2]{
|
|
261
|
+
\parpic[r]{\includegraphics[#1]{#2}}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
% Entre cometes simples (quoted).
|
|
266
|
+
\newcommand{\q}[1]{`\texttt{\small #1}'}
|
|
267
|
+
|
|
268
|
+
% Entre cometes dobles (double quoted).
|
|
269
|
+
\newcommand{\qq}[1]{``\texttt{\small #1}''}
|
|
270
|
+
|
|
271
|
+
% Sense cometes per� el mateix est�l (unquoted).
|
|
272
|
+
\newcommand{\uq}[1]{\texttt{\small #1}}
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
\newcommand{\directori}{}
|
|
276
|
+
|
|
277
|
+
\newcommand{\enllac}[1]{\texttt{#1}}
|
|
278
|
+
|
|
279
|
+
\providecommand{\Link}[1]{
|
|
280
|
+
\texttt{#1}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
%%% LISTINGS
|
|
287
|
+
|
|
288
|
+
\lstset{language=C++}
|
|
289
|
+
\lstset{columns=flexible}
|
|
290
|
+
%\lstset{basewidth={1em,1em}}
|
|
291
|
+
\lstset{keepspaces=true}
|
|
292
|
+
\lstset{morekeywords={string,include,cin,cout,endl}}
|
|
293
|
+
\lstset{stringstyle=\ttfamily}
|
|
294
|
+
\lstset{commentstyle={}}
|
|
295
|
+
\lstset{numberstyle=\tiny\sffamily}
|
|
296
|
+
\lstset{numbersep=-5pt}
|
|
297
|
+
\lstset{keywordstyle=\bfseries}
|
|
298
|
+
\lstset{identifierstyle=\itshape}
|
|
299
|
+
\lstset{showstringspaces=false}
|
|
300
|
+
\lstset{upquote=true}
|
|
301
|
+
\lstset{texcl=true}
|
|
302
|
+
\lstset{literate={->}{$\rightarrow$}1 {<=}{$\le$}1 {>=}{$\ge$}1 {!=}{$\neq$}1 {<<}{$<\!\!\!<$}2 {>>}{$>\!\!\!>$}2}
|
|
303
|
+
\lstset{xleftmargin=0.25cm}
|
|
304
|
+
|
|
305
|
+
%\lstMakeShortInline@ Aquesta comanda el principal, perqu� aqu� hem potinejat les @,
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
\renewcommand{\footnote}[1]{ (#1)}
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
\newcommand{\UseHaskell}{
|
|
313
|
+
\lstset{language=Haskell}
|
|
314
|
+
\lstset{columns=fullflexible}
|
|
315
|
+
\lstset{literate={<=}{$\le$}1 {>=}{$\ge$}1 {/=}{$\neq$}1 {->}{$\rightarrow$}1 {=>}{$\Rightarrow$}1}
|
|
316
|
+
\lstset{deletekeywords={insert}}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
\newcommand{\UsePython}{
|
|
320
|
+
\lstset{language=Python}
|
|
321
|
+
\lstset{columns=fullflexible}
|
|
322
|
+
%\lstset{literate={<=}{$\le$}1 {>=}{$\ge$}1 {/=}{$\neq$}1 {->}{$\rightarrow$}1 {=>}{$\Rightarrow$}1}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
\newcommand{\CPP}{C++}
|