Блог пользователя CS_alpha

Автор CS_alpha, 10 месяцев назад, По-английски

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)

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор CS_alpha, история, 10 месяцев назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

Автор CS_alpha, история, 11 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится