ipaljak's blog

By ipaljak, history, 2 years ago,

Hi all,

join us on the fourth round which will be held on Saturday, January 18th at 14:00 UTC.

If you are not familiar with the COCI contest format, we encourage you to read the announcement for the new season. You can also find the problems from the previous rounds here.

Feel free to discuss the problems in the comment section after the contest ends.

See you on Saturday!

• +79

 » 2 years ago, # |   0 Auto comment: topic has been updated by ipaljak (previous revision, new revision, compare).
 » 2 years ago, # |   +27 A friendly reminder: the round starts in about 3.5 hours
 » 2 years ago, # |   +11 How to solve C?
•  » » 2 years ago, # ^ | ← Rev. 9 →   +21 I am not entirely sure my solution is correct. (Edit: It's correct)I split the array in 2 sets, the one in the range [l, r] and what is left. In this sets we have the numbers sorted by indices in the initial array. We see that we only make swaps between numbers in different sets.I did dp[i][j][cost] = the biggest amount of debt you can save if you make swaps till the ith from the first set and jth from the second set and spend cost kunas. The RecurrenceWe note x = the indice in the initial array of the ith from the first set y = the indice in the initial array of the jth from the second set  dp[i][j][cost] = max (dp[i][j - 1][cost], dp[i - 1][j][cost], dp[i - 1][j - 1][cost - abs(x - y)] + a[x] - a[y]); where a is the initial array
 » 2 years ago, # |   +8 When will the results be published?
•  » » 2 years ago, # ^ |   0 They should be up in a couple of minutes, I'll let you know,
•  » » » 2 years ago, # ^ |   +14 The results should now be visible under the Results tab in the judge.
•  » » » » 2 years ago, # ^ |   0 Thanks!
 » 2 years ago, # |   0 Does top down 2500*n^2 DP pass on Holding or it TLEs? 2e7 in 2s is kinda tight.
•  » » 2 years ago, # ^ |   +16 Notice that n^2 is kinda (n / 2)^2, so it should pass (and 2e8 is kinda tight, 2e7 usually fits comfortably)
•  » » 2 years ago, # ^ |   0 It should pass, 2e7 in 2 seconds shouldn't be tight at all.
 » 2 years ago, # |   +11 I spent 1:30 on solving D for + instead of xor, oh
•  » » 2 years ago, # ^ |   +11 Did you solve it for +? :)
•  » » » 2 years ago, # ^ | ← Rev. 2 →   0 I think yes, but it was about 200 or so lines of code (not including prewritten one)
 » 2 years ago, # |   +1 How to solve D?
•  » » 2 years ago, # ^ |   0 You can use euler tour + segment tree + trie or dsu + trie(with lazy and a function for merge two tries) over the final tree, in both keep for every node of the trie the most "old" node in the subtree(necessary for search the maximum xor only with the nodes added before the current query)
•  » » » 2 years ago, # ^ |   0 I used segment trie and got TLE.
•  » » » » 2 years ago, # ^ | ← Rev. 2 →   0 I implemented the solution with dsu but put stupidly(r instead r^x) bug and I couldn't submit it on time, so I don't know if my solution would pass
•  » » » » 2 years ago, # ^ |   +5 My solution passed in one second
 » 2 years ago, # |   +11 Tasks, full test data, and solutions (with editorials) are available here.We hope you had a good time :)
 » 2 years ago, # | ← Rev. 2 →   0 When I can submit again ? It say "You're not allowed to submit at this time."
•  » » 2 years ago, # ^ |   +8 I would say in an hour or so, but my hands are tied in that regard. I'll let you as soon as I hear the analysis mode is up.
 » 2 years ago, # |   0 Are the testcases in Holding weak. My slow solution passes all the subtasks. https://pastebin.com/hGzYAsXm
•  » » 2 years ago, # ^ |   +14 Hi, I am coauthor of Holding and I was creating testcases for it. We have testcase on which your solution reaches the worst complexity, but running time of it is still low, 1.2sec, and time limit is 2sec. We couldn't put 1sec for time limit because some solutions with intended complexity were very close to 1sec.
•  » » » 2 years ago, # ^ |   0 Thanks.
 » 2 years ago, # |   +19 Will the COCI tasks from this season be added on oj.uz? ojuz
•  » » 2 years ago, # ^ | ← Rev. 2 →   +26 I think I will
•  » » 2 years ago, # ^ |   +16 Problems are all available to submit: https://oj.uz/problems/source/445