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 1463. Happiness to People!

Something strange
Posted by H*J_ZHUJ 28 Aug 2006 20:39
Here a part of my program:

----------------------------------

const
     maxn = 50000;

var
   gr : array[1..maxn, 1..maxn] of Integer;
   maxy : array[1..maxn] of Longint;

   c : array[1..maxn] of boolean;
   path : array[1..maxn] of Longint;
   d : array[1..maxn] of Longint;

   a : array[1..maxn] of Integer;
   vs : array[1..maxn] of Longint;

   que : array[1..maxn] of Longint;
   first, last : Longint;

   n, k, i, j, x, y, w, tmp, max, start, finish, u, v : Longint;

   stop : boolean;

----------------------------------

When maxn = 500, I have WA#9.
When maxn = 20000, I have Crash (access violation) #9.
When maxn > 20000, sometimes I have ML #1 (But memory isn't shown!), sometimes I have Crash (access violation) #1.

What does it mean?

Edited by author 29.08.2006 02:57
Re: Something strange
Posted by Alexander Prudaev 29 Aug 2006 20:28
you can't use O(N^2) memory. it's ML
N^2*(1 byte)= 2.5GB

Edited by author 29.08.2006 20:30