Confused about Complexity of Contest 362 Div. 1 Problem A:

Revision en2, by Noble_Mushtak, 2016-07-16 00:35:30

Here is my analysis of the solution to Contest 362 Div. 1 Problem A:

  • 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?

Tags #362 (div. 2) c, analysis

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Noble_Mushtak 2016-07-16 00:35:30 104 clarified answer
en1 English Noble_Mushtak 2016-07-16 00:33:09 666 Initial revision (published)