Vichitr's blog

By Vichitr, 2 months ago, In English

Hello Codeforces,
ICPC Amritapuri Regional will be hosting next team practice round on CodeDrills on Tuesday, 25th May 2021. There will be 5 problems to be solved in 2.5 hours.

Contest Details

Registration

  • You will need to create a team on the contest page in order to participate.
  • Team size can be upto 3.
  • While creating the team, add the registered emails of other users to invite them to join your team. They will get an invite email, ask them to accept.
  • For more details on team registration, refer this guide.

Note : Register your teams & accept invites before the start of the contest. This won't be allowed after contest starts!

Prizes

  • Cash prizes of INR 35000 for top 15 teams.
  • 1st Place — INR 5000
  • 2nd, 3rd Places — INR 4000 each
  • 4th, 5th, 6th Places — INR 3000 each
  • 7th, 8th, 9th, 10th Places — INR 2000 each
  • 11th, 12th, 13th, 14th, 15th Places — INR 1000 each
  • Only Indian participants are eligible for prizes but everyone can participate.
  • Prize money is per team.

Joining me on the problem setting panel are:

I would like to thank all of them for the round preparation. Along with them I would also like to thank

I hope you will enjoy solving the problems. Any feedback is appreciated after the contest.

Good Luck & Have Fun!
Hope to see you participating!!

UPDATES:

  • Contest is over. Thanks for great participation. Problems are public and available for practice now.
  • Submissions are also public. You can view others submissions from leaderboard.
  • Editorials are published for all problems except Alibaba and Thieves. View them on Editorial tab on the problem page.
  • If there are any doubts on the problems or solutions, ask them on this blog or on CodeDrills Discuss.
  • Editorial for Alibaba and Thieves is also published now.
 
 
 
 
  • Vote: I like it
  • +111
  • Vote: I do not like it

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

Reminder: please register/send/accept invites before contest starts as it won't be allowed after it starts.

Contest starts in 5:30 hours.

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

    Hey Vichitr I have registered on behalf my Team but one my Teammates has not received any invite mail yet , although there is showing invited Besides his id. This happens Every time to him . Any way to get out of this ?

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

      It seems there was an extra space in the teammate's email so the invite mail to your teammate kept bouncing. We have fixed the issue. Meanwhile, your teammate can also accept by directly visiting the team url.

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

The issue has been resolved.

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

I am not being able to register... The spinner keeps spinning.

Edit: The site does not mention what characters are permitted while creating a team name. I had to look into the dev tools to see that it doesn't include special characters.

I would like to request this feature to at least tell the users what are they doing wrong by prompt...

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

your website can't handle queue in first problem itself :(

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

At least you must provide a support during the contest where we can ask our queries related to the problems.

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

How to solve Alibaba and Thieves ? Also in horse and barns what is probability that a particular cell will be selected while randomly choosing k cells ? Will it be k/(n*m) ?

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

    For horse and barns problem: for your doubt, the number of ways of choosing k cells such that a particular cell is chosen is $$$\binom{N*M - 1}{K -1}$$$(check here to know about combinations) because we have the choice of choosing $$$K-1$$$ cells from $$$N*M-1$$$ cells. But it is not of much relevance here because we don't know if the particular cell we have chosen is the one with maximum distance.

    To make sure that the particular cell we have chosen is the maximum distance we restrict our choices only to those cells whose distance is are less than or equal to the one we chose and choose $$$K-1$$$ among those. That is what I have done in the editorial. There are other ways of counting the same thing.

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

      Why does the following idea fail?? Anyone who used this method and got it accepted?

      I used the idea to find the contribution of all cells of particular distance from barn. Let call the total number of cells with distance <= d as totalupto[d], then finding contribution of distance d is $$$totalupto[d] \choose k$$$-$$$totalupto[d-1] \choose k$$$.

      Therefore total answer is : $$${\sum_{d}contribution[d]*d}/{n*m \choose k}$$$

      Code for reference

      Update : Idea is correct, code is buggy.

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

        Hey this is also one of our tester's solution idea. We got AC on this idea. That same solution is there in Setter's Code 2 as well.

        Spoiler

        Here $$$df[i] =$$$ number of cells with distance $$$= i$$$.

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

          NEvermind, found the bug. In fact I made a blunder in my BFS loop itself. T_T

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

    Alibaba and Thieves: The idea is to iterate over the sorted list of time intervals in the increasing order of <end time,start time> and assign the earliest available time slot to steal the coin from the current range, if the earliest available slot is outside the current time range skip stealing from that box.

    You can check setter's code and tester's code for implementation.

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

      damn , I read we can move from one box to "next" one but it was to any other.

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

Resolved

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

    I don't know if this is the code you submitted, so many errors I see. There can be small mistakes here and there. Can you paste your complete code?

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

      It was problem with m = 0.

      It would be better if the full constraints of the problem are mentioned ':D.

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

        Isn't it mentioned $$$m <= n$$$. That means $$$m$$$ can be $$$0$$$ as well.

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

    if m=0 answer should be NO you are printing MAYBE ig.

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

A small request to bring in edit team feature, had to delete everytime for editing small details.

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

How to solve B? There is no editorial for it @ Vichitr

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

    You can sort the boxes array with increasing order of ending time and then greedily pick the boxes going from 1 to n by keeping track of the previous ending time and just adding the box if the previous ending time is strictly less than current starting time.

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

Alibaba and Thieves. This problem does not have any explanation in the editorial.

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

Can anyone please help me in Alibaba and Thieves. I was running the same algo mentioned in the editorial previously but with sorted according to <start time,end time> and was constantly getting WA. But after looking at the editorial sorting on the basis of <end time,start time> resolved the issue. Can anyone explain or give a counter example where sorting on the basis of <start time,end time> fails? I am not able to find the loop hole. Thanks

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

    I think it will fail on this:

    1
    3
    11 11
    11 13
    12 12
    

    You should first take the 1st coin, then the 3rd and then the 2nd, but by sorting <start time,end time> this way you will take only 1st and 2nd.

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

Any updates about the online preliminary round?

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

Vichitr deepa_panwar Seems like the site is down right now ? when can we expect it to be up for upsolving ?

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

In contest numbering of problems in scoreboard is not matching numbering on dashboard. Like problem number 2 of scoreboard Subarray MEX Sum corresponds to problem 5 in dashboard.

This created a lot of confusion as problem names were also not mentioned in the scoreboard.

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

TLDR; Why CodeDrills instead of CodeChef?


Indian ICPC Online regionals used to be organised with the help of CodeChef.com for quite a few years. But this time it has been decided to be held on a new platform CodeDrills.io launched just about an year back, to be specific on 25th March, 2020. But CodeDrills is not in any way better than CodeChef, then why such a change?
Codedrills lacks a number of basic features that can be used at majority of competitive programming websites. Talking about its UI/UX, its neither towards a minimalistic side as CodeForces nor towards a finished side as CodeChef, lies in a middle ground making it difficult to use and understand, it literally took 5 minutes for our team to see our rank during the contest :(. Using such a newly build platform for a prestigious contest seems a weird choice on the part of organisers. Their could be some unfortunate & unpredictable situations during the contest, is CodeDrills prepared for such bumps? Isn't CodeChef a better choice, which could have been tested for many of such unpleasant surprises. Why such abrupt changes? Possible answers:
  • First, it seems quite obvious to me, CodeDrills's team is led by Amrita University's graduates which leads to a internal bias in the organisers to favour their students to publicize their own university sacrificing the prestige of ICPC. :(:(
  • Second, organizing an ICPC online regional on CodeDrills, is expected to give it's user base a huge rise, which could not have been possible any other way, so may be there is an internal deal of organisers with CodeDrills for the same. (I understand it is an huge allegation, but still some one has to point it out.)
  • »
    »
    2 months ago, # ^ |
      Vote: I like it +46 Vote: I do not like it
    1. UI/UX — We got a lot of feedback saying the UI/UX is good. Let us know if anything in particular is painful, we will fix it. Those who have given constructive feedback to us in the past would know that we take it seriously and fix it quickly.
    2. Basic judge features -> such as? The site has all the basic features needed for a competitive coding contest. There are several more enhancements to the judge that would be good to have and we would be working on adding those but all basic features are present
    3. "is CodeDrills prepared for such bumps" -> We have hosted a lot of contests in the past year and have good experience handling any issues that come up. There were issues and we have resolved them during contest too — many of them so smoothly that users didn't even notice the bumps.
    4. Also CodeDrills was started in Aug 2019, and code-drills has been present for the last 4-5 years. It was not specifically started for ICPC if that's what you are trying to imply
    5. It's not the first time that a new judge has been used. E.g. they used Code Marshall for the Asia West Finals. Amrita also has held regionals on lots of new platforms over the years and it is still the most prestigious regionals in India. Experimentations and flexibility are important reasons why that is so.

    Regarding your "Possible answers" which are basically just conspiracy theories :)

    • I am an IIT Bombay graduate, and so is Balajiganapathi. Vichitr is NITK surathkal graduate. So this is just plain wrong. The setting team has a lot of setters from different colleges, including Amrita (The contests are organized by Amrita college, is it really surprising that their graduates would be involved in setting problems?)
    • Yes we are getting new users on CodeDrills but we already had a decent amount of users. Users didn't increase magically when Amrita announced ICPC would hosted on CodeDrills. It increased gradually with good contest rounds. There is just a bias but it's not completely true. We hold other types of contests too other than ICPC or competitive coding.
    • »
      »
      »
      2 months ago, # ^ |
      Rev. 4   Vote: I like it +19 Vote: I do not like it

      I want to suggest few things.

      1. Add some greenery to the Accepted verdict.Almost all OJs have it, and its beautiful and satisfying.

      2. Why need Javascript to load everything, the website gets very slow during heavy browser load or on weak PCs. The UI has a modern look to it indeed, but it would be cooler if its lightweight as well.

      3. Please dont use google as an authentication. Its buggy as hell.

      4. Introduce ratings. CP is fun only when there is rating and rank and colours.

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

        Thanks for the feedback. We will work on incorporating them:

        1. We have added greenary (and "redary" :P ) to the scoreboard. We will do that at other places too including submission history.
        2. It is a single page app so it is needed. The advantage of SPAs is that while slightly slower on first ever load, next loads are fast as only dynamic content needs to be fetched. This also reduces load on the server that would happen if we used SSR.
        3. You can directly login using email/password too besides Google auth
        4. Yes ratings are in the works! We wanted to get everything else correct first. We will soon be releasing public profiles and eventually ratings — probably soon after ICPC.If you have any ideas about the rating calculation system, let us know we are researching it. +1 for ratings, ranks and colours :)
        • »
          »
          »
          »
          »
          2 months ago, # ^ |
          Rev. 4   Vote: I like it +21 Vote: I do not like it

          Some more feedback regarding submissions for problems:

          1.After submitting a solution to problem show the process running on a different page like codeforces, codechef , atcoder ,spoj or any other major cp platforms.

          2.Add a submit button after clicking it we will go in a new page where we can submit the problem by copy paste or selecting file. Right now it's on main page of the task which make the page bar long -> not comfortable for reading the problem.

          3.Verdict will be given with some color with some single word like "AC", "Accepted" rather than "congratulations, you have solved the task".

          @Balajiganapathi

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

      Regarding your third point, there was a queue issue and judging was slow yesterday in the beginning with just 472 teams participating. How do we know if codedrills can handle the load in the online round when the number of teams will be 10x?

      Also, search is broken and there's no college/university filter. I had mentioned this six weeks ago too. I hope you realize how important it is to be able to search for teams on the basis of college in a contest where your college rank matters too, not just your overall place in the standings. And is there a way to check our rank during the contest apart from manually checking pages of the scoreboard?

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

        Hey we had built the search feature but seems we forgot to deploy it before the contest. We have deployed now. You can search by team name or college name on the scoreboard.

        Re. the queue issue, yes there was some queueing of submissions at the beginning of the contest. We will fix that issue. We are also running load tests to ensure the judge is able to handle the loads that is expected during quals round.

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

          Thanks for adding search! Out of curiosity, how are you running the load tests?

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

            We use k6 for loadtests. We found that the simplest to setup and run.

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

      Some of the letters on your website are unusually big.

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

        Can you let me know which ones are you talking about? Will take a look.

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

          [Hello, my name], status, problems ...

          I didn't saw such huge letters on websites. Maybe I am the only one who doesn't like it.

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

            Thanks for the feedback. We will check how that can be made better.

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

    Hey brother/sister,

    I think deepa_panwar has answered most of your questions and weird/false assumptions also. I dont have to say anything further there. Just adding few points here:

    1. As you can see Deepa has said how open CodeDrills is to constructive criticism and i have first hand seen how seriously those feedbacks are taken. Ex: Even before you said about the numbering of the problem, we already discussed about it yesterday and have decided the fix for it.

    2. You are plainly comparing CodeDrills with CF and CC which is fine but you have directly ignored the fact that both the sites have been there for more than a decade.

    3. This is a personal opinion here. If you really think that the things that you have mentioned are a problem that needs to addressed. It would be much more convincing if it came from a real person and not from a fake account created just hours ago just for this purpose. Have some guts bro/sis if you are right then no one can do anything to you.

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

    Hello 200ok,

    This is Maheshwara Chaitanya, RCD at Amrita for hosting ICPC. I have been organising this contest since 2007 when the participating number was 100-150 teams. Now it has been 3000+ and we are the world's largest ICPC site in terms of participation. I am not a crackpot to host a prestigious contest using a programme created by my own student. Also cautious while choosing a contest platform. Since you haven't mentioned any identity here, your post itself looks suspicious and without any base. I have been using at least 5 platforms in the last 13 years for hosting contests. If you have any constructive feedback, it would look genuine if you could prove yourself as a coder, your credentials openly and then criticise. I would also urge to read out the history of ICPC before posting such kind of comments in a platform like this.

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

deepa_panwar Vichitr

i am unable to see the submission from yesterday. it is showing me i am unable to see the submission of my team mates i am able to see the submission which are submitted by me

Tried a lot of accounts with GOOGLE AUTH. but every account show this :

NOT ALLOWED TO ACESS

i used google authorisation to sign in.

FIX IT PLEASE

Also give us update about how to claim prize money

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

    Have DM'ed you for more details about the issue.

    For prizes, we will run plagarism checks first then share the final winner list with Amrita by next week. They will contact the winners.

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

    Hi, it should be visible now. If still not, let us know.

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

      yeah now it's visible. thanksss

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

Hello Vichitr deepa_panwar, I have two doubts/issues:-

  1. How can we check the ranking of our team without going through each and every page?
  2. When we check for a particular submission/ particular team on the leaderboard filtered with college name and we click the back button, the page automatically takes us back to the first page of the leaderboard, which is unfiltered. I hope this issue is fixed :)
  • »
    »
    2 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it
    1. You can search for your team name on the search box. We are looking into how to make it easier by just displaying team rank on the top.
    2. We currently don't add the search term/page to the url so back won't work. You can ctrl-click to open any links in the new tab for now.
»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can someone plz explain how to solve the Subarray MEX Sum question I didn't understood the editorial.. Any help would be beneficial:)

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

I was taking part ICPC Amritapuri Practice Session #7 [Team Contest]
After contest I upsolve the 2nd problem than I see
solution of this team link is Accepted solution.
but at this Test case: output failed
1
3
1 2
1 2
1 2
Expected output: 2
output: 3

And many other cases the solution fail also.
please see his solution Vichitr,Ashishgup and All testers.
why so weak hidden test cases are?
  • »
    »
    2 months ago, # ^ |
    Rev. 2   Vote: I like it +6 Vote: I do not like it

    This was such a greedy problem! Setters and testers hand made test cases to fail 10+ greedies. Somehow this case was missed. Few more test cases has been added to the practice problem.

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

      Just to confirm, will our already submitted solutions be automatically run against those new test cases?

      Asking this because even our team had a wrong solution which showed accepted in the contest.

      Also, another side question -- approximately how many more practice sessions like this can we expect?

      • »
        »
        »
        »
        2 months ago, # ^ |
          Vote: I like it +8 Vote: I do not like it
        1. No. We won't rejudge already submitted solutions.
        2. No, this was the last practice round we planned for. There might be more rounds with old problems just for practice.
»
2 months ago, # |
  Vote: I like it +5 Vote: I do not like it

This and Alibaba and Thieves are exactly the same problems. Link
I feel this can be avoided in the future contests.
PS: Can't thank you guys enough for all the effort. But I genuinely think that there will be a queue issue during the main ICPC contest as there was an evident queue during this one with around 400 teams. Multiply this by 10 and the contest is totally ruined. Ramp up the servers ASAP or move the platform.
Vichitr Ashishgup

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

    Hi, this is always tried to avoid. Though sometimes it might be the case that its existing. Point taken. Hopefully no existing problem appears again.

    On the queue part, we are more cautious than you. We also strive to become a better platform. We would obviously load test with more load than what we are expecting. Ramping up the servers is a quick job for us. This shouldn't be an issue hopefully.

»
2 months ago, # |
  Vote: I like it -18 Vote: I do not like it

Since you have given editor, therefore, it would be good if we can divide the screen in two parts one for editor and other for problems (just like hackerrank). If we are using editor then it is hard to scroll every time to see the problem.

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

This ICPC is slowly becoming a joke. When will the date for online qualification contest will be announced?

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

    a lot of my seniors gave up on this year icpc, just because of the pathetic management from icpc coordinators, i hope they know we also have things like placements, internships final exam, i don't know whats taking them so long, we can't just sit here waiting for icpc.

    at this rate this year icpc will coincide with next year icpc

    anandoham

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

    Typical indian stuff... Delayed, Denied, Injustice

    but seriously wtf im thinking about those who are working somewhere now, how will they give icpc now, sitting from their cubicle lmao

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

deepa_panwar Vichitr

when we will get our prize money....??

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

    Hey dude, prize money is taken care by Amrita. For any queries regarding prizes, please reach out to icpc@am.amrita.edu

    As far as I know, it would take few months to process it.

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

Please have a look at this: https://icpc.global/regionals/finder/Asia-Amritapuri-First-Round-2020. It says the preliminary round is on 4 July 2021, but no information about it is given on the amrita website. Kindly confirm this date as soon as possible.

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

    I think that's the date for Regional, not preliminary

    No one from Amrita Uni seems to even reply, the mail they give is just a gimmick there is no one even checking the mails

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

    Yes, please confirm the date(s) of the Online Round (as well as regional, if the dates are announced)