Hi, in my solution below, I created a algorithm that uses only addition, subtraction, and some simple functions to get my answer. https://codeforces.me/contest/1811/submission/202086856 However, this O(1) solution times out to this problem : https://codeforces.me/contest/1811/problem/B
Can I have an in depth explanation as to why this is the case? I suspect it is because I'm using doubles, but even then I don't see how this can cause such it to be so slow.