ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2115. The Knowledge Day

WA3: possible scenarios
Posted by Badr 29 Aug 2021 16:32
Can anyone check if I missed any scenario ?

1, 2, 3, 4, 5 => Nothing to do here"
5, 4, 3, 2, 1 => Nothing to do here"
5, 2, 3, 4, 1 => "Yes\n1 5"
1, 8, 3, 4, 5, 6, 7, 2, 9 => "Yes\n2 8"
1, 8, 7, 6, 5, 4, 3, 2, 9 => "Yes\n1 9"
9, 8, 3, 6, 5, 4, 7, 2, 1 => "Yes\n3 7"
1 => Nothing to do here"
1, 1, 1, 1, 1 => "Nothing to do here"
9, 2, 3, 5, 4, 6, 7, 8, 1 => "No hope"
1, 2, 3, 9, 5, 6, 7 => "No hope"
7, 6, 5, 9, 3, 2, 1 => "No hope"
1, 1 => "Nothing to do here"
1, 2 => "Nothing to do here"
1, 2, 4, 3, 5, 6 => "Yes\n3 4"
6, 5, 3, 4, 2, 1 => "Yes\n3 4"
2, 1, 3 => "Yes\n1 2"
1, 3, 2 => "Yes\n2 3"
1, 2, 3, 2, 3, 4, 5 => "Yes\n3 4"
1, 5, 7, 2, 4, 5 => "No hope"
Re: WA3: possible scenarios
Posted by Otrebus 6 Feb 2022 00:56
If there are repeated digits, make sure you switch the right one. For example:

5
2 1 1 1 3
Re: WA3: possible scenarios
Posted by Aleksei Chernenkov 17 Jan 2023 21:12
Try to generate tests containing a lot of same numbers, e.g. the next test:
9
1 5 1 3 3 3 5 1 5
has answer:
Yes
2 8