Блог пользователя CodeChef_admin

Автор CodeChef_admin, история, 4 года назад, По-английски

We invite you to participate in either CodeChef’s November Cook-Off or SnackDown Pre-Elimination, this Sunday, 21st November, rated for all. Cook-Off’s Div-1 and SnackDown Pre-Elimination will have the same problems.

Time: 9 PM — 12 AM IST

On the problem setting panel are:

Users who have qualified to participate in the SnackDown Pre-Elimination cannot participate in the Cook-Off. The Pre-Elimination will be rated for all users participating in it.

The Div-1 Cook-Off and Pre-Elimination ranklists will be merged to determine the winners of the cash/Amazon voucher prizes. Prizes for Cook-Off and Lunchtime Div-2 and Div-3 have been stopped from this month.

Plagiarism checks are being done on all the Snackdown rounds, and will be announced within a week, after which the Pre-Elimination ranklist will be finalized. Cheaters caught will be permanently banned from the platform.

The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

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.

Hope to see you participating. Good Luck!

  • Проголосовать: нравится
  • +66
  • Проголосовать: не нравится

»
4 года назад, скрыть # |
 
Проголосовать: нравится -25 Проголосовать: не нравится

Why both contests at same time? Is there any reason?

»
4 года назад, скрыть # |
 
Проголосовать: нравится -23 Проголосовать: не нравится

How many testers you want Admin : Yes

Testers:NO

reference previous contest

»
4 года назад, скрыть # |
 
Проголосовать: нравится +88 Проголосовать: не нравится

Plagiarism checks are being done on all the Snackdown rounds, and will be announced within a week, after which the Pre-Elimination ranklist will be finalized. Cheaters caught will be permanently banned from the platform.

This puts a smile on my face.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +34 Проголосовать: не нравится

    Can we say that Snackdown was a bait from CodeChef for the cheaters? Let's see what will happen!

    ... background: where is my popcorn? ...

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    Shouldn't plag should be checked in cook-off also if the problem set for both of them is nearly same.?? Literally everyone's solution for div2 D is exact same

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    But if I tell you the reality, the cheaters have changed their code just a little bit such as func name or added some extra lines and they are not being taken into consideration. If you don't believe me then go to the slippers problem and check the successful submission check the last 100 and more than 90 have the same code just a bit changes

»
4 года назад, скрыть # |
 
Проголосовать: нравится +24 Проголосовать: не нравится

Prizes removed from div2 and div3 and I wasn't able to win once.

»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -19 Проголосовать: не нравится

The Pre-Elimination will be rated for all users participating in it....

Then if i attend only on pre-elimination then i rated as global round of all div, sir ? CodeChef_admin

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How many will qualify for elimination?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

Are the 4 problems shown in the contest in a seperate category part of snackdown?(it should consist of div2,div3 only problems)

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Is there a soln to DECSUBK that works in $$$O(n ^ 3)$$$ or similar or are they just troll constraints? I got AC with an $$$O(n \cdot logn)$$$ solution but I can't think of any simpler idea with worse complexity.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +25 Проголосовать: не нравится

    Brute forcing the solution by checking for each index the minimum number possible on that position will work in O(n^3 log(n))

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +22 Проголосовать: не нравится

    My $$$O(n^3log(n))$$$ solution was to greedily assign the elements from $$$1$$$ to $$$n$$$, checking if it's possible by seeing if the minimum possible longest non-decreasing subsequence length is $$$ \lt = k$$$. If [min possible] <= k <= [max possible], k must be achievable.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +15 Проголосовать: не нравится

    My soln was $$$O(n^3*logn)$$$ and it aced in 0.34s. I found LIS of $$$O(n^2)$$$ sequences in $$$O(n*logn)$$$.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +4 Проголосовать: не нравится

    I did it in O(n^3).For every element in the sorted array I made an LIS array and checked at which position can the current element be inserted so as to not exceed LIS by k.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +24 Проголосовать: не нравится

    What's your solution?

    • »
      »
      »
      4 года назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится +32 Проголосовать: не нравится

      Lets make some observations:

      • If an element $$$i$$$ appears $$$x_i$$$ times, the length of the longest non-decreasing subsequence is at least $$$x_i$$$. So the answer doesn't exist if there exists some $$$x_i \gt k$$$.

      • The length of the longest non-decreasing subsequence of an array made up of $$$k$$$ strictly decreasing segments is at most $$$k$$$.

      • If for each element $$$i$$$, we place its $$$x_i$$$ occurrences in $$$x_i$$$ contiguous segments $$$[l_i, l_i + x_i - 1]$$$, such that $$$l_i \lt l_j$$$ if and only if $$$i \lt j$$$ and all $$$k$$$ segments are non-empty, the length of the longest non-decreasing sequence is exactly $$$k$$$.

      • To produce the lexicographically smallest non-decreasing sequence in this manner, it is optimal to make as many of these segments (from left to right) as possible have exactly one number, and for this number to be as small as possible.

      This yields a simple greedy where if we have placed the occurrences of the first $$$i - 1$$$ elements in the first $$$j$$$ segments till now, it is optimal to place the element $$$i$$$ in the range $$$[j, j + x_i - 1]$$$ or $$$[k - x_i + 1, k]$$$ if $$$j + x_i - 1 \gt k$$$.

      This can be implemented using a map or array of the number of times an element appears in O(n logn) or O(n) respectively.

      Code
  • »
    »
    4 года назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    .

»
4 года назад, скрыть # |
 
Проголосовать: нравится +188 Проголосовать: не нравится

Why is pre-elim round rated? I've qualified, but at what cost T_T

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

CodeChef_admin Will the top 500 of this round get T-shirts?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +93 Проголосовать: не нравится

I hate GUESSROW.

IMHO hiding this information is too unfair.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +6 Проголосовать: не нравится

    I ran my solution locally with different seeds, it used in average 590-620 queries per test, then I chose the best seed for my interaction (which was probably as good to any other interactor as any other seed) and submitted, assuming that there are not a lot of tests and I can force it to pass in an expectedly finite number of attempts; it only took one.

    • »
      »
      »
      4 года назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Yes, so your situation is OK. For me, who was not very clever, it was something like 600-650, and it was impossible to tell appropriately from the information available from the statement when to stop improving the solution.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +21 Проголосовать: не нравится

    Hating the problem seems a bit too much (though your opinion was shared by the coordinator...) but what you say about the number of tests is correct. It would have been better to say the number of tests explicitly.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +169 Проголосовать: не нравится

In SLIPPERS only after third wrong attempt I've realized that there is a second sample test, don't do that.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Why $$$M=1$$$ in MEGAMU2...

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +11 Проголосовать: не нравится

    Was it a special case for your code? I am asking because it was not special for the official solution, so I don't see what's wrong with it.

    • »
      »
      »
      4 года назад, скрыть # ^ |
       
      Проголосовать: нравится +10 Проголосовать: не нравится

      I can say for myself, that I noticed that the sequences where $$$\mu$$$ is nonzero can be described as follows:

      1. Delete all zeroes.
      2. Let the part before first element greater than $$$2$$$ be $$$p$$$, the remaining part be $$$s$$$.
      3. Delete all ones from $$$s$$$.
      • either $$$p$$$ is an even number of twos, or $$$p$$$ has an odd number of twos before the first one;
      • $$$s$$$ consists of blocks of type $$$(x+1)^+(x)^+$$$ and $$$(xx)^+$$$;
      • $$$s$$$ does not have falls by at least two.

      Then I calculated some dp, and I had to handle $$$M = 1$$$ manually to calculate the number of valid $$$p$$$-s.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится

Hello everyone. After the round was over I have started to examine some problem "Slippers" solutions and they were all suspicious identical. Judge yourself:

Submission #1

Submission #2

Submission #3

Submission #4

unfortunately, almost all the submissions were like this.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +30 Проголосовать: не нравится

how to solve slippers.

  1. Read GP of IMO J
  2. ???
  3. win
»
4 года назад, скрыть # |
Rev. 4  
Проголосовать: нравится +8 Проголосовать: не нравится

Thanks for the contest, very nice problemset.

For GOODRANKING, I did some randomization and it passed: https://www.codechef.com/viewsolution/54143464. Not sure why though, my check function works in O(n^2) in worst case, so overall worst case time complexity should be O(n^3).

UPD : Code works even without randomization. No idea how xD

»
4 года назад, скрыть # |
 
Проголосовать: нравится +49 Проголосовать: не нравится

Very nice contest, specifically the part authored by dario2994. Much better than I expected from CodeChef. Hopefully the elimination/finals will be as nice.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

BTW how the rating update works? Div.1+pre-elimination merged ranklist or separate ranklist?

»
4 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится
Doubt cleared

Thanks to nishuz

»
4 года назад, скрыть # |
 
Проголосовать: нравится +94 Проголосовать: не нравится

during the 25 last minutes of the contest, there are about 400+ accepted solution for "Guests like slippers".

most of them are the first submission, i.e. no penalty.

that's great ! hope the next round will also be fantastic like this ! everyone knows suddenly how to programming...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Really enjoyed solving D, the observation was cute and felt rewarding (though I'm not sure if I had the intended solution).

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

When will the ratings get updated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

CodeChef_admin I have seen that my rank in SnackDown Pre-Elimination jumped up by ~40 positions and that the rating were updated. Does it mean that plagiarism checks were done already? And if so — why all solutions from my and 3 out of 4 solutions from RamziAbedRamzi's comment weren't removed and authors weren't banned from appropriate contest and from platform at all?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Its more than a week ...... How much time more codechef take to ban cheaters...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

CodeChef_admin my rank in snackdown pre elimination was 905 and rating was updated according to it but now my rank is 715, still the rating is the same. Is it expected or it will be fixed?