ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1770. The Party of Ural Champions

How to solve it?
Posted by Tavrida NU: TTL300 11 Apr 2010 18:11
Hi, can anybody give a hint how to solve this problem?
Re: How to solve it?
Posted by Chmel_Tolstiy 11 Apr 2010 21:58
Floyd.
Re: How to solve it?
Posted by Khúc Anh Tuấn 12 Apr 2010 09:31
Notice that if there is an edge between i and j then a[i][j] + a[j][i] <= 1 (a is input array). The reverse is not true, but you no need to worry as unnecessary edges do not change the array a. So you have a graph, run Floyd to check if it matches with array a.