Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

HuTao_Oya_OyaOya's blog

By HuTao_Oya_OyaOya, history, 6 hours ago, In English
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.

Full text and comments »

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

By HuTao_Oya_OyaOya, history, 8 days ago, In English

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.

Full text and comments »

By HuTao_Oya_OyaOya, history, 11 days ago, In English

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

Full text and comments »

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