9

Invitation to CodeChef February Cook-Off (Rated for all) — Today

 2 years ago
source link: http://codeforces.com/blog/entry/100176
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

We invite you to participate in CodeChef’s February Cook-Off, this Monday, 21st February, rated for all.

Time: 8 PM — 10:30 PM IST

Joining me on the problem setting panel are:

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!

2 days ago, # |

Excited(because plagiarism checker is back and has spoiled many cheater's profile)^-^

2 days ago, # |

Reminder: Contest starts in 30 minutes!

  • 43 hours ago, # ^ |

    is the round declared unrated?

2 days ago, # |

why t <= 3e5 in D ? I got 2 unnecessary TLE.

2 days ago, # |

How to solve div2 D ??...

  • 2 days ago, # ^ |

    Compute initial cost for the graph, by visiting vertices in non — decreasing order of A[i]. Call it C.

    For each '+' query, C = C + 2

    For each '-' query, C = C — 2

    For each '?' query, print(C)

    • 41 hour(s) ago, # ^ |

      I got the meaning of the problem statement wrong, and thought after queries of types '?' the whole graph gets reset back to initial and so was changing the cost to the initial minimum, guess I need English tuitions, LOL. But the basic idea of the question is just what you mentioned!

  • 38 hours ago, # ^ |

    Actually the answer is simply ∑ni=1Ai−N(N−1)/2+2M∑i=1nAi−N(N−1)/2+2M

2 days ago, # |

Why so many constructive problem in Div2.

2 days ago, # |

Testing of Div2A sucks...

2 days ago, # |

What the fuck was wrong with div 2a , i submitted exact correct same solution to get 3 times WA in a row, and now i see i all of them are correct after contest, i wasted 15 min on that crap problem ಠ_ಠ, could have gone to next problem.

2 days ago, # |

Rev. 2  

0

Is codechef prize still distributed?

  • 2 days ago, # ^ |

    Yes, the prize is very deeply disturbed.

  • 2 days ago, # ^ |

    They are only for D1 users now . Announcement section has update here
    link

2 days ago, # |

When will the remaining editorials be out ? . How to solve Slingshot problem (D1 E) ?

2 days ago, # |

Rev. 3  

+27

Tests in Tangling Tree seems to be weak. I've submitted small to large by merging large to small (which is essentially O(n2)O(n2)), but it still works in 0.11 code

UPD: here is the test generator

Спойлер
  • 45 hours ago, # ^ |

    Hi. Apologies for the weak test — I did check it against a solution that merge to any set (which is effectively your large to small) and realised it will pass, but it was quite late (it was prepared in a rush) and didn’t find a construction quickly so I left it.

    I figured it would not be so bad since no one who are able to code the whole thing would forget something like small to large. I was only very concerned about solutions that rebuild the whole set, since that enables a solution that does not implement reverse operation to pass.

    Anyways, I will investigate adding this test.

    • 38 hours ago, # ^ |

      You are absolutely right, for me the toughest part was actually maintaining O(1)O(1) reverse (I had a bug in idea too, but still).

43 hours ago, # |

In my humble opinion Codechef should reward atleast the top 50 Indian coders with something. These contests' previous prize structure was very very motivating for many emerging coders from India. Sad that it's changed now. Anyways, we can't question them obviously , it's their decision to make ..

42 hours ago, # |

When can we expect editorials for the remaining problems? (particularly D1E)

  • 33 hours ago, # ^ |

    Rev. 2  

    0

    Slingshot solution: O((nm)2)O((nm)2) dp would be to process cells in decreasing order: dpi,j=max(i′,j′)|Ai′,j′>Ai,j,|i′−i|+|j−j′|>SAi,j+dpi′,j′dpi,j=max(i′,j′)|Ai′,j′>Ai,j,|i′−i|+|j−j′|>SAi,j+dpi′,j′. We can speed up the transition to O(log(n))O(log(n)) by using a segment tree (supporting range max + point update) for each diagonal (4n-2 total), and updating dp values there accordingly.

    • 32 hours ago, # ^ |

      Can you please elaborate a bit? Thanks

      • 31 hour(s) ago, # ^ |

        Rev. 2  

        +6

        Sure! So the set of cells that are >S manhattan distance away from a cell forms a diamond. In the dp, we need to take a max of dp values of cells that are NOT in this diamond. This can be split in to 4 regions of contiguous diagonals (one from each corner).

        Picture

        Actually there are 2 types of diagonals, one indexed by x+yx+y, other by x−yx−y. The x−yx−y diagonals are parallel to the orange and blue lines; and x+yx+y to the purple and green.

        Process cells in decreasing order of A. Let dpsum[d]dpsum[d] be the maximum dp value over processed cells (x,y)(x,y) with x+y=dx+y=d. Let dpdif[d]dpdif[d] be the maximum dp value over processed cells (x,y)(x,y) with x−y=dx−y=d. The answer for cell (x,y) is

        Ax,y+max(maxd<x+y−S or d>x+y+S dpsum[d],maxd<x−y−S or d>x−y+S dpdif[d])Ax,y+max(maxd<x+y−Sord>x+y+Sdpsum[d],maxd<x−y−Sord>x−y+Sdpdif[d])

        When we get the answer for (x,y)(x,y) we set dpsum[x+y]dpsum[x+y] to max(dpsum[x+y],ans)max(dpsum[x+y],ans) and update dpdifdpdif similarly.

        We can compute these suffix/prefix maximums and update the dp in O(log(n))O(log(n)) with a segtree.

        Code: https://www.codechef.com/viewsolution/58784071

        • 30 hours ago, # ^ |

          Rev. 2  

          +8

          Thanks a lot! That's a great explanation. I couldn't find a way to query the remaining region.

40 hours ago, # |

rating update when??why so late?

35 hours ago, # |

Is Codechef Discuss down right now ? I get a 502 Bad Gateway notification.

34 hours ago, # |

why not ratting updated yet?

  • 32 hours ago, # ^ |

    Go to the section where all coders rating is shown rating has updated there.

14 hours ago, # |

The ratings have been updated for all. For users who were affected by the issue in PREFPERM, and who would have had their ratings decrease, we have made the contest unrated for them (ie. +0 rating change). There were 286 such users across all divisions.

  • 8 hours ago, # ^ |

    Thanks CodeChef_admin for this considerate decision. I spent almost an hour in trying to fix the solution for that problem, and I did not consider at all the likelihood that the reason for getting WA from the automatic judge would be an issue in the problem checker.

14 hours ago, # |

What is CodeChef? Is there anyone explain it to me?

  • 8 hours ago, # ^ |

    a chef who cooks code


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK