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 1067. Disk Tree

MLE on last test!!
Posted by Lifanov 18 Apr 2005 12:41
I use this structure for save tree.

struct node{
    char *name;
    node *next;
    node *subfolder;
};
sizeof(node)=12;
for ten test a have 20000*12=420 Kb for node
and 40*50*(2-3)=50 Kb for names
total 500 Kb, but I Get MLE with memory=1500 Kb
Maybe my recurse function use many memory?
Sorry for my English.

Edited by author 18.04.2005 12:46
I rewrite programm and get AC.
Posted by Lifanov 25 Apr 2005 11:14
I sort input string and then analithing and output.Not build tree.