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 1269. Obscene Words Filter

Strange memory using
Posted by elmariachi1414 (TNU) 6 Dec 2008 13:29
Can anyone tell me, why this implementation of trie

#define M 100111
struct NODE {
    char c;
    int v;
    NODE * next;
} * trie[M];

uses about 5 441 KB at Timus?
I use about 1 MB of additional arrays, but anyway it is too much.

Input text is < 100 KB => size( trie[M] ) <= 1 MB!

Please, help me!
Maybe admin can say something?
Maybe it is because of using heap?
Re: Strange memory using
Posted by Amirbekov Artem[Ivanovo SPU] 11 Dec 2008 23:29
How do you use this implementation? What does "next" mean?