GoatTamer's blog

By GoatTamer, 2 years ago, In English

Hello Codeforces!

Computer Club, MNNIT Allahabad, India is glad to invite you to the annual programming competition of MNNIT, INSOMNIA, which is an ACM-ICPC style team programming contest of 2.5 hours duration held on Codeforces during its annual technical fest Avishkar. The team can consist up to 3 members.

Contest Details:

  1. Qualifiers:
    • Start Time: Wednesday, November 9, 21:00 IST
    • Duration: 2.5 hours
  2. Finals:
    • Start Time: Sunday, November 13, 12:00 IST
    • Duration: 2.5 hours

Top 25 global teams, and Top 25 teams from MNNIT (based on the result of Qualifiers) will qualify to the Finals. The prize distribution for global teams is mentioned below:

Teams consisting of MNNIT students only will be eligible for a seperate prize pool.

Register your team for the qualifiers here: https://forms.gle/BKsbKfoGzSxC394R8
Also self-register your team directly on codeforces: https://codeforces.me/contestInvitation/a08a3cd920019089aec1f1492b88bbb3f76a478d

Problem setters: GoatTamer, Electron, Invincible06, Prat21, Rook_Lift, karimulla1098, lokesh_2052.
Testers: Aur_Batao, satyam343.

We have an exciting problemset awaiting you. Good luck and have fun!

UPD: The Finals will be open for all to participate, but you will be eligible for prizes only if you have qualified through the previous round. (Qualified teams will be sent an email for confirmation and as a reminder to register). Finals link: https://codeforces.me/contestInvitation/fba84689837b1330fca8c746fe64af017d523fb6

UPD: Hope you guys enjoyed both the sets. Here are the official winners of the finals:

Global teams:
1. amigos (ritikmital, rishabnahar2025, gupta_nitin)
2. BforBruteForce (beedle, DrearyJoke, Yomapeed)
3. Angeethi_Lovers (AwakeAnay, TimeWarp101, ShivanshJ)

Shoutout to YouKn0wWho for solo-grabbing the $$$3^{rd}$$$ spot in the Finals.

MNNIT Teams:
1. White (aadiitya, lucifer223, Aditya.Rai)
2. MeowTourist (RedDaisy, Invinc3, _NICkk)
3. Crush_Ki_Smile ::uwu:: (Just_a_n00b, krishnaaa2303, Till_my_Death)

Editorial:

Qualifiers
Finals
  • Vote: I like it
  • +67
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
  Vote: I like it -13 Vote: I do not like it

A blue announcing the contest, must be mid

»
2 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Goat's contest is what I read.Hoping to have a good experience. :)

»
2 years ago, # |
  Vote: I like it +24 Vote: I do not like it

Bakri round :0

»
2 years ago, # |
  Vote: I like it +11 Vote: I do not like it

NIT allahabad Contest orz

»
2 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Blue contest, must be easy

»
2 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Registrations have opened. Don't forget to register your team on the contest link well before the contest begins: https://codeforces.me/contestInvitation/a08a3cd920019089aec1f1492b88bbb3f76a478d

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

First link (external one) doesn't work for me :(

UPD: Now it works.

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

How many problems will be there and, what is the expected difficulty of the round?

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

    Qualifiers will be a Div3-ish set, Finals will be a Div2-ish set.

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

      damn if this will be a div 3 round I'll be more than happy to participate unofficially in it XD!!

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

        I had meant it as in if an X rated person can full-solve a Div3 set in Y minutes, a team of 3 X rated people could full-solve this set in Y minutes. Also, Im sure it would be easier if the problems were ordered like a cf-style round.

        definitely not coping the fact that I underestimated difficulty of set

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

is there any penalty for a wrong submission

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

    I think there would be penalty of 10-20mins for each wrong submission.

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

    Its ICPC style contest, binary scoring and 20 minutes penalty per rejected submission

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

How to solve A?

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

    Editorial will be available soon, here is the brief description:

    I am basically counting the number of pairs (i, j) such that the final condition is satisfied. For this I am traversing the tree in depth first order and maintaing an array of hashes from root to current node.

    Now, for each node we can simply do a binary search on this array of hashes to calculate the up_node (the node till which a matching occurs with the prefix of the given string).

    Now, we can use this up_node value to kind of calculate the count of 'j' for each 'i'.

    Now, there is possibility of overcounting, so I am using small to large merging to eliminate it.

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

Definitely harder than div3-ish. Overall the problems were quite good. Was MO's the intended solution for G?

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

    You could answer the queries offline which would allow you to get by with a Fenwick tree

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

      Deleted

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

        uh, just ascending order of queries should be fine, this would allow you to scan the array from left to right and maintain frequencies in a fenwick tree. Mo's was not required at all.

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

    You can use a standard trick if you are given offline queries of type l, r, x where you have to find number of elements greater than x in range l, r. You can form events which consists of either {a[i], i} or {x, query_id} and sort it on the basis of the first element. Now when you encounter the event {a[i], i} just update the position i in a fenwick tree with 1. So for each query you just need to count the number of 1's in the range (basically the sum).

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

      Yeah that makes sense. I overcomplicated it. Thanks

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

    if you are interesting in seeing impl using merge sort tree, check my submission link

    I hope you can ignore 200 lines of irrelevant template.

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

Is there a solution for D that does not require 140 lines of code? :) I spent 1 hour debugging it :)

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

    You could observe that for any number $$$n$$$ ending with 9, the xor of (xor of all digits) from $$$[1,n]$$$ is either (1^2^3^4^..^9), or 0.

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

    I solved it using digit dp

    c++ code
  • »
    »
    2 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    For any 10 numbers starting from *0 to *9 the xor of all digits is 1. Use this observation .

    Code

    Ranges smaller than 20 can be handled by brute force to avoid any corner case.

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

Editorial?

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

How can i get the solutions of contest problems??

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

    All submissions should be public, editorial will be uploaded after Finals is done.

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

Where can we see more details about final round?

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

    The final Round is scheduled on 13th Nov, 12 PM (IST); we will mail the test link and other details to qualified teams. Still, if you have any doubts, you can dm me

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

Insomnia = Dreamcatcher//>?

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

    I don't watch Japanese children's cartoon shows and comic books or Korean children's music bands

»
2 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Due to unavoidable circumstances, the contest is delayed by 15 mins. Sorry for inconvenience.

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

Enjoyed the contest!

»
2 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Please make submissions public

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

    Submissions have been made public, you can also view failed cases of submissions.

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

Problem B Treely in finals was proposed by an author in HackerEarth for hiring challenges creation, I only tested that problem. I think that is a violation of the rules for a contest.

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

    Seems like a notorious coincidence.

    I assure you all problems that appeared in the sets was originally created and prepared by the problemsetters.

    That aside, how can one even search for a problem that has not even appeared in a contest, and was in testing phase as I gather from your comment.

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

When will the editorial of the finals be released?

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

    They will be released by end of day today

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

      Still no editorial?

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

        Sorry for the delay, editorials for most of the problems have been added to the blog, will try to catch em all soon enough.

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

In Code for Probablity Tree, in small to large merging dfs, shouldn't the first element of pair be depth of upNode instead of upNode itself, taking in consideration the way its being iterated and being break out of loop.