### Vichitr's blog

By Vichitr, history, 3 months ago,

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.

• +76

 » 3 months ago, # | ← Rev. 2 →   +22 Is it possible to have contest format similar to the preliminary round i.e. duration of the contest is 2.5 hrs.
•  » » 3 months ago, # ^ |   +27 Thanks for the suggestion, darklight13! We are planning to keep next team contest for 2.5 hours!
•  » » » 3 months ago, # ^ |   +10 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 months ago, # ^ |   +3 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 months ago, # ^ |   0 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 months ago, # ^ |   0 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 months ago, # ^ |   0 You can now check AC submissions on the scoreboard starting from last contest.
•  » » » » » » » 3 months ago, # ^ |   0 Thank u, that's quite kind of u all...
•  » » » » » » » 3 months ago, # ^ |   +3 Can you also fix search (top-right) in scoreboard? It doesn't seem to work.
•  » » » » » » » » 3 months ago, # ^ |   +3 Done. You can now search team name and org in scoreboard (please refresh before trying).
•  » » » » » » » » » 3 months ago, # ^ |   +3 Thank you!
 » 3 months ago, # |   +7 Hi! CodeDrills is looking for problem setters! Anyone interested can send a personal message on codeforces to either me or Balajiganapathi.
•  » » 3 months ago, # ^ |   +6 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 months ago, # |   +5 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 months ago, # ^ | ← Rev. 2 →   +18 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 months ago, # ^ |   +10 Scoreboard has been fixed!
 » 3 months ago, # | ← Rev. 2 →   +57 Aren't the problems too standard ?? How they are meant for ICPC training?
•  » » 3 months ago, # ^ |   +24 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 months ago, # |   +5 Auto comment: topic has been updated by Vichitr (previous revision, new revision, compare).
 » 3 months ago, # | ← Rev. 2 →   +9 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 months ago, # ^ |   0 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 months ago, # |   +38 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 months ago, # ^ |   +11 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 months ago, # ^ | ← Rev. 2 →   +4 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.cppAnd use #ifdef Jaydeep999997 instead of #ifndef ONLINE_JUDGE
 » 3 months ago, # | ← Rev. 4 →   0 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 months ago, # ^ |   -18 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 months ago, # ^ |   +10 We share that here. Please check.
 » 3 months ago, # |   +5 When will I be able to see other participant's submission?
•  » » 3 months ago, # ^ |   0 Made submissions public!
 » 3 months ago, # | ← Rev. 2 →   0 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 months ago, # ^ |   0 I think idea is completely correct , maybe your implementation is less optimized .
 » 3 months ago, # |   +10 Is it possible to solve last question without hld in given time constrain?
 » 3 months ago, # |   0 How to solve C?
•  » » 3 months ago, # ^ |   0 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 months ago, # ^ |   0 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 months ago, # ^ |   0 I did in similar way as you have mentioned (instead of dijkstra i used bfs since graph is tree).
•  » » » » » 3 months ago, # ^ |   0 But the graph is weighted. I think bfs is used for finding the shortest path in a unweighted graph. Am i going wrong?
•  » » » » » » 3 months ago, # ^ |   0 Yes, because there will be unique path between any two vertices.
•  » » » » » » » 3 months ago, # ^ |   0 Ok, thanks! I got it xD!
•  » » » » » » » 3 months ago, # ^ |   0 Can you show your code?
•  » » » » » » » 3 months ago, # ^ |   0 Still getting runtime error
 » 3 months ago, # |   -13 Can we get proper editorials? Like in C why checking the shortest distance in a mst with original graph edges would be okay?
 » 3 months ago, # | ← Rev. 2 →   +1 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 months ago, # ^ |   0 Ya, I also have this confusion. I thought it was samples but my code was passing samples. So, I thought some error with judge... submitted again just to see another WA. lol
•  » » 3 months ago, # ^ |   +5 The sample is not necessarily #0 in the full tests.
•  » » 3 months ago, # ^ |   +3 Hi, we include more testcases in first test file along with sample!
 » 3 months ago, # |   0 Where can I see the editorial?
 » 3 months ago, # | ← Rev. 2 →   0 I think test cases for C are a bit weak. My solution is $O(N^3)$ and it gives AC (barely)
•  » » 3 months ago, # ^ |   +3 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 months ago, # ^ |   0 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 months ago, # ^ | ← Rev. 2 →   0 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 months ago, # ^ |   +3 It varies! Maybe on some other try, it gets TLE as its very close to TL.
 » 3 months ago, # |   +4 Can the "Submission History" section have a separate reload button? Refreshing the page takes me back to the problem description.
•  » » 3 months ago, # ^ |   +3 Thanks for suggestion, we will look into it.
 » 3 months ago, # | ← Rev. 3 →   +109 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 ?