safarisoul's blog

By safarisoul, history, 10 years ago, In English

Intuitively, long as primitive type should be faster in case of multiplication or other arithmetic operations than Long as object type. However, my recent submissions to a CF problem 439B - Деву-дурачок disproved this intuition.

15307785 using long, the primitive type got TLE, whilst 15307798 using Long, the object type got Accepted, and has a large timely improvement over the previous one by like 10 times.

Does anyone have any idea why this happened?

Here is another problem :285C - Получаем перестановку

Full text and comments »

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