Wrong Test cases for Question "SERIES", of contest CODEMANIA

In the question, https://www.codechef.com/COMA2020/problems/SERIES,

output for the test case -

6
0 4 5 8 11 8

should be “Yes”, but almost every AC submission, outputs “No” for the same.

Explanation -
0 4 8
5 8 11
are two AP sub-sequences.

@ utkarshh12 please respond!

6 Likes

This is the reason that i find the bug in my solution almost 2hr long and give up.
I also have doubt in the test case of Quality Work.

2 Likes

There are many othe testcases too:
like
7
1 2 3 -2 4 10 16
Sequences are 1 2 3 and -2 4 10 16 (just simply concatenated in testcase)
Answer is ‘Yes’ but few submissions that i checked gave ‘No’.

@utkarshh12 Remove this problem if solution/test-cases are wrong.

1 Like

How to solve this problem ?

@techiehere08
Focus on the two smallest elements. This should be enough of hint.

1
1.999999
1000000000000000000
Check one cpp and one java solution and you will see the difference in output section.
i tried one cpp and one java(Java and cpp)

1 Like

but u cant solve in contest :sweat_smile::sweat_smile:

Tumhara kuch ukhaada kya maine ?
Let me discuss the coding problems I want to and keep your trolling for some other place.

2 Likes

Why did this happen btw ?

I think this is the issue with constaint in the test case file.
but my output is matched with the cpp one, and i think there may be some mistake in test file like this (some overflow type).

1 Like

@souradeep1999 What do you think about this problem ? Maybe the test-cases only have distinct array elements ?

which one?

1 Like

“GOOD-SERIES-PROBLEM”

Like even though I have a solution, I feel that there can be cases where it might fail, I want to know if an absolutely correct solution exists for this problem ?(many AC solutions failing simple tests)

Hi, please share you approach for Quality Works https://www.codechef.com/COMA2020/problems/WORK.

This solution(not mine) seems correct for this case and also the case provided above-
https://www.codechef.com/viewsolution/29238337

1 Like

So what do you think guys? Does a true solution exists for this problem ?

can you please tell me how that testcase’s output should be yes?

1 Like

(4,7,10).
(2,9)

you cannot rearrange the numbers