### aj95's blog

By aj95, 20 months ago, ,

Hi,

I've written few blog entries to provide some useful resources and problems to solve to help people get comfortable with the concepts. Check out them here :

I hope these articles will be useful.Feel free to give feedback.

•
• +37
•

 » 20 months ago, # |   0 Thank You for the tutorials. Really appreciate your efforts.
 » 19 months ago, # |   0 The title says it's for beginners, but the blog post says it is only for high level understanding.
•  » » 19 months ago, # ^ |   +3 I've written beginners keeping in mind all the red coders and similar people here. The blog is meant for beginners but with atleast certain level of knowledge and experience.
 » 18 months ago, # |   0 nice !thanks a lot :)
 » 18 months ago, # |   0 These problems are really helpful, thanks! I showed these problems to my brother[user:clashroyale]
 » 18 months ago, # |   0 I was looking through your solution http://codeforces.com/contest/585/submission/17410169 and having some problems in understanding some parts , i am writing what i understood could you reply whether i am correct or not ?temp1 = (ModPow(2, n, MOD) — 1 + MOD) % MOD; // all the subsets excluding the empty one are taken for (i = 1; i <= N; i++) { g[i] = h[i] = 0; if (u[i] == 0) continue; for (j = i; j <= N; j += i) g[i] += c[j]; temp2 = u[i] * (ModPow(2, g[i], MOD) - 1); h[i] = (temp2 + MOD) % MOD; temp1 = (temp1 - temp2 + MOD) % MOD; } // then we are iterating over all possible numbers allowed and for those numbers containing no square factors as calculated by the mobius function, for a particular value we are taking all subsets having multiples as this number and subtracting the subsets possible excluding the empty one from the temp1 .So after loop in temp1 we are having count of subsets having gcd as 1.answer = n * temp1; // the man is coming in n instances so we are first assuming that for whatever number he chooses we will always give the complete set that is all those subsets having gcd equal to one so that since the gcd is initially one any number he chooses , the combined gcd would be one. for (j = 2; j <= N; j++) { answer = (answer + (g[j] * h[j]) % MOD + MOD) % MOD; } // this loop is troubling me assuming he takes number j why are we adding this thing the h[j] is the number of subsets having gcd j so we are violating the condition . Can you please explain me?
 » 18 months ago, # |   0 Thank You for the tutorials
 » 16 months ago, # |   0 codeforces.com/blog/entry/50712
 » 16 months ago, # |   0 Thanks for your tutorials.
 » 13 months ago, # |   +3 I've seen this blog to come up in recent actions a lot of time. Whenever I open it, there is no new comment that I can see. Also the blog text has just 1 edit. Why does this happen?