-rynk2200's blog

By -rynk2200, history, 6 months ago, In English

https://codeforces.net/contest/1920/problem/C

Above is the link to the problem i need help with. How is the complexity of inner loop n+logn and not n*logn? GCD is being calculated inside the loop so the logarithmic term should be multiplied right?

Link of the given tutorial:-

https://codeforces.net/blog/entry/122560

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it