alex_2008's blog

By alex_2008, history, 13 months ago, In English

Recently, I’ve been upsolving the UJGOI 2025 problems, but I couldn’t solve the 4th problem from Day 2. I would be grateful if someone could provide an editorial for the following problem:

You are given a directed graph with $$$n$$$ vertices and $$$m$$$ directed edges ($$$1 \le n, m \le 3 \cdot 10^5$$$), where each edge $$$E_i$$$ is added to the graph at time $$$i$$$ (in order).

There are also $$$Q$$$ online queries of the form $$$(x, y)$$$ ($$$1 \le Q \le 3 \cdot 10^5$$$). For each query, you need to determine the first moment in time when $$$x$$$ and $$$y$$$ belong to the same strongly connected component. If they are never in the same SCC, output -1.

Full text and comments »

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

By alex_2008, history, 4 years ago, translation, In English

Hello dear programmers! I have one question. I have two different penalties when I click on unofficial results. During Codeforces Round #806 (Div. 4) I submitted solutions for all problems, but I got points only for problems E and G. I don't know if it's a platform glitch or I didn't understand something. Here is the evidence.

Official results

Unofficial results

Full text and comments »

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