RutuparnDalvi's blog

By RutuparnDalvi, history, 8 days ago, In English

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
  • Vote: I like it
  • 0
  • Vote: I do not like it

8 days ago, # |
  Vote: I like it +3 Vote: I do not like it

Try including

#pragma GCC target("popcnt")

at the top of your code. I had to use this to get AC.