Hey guys,
I have working on a problem titled: Beautiful Subgrids from CSES Problem set. I am unable to get Accepted for large datasets (n ~ 3000) with my time exceeding 2s. I have done certain optimisations(which are probably suboptimal) present in the code below. Please direct me. Thanks
My code
Try including
at the top of your code. I had to use this to get AC.
Why does this work?
Because in assembly level, it replaces a function call with straight machine code https://godbolt.org/z/yQv94Y
I'd recommend checking this blog for more info on pragmas https://codeforces.com/blog/entry/96344