# SUMOR QUESTION HAS WEAK TESTCASE ICPC 2019

THIS TESTCASE WILL FAIL HALF OF THE SOLUTION FOR PROBLEM SUMOR:

1
3
20 12 19

20|12|19 = 31
12|19 = 31
19 = 19
31+31+19 = 81
testcase are weak for this question. @admin . there are lot many solution which gives 79 and still passes the testcases.

48 Likes

14 Likes

12 Likes

Well. This question now looks like approximate question may be. Lets see whats testers solution. @admin please reply.

4 Likes

Amazing. My solution prints 80 for this but it got WA.

Then whats the solution to this question.I hope it is not an approximate else it would have to be deleted from the contest.

1 Like

It seems that there are a lot more teams whose accepted solution fails on this test case. Maybe more than 80-90%.

2 Likes

What is the â€ścorrectâ€ť solution for the question?

most prob its an approximate/challenge question

Our solution gave WA during the contest but Iâ€™m pretty sure the logic was correct. First of all remove zeros from the array and add the or of the array c+1 times in the answer (c=count of zeros). Keep 30 sets, such that si stores the numbers that have ith bit set. Also create a set ( r ) that has all the elements left.
We do this operation n-c times -
Create a set (nr) of non-removable elements, which stores the numbers that will decrease the value of or, if removed from the array. All the elements present in the sets (si) that have size 1 will come in this set. Now, iterate in the set r and select the smallest element which is not present in nr and remove it, if you find one (this wonâ€™t decrease the or value). If not then remove the smallest element from the nr set (this will decrease the or and the difference would be this number). Update the sets r and si by removing this deleted element, wherever present.

The algorithm works for all the cases, but still we got WA. Can the ICPC officials please look into this issue and remove this problem or rejudge the solutions? @admin This is absolutely unfair for teams like us.

10 Likes

What rank you got ?

General rank - 109
College rank - 7

3 Likes

How are you deciding NR set? It would not be unique!!

did u participated

If any bit has only one element that has this bit set, then removing this element will decrease the or value as all the other elements have 0 in this bit. So the nr set will have elements from the sets(si) that have size 1.

1 Like

Even, we did the same thing and got WA. Hoping that @admin will take the needful step.

2 Likes

@admin even I was trying the same approach as @hitesh_0301 mentioned and I too got WA. This will affect many deserving teams. Please look into it. Either remove this problem or rejudge all solutions.

3 Likes

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

How to solve Beautiful partitions?