SleepyShashwat's blog

By SleepyShashwat, history, 4 years ago, In English

We invite you to participate in CodeChef’s July Lunchtime, running this Saturday, 25th July, from 7:30 pm to 10:30 pm IST. The contest features 5 problems and is 3 hours long.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.

Here is the problemsetting panel:

Prizes:

The top 10 Indian and top 10 Global school students from ranklist will receive certificates and CodeChef laddus, with which they can claim cool CodeChef goodies. Know more here.

Good luck and have fun!

  • Vote: I like it
  • +41
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

5 problems in Div1 too? What happened to the idea of putting div2 problems in div1 as seen in the last cookoff?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    That was the shittiest idea ever.

    What were they trying to do? Preventing div2 guys to solve hardest 2 problems which they were not going to read anyway.

    Instead that should have been div1+div2

»
4 years ago, # |
  Vote: I like it +90 Vote: I do not like it

ccprobquality.jpg

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

What is the observation/logic required for solving Binary Concatenation?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Try fixing the number of bits in both numbers you're choosing and write down the expression.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    The function essentially returns $$$2^{MSB_Y}*X+Y - (2^{MSB_X}*Y+X)$$$. Here, MSB stands for most significant bit (1-indexed).

    Notice that if both the MSB's are fixed, increasing $$$X$$$ never lowers the value, and similarly decreasing $$$Y$$$ never lowers the value. So for each ordered pair of MSB's, we check the max and min respectively.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Test cases were weak this got accepted Your text to link here...

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        Yeah, I think many got Binary Concatenation Accepted like that. SleepyShashwat Is it possible to do anything now?

      • »
        »
        »
        »
        4 years ago, # ^ |
        Rev. 2   Vote: I like it +28 Vote: I do not like it

        Hello,

        I sincerely apologize for this. I did try running some heuristics, but that was, evidently, not enough.

        The constraint of having only two files per subtask coupled with preparing problems at a four days' notice did not help either.

        Regardless, I will do better.

        Thanks for participating!

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't know if my solution was intended to work or not, but i simply bruteforced $$$A_i$$$ and $$$A_j$$$, with $$$A_i$$$ as one of the maximum or second maximum number, and $$$A_j$$$ as elements of array. It got accepted surprisingly lol

»
4 years ago, # |
  Vote: I like it +62 Vote: I do not like it

I must say that I'm so happy to see high quality CodeChef problems recently, one more competition that was quite interesting to solve.

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

How to solve Golomb ?