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 1085. Meeting

vitalok wats wrong [1] // Problem 1085. Meeting 26 Mar 2007 14:43
[code deleted]



Edited by moderator 27.03.2007 09:45
Kit Re: wats wrong // Problem 1085. Meeting 26 Mar 2007 15:05
Don't use maxint, you have overflow here, I think:
a[i,k]+a[k,j]
In 32-bit compilers integer = longint, so maxint = 2147483647, like Delphi.

You can use something like this:
const
...inf = 1000000;
..........
for i:=1 to n do
...for j:=1 to n do
......a[i,j]:=inf;