Page 1 of 1

1619 - Feel Good

Posted: Fri Sep 05, 2014 1:51 am
by brianfry713
Use this thread to discuss this problem.

Re: 1619 - Feel Good

Posted: Fri Jun 29, 2018 11:21 pm
by jurajz
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.