CS_alpha's blog

By CS_alpha, 10 months ago, In English

For problem E, this code, implemented using unordered_map, was giving MLE. So, I switched to 2D array. However, now this is giving TLE. Isn't 2D array faster than unordered_map? How is it giving TLE when the former isn't? Is it because of any UB?

Time complexity: O(n * k + total_t_len + q * k)

Space complexity: n* k * 4 bytes = 1000000 * 26 * 4 ≈ 100MB (fits comfortably in 512MB)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By CS_alpha, history, 10 months ago, In English

I used sort() in https://mirror.codeforces.com/contest/2056/submission/325199850 and got runtime error verdict, but used stable_sort() in https://mirror.codeforces.com/contest/2056/submission/325199048 and got accepted verdict.

Can someone please explain the reason? The rest of the code is unchanged.

Full text and comments »

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

By CS_alpha, history, 11 months ago, In English

I’ve been unable to log in to Codeforces using mobile data for the past few months. I’m posting this now because I have no idea what’s causing the issue or who to reach out to for help. It’s frustrating, and I need a solution. Has anyone else faced this? Any help or guidance would be appreciated

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it