Блог пользователя _Robi

Автор _Robi, история, 4 месяца назад, По-английски

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!

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

»
4 месяца назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

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