Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

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

Problem

The problem asks you to find all pairs of edges not included in shortest path.

Here is my two submissions :

correct one : in this, what i did is i fixed the edges and iterated on the nodes and check whether the particular edge can be included in the answer or not. It gives right answer.

Second one : WA : in this, i fixed the nodes and iterated on the edges that is present in our graph and check whether this particular edge can be included in the answer or not. It gave WA.

why second one is giving wa, though i think both have the same intution.

This is making the difference :

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