Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Compare revisions
fc4f0be5fc3737081d9328cad814c5a8287a696b to 575633747cb19f58680abdfe494e4a3168620a3e
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
mj/mo-submit
Select target project
No results found
575633747cb19f58680abdfe494e4a3168620a3e
Select Git revision
Swap
Target
mj/mo-submit
Select target project
mj/mo-submit
1 result
fc4f0be5fc3737081d9328cad814c5a8287a696b
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
p-score umí i domácí kolo
· a9ba513e
Martin Mareš
authored
3 years ago
a9ba513e
p-score: Další vylepšení pro domácí kolo
· 4ad1cd40
Martin Mareš
authored
3 years ago
4ad1cd40
Merge branch 'master' into devel
· 57563374
Martin Mareš
authored
3 years ago
57563374
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/p-score
+9
-8
9 additions, 8 deletions
bin/p-score
with
9 additions
and
8 deletions
bin/p-score
View file @
57563374
...
...
@@ -7,6 +7,7 @@ from sqlalchemy.orm import joinedload
import
mo.db
as
db
from
mo.score
import
Score
from
mo.util
import
die
,
init_standalone
from
mo.util_format
import
format_decimal
parser
=
argparse
.
ArgumentParser
(
description
=
'
Vygeneruje výsledkovou listinu MO-P
'
)
parser
.
add_argument
(
'
year
'
,
type
=
int
)
...
...
@@ -35,12 +36,12 @@ def get_results(round, contests):
def
write_tex
(
round
,
tasks
,
contests
,
results
):
with
open
(
'
final.tex
'
,
'
w
'
)
as
out
:
out
.
write
(
r
'
\def\HranicePostupu{%s}
'
%
(
round
.
score_winner_limit
,)
+
"
\n
"
)
out
.
write
(
r
'
\def\HraniceUspesnychResitelu{%s}
'
%
(
round
.
score_successful_limit
,)
+
"
\n
"
)
out
.
write
(
r
'
\def\HranicePostupu{%s}
'
%
(
format_decimal
(
round
.
score_winner_limit
,)
)
+
"
\n
"
)
out
.
write
(
r
'
\def\HraniceUspesnychResitelu{%s}
'
%
(
format_decimal
(
round
.
score_successful_limit
)
,)
+
"
\n
"
)
out
.
write
(
'
\n
'
)
for
c
in
contests
:
res
=
results
[
c
.
place
.
get_code
()]
if
round
.
seq
=
=
2
:
if
round
.
seq
<
=
2
:
out
.
write
(
r
'
\kraj{%s}
'
%
c
.
place
.
name
+
'
\n
'
)
if
not
res
:
out
.
write
(
r
'
\nobody
'
+
'
\n
'
)
...
...
@@ -80,16 +81,16 @@ def write_tex(round, tasks, contests, results):
for
t
in
tasks
:
s
=
sol_map
.
get
(
t
.
task_id
)
if
s
is
not
None
:
cols
.
append
(
s
.
points
)
cols
.
append
(
format_decimal
(
s
.
points
)
)
else
:
cols
.
append
(
'
--
'
)
cols
.
append
(
r
.
get_total_points
())
cols
.
append
(
format_decimal
(
r
.
get_total_points
())
)
out
.
write
(
""
.
join
([
'
{
'
+
str
(
col
)
+
'
}
'
for
col
in
cols
])
+
'
\n
'
)
out
.
write
(
r
'
\endtable
'
+
'
\n
'
)
if
round
.
seq
=
=
2
:
if
round
.
seq
<
=
2
:
out
.
write
(
r
'
\endkraj
'
+
'
\n\n
'
)
...
...
@@ -130,11 +131,11 @@ def write_html(round, tasks, contests, results):
for
t
in
tasks
:
s
=
sol_map
.
get
(
t
.
task_id
)
if
s
is
not
None
:
cols
.
append
(
s
.
points
)
cols
.
append
(
format_decimal
(
s
.
points
)
)
else
:
cols
.
append
(
'
–
'
)
cols
.
append
(
r
.
get_total_points
())
cols
.
append
(
format_decimal
(
r
.
get_total_points
())
)
out
.
write
(
""
.
join
([
'
<td>
'
+
str
(
col
)
for
col
in
cols
])
+
'
\n
'
)
...
...
This diff is collapsed.
Click to expand it.