In yesterday's contest's problem D2, my PyPy3 code runs in 4150ms and the same PyPy2 code runs in 2700ms. Can someone please explain why? And in what cases, PyPy2 is faster than PyPy3?
pajenegod c1729 Kiri8128 conqueror_of_tourist can help maybe.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
In yesterday's contest's problem D2, my PyPy3 code runs in 4150ms and the same PyPy2 code runs in 2700ms. Can someone please explain why? And in what cases, PyPy2 is faster than PyPy3?
pajenegod c1729 Kiri8128 conqueror_of_tourist can help maybe.
Few days back, for a short while option to submit in PyPy 64 bit was added.
After the option was removed, I thought it would come back in a few days but it is over a week now. So can MikeMirzayanov please confirm, is PyPy 64 bit coming? And if yes, when?
Can someone please explain where can one use ternary search in a question. CP Algorithm states that ternary search is used when function f(x) which is unimodal on an interval [l,r]. But my question is how can one tell whether this condition holds or not? Is there some specific way?
Is ternary search applicable in this Div3 G. If yes, then how?
My submission 114580614 and submission 114581483 for problem D educational round 108 gave runtime error in C++17 and C++14 respectively whereas submission 114582152 got accepted in C++11. Can someone explain?
UPD: I think there was some problem in the line 49-50 because it may be possible that length of prof < n, but why did the code work in C++11 ??
for (int i=0;i<n;i++) prof[i] = 0;
Thanks
Can someone explain the logic given below for this problem.
One easy to implement solution is using 2 Breadth First Searches (BFS). Start a BFS with a random node and store the last node encountered before search ends. This last node will definitely be one of the ends of the diameter (Why?). Now run a second BFS from this node and you will end on the other end of the diameter.
Thanks
Questions like 1512G - Short Task and 1500B - Two chandeliers have very less accepted solutions in slow languages like Python/PyPy. My suggestion is that if the setters/testers feel that majority of the submissions in slow languages would exceed the time limit, they can just give a disclaimer that the problem might not have a solution in slow languages. An example of this can be seen in Kick Start 2020 Round C problem 3. I feel that this will help users who use slow languages and will also not reveal much about the intended solution. isaf27, KAN, antontrygubO_o, MikeMirzayanov, please consider my suggestion. Thanks
Name |
---|