Skip to content

Commit

Permalink
Polygon loader puts all cases in one subtask, rather than scoring usi…
Browse files Browse the repository at this point in the history
…ng percentage of cases solved
  • Loading branch information
AngusRitossa committed Sep 13, 2024
1 parent aa0d3b5 commit 92954f0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmscontrib/loaders/polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import imp
import logging
import os
import json
import subprocess
import xml.etree.ElementTree as ET
from datetime import datetime, timedelta
Expand Down Expand Up @@ -277,17 +278,14 @@ def get_task(self, get_statement=True):
args["task_type_parameters"] = \
["alone", [infile_param, outfile_param], evaluation_param]

args["score_type"] = "Sum"
args["score_type"] = "GroupMin"
args["score_type_parameters"] = json.loads('[100, "^.*", "Subtask 1"]')

total_value = 100.0
input_value = 0.0

testcases = int(testset.find('test-count').text)

n_input = testcases
if n_input != 0:
input_value = total_value / n_input
args["score_type_parameters"] = input_value

args["testcases"] = {}

for i in range(testcases):
Expand Down

0 comments on commit 92954f0

Please sign in to comment.