P.S. Does anyone know why so many people tend to write my name in the wrong way when there's no reason to assume I mistyped my own name in previous messages?
Oopss... maybe cause Erik in portuguese would be written with a 'c'?
I was just too lazy to check your name again when I wrote it
Well so many words and now something to say. I just prepared everything for this contest in two days and also not two days full work because somehow there was not enough time. Problem F was from remote past and was from a mock contest of our local contest. No one found any mistake during that contest and as it was a mock contest problem we did not check it seriously.
After such a long time I put this problem without checking (Assuming it was correct). During contest I was not online (My internet was out of order) so it was impossible for me to put a clarification although I was already informed that there was a mistake. At first it was very difficult to find that the problem was wrong as so many people got accepted for F.
i believe manzoor is right.... sometimes we dont give out the credits.... although the problem really sucks AS IS, he has put some great effort on this web site....
anyhow, when the problem get to the archive will it be with a sensefull statement?
Two mistakes. First, you print a space after each number, and after the last number, you shouldn't. Second, in the method 'allZero' you loop from 0 to MD where you should loop from 0 to N.
Sample input to show your mistakes:
i don't know why u get so much confused in this problem. it's a mock test type problem. just print the subsequence which has maximum summation value from the given sequence. if the input is like,
3
2
0
5
then the output will be 2 5. if two sequence has the same value then we need to print the sequence which has minimal lenght. here 2 5 has 2 length but 2 0 5 would be length of 3
But is 2 5 a subsequence here? what does subsequence mean here? how can 2 5 be a sequence, there is a 0 in the middle , doesn't it seperate 2 and 5 into 2 subsequences or any combination of the numbers means a subsequence in this problem