Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор HuTao_Oya_OyaOya, история, 6 часов назад, По-английски
Problem Statement
Optimal Code

Link to the problem on GFG

Doubt: Can anyone explain to me how this code is working practically while theoretically O(1e4*1e5) should give TLE.

Is there any mathematically reason ?

Thanks for your time.

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

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

Автор HuTao_Oya_OyaOya, история, 8 дней назад, По-английски

Given an m x n binary matrix matrix, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1.

Code:

Queries:

Q1
Q2
Q3

Thanks for your time.

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

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

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

How to get the new ideas & When should I look at the editorial. (You can avoid spoilers, not a must read)

I tried hard to solve the Problem G

I've spent 30 minutes trying it, and I'm already out of ideas.

My fear

What I usually try to do is "I will try for another 15-20 minutes then I will try again tomorrow and I will look at the editorial."

Any slight hints/ideas or anything on how to face the situation that I'm facing these days would be greatly appreciated.

My Goal
Sorry

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

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