1619 - Feel Good

All about problems in Volume 16. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

1619 - Feel Good

Post by brianfry713 »

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
Learning poster
Posts: 69
Joined: Sat Sep 02, 2006 7:30 pm
Location: Slovakia

Re: 1619 - Feel Good

Post 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:

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:

2 4

7 10

14 16

But I think, the first possibility have to be outputted, that means the answer with lowest possible indices.

Hope it helps.
Post Reply

Return to “Volume 16 (1600-1699)”