tzhamoidin_twink's blog

By tzhamoidin_twink, history, 4 years ago, In English

We have unweighted undirected graph with n vertices and m edges (n < 1e5, m < 1e6). You need to find sum of d(u, v) over all pairs of u v, where d(u, v) — minimal distance between u and v.

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

»
4 years ago, hide # |
Rev. 2  
Vote: I like it +3 Vote: I do not like it

I have a certain problem in a previous contest in mind, almost exactly same with this problem, only difference being the constraints for $$$m$$$. Can you please state the source of this problem?