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 1471. Distance in the Tree

Why WA1?
Posted by Andrew Sboev 8 Jul 2012 16:56
I'm using Floyd-Warshall algorithm, and my program correctcly passes different tests, but i have WA1. Why?
Re: Why WA1?
Posted by Alexey Dergunov [Samara SAU] 8 Jul 2012 18:12
Floyd-Warshall algorithm? But it's too slow. Use LCA.
Re: Why WA1?
Posted by Andrew Sboev 8 Jul 2012 19:43
Maybe it is slow, but it works correctly :)Should be TLE, not WA1 :)
Re: Why WA1?
Posted by kirill 24 Jan 2014 13:26
Use std::cout. I had such problem when I used <fstream>