problem in understanding Mobius function

Правка en1, от hardik_836, 2022-12-28 14:59:18

In the recent contest Codeforces Round #841 (Div. 2) and Divide by Zero 2022 I am not able to understand how we calculate number of pairs (x,y) where 1≤x<y≤n with gcd(x,y)=k for each k∈[1..n] in O(nlogn) time. In the tutorial it is stated we use mobius function/dynammic programing approach to calculate it. But i am not not able to understand the approach. Someone kindly suggest some resources,youtube channel for understanding it properly. problem link[cut] https://codeforces.me/contest/1731/problem/E

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский hardik_836 2022-12-28 14:59:18 565 Initial revision (published)