mohit_jx64's blog

By mohit_jx64, history, 15 months ago, In English

Hello, Codeforces ( ^_^)/

Warm and friendly greetings from FooBar (Competitive Programming Club), IIIT-Delhi.

We have a variety of coding events hosted under our annual technical Fest — Esya'23 and are glad to extend an invitation for your participation.

The details for the events are as follows:

  • ProTrio [Registration Link]:
    • ICPC-style coding contest
    • Eligibility: College Students | Team Size: 1-3 members (same college)
    • Stages: preliminary (online) and final round (on-site)
    • Prizes: worth ₹40,000
  • ProCon Junior [Registration Link]:
    • IOI-style coding contest
    • Eligibility: High School Students | Team Size: Individual
    • Stages: preliminary (online) and final round (on-site)
    • Prizes: Multiple Bonus Points for IIIT-D admissions (each point ≡ 1 percentile jump in the JEE Main Score)
  • ProSort Euler [Registration Link]:
    • Math-based coding contest
    • Eligibility: Open to all | Team Size: 1-2 members
    • Stages: one final round (online)
    • Prizes: worth ₹25,000

Important Dates:

Registration deadlines:

Contest timings:

Note:

  • Further details can be found here.

  • Contest links will be shared with your registered email IDs.

Problems in these events are collectively authored and tested by kunalsrv20, Artemistic, shiv_codegen, deepcpp, BlackPanther112358, haajihaa2508, ojus_single and me.

Good luck, and hope you enjoy the contests! (。◕‿◕。)

Updates:

  • Preliminary rounds for ProTrio and ProCon Jr. will be held on Codedrills. Contest links will be shared on the registered email addresses. Late registration requests will be difficult to deal with so please make sure you've registered on Unstop before the due date.
  • ProTrio-Prelims-Contest-Link & ProCon-Jr-Contest-Link both contests are public.
  • ProTrio-Prelims-Editorial
  • ProTrio Prize Distribution for the Preliminary round:

Rank Team Name University Prize Distribution
1 skillIssu IIT Delhi Rs. 2500/-
2 728752-UC6313NG IIIT Hyderabad Rs. 1500/-
3 fightFight IIIT Hyderabad Rs. 1500/-
4 728752-UZP479L8 IIT Delhi Rs. 1000/-
5 728752-URN708B7 IIT BHU Rs. 1000/-
  • Top 51 teams have been invited on-site for the final round of ProTrio, where the top 5 teams will receive cash prizes, and the next 5 teams will receive goodies. (Invite emails have been sent)
  • Vote: I like it
  • +69
  • Vote: I do not like it

| Write comment?
»
15 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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

»
15 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Saying as a setter and a tester, you will enjoy the contest └(・。・)┘

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

    why is there discrimination against droppers in procon junior? downvoted every one of u

»
15 months ago, # |
  Vote: I like it +21 Vote: I do not like it

As a setter and tester, I'm definitely sure that you'll AKA the contest. :))

»
15 months ago, # |
  Vote: I like it +10 Vote: I do not like it

As a setter, the problemsets were fun to work on and I'm sure you will enjoy the events :) Good luck!

»
15 months ago, # |
  Vote: I like it +16 Vote: I do not like it

As somebody who has both participated and organised Prosorts and other events at Foobar, I can say that you should definitely give it a try.

»
15 months ago, # |
  Vote: I like it +5 Vote: I do not like it

As a setter and tester, it is highly likely that you will enjoy the Bugaboos :)

»
15 months ago, # |
  Vote: I like it +13 Vote: I do not like it
»
15 months ago, # |
  Vote: I like it +2 Vote: I do not like it

ProSort Euler doesn't allow students from different colleges?

  • »
    »
    15 months ago, # ^ |
    Rev. 2   Vote: I like it +6 Vote: I do not like it

    ProSort Euler does not have any such constraints. It is open to all.

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

      On Unstop it's not allowing to do so :(

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

        Fixed, should work now.

        • »
          »
          »
          »
          »
          15 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I'm not sure if I'm doing something wrong but it still says that we should be from same organization.

»
15 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Hey! Will the prelims be on codeforces? Also, can you provide us with the old archives?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can I join protrio solo? I don't have friends who know programming (even syntax ... forget about logic)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

mohit_jx64 On the coderills page for the protrio contest it says Please make sure you login and verify your team before the contest .. So how to do this step ???

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

    You don't need to do anything. We will be registering your team from our end and you'll receive contest invitation.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

pardon me if its a dumb question.

i am participating first time in any online team coding contest

can you tell . if there are any rules about how the team should collaborate

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

    No rules, You are free to discuss and search on internet!

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

      Free to discuss *(with your team members only) XD

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
15 months ago, # |
  Vote: I like it +10 Vote: I do not like it

As a setter and tester, you will solve all problems in first try :)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to find the sizes of connected components in xor 3?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can anyone tell the logic for Typewriter Game ..

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

    Google "Optimal Cache Replacement Policy"

    • »
      »
      »
      15 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Yes, that was the main intuition of the greedy.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      but will the time limit not be O(n*k) in that case also

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

        Maintain your cache (aka keyboard in problem's words) as a set of pairs $$$(\text{next occurrence of value}, \text{value})$$$, you need to make $$$O(1)$$$ changes to this set every step. Submission Link

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

        The greedy idea is to keep filling up your 'cache' with characters until you hit size $$$k$$$. Now when you need to remove something from your cache you remove the character who's next occurrence is the furthest away from your current position.

        You can pre-process the next occurrence of every character in $$$O(n)$$$, and you can maintain the current state of the cache in a set, say pair {next_occurrence, a[i]}. Simulating the entire sequence is now $$$O(nlog(k))$$$.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How many team will be selected for the onsite round?

»
15 months ago, # |
  Vote: I like it +19 Vote: I do not like it

We cheesed typewriter with an unintended solution. I wrote a greedy which always chooses to replace the least frequent character. My teammate wrote a greedy which always chooses the furthest character. Both of these individually give WA. But taking the min of the answers produced by both greeds passed

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

    Taking min frequency will give you WA. We have a test case for that. The intended solution is to take the farthest one.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yaa I wrote the min one and get wrong answer at testcase 10

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it is indeed the optimal solution

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Farthest character should work. Typical OS page fault minimisation algorithm.

»
15 months ago, # |
Rev. 2   Vote: I like it +33 Vote: I do not like it

What were the intended solutions for A and second part of C? I have a feeling mine were different.

For A, I maintained a frequency table (stored as an std::map<int, int>) for each paranthesis depth. When opening a parenthesis of depth $$$d$$$ just add its color to the $$$d$$$-th frequency table.

When closing a parenthesis of depth $$$d$$$,

  • Answer for this parenthesis is the size of this frequency table.
  • Merge the $$$d$$$-th table into the $$$(d - 1)$$$-th, and clear the $$$d$$$-th table.

By using small-to-large merging you can do merges in $$$O(n \log^2 n)$$$.

For C, I just spammed FWHT thrice. Was the intended solution to use that there are at most $$$\sqrt n$$$ distinct values?

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

    A was intended to be solved using small-to-large merging, by constructing a tree from the parentheses. Although A could also be solved by mo's algorithm in $$$O(n \sqrt n)$$$.

    And yes for C the intended solution was to use $$$\sqrt n$$$ distinct values, so the final complexity would be $$$O(n \sqrt n)$$$. I'm not familiar with FWHT though...

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      And here I was trying to use recursion, when will you upload editorial?

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

        Will post it soon, most probably in the comment section of this blog.

    • »
      »
      »
      15 months ago, # ^ |
      Rev. 2   Vote: I like it +36 Vote: I do not like it

      A can be done using segment tree also. Iterate over the indices of the string, maintain the first index after current index for every color. Then the problem reduces down to range sum, index update queries for a total of O(nlogn) time.

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

      I solved with MO's :)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

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

will there be no prizes for the offlne onsite round of pro trio??

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm not sure what prizes you are talking about! But it's mentioned in the blog that top 5 teams in the finals will receive cash prize and next 5 will receive goodies. The prizes for preliminary round and final round are separate.

»
15 months ago, # |
  Vote: I like it +26 Vote: I do not like it

But among top 50, only 11 team are from delhi.

aren't 11 teams too less. considering its IIIT delhi and there were 250+ teams registered.

( or I don't know maybe you guys have travel arrangement for outside delhi team, in that case my bad)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you check why our solution was giving runtime error on test case 4.

Submission link: https://codedrills.io/submissions/749386

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

    Hi Quick-One, thanks for pointing this out. We checked your submission and found there was a slight error with the test case due to which Python and Java codes can give runtime error on 4th testcase. We have rectified the same and re-judged all the submissions for the Problem : GCD Faceoff. Updated standings are also now visible here.

    There were 2 teams who faced this issue including you. I want to sincerely apologize for any inconvenience and frustration this may have caused you. To accommodate these changes in the standings, Top 51 teams will be now invited on-site for the final round of ProTrio, where the top 5 teams will receive cash prizes, and the next 5 teams will receive goodies.

    If you still have any concerns or questions, please do not hesitate to reach out to us. Thank you for your understanding, and we appreciate your support.

»
15 months ago, # |
  Vote: I like it +2 Vote: I do not like it

Editorial plzz Mohit bhaya

»
15 months ago, # |
Rev. 3   Vote: I like it +13 Vote: I do not like it

ProTrio Preliminary Contest Editorial

Problem A Colorful Parenthesis

Author: kunalsrv20

Intended Solution
Alternatives
Code (Intended)
Code (Using Mo's algorithm)

Problem B GCD FaceOff

Author: haajihaa2508

Solution
Code

Problem C XOR 3

Author: mohit_jx64

Solution
Code

Problem D A Grid is a Grid is a Grid

Author: ojus_single

Solution
Code

Problem E Typewriter Game

Author: shiv_codegen

Solution
Code