Showing posts with label Shortest Path. Show all posts
Showing posts with label Shortest Path. Show all posts

Saturday, June 4, 2016

Codeforces Round #353 (Div. 2) - E. Trains and Statistic

Problem Statement:
Codeforces Round #353 (Div. 2) - E. Trains and Statistic
Summary:
A graph with node 1..n such that node i have an edge to every nodes in i+1 to a[i] inclusive (where i+1 <= a[i] <= n). Calculate the sum of all the length shortest path from every pair of nodes.