SkyWalkerPS's blog

By SkyWalkerPS, history, 21 month(s) ago, In English

Hello World!

Whether you're a beginner, a pro, or somewhere in between, Coding is always for everyone. No //comments about it, so let’s spice things up with a coding contest. Coding Club NIT Silchar brings you Code Cauldron — Brew Your Code under the flag of our coding week TownHall, to develop your coding, real problem-solving abilities, and experience worth remembering.

The coding competition is open to all undergraduate programmers in India, although everyone is encouraged to participate in it. Top 3 teams will be eligible for prizes, from prize pool of 6K.

Rules:

  • A team of 1-3 members from the same college is required to participate in the contest.

  • Each team member must fill the g-form attached with the post, failure to do so will result in the team's disqualification.

  • A team must be created in Codeforces comprising of the members.

  • Each participant must have a Codeforces account.

Registration and Contest Link:

Click on this link to register yourselves. You won't be considered an official participant if you don't register here. You also have to register in the Codeforces contest for taking part.

https://forms.gle/Pts8GmzDWTd6UGMB6

Contest Time: 24th March 2023 at 21:00 IST.

Contest Link:

Click on the link below to take part in the contest. Registration for the contest will start 6 hours before the contest.

https://mirror.codeforces.com/contestInvitation/cac71a7a24a6d0ad11bfc282604d10312473d1f0

Upd: Registration on Codeforces has been started. Do it asap.

Upd: Author's solution for Problem A was wrong. Sorry for the inconvenience caused, We will announce the results after rejudging all the submissions. Thank you.

  • Vote: I like it
  • -6
  • Vote: I do not like it

| Write comment?
»
21 month(s) ago, # |
  Vote: I like it +17 Vote: I do not like it

Excited for the contest!

»
21 month(s) ago, # |
  Vote: I like it +17 Vote: I do not like it

Fingers crossed!

»
21 month(s) ago, # |
  Vote: I like it +14 Vote: I do not like it

Best of luck to all the participants!

»
21 month(s) ago, # |
  Vote: I like it +14 Vote: I do not like it

Very much excited for the contest.

»
21 month(s) ago, # |
  Vote: I like it +14 Vote: I do not like it

Excited!!

»
21 month(s) ago, # |
  Vote: I like it +17 Vote: I do not like it

Excited!!!

»
21 month(s) ago, # |
  Vote: I like it +11 Vote: I do not like it

Auto comment: topic has been updated by SkyWalkerPS (previous revision, new revision, compare).

»
21 month(s) ago, # |
  Vote: I like it +11 Vote: I do not like it

Very much excited!

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

Is registration in Google form necessary for the prize

»
21 month(s) ago, # |
  Vote: I like it +5 Vote: I do not like it

Excited!!

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

All members have to fill the google form ? SkyWalkerPS

»
21 month(s) ago, # |
  Vote: I like it +39 Vote: I do not like it

Is the model solution of A correct?

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve B ?

Can anyone please share their submission, it's not visible rn.

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same question. Is there some standard technique to calculate nCr mod p where n,r if of the order of 1e6 and p is not prime of order 1e9?

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
  • »
    »
    21 month(s) ago, # ^ |
    Rev. 2   Vote: I like it +25 Vote: I do not like it

    First of all answer for $$$i$$$ heads is $$$n \choose i$$$. You can write it as $$$\frac{n!}{i! \cdot (n-i)!}$$$. Now our idea was to prime factorize it. So we move from $$$i=0$$$ to $$$n$$$ and maintain the track of power of all prime numbers till $$$n$$$. You can use segment tree to calculate the product of all elements after each update.

    Submission

    • »
      »
      »
      21 month(s) ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I like your idea, thanks. I think it can be used in general too.

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    cp-algo describes a method using CRT which probably isn't too hard to implement.
    In practice, if you have internet access the fastest way is to just take code from yosupo.

»
21 month(s) ago, # |
  Vote: I like it +15 Vote: I do not like it

H is pretty much a direct copy of this problem, down to the wording used :(
It's minimum instead of maximum but that isn't a meaningful difference.

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by SkyWalkerPS (previous revision, new revision, compare).

»
21 month(s) ago, # |
  Vote: I like it +7 Vote: I do not like it

piyusheverhard please share your A?

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

A was dp or did i miss something?

»
21 month(s) ago, # |
  Vote: I like it +31 Vote: I do not like it

Thanks a lot for wasting everyone's 2 hours. spent the whole contest trying to debug A :)

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Same here!

    We should have moved to G but ended up wasting our time on A.

  • »
    »
    21 month(s) ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I wrote a naive solution. I was sure that the model solution was incorrect. I even made a clarification but received no response.

»
21 month(s) ago, # |
  Vote: I like it +13 Vote: I do not like it

"Sorry for the inconvenience caused" — Yeah no problem, We only spent half the contest trying to see what's wrong with our A, not like it would've changed the standings much...

»
21 month(s) ago, # |
  Vote: I like it +3 Vote: I do not like it
»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

is D dp?

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

AC solution of B is giving a compilation error on my system. In line 108, 1i is written (I copied the template), and that is probably causing the error. Is it because of a lower version of C++ installed on my system or is there some other issue?