REBXOR ambiguity

The same solution which gave tle during competition is working now.
Was the time-limit changed between the competition ?
If yes why were the solutions not rejudged.

Link to solution submitted during competetion (TLE) : https://www.codechef.com/viewsolution/8091580

Same solution submitted now in practice (AC) : https://www.codechef.com/viewsolution/8167083

1 Like

can you post the solution?

Link to solution submitted during competetion : https://www.codechef.com/viewsolution/8091580

Same solution submitted now in practice : https://www.codechef.com/viewsolution/8167083

1 Like

maybe they have kept it 2s during the contest only…For practice purpose it has been increased…

But initially, very few people were able to solve the ques in java and afterwards many were able to solve it in the same way I was getting tle, so I wanted to confirm if the limit was increased.

Yes, Time limit was increased within the contest only. But no special announcements were made.

Time limit 2sec https://www.codechef.com/viewsolution/8087050

Time limit 3sec https://www.codechef.com/viewsolution/8125195

But at the end I got full 100 points. Had to switch over the language and submitted in C

1 Like

Same here I had to switch to cpp to get 100 pts

Many people got TLE while using dynamic memory allocation, but there was a possible optimisation that I used which reduced the execution time by half.

Notice that the maximum possible XOR is the value when all k bits are set to 1 where k is the number of bits in the maximum element of the original array, one this value is encountered, there is no further need of trie, which made my soltion AC.

my solution is: https://www.codechef.com/viewsolution/8089627

3 Likes