CaptainUknown's blog

By CaptainUknown, history, 8 months ago, In English

Hello everyone!

We are happy to invite you to participate in the International Coding League, 2024, conducted by the students of BITS Pilani, one of the flagship events of our technical fest APOGEE.

This will be a team programming contest and the duration of the contest will be 2 hours.

Note: Contest Registration on Codeforces will start 6 hours before the contest, in the meantime you can fill out the registration form provided above.

Both rounds of the contest will be held on Codeforces, and would be in teams of 1 or 2. The prize pool for the online round is INR 17000 (5K + 3K + 2K + 7 * 1K). To be eligible for these prizes (and to participate in the next round), teams must fill the registration form.

The Top 25 teams in this round along with 15 teams from BITS Pilani would qualify to the second round, which would be held offline at BITS Pilani, Pilani campus on 6th April, 2024. The prize pool for the offline round is INR 30000 (15K + 10K + 5K).

The problem setters and testers are: CaptainUknown, AAK, SiRBruce, Lakshit_Sethi, devk27, nya and Bhaskar1702.

We hope you enjoy the contest and have fun!

Happy Coding! :)

Reminder 1 : ICL Round 1 is scheduled for 8 PM IST on 26th March 2024. Do not forget to fill out the registration form to be eligible for the prizes! Registration on Codeforces will begin 6 hours before the contest.

UPD1 : Registrations for the contest have started on Codeforces. You can make your team and register for the contest now!

UPD2 : Contest Starting in 1 Hour !

UPD3 : Contest is Live!!! All the Best!

UPD4 : Congratulations to all the winners, and thank you to all participants! We will be contacting the winners for the prizes shortly.

UPD5 : We are addressing all the issues.

  • Vote: I like it
  • +68
  • Vote: I do not like it

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

Everyone do take part

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

Can non-Indian win prize?

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

    Will update you on this by tomorrow!

    UPD1 — Yes, Non-Indians will be able to get the prizes in the online round. You will have to fill out the registration form to be eligible.

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

Is it necessary for the team members to be from the same college or university?

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

    No it is not necessary for the team members to be from the same university.

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

Number of questions and difficulty is like div 2 ??

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

    Difficulty of Round 1 will be near to a Div 2, there will be 7-8 questions.

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

loved last year's ICL, really looking forward to this!

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

can't wait to take part in ICL this year too!!!

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

my friend ahmadexe is unable to actually open the contest page. I registered him as a team member on google form. What is wrong?

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

    This should not be happening, maybe try again some time later.

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

      this is what my teammate is getting

       here's a screenshot of it as well. I have no idea what's wrong. Edit: the link of image isn't working. Here's a direct link:

      https://ibb.co/P4cvpfC do we need to re-register or something?

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

        Make sure they click the invitation link and not just enter the contest link directly

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

Where will the contest link be available?

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

    Contest Link is on the post, Registrations will go live on Codeforces 6 hours before the contest, meanwhile you can fill out the registration form to be eligible for the prizes!

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

is in sorted order?

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

how to c? I tried this but din't work:

conversion will start from smallest, so out target color is c[min(a)] if their are already same color as c[min(a)], we ignore it. otherwise we increase the cost. cost — k is the answer

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

    if you get it pls share i was stuck at c too similar approach

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

F was a bit standard i guess :)

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

Question G1 on AtCoder would be like:

Count number of connected labelled graphs with $$$n$$$ nodes.

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

Why this approach for C is wrong ?

Find the smallest number in array A, then find the maximum frequency of b[i] where a[i]=min element, then answer is max(0, n-freq[col[b[i]] — k)

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

Does the solution of G2 involve convolution?

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

G1 and G2 here

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

What is so special about D? I see many people couldn't do it from first try, and we also failed it.

I did - searching the best root to minimise the largest leaf depth - hanging the tree to it - for each node now, res += depth[node] / 2 * population[node]

Is the idea wrong or I just implemented it poorly?..

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

    Try this for 1-2-3 tree, the correct root to hang on is 1.

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

      Hell..

      Ok, seems legit :) I didn't think that I might take larger depth without affecting the time, but seems I can take D + 1 preserving the same time.

      Thank you

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

I just had a question regarding C problem for the test case

1

8 4

1 2 3 3 3 3 3 3

1 2 3 3 3 4 4 4

here the answer that got accepted for problem is 1, however if we look at the case where the value is 1 it is when ball with a[i]=3 and colour[i]=3, however it is not possible to colour all the balls '3' since even if i remove the balls with index=0,1,5,6 i will have a ball left with a[7]=3 and colour[7]=4, which is not colourable since a[i]<a[j] is not met. I was wondering if there is something that I am missing?

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

    I believe the test cases are made such that answer is always possible so this type of test cases won't be there

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

      The answer is possible for this testcase also it will be 3

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

        Then its just weak tests :)

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

    this bothered me in the contest and I came up with that we should always start from first k a_i such that freq of that is maximum. I did this but I got wrong answer.

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

Can anyone please tell why my code for B gives WA on test 2 or find a countercase, i ran several stresses on my solution and it couldn't find any countercase.

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

    I just added assertions and turns out that the condition $$$e_i < s_{i+1}$$$ is giving runtime error on test 2. RIP :(

    CaptainUknown please check the testcases.

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

was E a dp problem?

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

Has anyone passed $$$O(N^2 \cdot M^2 \cdot (N + M))$$$ in [problem:105039E]?

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

    Yes

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

      How did you take care of TLE in test 16? Also, your accepted solution takes 951 ms. Either this is not the intended solution or the time limit is too tight.

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

        Yeah initially I also got tle on 16 , when you calculate prefix sum cache it also .

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

Please upload editorial

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

Please upload editorial

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

How can i solve Tree Disaster ( Problem D ) , i tried to take the mid point of the diameter but it gave WA 2 ?

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

    There could be multiple diameters and hence multiple mid-points, you need to take the one with least index

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

luckily win this as a team with only myself, is there an official scoreboard and how would you transfer the prize?