@jpetit/toolkit 3.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/.prettierignore +11 -0
- package/.prettierrc.json +9 -0
- package/.vscode/settings.json +26 -0
- package/README.md +22 -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/graphics/japanese-flag.pbm/README.md +14 -0
- package/assets/problems/graphics/japanese-flag.pbm/award.png +0 -0
- package/assets/problems/graphics/japanese-flag.pbm/handler.yml +2 -0
- package/assets/problems/graphics/japanese-flag.pbm/problem.ca.tex +21 -0
- package/assets/problems/graphics/japanese-flag.pbm/problem.ca.yml +3 -0
- package/assets/problems/graphics/japanese-flag.pbm/sample-1.inp +1 -0
- package/assets/problems/graphics/japanese-flag.pbm/sample-2.inp +1 -0
- package/assets/problems/graphics/japanese-flag.pbm/solution.cc +25 -0
- package/assets/problems/graphics/japanese-flag.pbm/solution.py +11 -0
- package/assets/problems/graphics/tortuga.pbm/README.md +13 -0
- package/assets/problems/graphics/tortuga.pbm/award.png +0 -0
- package/assets/problems/graphics/tortuga.pbm/handler.yml +2 -0
- package/assets/problems/graphics/tortuga.pbm/problem.ca.tex +23 -0
- package/assets/problems/graphics/tortuga.pbm/problem.ca.yml +3 -0
- package/assets/problems/graphics/tortuga.pbm/sample.inp +0 -0
- package/assets/problems/graphics/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.eps +1113 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/campanar.png +0 -0
- package/assets/problems/standard/campanar-de-la-torrassa.pbm/generate.cc +10 -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/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 +307 -0
- package/assets/sty/picins.sty +579 -0
- package/assets.zip +0 -0
- package/eslint.config.mjs +31 -0
- package/lib/ai.ts +138 -0
- package/lib/assets.ts +31 -0
- package/lib/cleaner.ts +58 -0
- package/lib/compilers/_frompython.ts +388 -0
- package/lib/compilers/base.ts +97 -0
- package/lib/compilers/gcc.ts +47 -0
- package/lib/compilers/gxx.ts +47 -0
- package/lib/compilers/index.ts +61 -0
- package/lib/compilers/python3.ts +67 -0
- package/lib/data.ts +19 -0
- package/lib/doctor.ts +104 -0
- package/lib/generate.ts +333 -0
- package/lib/maker.ts +535 -0
- package/lib/settings.ts +42 -0
- package/lib/tui.ts +69 -0
- package/lib/utils.ts +83 -0
- package/package.json +56 -0
- package/problems/graphic.pbm/README.md +14 -0
- package/problems/graphic.pbm/award.png +0 -0
- package/problems/graphic.pbm/handler.yml +2 -0
- package/problems/graphic.pbm/problem.ca.html +13 -0
- package/problems/graphic.pbm/problem.ca.md +20 -0
- package/problems/graphic.pbm/problem.ca.tex +21 -0
- package/problems/graphic.pbm/problem.ca.txt +20 -0
- package/problems/graphic.pbm/problem.ca.yml +3 -0
- package/problems/graphic.pbm/sample-1.inp +1 -0
- package/problems/graphic.pbm/sample-2.inp +1 -0
- package/problems/graphic.pbm/solution.py +11 -0
- package/problems/maxim2.pbm/Main.java +13 -0
- package/problems/maxim2.pbm/distillation.yml +7 -0
- package/problems/maxim2.pbm/distilled-01.inp +1 -0
- package/problems/maxim2.pbm/distilled-02.inp +1 -0
- package/problems/maxim2.pbm/distilled-03.inp +1 -0
- package/problems/maxim2.pbm/distiller.yml +2 -0
- package/problems/maxim2.pbm/generate-inputs.py +9 -0
- package/problems/maxim2.pbm/handler.yml +2 -0
- package/problems/maxim2.pbm/ma-1.inp +1 -0
- package/problems/maxim2.pbm/ma-2.inp +1 -0
- package/problems/maxim2.pbm/ma-3.inp +1 -0
- package/problems/maxim2.pbm/ma-4.inp +1 -0
- package/problems/maxim2.pbm/ma-5.inp +1 -0
- package/problems/maxim2.pbm/per-doubles.inp +1 -0
- package/problems/maxim2.pbm/problem.ca.html +11 -0
- package/problems/maxim2.pbm/problem.ca.md +19 -0
- package/problems/maxim2.pbm/problem.ca.tex +17 -0
- package/problems/maxim2.pbm/problem.ca.txt +19 -0
- package/problems/maxim2.pbm/problem.ca.yml +3 -0
- package/problems/maxim2.pbm/problem.en.html +11 -0
- package/problems/maxim2.pbm/problem.en.md +19 -0
- package/problems/maxim2.pbm/problem.en.tex +16 -0
- package/problems/maxim2.pbm/problem.en.txt +19 -0
- package/problems/maxim2.pbm/problem.en.yml +4 -0
- package/problems/maxim2.pbm/sample-1.inp +1 -0
- package/problems/maxim2.pbm/sample-2.inp +1 -0
- package/problems/maxim2.pbm/sample-3.inp +1 -0
- package/problems/maxim2.pbm/solution.c +12 -0
- package/problems/maxim2.pbm/solution.cc +13 -0
- package/problems/maxim2.pbm/solution.java +13 -0
- package/problems/maxim2.pbm/solution.pas +9 -0
- package/problems/maxim2.pbm/solution.py +5 -0
- package/problems/maxim2.pbm/tags.yml +2 -0
- package/problems/maxim2.pbm/test_-1_-1.inp +1 -0
- package/problems/maxim2.pbm/test_-1_-2.inp +1 -0
- package/problems/maxim2.pbm/test_-1_0.inp +1 -0
- package/problems/maxim2.pbm/test_-1_1.inp +1 -0
- package/problems/maxim2.pbm/test_-2_-1.inp +1 -0
- package/problems/maxim2.pbm/test_-2_-2.inp +1 -0
- package/problems/maxim2.pbm/test_-2_0.inp +1 -0
- package/problems/maxim2.pbm/test_-2_1.inp +1 -0
- package/problems/maxim2.pbm/test_0_-1.inp +1 -0
- package/problems/maxim2.pbm/test_0_-2.inp +1 -0
- package/problems/maxim2.pbm/test_0_0.inp +1 -0
- package/problems/maxim2.pbm/test_0_1.inp +1 -0
- package/problems/maxim2.pbm/test_1_-1.inp +1 -0
- package/problems/maxim2.pbm/test_1_-2.inp +1 -0
- package/problems/maxim2.pbm/test_1_0.inp +1 -0
- package/problems/maxim2.pbm/test_1_1.inp +1 -0
- package/test.ts +3 -0
- package/toolkit/ai.ts +30 -0
- package/toolkit/clean.ts +19 -0
- package/toolkit/compilers.ts +29 -0
- package/toolkit/create-jutge-ai.ts +101 -0
- package/toolkit/create-template.ts +51 -0
- package/toolkit/create-wizard.ts +4 -0
- package/toolkit/create.ts +75 -0
- package/toolkit/doctor.ts +17 -0
- package/toolkit/index.ts +28 -0
- package/toolkit/init.ts +66 -0
- package/toolkit/make.ts +60 -0
- package/toolkit/verify.ts +19 -0
- package/tsconfig.json +38 -0
- package/types/zip.d.ts +4 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
% \usepackage{html}
|
|
2
|
+
|
|
3
|
+
\usepackage{mathpazo}
|
|
4
|
+
\usepackage{helvet}
|
|
5
|
+
\usepackage{courier}
|
|
6
|
+
|
|
7
|
+
\usepackage{mdwlist}
|
|
8
|
+
\usepackage{shortvrb}
|
|
9
|
+
\usepackage{picins}
|
|
10
|
+
\usepackage{pstricks}
|
|
11
|
+
\usepackage{pst-tree}
|
|
12
|
+
\usepackage{graphicx}
|
|
13
|
+
\usepackage{amsmath}
|
|
14
|
+
\usepackage{geometry}
|
|
15
|
+
\usepackage{moreverb}
|
|
16
|
+
\usepackage{multicol}
|
|
17
|
+
\usepackage[utf8]{inputenc}
|
|
18
|
+
\usepackage{listings}
|
|
19
|
+
\usepackage{textcomp}
|
|
20
|
+
\usepackage{chessboard}
|
|
21
|
+
\usepackage{tikz}
|
|
22
|
+
\usepackage{wasysym}
|
|
23
|
+
\usepackage{eurosym}
|
|
24
|
+
\usepackage{color}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
\geometry{
|
|
29
|
+
a4paper,twoside,
|
|
30
|
+
left=2.75cm,right=2.75cm,
|
|
31
|
+
top=3cm,bottom=3cm,
|
|
32
|
+
marginparwidth=3cm,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
\setlength{\parindent}{0cm}
|
|
36
|
+
\pagestyle{empty}
|
|
37
|
+
|
|
38
|
+
\MakeShortVerb\|
|
|
39
|
+
|
|
40
|
+
\newenvironment{NoShortVerb}{\DeleteShortVerb\|}{\MakeShortVerb\|}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
\newcommand{\mysection}[1]{\subsection*{#1}}
|
|
44
|
+
|
|
45
|
+
\newcommand{\Problem}[1]{
|
|
46
|
+
\def\PbmTitle{#1}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
\newcommand{\ProblemId}[1]{
|
|
50
|
+
\def\PbmId{#1}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
\def\PbmEvent{}
|
|
54
|
+
\newcommand{\ProblemEvent}[1]{
|
|
55
|
+
\def\PbmEvent{\\#1}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
\newcommand{\Statement}{
|
|
59
|
+
\vspace*{-2cm}
|
|
60
|
+
{\LARGE{\emph{\textbf{Jutge.org}}}}
|
|
61
|
+
\\[1.5mm]
|
|
62
|
+
The Virtual Learning Environment for Computer Programming
|
|
63
|
+
|
|
64
|
+
\vspace*{1.5cm}
|
|
65
|
+
|
|
66
|
+
\hrule~\\[1mm]
|
|
67
|
+
{\Large{\textbf{\PbmTitle\hfill\PbmId}}}
|
|
68
|
+
\PbmEvent
|
|
69
|
+
\vspace*{2mm}
|
|
70
|
+
\hrule
|
|
71
|
+
\bigskip
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
\newcommand{\Specification}{
|
|
75
|
+
\mysection{\TxtSpecification}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
\newcommand{\Input}{
|
|
79
|
+
\mysection{\TxtInput}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
\newcommand{\Output}{
|
|
83
|
+
\mysection{\TxtOutput}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
\newcommand{\Sample}{
|
|
87
|
+
\SampleTwoCol
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
\newcommand{\SampleSession}{
|
|
91
|
+
\mysection{\TxtSampleSession}
|
|
92
|
+
{\footnotesize\verbatimtabinput{sample.dt}}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
\newcommand{\SampleInput}[2]{
|
|
96
|
+
\mysection{\TxtSampleInput\ #2}
|
|
97
|
+
{\footnotesize\verbatimtabinput{#1.inp}}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
\newcommand{\SampleOutput}[3][]{
|
|
103
|
+
\mysection{\TxtSampleOutput\ #3}
|
|
104
|
+
\ifthenelse{\equal{#1}{}}{
|
|
105
|
+
\footnotesize\verbatimtabinput{#2.cor}
|
|
106
|
+
}{
|
|
107
|
+
\includegraphics[width=7cm]{#2.cor.png}
|
|
108
|
+
\\{\footnotesize #1}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
\newcommand{\SampleTwoColInputOutput}[3][]{
|
|
113
|
+
\setlength{\columnseprule}{0.5pt}
|
|
114
|
+
\begin{multicols}{2}\raggedcolumns
|
|
115
|
+
\SampleInput{#2}{#3}%\vfill
|
|
116
|
+
\columnbreak
|
|
117
|
+
\SampleOutput[#1]{#2}{#3}%\vfill
|
|
118
|
+
\end{multicols}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
\newcommand{\SampleOneColInputOutput}[3][]{
|
|
122
|
+
\SampleInput{#2}{#3}
|
|
123
|
+
\SampleOutput[#1]{#2}{#3}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
\newcommand{\Precondition}{
|
|
128
|
+
\mysection{\TxtPrecondition}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
\newcommand{\Samples}{
|
|
132
|
+
\mysection{\TxtSamples}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
\newcommand{\Observation}{
|
|
136
|
+
\mysection{\TxtObservation}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
\newcommand{\Observations}{
|
|
140
|
+
\mysection{\TxtObservations}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
\newcommand{\Hint}{
|
|
144
|
+
\mysection{\TxtHint}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
\newcommand{\Scoring}{
|
|
148
|
+
\mysection{\TxtScores}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
\newcommand{\Interface}{
|
|
152
|
+
\mysection{\TxtInterface}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
\newcommand{\Score}[3]{
|
|
157
|
+
\begin{itemize}
|
|
158
|
+
|
|
159
|
+
\setlength{\fboxrule}{0.05pt}
|
|
160
|
+
\item \textbf{#1:} \hfill \fbox{\textbf{~#2 \TxtPoints~}}
|
|
161
|
+
|
|
162
|
+
#3
|
|
163
|
+
\end{itemize}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
\newcommand{\ShortScore}[3]{
|
|
167
|
+
\begin{itemize}
|
|
168
|
+
\setlength{\fboxrule}{0.05pt}
|
|
169
|
+
\item \textbf{#1:} ~ #3 \hfill \fbox{\textbf{~#2 \TxtPoints~}}
|
|
170
|
+
\end{itemize}
|
|
171
|
+
}
|
|
172
|
+
\newcommand{\ObservationElastic}{
|
|
173
|
+
\TxtObservationElastic
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
\newcommand{\ObservationElasticII}{
|
|
177
|
+
\TxtObservationElasticII
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
\newcommand{\ObservationNoMain}{
|
|
181
|
+
\Observation
|
|
182
|
+
\TxtObservationNoMain
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
\newcommand{\ObservationNoMainPlural}{
|
|
186
|
+
\Observation
|
|
187
|
+
\TxtObservationNoMainPlural
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
\newcommand{\ObservationNoMainTuples}{
|
|
191
|
+
\Observation
|
|
192
|
+
\TxtObservationNoMainTuples
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
\newcommand{\ObservationNoMainClasses}{
|
|
196
|
+
\Observation
|
|
197
|
+
\TxtObservationNoMainClasses
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
\newcommand{\ObservationNoMainTuplesPlural}{
|
|
201
|
+
\Observation
|
|
202
|
+
\TxtObservationNoMainTuplesPlural
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
\newcommand{\ProblemInformation}{
|
|
207
|
+
\mysection{\TxtProblemInformation}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
\newcommand{\Author}{{\TxtAuthor{}}}
|
|
211
|
+
|
|
212
|
+
\newcommand{\Translator}{
|
|
213
|
+
{\TxtTranslator}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
\newcommand{\Generation}{
|
|
217
|
+
{\TxtGeneration}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
\newcommand{\DoProblem}[1]{
|
|
222
|
+
\clearpage
|
|
223
|
+
\input{problem.#1.tex}
|
|
224
|
+
\Solution
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
\newcommand{\Solution}{
|
|
228
|
+
% empty
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
\newcommand{\FigureL}[2]{
|
|
232
|
+
\parpic[l]{\includegraphics[#1]{#2}}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
\newcommand{\FigureC}[2]{
|
|
236
|
+
\begin{center}
|
|
237
|
+
\includegraphics[#1]{#2}
|
|
238
|
+
\end{center}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
\newcommand{\FigureR}[2]{
|
|
242
|
+
\parpic[r]{\includegraphics[#1]{#2}}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
% Entre cometes simples (quoted).
|
|
247
|
+
\newcommand{\q}[1]{`\texttt{\small #1}'}
|
|
248
|
+
|
|
249
|
+
% Entre cometes dobles (double quoted).
|
|
250
|
+
\newcommand{\qq}[1]{``\texttt{\small #1}''}
|
|
251
|
+
|
|
252
|
+
% Sense cometes per� el mateix est�l (unquoted).
|
|
253
|
+
\newcommand{\uq}[1]{\texttt{\small #1}}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
\newcommand{\directori}{}
|
|
257
|
+
|
|
258
|
+
\newcommand{\enllac}[1]{\texttt{#1}}
|
|
259
|
+
|
|
260
|
+
\providecommand{\Link}[1]{
|
|
261
|
+
\texttt{#1}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
%%% LISTINGS
|
|
268
|
+
|
|
269
|
+
\lstset{language=C++}
|
|
270
|
+
\lstset{columns=flexible}
|
|
271
|
+
%\lstset{basewidth={1em,1em}}
|
|
272
|
+
\lstset{keepspaces=true}
|
|
273
|
+
\lstset{morekeywords={string,include,cin,cout,endl}}
|
|
274
|
+
\lstset{stringstyle=\ttfamily}
|
|
275
|
+
\lstset{commentstyle={}}
|
|
276
|
+
\lstset{numberstyle=\tiny\sffamily}
|
|
277
|
+
\lstset{numbersep=-5pt}
|
|
278
|
+
\lstset{keywordstyle=\bfseries}
|
|
279
|
+
\lstset{identifierstyle=\itshape}
|
|
280
|
+
\lstset{showstringspaces=false}
|
|
281
|
+
\lstset{upquote=true}
|
|
282
|
+
\lstset{texcl=true}
|
|
283
|
+
\lstset{literate={->}{$\rightarrow$}1 {<=}{$\le$}1 {>=}{$\ge$}1 {!=}{$\neq$}1 {<<}{$<\!\!\!<$}2 {>>}{$>\!\!\!>$}2}
|
|
284
|
+
\lstset{xleftmargin=0.25cm}
|
|
285
|
+
|
|
286
|
+
%\lstMakeShortInline@ Aquesta comanda el principal, perqu� aqu� hem potinejat les @,
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
\renewcommand{\footnote}[1]{ (#1)}
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
\newcommand{\UseHaskell}{
|
|
294
|
+
\lstset{language=Haskell}
|
|
295
|
+
\lstset{columns=fullflexible}
|
|
296
|
+
\lstset{literate={<=}{$\le$}1 {>=}{$\ge$}1 {/=}{$\neq$}1 {->}{$\rightarrow$}1 {=>}{$\Rightarrow$}1}
|
|
297
|
+
\lstset{deletekeywords={insert}}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
\newcommand{\UsePython}{
|
|
301
|
+
\lstset{language=Python}
|
|
302
|
+
\lstset{columns=fullflexible}
|
|
303
|
+
%\lstset{literate={<=}{$\le$}1 {>=}{$\ge$}1 {/=}{$\neq$}1 {->}{$\rightarrow$}1 {=>}{$\Rightarrow$}1}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
\newcommand{\CPP}{C++}
|