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 [problem:439B] disproved this intuition.↵
↵
[submission:15307785] using long, the primitive type got TLE, whilst [submission: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 :[problem:285C]
↵
[submission:15307785] using long, the primitive type got TLE, whilst [submission: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 :[problem:285C]