Hello everyone. I've just solved Timus 1766. The solution has something to do with random walks and Markov chains (not going to describe it). The problem reduces to computing A∞v. I have solved it by raising a certain matrix A to sufficiently big power (2120 in my case). After reading problem discussions I've found out it could be computed using Gaussian elimination. Can anybody explain what does Gaussian elimination have to do with raising matrix to an infinite power?