Confused about Complexity of 362-A

Правка en1, от Noble_Mushtak, 2016-07-16 00:33:09

Here is my analysis of the solution:

  • There are edges per query.
  • Each edge takes to process. There are added every query and O(q) queries, so we have edges, meaning each edge is to process.
  • Finally, there are O(q) queries.

This gives us overall. However, the editorial does not have the term and simply has . How did they get rid of the term in the analysis? Did I do something wrong here?

Теги #362 (div. 2) c, analysis

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Noble_Mushtak 2016-07-16 00:35:30 104 clarified answer
en1 Английский Noble_Mushtak 2016-07-16 00:33:09 666 Initial revision (published)