You are not logged in. Please login at www.codechef.com to post your questions!

×

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

asked 14 Sep '15, 16:15

siddhartha4444's gravatar image

3★siddhartha4444
1547
accept rate: 0%

edited 14 Sep '15, 16:27


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

link

answered 15 Sep '15, 18:15

xariniov9's gravatar image

6★xariniov9
1.1k18
accept rate: 10%

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

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

link

answered 14 Sep '15, 16:20

siddhartha4444's gravatar image

3★siddhartha4444
1547
accept rate: 0%

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

(14 Sep '15, 16:25) sandeep93★

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.

(14 Sep '15, 16:29) siddhartha44443★

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

link

answered 14 Sep '15, 18:32

ankurverma1994's gravatar image

4★ankurverma1994
415114
accept rate: 8%

edited 14 Sep '15, 18:34

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

(15 Sep '15, 14:27) siddhartha44443★

can you post the solution?

link

answered 14 Sep '15, 16:16

sandeep9's gravatar image

3★sandeep9
4782827
accept rate: 4%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×158

question asked: 14 Sep '15, 16:15

question was seen: 1,254 times

last updated: 15 Sep '15, 18:15