rbx.cp 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

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.
Files changed (45) hide show
  1. rbx/box/cli.py +79 -31
  2. rbx/box/code.py +131 -82
  3. rbx/box/global_package.py +74 -0
  4. rbx/box/package.py +6 -19
  5. rbx/box/remote.py +19 -0
  6. rbx/box/sanitizers/warning_stack.py +3 -3
  7. rbx/box/solutions.py +13 -7
  8. rbx/box/stats.py +10 -0
  9. rbx/box/stresses.py +45 -64
  10. rbx/box/stressing/finder_parser.py +11 -16
  11. rbx/box/tasks.py +33 -22
  12. rbx/box/tooling/boca/scraper.py +1 -1
  13. rbx/grading/caching.py +98 -47
  14. rbx/grading/debug_context.py +31 -0
  15. rbx/grading/grading_context.py +96 -0
  16. rbx/grading/judge/cacher.py +93 -21
  17. rbx/grading/judge/sandbox.py +6 -3
  18. rbx/grading/judge/sandboxes/timeit.py +1 -1
  19. rbx/grading/judge/storage.py +169 -35
  20. rbx/grading/profiling.py +126 -0
  21. rbx/grading/steps.py +44 -16
  22. rbx/grading/steps_with_caching.py +52 -26
  23. rbx/resources/presets/default/contest/.gitignore +2 -0
  24. rbx/resources/presets/default/contest/contest.rbx.yml +14 -1
  25. rbx/resources/presets/default/contest/statement/contest.rbx.tex +25 -86
  26. rbx/resources/presets/default/contest/statement/icpc.sty +322 -0
  27. rbx/resources/presets/default/contest/statement/instructions.tex +40 -0
  28. rbx/resources/presets/default/contest/statement/logo.png +0 -0
  29. rbx/resources/presets/default/contest/statement/template.rbx.tex +45 -36
  30. rbx/resources/presets/default/preset.rbx.yml +2 -2
  31. rbx/resources/presets/default/problem/problem.rbx.yml +12 -8
  32. rbx/resources/presets/default/problem/statement/icpc.sty +322 -0
  33. rbx/resources/presets/default/problem/statement/template.rbx.tex +47 -79
  34. {rbx_cp-0.7.0.dist-info → rbx_cp-0.8.0.dist-info}/METADATA +3 -1
  35. {rbx_cp-0.7.0.dist-info → rbx_cp-0.8.0.dist-info}/RECORD +43 -36
  36. rbx/resources/presets/default/contest/statement/olymp.sty +0 -250
  37. rbx/resources/presets/default/problem/statement/olymp.sty +0 -250
  38. /rbx/resources/presets/default/problem/{gen.cpp → gens/gen.cpp} +0 -0
  39. /rbx/resources/presets/default/problem/{tests → manual_tests}/samples/000.in +0 -0
  40. /rbx/resources/presets/default/problem/{tests → manual_tests}/samples/001.in +0 -0
  41. /rbx/resources/presets/default/problem/{random.py → testplan/random.py} +0 -0
  42. /rbx/resources/presets/default/problem/{random.txt → testplan/random.txt} +0 -0
  43. {rbx_cp-0.7.0.dist-info → rbx_cp-0.8.0.dist-info}/LICENSE +0 -0
  44. {rbx_cp-0.7.0.dist-info → rbx_cp-0.8.0.dist-info}/WHEEL +0 -0
  45. {rbx_cp-0.7.0.dist-info → rbx_cp-0.8.0.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  from typing import Any, Dict, List, Optional, Tuple
2
2
 
3
- from rbx.grading import steps
3
+ from rbx.grading import grading_context, profiling, steps
4
4
  from rbx.grading.caching import DependencyCache, NoCacheException
5
5
  from rbx.grading.judge.sandbox import SandboxBase, SandboxParams
6
6
  from rbx.grading.steps import (
@@ -27,17 +27,24 @@ def compile(
27
27
  artifacts.logs = GradingLogsHolder()
28
28
 
29
29
  ok = True
30
+ cached_profile = profiling.Profiler('steps.compile[cached]', start=True)
30
31
  with dependency_cache(
31
32
  commands, [artifacts], params.get_cacheable_params()
32
33
  ) as is_cached:
33
- if not is_cached and not steps.compile(
34
- commands=commands,
35
- params=params,
36
- artifacts=artifacts,
37
- sandbox=sandbox,
38
- ):
39
- ok = False
40
- raise NoCacheException()
34
+ if not is_cached:
35
+ with profiling.Profiler('steps.compile'):
36
+ profiling.add_to_counter('steps.compile')
37
+ ok = steps.compile(
38
+ commands=commands,
39
+ params=params,
40
+ artifacts=artifacts,
41
+ sandbox=sandbox,
42
+ )
43
+ if not ok:
44
+ raise NoCacheException()
45
+ else:
46
+ cached_profile.stop()
47
+ profiling.add_to_counter('steps.compile[cached]')
41
48
 
42
49
  return ok
43
50
 
@@ -56,16 +63,25 @@ async def run(
56
63
  if metadata is not None and metadata.retryIndex is not None:
57
64
  cacheable_params['__retry_index__'] = metadata.retryIndex
58
65
 
59
- with dependency_cache([command], [artifacts], cacheable_params) as is_cached:
60
- if not is_cached:
61
- await steps.run(
62
- command=command,
63
- params=params,
64
- artifacts=artifacts,
65
- sandbox=sandbox,
66
- metadata=metadata,
67
- )
68
-
66
+ with grading_context.cache_level(
67
+ grading_context.CacheLevel.NO_CACHE,
68
+ when=grading_context.is_compilation_only,
69
+ ):
70
+ cached_profile = profiling.Profiler('steps.run[cached]', start=True)
71
+ with dependency_cache([command], [artifacts], cacheable_params) as is_cached:
72
+ if not is_cached:
73
+ with profiling.Profiler('steps.run'):
74
+ profiling.add_to_counter('steps.run')
75
+ await steps.run(
76
+ command=command,
77
+ params=params,
78
+ artifacts=artifacts,
79
+ sandbox=sandbox,
80
+ metadata=metadata,
81
+ )
82
+ else:
83
+ cached_profile.stop()
84
+ profiling.add_to_counter('steps.run[cached]')
69
85
  return artifacts.logs.run
70
86
 
71
87
 
@@ -91,13 +107,23 @@ async def run_coordinated(
91
107
  if solution.metadata is not None and solution.metadata.retryIndex is not None:
92
108
  cacheable_params['solution.__retry_index__'] = solution.metadata.retryIndex
93
109
 
94
- with dependency_cache(
95
- [interactor.command, solution.command],
96
- [interactor.artifacts, solution.artifacts],
97
- cacheable_params,
98
- ) as is_cached:
99
- if not is_cached:
100
- await steps.run_coordinated(interactor, solution)
110
+ with grading_context.cache_level(
111
+ grading_context.CacheLevel.NO_CACHE,
112
+ when=grading_context.is_compilation_only,
113
+ ):
114
+ cached_profile = profiling.Profiler('steps.run_coordinated[cached]', start=True)
115
+ with dependency_cache(
116
+ [interactor.command, solution.command],
117
+ [interactor.artifacts, solution.artifacts],
118
+ cacheable_params,
119
+ ) as is_cached:
120
+ if not is_cached:
121
+ with profiling.Profiler('steps.run_coordinated'):
122
+ profiling.add_to_counter('steps.run_coordinated')
123
+ await steps.run_coordinated(interactor, solution)
124
+ else:
125
+ cached_profile.stop()
126
+ profiling.add_to_counter('steps.run_coordinated[cached]')
101
127
 
102
128
  return (
103
129
  interactor.artifacts.logs.run,
@@ -0,0 +1,2 @@
1
+ build/
2
+ .box/
@@ -8,9 +8,22 @@ statements:
8
8
  language: "en"
9
9
  path: "statement/contest.rbx.tex"
10
10
  type: "jinja-tex"
11
- assets: ["statement/olymp.sty", "statement/*.png"]
11
+ assets:
12
+ - "statement/icpc.sty"
13
+ - "statement/*.png"
14
+ - "statement/instructions.tex"
12
15
  joiner: {type: "tex2pdf"}
13
16
  override:
14
17
  configure:
15
18
  - type: "rbx-tex" # Convert rbxTeX to TeX
16
19
  template: "statement/template.rbx.tex"
20
+ - name: "editorial-en"
21
+ extends: "statement-en"
22
+ vars:
23
+ editorial: true
24
+ watermark: true
25
+ # Whether to show the problem statement in the editorial.
26
+ show_problem: false
27
+ vars:
28
+ year: 2025
29
+ date: "2025-06-21"
@@ -1,97 +1,36 @@
1
-
2
- \documentclass[titlepage, oneside, a4paper]{article}
3
-
4
- \usepackage {import}
5
- \usepackage[margin=25mm, left=17mm, right=17mm]{geometry}
6
- \usepackage[utf8]{inputenc}
7
- \usepackage[english]{babel}
8
- \usepackage{amsmath}
9
- \usepackage{amssymb}
10
- \usepackage{fancyhdr}
11
- \usepackage{comment}
12
- \usepackage{olymp}
13
- \usepackage{epigraph}
14
- \usepackage{expdlist}
15
- \usepackage{graphicx}
16
- \usepackage{ulem}
17
- \usepackage{lastpage}
18
-
19
- %- for problem in problems
20
- %- if problem.blocks.preamble is defined
21
- \VAR{problem.blocks.preamble}
22
- %- endif
23
- %- endfor
24
-
25
- \def\showSourceFileName{1}
26
- \newif\ifintentionallyblankpages % comment this out to add blank pages
27
-
28
- \pagestyle{fancy}
29
- \fancyhf{}
30
- \renewcommand{\footrulewidth}{0.4pt}
31
-
32
- %- if contest is defined
33
- \title{\VAR{contest.title or ""}}
34
- \author{\VAR{contest.location if contest.location is defined else ""}}
35
- \date{\VAR{contest.date if contest.date is defined else ""}}
36
- %- else
37
- \title{}
38
- \author{}
39
- \date{}
1
+ \documentclass[a4paper,11pt]{article}
2
+
3
+ \def\lang{\VAR{lang}}
4
+ \usepackage{icpc}
5
+ \usepackage{import}
6
+
7
+ \def\Year{\VAR{vars.year}}
8
+ \def\Title{\VAR{contest.title}}
9
+ \def\Date{\VAR{vars.date}}
10
+
11
+ %- if vars.editorial is truthy and vars.watermark is truthy
12
+ \AddToHook{shipout/foreground}{
13
+ \begin{tikzpicture}[overlay, remember picture]
14
+ \node[text=gray, rotate=45, scale=8, opacity=0.3]
15
+ at (0.5\paperwidth,-0.6\paperheight) {EDITORIAL};
16
+ \end{tikzpicture}
17
+ }
40
18
  %- endif
41
19
 
42
- \makeatletter
43
- \let\newtitle\@title
44
- \let\newauthor\@author
45
- \let\newdate\@date
46
- \makeatother
47
-
48
- \rhead{\newtitle}
49
- \lhead{\newauthor}
50
- \lfoot{\newdate}
51
- \rfoot{\thepage}
52
-
53
20
  \begin{document}
54
21
 
55
- %- if contest is defined
56
- \begin{frontpage}{\newtitle}{\newauthor}{\newdate}
57
- \begin{itemize}
58
- \item Sobre a prova:
59
- \begin{enumerate}
60
- \item A prova tem duração de 5 horas;
61
- \end{enumerate}
62
- \item Sobre a entrada:
63
- \begin{enumerate}
64
- \item A entrada do seu programa deve ser lida da entrada padrão (standard input);
65
- \item Quando uma linha da entrada contém vários valores, estes são separados por um único espaço em branco, a menos que explicitado o contrário no enunciado do problema;
66
- \item Toda linha da entrada terminará com um caractere final-de-linha.
67
- \end{enumerate}
68
-
69
- \item Sobre a saída:
70
- \begin{enumerate}
71
- \item A saída de seu programa deve ser escrita na saída padrão;
72
- \item Quando uma linha da saída contém vários valores, estes devem ser separados por um único espaço em branco, a menos que explicitado o contrário no enunciado do problema;
73
- \item Toda linha da saída deve terminar com um caractere final-de-linha.
74
- \end{enumerate}
75
-
76
- \item Sobre as submissões:
77
- \begin{enumerate}
78
- \item Você deve submeter o código fonte das suas soluções;
79
- \item Os comandos utilizados para compilação serão:
80
- \begin{enumerate}
81
- %- for language in languages:
82
- \item \VAR{language.name | escape}: \VAR{language.command | escape}
83
- %- endfor
84
- \end{enumerate}
85
- \item Para linguagem Java, o nome da classe principal do arquivo deve ser \textbf{Main}. A classe deve ser pública.
86
- \end{enumerate}
87
- \centering\vspace*{\fill}\textbf{Este caderno contém \VAR{problems | length} problema(s) e \pageref{LastPage} página(s)} \\
88
- \vspace*{\fill}
89
- \end{itemize}
90
- \end{frontpage}
22
+ %- if vars.editorial is truthy
23
+ \InsertEditorialTitlePage
24
+ %- else
25
+ \InsertTitlePage
26
+ \input{instructions.tex}
91
27
  %- endif
92
28
 
93
29
  %- for problem in problems
30
+ \stepcounter{problemcounter}
94
31
  \subimport{\VAR{problem.path | parent}/}{\VAR{problem.path | stem}}
95
32
  %- endfor
96
33
 
34
+ \label{lastpage}
97
35
  \end{document}
36
+
@@ -0,0 +1,322 @@
1
+ \usepackage{caption}
2
+ \usepackage{epsfig}
3
+ \usepackage{moreverb}
4
+ \usepackage{float}
5
+ \usepackage{fancyvrb}
6
+ \usepackage{multicol}
7
+ \usepackage{hyperref}
8
+ \usepackage{ifthen}
9
+ \usepackage{titlesec}
10
+ \usepackage{pmboxdraw}
11
+ \usepackage{xcolor}
12
+ \usepackage{colortbl}
13
+ \usepackage{tikz}
14
+ \usepackage{subcaption}
15
+ \usetikzlibrary{matrix,positioning,fit,scopes,chains}
16
+ \let\mytitleformat\titleformat
17
+ \let\titleformat\relax
18
+ \usepackage{logicpuzzle}
19
+ \usepackage{enumitem}
20
+ \usepackage{amsfonts}
21
+ \usepackage[brazil]{babel}
22
+ \usepackage[utf8]{inputenc}
23
+ \usepackage[T1]{fontenc}
24
+ \usepackage{indentfirst}
25
+ \usepackage{pdftexcmds}
26
+ \usepackage{amsmath}
27
+
28
+ \captionsetup[figure]{labelformat=empty}
29
+ \setlist[itemize]{noitemsep, nolistsep}
30
+
31
+ \setlength{\marginparwidth}{0pt}
32
+ \setlength{\oddsidemargin}{-0.25cm}
33
+ \setlength{\evensidemargin}{-0.25cm}
34
+ \setlength{\marginparsep}{0pt}
35
+
36
+ \setlength{\parindent}{0cm}
37
+ \setlength{\parskip}{5pt}
38
+
39
+ \setlength{\textwidth}{16.5cm}
40
+ \setlength{\textheight}{25.5cm}
41
+
42
+ \setlength{\voffset}{-1in}
43
+
44
+ \newcommand{\insereArquivo}[1]{
45
+ \ifnum0\pdffilesize{#1}>0
46
+ \VerbatimInput[xleftmargin=0mm,numbers=none,obeytabs=true]{#1}\vspace{.5em}
47
+ \fi
48
+ }
49
+
50
+ \newcommand{\insereTexto}[1]{
51
+ \texttt{#1}
52
+ }
53
+
54
+ \def\portuguese{pt}
55
+ \ifx\lang\portuguese
56
+ \def\strTaskSheet{Caderno de Problemas}
57
+ \def\strSolutionSheet{Caderno de Soluções}
58
+ \def\strSponsored{Patrocínio}
59
+ \def\strHosted{Realização}
60
+ \def\strOrganized{Organização}
61
+ \def\strProblem{Problema }
62
+ \def\strExplanation{Explicação do exemplo }
63
+ \def\strInput{Entrada}
64
+ \def\strOutput{Saída}
65
+ \def\strInteraction{Interação}
66
+ \def\strSampleinput{Exemplo de entrada }
67
+ \def\strSampleoutput{Exemplo de saída }
68
+ \def\strSampleinteraction{Exemplo de interação }
69
+ \def\strInteractionread{Leitura}
70
+ \def\strInteractionwrite{Escrita}
71
+ \def\strExamples{Exemplos}
72
+ \def\strSolution{Solução}
73
+ \def\strNotes{Observações}
74
+ \else
75
+ \def\strTaskSheet{Task Sheet}
76
+ \def\strSolutionSheet{Solution Sheet}
77
+ \def\strSponsored{Sponsored by}
78
+ \def\strHosted{Hosted by}
79
+ \def\strOrganized{Organized by}
80
+ \def\strProblem{Problem }
81
+ \def\strExplanation{Explanation of sample }
82
+ \def\strInput{Input}
83
+ \def\strOutput{Output}
84
+ \def\strInteraction{Interaction}
85
+ \def\strSampleinput{Sample input }
86
+ \def\strSampleoutput{Sample output }
87
+ \def\strSampleinteraction{Sample interaction }
88
+ \def\strInteractionread{Read}
89
+ \def\strInteractionwrite{Write}
90
+ \def\strExamples{Examples}
91
+ \def\strSolution{Solution}
92
+ \def\strNotes{Notes}
93
+ \fi
94
+
95
+ \newcommand{\includeProblem}[3][]
96
+ {
97
+ \newpage
98
+ \def\ProblemLetter{#1}
99
+ \ifx\ProblemLetter\empty
100
+ {\huge{\bf #2}}
101
+ \else
102
+ {\huge{\bf \strProblem #1. #2}}
103
+ \fi
104
+ #3
105
+ }
106
+
107
+ \newcommand{\inputdesc}[1]{
108
+ \subsection*{\strInput}
109
+ {#1} }
110
+
111
+ \newcommand{\inputdescline}[1]{
112
+ \subsection*{\strInput}
113
+ \strInputdescline {#1} }
114
+
115
+ \newcommand{\outputdesc}[1]{
116
+ \subsection*{\strOutput}
117
+ {#1}}
118
+
119
+ \newcommand{\interactiondesc}[1]{
120
+ \subsection*{\strInteraction}
121
+ {#1}}
122
+
123
+ \newcommand{\sampledesc}[2]{
124
+ \subsection*{\strExplanation #1}
125
+ {#2}}
126
+
127
+
128
+ \newcommand{\incat}[1]{sample-#1.in}
129
+ \newcommand{\solcat}[1]{sample-#1.sol}
130
+ \newcounter{problemcounter}
131
+ \setcounter{problemcounter}{0}
132
+ \newcounter{exemplocounter}[problemcounter]
133
+ \setcounter{exemplocounter}{0}
134
+
135
+ \newcommand\mc[1]{\multicolumn{1}{l}{#1}}
136
+ \newcommand{\example}[2]{
137
+ {\small
138
+
139
+ \stepcounter{exemplocounter}
140
+
141
+ \begin{minipage}[c]{0.945\textwidth}
142
+ \begin{center}
143
+ \begin{tabular}{|l|l|}
144
+ \mc{\bf{\strSampleinput \arabic{exemplocounter}}}
145
+ &
146
+ \mc{\bf{\strSampleoutput \arabic{exemplocounter}}} \\
147
+
148
+ \hline
149
+ \begin{minipage}[t]{0.5\textwidth}
150
+ \vspace{0.01cm}
151
+ \insereArquivo{#1}
152
+ \vspace{-0.2cm}
153
+ \end{minipage}
154
+ &
155
+ \begin{minipage}[t]{0.5\textwidth}
156
+ \vspace{0.01cm}
157
+ \insereArquivo{#2}
158
+ \vspace{-0.2cm}
159
+ \end{minipage} \\
160
+ \hline
161
+ \end{tabular}
162
+ \end{center}
163
+ \end{minipage} % leave next line empty
164
+
165
+ }
166
+ } % example
167
+
168
+ \newcommand{\exampleInteractive}{
169
+ {\small
170
+
171
+ \stepcounter{exemplocounter}
172
+
173
+ \begin{center}
174
+ \begin{tabular}{lcr}
175
+ \begin{minipage}[t]{0.3\textwidth}
176
+ \hspace{-0.19cm}\bf{\strInteractionread}
177
+ \end{minipage}
178
+ &
179
+ \begin{minipage}[t]{0.3\textwidth}
180
+ \bf{\strSampleinteraction \arabic{exemplocounter}}
181
+ \end{minipage}
182
+ &
183
+ \begin{minipage}[t]{0.3\textwidth}
184
+ \hfill \bf{\strInteractionwrite}
185
+ \end{minipage}
186
+ \end{tabular}
187
+ \end{center}
188
+ \vspace{-0.5cm}
189
+ }
190
+ } % exampleInteractive
191
+
192
+ \newcommand{\interaction}[2]{
193
+ {\small
194
+
195
+ \ifthenelse{\equal{#2}{\string 0}}{
196
+ \vspace{-0.3cm}
197
+ \begin{tabular}{|l|}
198
+ \hline
199
+ \begin{minipage}[t]{0.55\textwidth}
200
+ \vspace{0.01cm}
201
+ \insereTexto{#1}
202
+ \vspace{0.28cm}
203
+ \end{minipage}
204
+ \\
205
+ \hline
206
+ \end{tabular}
207
+ }{
208
+ \vspace{-0.3cm}
209
+ \hfill
210
+ \begin{tabular}{|l|}
211
+ \hline
212
+ \begin{minipage}[t]{0.55\textwidth}
213
+ \vspace{0.01cm}
214
+ \insereTexto{#1}
215
+ \vspace{0.28cm}
216
+ \end{minipage}
217
+ \\
218
+ \hline
219
+ \end{tabular}
220
+ }
221
+
222
+ }
223
+ } % interaction
224
+
225
+ \newcommand{\explanation}[1]{
226
+ \textbf{\strExplanation\theexemplocounter}
227
+
228
+ {#1} % leave empty line
229
+
230
+ } % explanation
231
+
232
+ \addtolength{\parskip}{0.4\baselineskip}
233
+
234
+ \pagestyle{myheadings}
235
+
236
+ \newcounter{pcounter}\setcounter{pcounter}{0}
237
+ \newcounter{qcounter}\setcounter{qcounter}{0}
238
+
239
+ \usepackage{titlesec}
240
+
241
+ \titlespacing\section{0pt}{6pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
242
+ \titlespacing\subsection{0pt}{6pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
243
+ \titlespacing\subsubsection{0pt}{6t plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
244
+
245
+ \newcommand{\InsertTitlePage}
246
+ {
247
+ \pagestyle{myheadings}
248
+ \markright{\Title -- \Year}
249
+
250
+ %%% Title Page
251
+ \begin{titlepage}
252
+ \vspace*{\fill}
253
+ \begin{center}
254
+
255
+ \includegraphics[width=8cm]{logo.png}
256
+
257
+ \vspace{0.8cm}
258
+ {\huge\bf \Title}\\[12pt]
259
+ {\large{\bf \strTaskSheet}}\\[12pt]
260
+ \vspace{1.5cm}
261
+ {\huge{\bf \Year}}
262
+
263
+ % \vspace{1cm}
264
+ % {\small \bf \strSponsored}\\[8pt]
265
+
266
+ % \includegraphics[width=16cm]{sponsors.png}
267
+
268
+ % \vspace{2cm}
269
+ % \begin{center}
270
+ % \setlength{\tabcolsep}{0.1\textwidth}
271
+ % \begin{tabular}{cc}
272
+ % {\small\bf \strHosted} & {\small\bf \strOrganized} \\
273
+ % \includegraphics[width=3cm]{host.png} & \includegraphics[width=4cm]{organizers.png} \\
274
+ % \end{tabular}
275
+ % \end{center}
276
+
277
+ \end{center}
278
+ \vspace*{\fill}
279
+ \end{titlepage}
280
+
281
+ \clearpage
282
+ }
283
+
284
+ \newcommand{\InsertEditorialTitlePage}
285
+ {
286
+ \pagestyle{myheadings}
287
+ \markright{\Title -- \Year}
288
+
289
+ %%% Title Page
290
+ \begin{titlepage}
291
+ \vspace*{\fill}
292
+ \begin{center}
293
+
294
+ \includegraphics[width=8cm]{logo.png}
295
+
296
+ \vspace{0.8cm}
297
+ {\huge\bf \Title}\\[12pt]
298
+ {\large{\bf \strSolutionSheet}}\\[12pt]
299
+ \vspace{1.5cm}
300
+ {\huge{\bf \Year}}
301
+
302
+ % \vspace{1cm}
303
+ % {\small \bf \strSponsored}\\[8pt]
304
+
305
+ % \includegraphics[width=16cm]{sponsors.png}
306
+
307
+ % \vspace{2cm}
308
+ % \begin{center}
309
+ % \setlength{\tabcolsep}{0.1\textwidth}
310
+ % \begin{tabular}{cc}
311
+ % {\small\bf \strHosted} & {\small\bf \strOrganized} \\
312
+ % \includegraphics[width=3cm]{host.png} & \includegraphics[width=4cm]{organizers.png} \\
313
+ % \end{tabular}
314
+ % \end{center}
315
+
316
+ \end{center}
317
+ \vspace*{\fill}
318
+ \end{titlepage}
319
+
320
+ \clearpage
321
+ }
322
+
@@ -0,0 +1,40 @@
1
+ \section*{General Information}
2
+
3
+ This task sheet consists of \pageref*{lastpage} pages (not counting the cover), numbered from 1 to \pageref*{lastpage}. Check if the sheet is complete.
4
+
5
+ \subsection*{Input}
6
+
7
+ \begin{itemize}
8
+ \item The input must be read from standard input.
9
+
10
+ \item All lines in the input, including the last one, end with a line break character (\texttt{\textbackslash n}).
11
+
12
+ \item When the input contains multiple space-separated values, there is exactly one whitespace character between two consecutive values on the same line.
13
+ \end{itemize}
14
+
15
+ \subsection*{Output}
16
+
17
+ \begin{itemize}
18
+ \item The output must be written to standard output.
19
+
20
+ \item The output must follow the format specified in the problem statement. The output must not contain any extra data.
21
+
22
+ \item All lines in the output, including the last one, must end with a line break character (\texttt{\textbackslash n}).
23
+
24
+ \item When a line in the output displays multiple space-separated values, there must be exactly one whitespace character between two consecutive values.
25
+
26
+ \item When an output value is a real number, use at least the number of decimal places corresponding to the precision required in the problem statement.
27
+ \end{itemize}
28
+
29
+ % \subsection*{Interactive Problems}
30
+
31
+ % The contest may contain interactive problems. In this type of problem, the input data provided to your program may not be predetermined but is instead specifically constructed for your solution. The judge writes a special program (the interactor), whose output is transferred to your solution's input, and your program's output is sent to the interactor's input. In other words, your solution and the interactor exchange data and may decide what to print based on the communication history.
32
+
33
+ % When writing a solution for an interactive problem, it is important to remember that if you print any data, it may first be stored in an internal \textit{buffer} and not immediately transferred to the interactor. To avoid this situation, you must use a special \textit{flush} operation every time you print data. These flush operations are available in the standard libraries of almost all programming languages:
34
+
35
+ % \begin{itemize}
36
+ % \item \texttt{fflush(stdout)} in \texttt{C}.
37
+ % \item \texttt{cout.flush()} in \texttt{C++}.
38
+ % \item \texttt{sys.stdout.flush()} in \texttt{Python}.
39
+ % \item \texttt{System.out.flush()} in \texttt{Java}.
40
+ % \end{itemize}