Skip to content

Commit

Permalink
Merge pull request #205 from Virv12/score-type-cms-compat
Browse files Browse the repository at this point in the history
Support cms names for score_type
  • Loading branch information
dp1 authored Dec 5, 2023
2 parents afc47f6 + 9885118 commit 74508d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions task-maker-format/src/ioi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,9 @@ impl FromStr for TestcaseScoreAggregator {

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"min" => Ok(TestcaseScoreAggregator::Min),
"sum" => Ok(TestcaseScoreAggregator::Sum),
"min" | "GroupMin" => Ok(TestcaseScoreAggregator::Min),
"sum" | "Sum" => Ok(TestcaseScoreAggregator::Sum),
"GroupMul" | "GroupThreshold" => bail!("{s} is not supported yet"),
_ => bail!("Invalid testcase score aggregator: {}", s),
}
}
Expand Down

0 comments on commit 74508d3

Please sign in to comment.