I was solving this problem [Smash Me](http://atcoder.jp/contests/abc157/tasks/abc157_d)↵
↵
**Abridge Problem Statement:**↵
Given $N$ users, $M$ friendship pairs, and $K$ blockship pairs. For each user $u$, find the number of other users $v$ such that:↵
↵
1. $u$ and $v$ are connected via a path of friendships.↵
2. $u \neq v$↵
3. $u$ and $v$ are not direct friends.↵
4. $u$ and $v$ do not block each other.↵
↵
I wrongly interpreted the problem and thinking of some other problem, ↵
↵
**The Modified Problem:**↵
Foranevery vertex $u$, find the number of vertices $v$ such that:↵
↵
1. There exists a path from $u$ to $v$ that does not contain any vertex $w \in \text{Blockship}[u]$.↵
2. $u \neq v$↵
3. $u$ and $v$ are not direct friends.↵
4. $u$ and $v$ do not block each other.↵
↵
↵
**I later was able to solve the original problem but just curious how to solve the above problem.**↵
↵
Thanks :D
↵
**Abridge Problem Statement:**↵
Given $N$ users, $M$ friendship pairs, and $K$ blockship pairs. For each user $u$, find the number of other users $v$ such that:↵
↵
1. $u$ and $v$ are connected via a path of friendships.↵
2. $u \neq v$↵
3. $u$ and $v$ are not direct friends.↵
4. $u$ and $v$ do not block each other.↵
↵
I wrongly interpreted the problem and thinking of some other problem, ↵
↵
**The Modified Problem:**↵
For
↵
1. There exists a path from $u$ to $v$ that does not contain any vertex $w \in \text{Blockship}[u]$.↵
2. $u \neq v$↵
3. $u$ and $v$ are not direct friends.↵
4. $u$ and $v$ do not block each other.↵
↵
↵
**I later was able to solve the original problem but just curious how to solve the above problem.**↵
↵
Thanks :D



