Vichitr's blog

By Vichitr, history, 3 years ago, In English

Hello Codeforces,
ICPC Amritapuri Regional will be hosting next team practice round on CodeDrills on Sunday, 14th March 2021. There will be 4 or 5 problems to be solved in 1.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.

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

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

UPD1: We intend not to penalize compilation errors. Penalties shown on leaderboard are not final. We will recalculate scoreboard after the contest to remove compilation error penalties!
UPD2: Issue with the scoreboard is fixed now! Thanks for participating!
UPD3: All problems are public & available for practice! Submissions are also public now! Check others accepted solutions on leaderboard page.

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

| Write comment?
»
3 years ago, # |
Rev. 2   Vote: I like it +22 Vote: I do not like it

Is it possible to have contest format similar to the preliminary round i.e. duration of the contest is 2.5 hrs.

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

    Thanks for the suggestion, darklight13! We are planning to keep next team contest for 2.5 hours!

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

      Can you please reduce the penalty time, 20 minutes is too much I guess?

      And also in previous contest I wasn't able to see my teammate's submissions, please fix it!

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

        The 20 minutes penalty is standard ICPC rule. We are planning to reduce the penalty in individual contests however.

        We are working on showing teammates' submissions too.

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

          Sorry to ask but by teammates, u mean AC code of different teams right?

          If not so, then can u allow us to view AC submissions of different teams, that might really be helpful.

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

            Yes we are working on showing solutions of everyone after contest.

            We are also working on showing an user's team mates solutions during the contest too for easier collaboration.

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

            You can now check AC submissions on the scoreboard starting from last contest.

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

              Can you also fix search (top-right) in scoreboard? It doesn't seem to work.

»
3 years ago, # |
  Vote: I like it +7 Vote: I do not like it

Hi! CodeDrills is looking for problem setters! Anyone interested can send a personal message on codeforces to either me or Balajiganapathi.

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

    Hi guys! First of all, thanks for showing your interest! I'm getting this error on CF while trying to reply -> You exceeded your daily quota of 4 distinct recipients. I will slowly reach out to everyone when I'm able to!

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

Reminder to register your teams if you haven't done yet. It(Creating, modifying or accepting invites) wont be allowed after the contest starts!

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

    feedback: In ICPC, compilation error is not counted. But it is weird that you are counting compilation error for penalty which imo is bad (and more weird that language is only shown as C++ and not specific version if you want to penalise compilation errors).

    Anyways, I hope you will fix it soon and it is not deliberate.

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

Aren't the problems too standard ?? How they are meant for ICPC training?

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

    Hi, thanks for the feedback.

    The aim of the practice sessions are to test how the platform is handling the load as well as to give a chance to users to become familiar with the site. The earlier plan was to hold such contests with previous year's problems. But we decided we will rather keep original problems so that the contest is interesting (shoutout to our admin Vichitr for making sure there are original problems each contest despite the short timespan). We will try to come up with more non-standard problems for the next contest — but we will be reserving the best problems for the actual ICPC contests :)

    PS: If someone is interested in setting problems for future practice and beta contests, please contact me or Vichitr.

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

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

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

A suggestion : -Platform was not loading properly in first few minutes , remember that in actual competition number will be a lot more.

-Please make contest in format similar to icpc (same duration and around same number of problems with difficulty).

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

    We will fix the load issue that occurred in the first few minutes. We are planning to keep the next contest more similar to online rounds including number and type of problems.

»
3 years ago, # |
  Vote: I like it +38 Vote: I do not like it

I use sublime text, and there I use these keywords for file IO.

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

When I submit on any online judge such as code forces or codechef, it automatically ignores these lines because of the ONLINE_JUDGE flag. Whereas in code drills, I always have to comment on these lines before submitting. It's annoying, and since it shows a Wrong Answer verdict, it will be counted as a penalty. So, please try to do something about it, if possible.

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

    Great idea, we will add it. Please take a look here and let us know in case any other flags and configs are required.

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

    I think changing your own build script to include your symbolic constant would be a better thing to do. That way, you can submit it on any site without having to worry about file IO being accidentally used. Just modify your build script to something like this :

    g++ -O2 -std=c++17 -DJaydeep999997 file.cpp

    And use #ifdef Jaydeep999997 instead of #ifndef ONLINE_JUDGE

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

I made two submissions on two different solutions. With these pragmans -
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
On "Queries on Tree" these pragmans gave runtime error.
On "Construct Weighted Tree" these pragmans passed without any issues.
Commenting out this line on "Queries on Tree" passes without any issues.

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

    Also Codechef and Codeforces share exact commands they use on their judging servers. If would be helpful if codedrills can also list something similar. One can locally mimic online judge's version.

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

When will I be able to see other participant's submission?

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

In Problem C, why is this idea wrong (it gave TLE)

For a given tree, find the diameter. Then both ends of the diameter are leaves. Then we can find the parent of both leavesusing the necessary and sufficient condition that if $$$A$$$ is leaf and $$$B$$$ is parent and edges are non-negative then for every vertex $$$C$$$, $$$d(A, C) = d(A, B) +d(B, C) $$$

Then we can remove these two leaves and solve it recursively. Base case of $$$1$$$ and $$$2$$$ vertices are handled separately.

»
3 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Is it possible to solve last question without hld in given time constrain?

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

How to solve C?

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

    You can put all data in matrix inside a vector and then sort the vector . Take pair having smallest distance , if they are already connected ignore them else they must have direct edge between them .

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

      I did the same ways. Used dsu to merge the nodes and then applied dijkstra to check if the the given distance matrix is consisitent with it or not. But it's giving me runtime error on the last case. May be due to range overflow as distances are of the range 10^18. Can you share your approach bit in detail?

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

        I did in similar way as you have mentioned (instead of dijkstra i used bfs since graph is tree).

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

          But the graph is weighted. I think bfs is used for finding the shortest path in a unweighted graph. Am i going wrong?

»
3 years ago, # |
  Vote: I like it -13 Vote: I do not like it

Can we get proper editorials? Like in C why checking the shortest distance in a mst with original graph edges would be okay?

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

Hey, I'm a bit confused regarding the verdicts. like when I test run my code it showed "great! sample passed" but when submitted, it gave me "wrong answer while running test #0". What's test 0 exactly?

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

    The sample is not necessarily #0 in the full tests.

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

    Hi, we include more testcases in first test file along with sample!

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

I think test cases for C are a bit weak. My solution is $$$O(N^3)$$$ and it gives AC (barely)

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

    Hey no, testcases are not weak! I can see your solution takes around 1900ms on stress test. I also expected well written $$$O(n^3)$$$ to pass in 2s. One of our $$$O(n^2logn)$$$ solution was taking around 1500ms. We wanted to pass some not so well written $$$O(n^2logn)$$$ solutions hence increased the TL to 2s.

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

      What? My $$$N^2logN$$$ got TLE and by just halving the edges it got AC. I just sorted all the edges and made MST out of those.

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

      I see. The $$$O(n^3)$$$ is quite simple so the constant factor is small. Still surprised it passed on the second try after a small optimization.

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

        It varies! Maybe on some other try, it gets TLE as its very close to TL.

»
3 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Can the "Submission History" section have a separate reload button? Refreshing the page takes me back to the problem description.

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

Vichitr and Balajiganapathi Instead of resolving so many issues mentioned in above comments , why not hold icpc on codeforces ? I have seen lot other countries icpc related contest on codeforces . MikeMirzayanov I know it will be not good idea to say this to you , but could you please reach Indian regional directors and offer them to hold ICPC on codeforces . It will be blessing for whole Indian CP community . You can ask little registration fees for that.

can some high rated codeforces user also communicate to regional directors regarding this ?