Add scoring types GroupSum, GroupSumCond, GroupSumCheck #1251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are 3 scoring types that are frequently used in Estonian olympiads, especially for more beginner-oriented tasks.
GroupSum gives points for each test proportionally for each subgroup. It doesn't have many functional advantages over Sum (or even just GroupMin and splitting each testcase into its own group), but it makes the contestant-facing UI consistent with GroupMin tasks (we generally have a few GroupSum tasks and then GroupMin for the rest). Also, it allows assigning different weights to different testcases in a somewhat intuitive manner (i.e. you give it the amount of points for the entire group, and the points get distributed evenly between the testcases).
GroupSumCond is useful for tasks where the question is of the form "find X, or if no such exist, print NONE". In these tasks, with GroupSum it'd be easy to get a lot of points by just printing NONE unconditionally. GroupSumCond allows designating some groups as "conditional", with the contestant only getting points for such groups if they also got some points from the unconditional groups. This allows moving all testcases where the answer is NONE into a conditional group, with the contestant only getting points if they also solve at least one of the non-NONE test cases correctly.
GroupSumCheck allows setting the whole group's points to zero in case of some particularly egregious error in one testcase. Admittedly less useful than the other 2 (I think we only needed it for BOI once).
I am aware that this PR is missing tests and documentation, but I'd want to first get feedback as to whether this feature is desired for CMS master.