1619 - Feel Good
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
1619 - Feel Good
Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
Re: 1619 - Feel Good
I think, that something is not correct with problem description or testing input/output.
I was wondered about statistics, more than 50% submission were WA. I tried to solve this problem and I had many WA's too. At first, I tried write empty line after last case, it didn't help. Empty line should be really before each test case except the first one - this is according problem description. After that I have idea to output the lowest indices of the interval, which have greatest value. Before I outputted any indices. After that, I got AC.
Problem description says, that when here is more intervals with greatest emotional value, we can print one of them. By the problem, there is green checkmark, that means, that in test case should be always such input, where is only one interval with greatest emotional value. After my submission, I think, that is not so.
So, for that case:
18
0 3 2 3 0 0 2 2 2 2 0 0 0 3 2 3 0 0
here are three possible outputs according problem description:
16
2 4
16
7 10
16
14 16
But I think, the first possibility have to be outputted, that means the answer with lowest possible indices.
Hope it helps.
I was wondered about statistics, more than 50% submission were WA. I tried to solve this problem and I had many WA's too. At first, I tried write empty line after last case, it didn't help. Empty line should be really before each test case except the first one - this is according problem description. After that I have idea to output the lowest indices of the interval, which have greatest value. Before I outputted any indices. After that, I got AC.
Problem description says, that when here is more intervals with greatest emotional value, we can print one of them. By the problem, there is green checkmark, that means, that in test case should be always such input, where is only one interval with greatest emotional value. After my submission, I think, that is not so.
So, for that case:
18
0 3 2 3 0 0 2 2 2 2 0 0 0 3 2 3 0 0
here are three possible outputs according problem description:
16
2 4
16
7 10
16
14 16
But I think, the first possibility have to be outputted, that means the answer with lowest possible indices.
Hope it helps.