Блог пользователя M.Ibrahim_

Автор M.Ibrahim_, история, 6 лет назад, По-английски

You can find the solution of Problem A Div1 as soon as you search about it.

You can see this link

you've to add just one condition in ”else” and get problem accepted

if(i == pp.first || i == pp.second || j == pp.first || j == pp.second) continue;

Accepted Solution 109890606

Therefore, this is unfair to some of the contestants.

Is it possible to find a solution ???

ch_egor

MikeMirzayanov

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Thank You for the trivial $$$\mathcal O(n^2)$$$ solution.

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +8 Проголосовать: не нравится

The algorithm mentioned in the article can not handle the case where N >= 5000.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Oh, It's a terrible thing.
But I don't think it matters because people rarely know.