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

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

You are given a number $$$n$$$ and a set $$$d$$$ that describe the graph. The graph has n vertices, numbered 0 through n-1. Vertices i and j are connected by an edge if and only if |i-j| is an element of d. Return the number of connected components of this graph.|d|<=50 and n<=1e18. In Topcoder its called "HugeGraph". I have searched for the editorial and I found nothing. Please anybody gives a editorial? Btw, for n,|d|<=1e5, if the problem can be solved? Sorry for my bad english:)

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

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

I cannot search for this problem in Topcoder archive. Was this special round? If you know which srm it was you can check petr blog, I think he explains some problems from round he participated.

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

Maybe from big $$$n$$$ you can find the answer with Berlekamp-Massey?

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

Please, anybody replies? I neeeeeed the editorial! I'm VERY interested in this problem :(