_Robi's blog

By _Robi, history, 4 months ago, In English

Is it possible to add more than one model solution for a single problem?

Here's my situation: my problem has two subtasks, and each subtask expects a different answer — for example, one subtask asks for the minimum value and the other asks for the maximum. So I need one model solution that covers the first subtask's test cases, and a separate one for the second subtask.

Is there a way to handle this? Any help would be greatly appreciated!

  • Vote: I like it
  • -1
  • Vote: I do not like it

»
4 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

If that is the case, your input should have a different input for both subtasks (for the user code to identify min or max), like first line should be "MAX" or "MIN", then you can just add an if in your model solution for min and max