Editorial of CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)
source link: http://codeforces.com/blog/entry/114521
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
H will coming soon.
6 hours ago, # | Wow. Tutorial was released even before system testing was over. Nice contest overall <3 |
6 hours ago, # | super fast editorial. Thanks! |
6 hours ago, # | well prepared ! |
6 hours ago, # | Wow! . Very Fast . Excellent Contest . Jiangly is new No. 1 :) |
6 hours ago, # | Jiangly is very cool |
Problem F is basically a generalization of 1705E - Mark and Professor Koro. I described a segment tree-free solution here that can easily be generalized to this problem. |
Can someone please help me with problem C My approach was to find the upper bound for each value and calculating values required to be removed and added using it Code |
6 hours ago, # | Well prepared for the contest . |
can anyone tell my which testcase my code is failing in problem c Code... |
6 hours ago, # | Nice problems and fast editorial. |
6 hours ago, # | In problem E, how do they come to conclusion that |
6 hours ago, # | In problem B, "Then consider how the binary representation changes..." — I mean, all of a sudden people have to consider binary representation of a number? :) I find this kind of problem a bit weird. I know that the idea and solution is nice and neat but when you solve it you kind of expect more general approaches to work here like backtracking or some easy calculations but this kind of reasoning seem to be not suitable for problem B. I solved it exactly the way it is described in the solution, but it was just kind of a luck. |
-
When is odd, either one of or is odd. You can perform the operation that makes remain in odd, eventually will end at .
6 hours ago, # | is there any reason as to why we do not consider the 40 spell limit in the 2nd question? |
-
Each operation you might want to do increases the number of significant bits in the number's binary representation. As the maximum value of we might want is which has only bits, we would need at most operations (+/-1 if my logic has some off-by-one error) which is clearly less than .
Cheers to authors. Overall Great round. I wanted to share my opinion on problem D. Problem D is the little bit bad for C++ users compared to python. There is a formula to find number of days require to reach height 'h'. But instead of using formula, if we use BINARY SEARCH , then there is very stupid long long overflow. Sincere request to authors to avoid these kind of problems which are language specific. In this problem, using binary search in c++ is 10x more difficult than using python. RDDCCD Below is my implementation in c++, EVEN AFTER USING LONG LONG, I am getting overflow. is there any way to overcome this ?
|
-
One possible way is to set I think. Or using int128. You can also detect whether overflow occurs, like checking (climb > (8e18/(a-b)). If it occurs, just set r = m.
5 hours ago, # | Great round, thank you problemsetters! |
5 hours ago, # | The proof of the time complexity of E is quite an impressive part of this problem. I like it very much. (I came up with this solution in the last 20 minutes, but I thought that was and lost the chance for a nice rating change. T_T) ABCD are a little too easy, considering the difficulty difference between D and E. I was somehow slower on ABCD than usual, and then my rank fell down a lot. Anyway, a nice contest. Really enjoyed it. |
200033270 I am getting the wrong answer in test case 7. I think there is some overflow error, but I cannot get it. I am using long long everywhere still. It will be helpful if somebody can find out what I am doing wrong. Thanks in advance. |
Today's Codeforces contest crossed the mark of 200 million submissions, what a coincidence! Congratulations! |
3 hours ago, # | In problem D, the tutorial and the solution use different formulas to compute |
111 minutes ago, # | Can someone tell me what is wrong with the code for problem E? Am i missing something? I am getting WA on TC 3 C++ CODE
|
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK