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

Автор Petr, история, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +71
  • Проголосовать: не нравится

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

"With the only successful solution to problem E coming from a contestant with no other solved problems..."

"a contestant"

radoslav11 so close.

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

For some reason my comment disappeared so I will add it here: it's easier(in my opinion) way to find vertices ABC such that AB and AC are edges and BC is not. Let A — the vertex of highest degree, iterate over B and C — its neighbours. Then if BC is not an edge — stop. It's O(M) checks in a set. If you didn't find such triangle, then all neighbours of A has same degree as A and then graph is clique