Note: The text editorials will be provided by the authors of the round. This video tutorial acts as an additional resource for those who prefer video over text, and not as a substitute for the text editorial.
2004A — Closest Point
Video
2004B — Game with Doors
Video
2004C — Splitting Items
Video
2004D — Colored Portals
Video
2004E — Not a Nim Problem
Video
2004F — Make a Palindrome
Video
BRUUUUHHHHHHH I didn't notice the change in B until after the contest :( such BS
Will a tutorial on problem G appear?
Are there written solutions for the problems? My English listening is poor.
me too ,i love solutions by written.plz!!!!!!orz
you can use subtitles(CC)
When is the text editorial?
WHERE D hacked ? anyone have test case ?
Yes, many people were hacked, including me on tl. I think many people had a problem because of the slow map<string,vector> structure
I have looked at your code, and the problem is you are doing :
In this code, z will copy each vector in the map once, so that is why your code is $$$O(nq)$$$, but if you change it to :
Then the vector will not be copied as you are only taking a reference to where does it exist.
Wow, thank you so much!!
can you tell me why this code is giving TLE[submission:276903797]
You have the same issue, you are doing
change it to
it should pass after this
Thanks
Is it a tendency, that now we have video editorials instead text one? I don't know, right now, is it better or worse, but definetly text editorials provides faster acsess to solution idea, because reading is faster than watching video. On another hand video edits can be easier to understand, so I personally prefer there both would be
also text editorials often have hints that are really valuable when you're almost solving the problem
Can we solve D using DSU? If not why
same doubt:(
If you ONLY want to use DSU, it would have worked if the problem asked to tell whether it is possible to move from some city to other. However the problem asks to find the minimum cost of moving from one city to other, which is not possible to solve ONLY using DSU.
The sub-array of f problem is continuous, so you shouldn't use that much n*(n+1)*(n+2)/6
No, this equation is exactly right
can you tell me why?
you can just do a brute force on n=(some number you like) and you'll find that, i do not know how to prove that though.
i prefer text editorials
where G
Is there any text tutorial? :(
Yoo everyone, I was trying to upsolve the problems and I submitted the code for problem D and decided to take a break and now when I came back, it's been over 15 mins but my code is still in the queue, idk wht to do
As of writing this comment, it is processing submissions from 7 hours ago, so I think it's gonna take a while. :)
Can anyone tell me why the first code is getting AC but the second one got hacked and now is showing TLE? Same logic. But in first one im passing from left to right and in second one im passing from right to left.
Thanks!
Code 1
Code 2
There was a test case targeting Java Arrays.Sort which doesn't guarantee worst case O(n log n) time when used on primitive data types. Arrays.Sort uses a different algorithm on objects such as Lists or Integer[].
It got me too QQ.
Does not make any sense. Collections.sort() is fine but Arrays.sort() isn't?
I don't know about Collections.sort, it might always use merge sort. But for Arrays.sort, if the input is an array of primitive type like int or long, Arrays.sort uses a form of quicksort with worst case time complexity of O(n^2). So if a test case uses input designed to be the worst case, Arrays.sort on an int[] may cause TLE.
(see https://codeforces.net/blog/entry/7108)
Yeah I got it now. Thanks :)
When will ratings get updated??
Hey can somebody help me out to find the error in this implementation of Question — D
277083966
Question D
Hello, Can anybody tell me why the code is resulting in a TLE ?
https://codeforces.net/contest/2004/submission/277699509