Competitive Programming Guide - Math #12 - Adjacency Matrix Exponentiation

preview_player
Показать описание

Key fact: raising the adjacency matrix of a graph to a power gives the number of paths of that length between each pair of vertices! This is really beautiful, in my opinion.

Рекомендации по теме
welcome to shbcf.ru