notTehlka's blog

By notTehlka, 3 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +28
  • Vote: I do not like it

By notTehlka, history, 3 years ago, In English

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?

Full text and comments »

  • Vote: I like it
  • +125
  • Vote: I do not like it

By notTehlka, history, 4 years ago, In English

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?

Full text and comments »

  • Vote: I like it
  • +23
  • Vote: I do not like it

By notTehlka, 4 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it

By notTehlka, history, 4 years ago, In English

Can someone explain the logic given below for this problem.

Logic

Source

Thanks

Full text and comments »

  • Vote: I like it
  • +12
  • Vote: I do not like it

By notTehlka, history, 4 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • +31
  • Vote: I do not like it