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 1414. Astronomical Database

http://pastebin.com/Cr6m0rw7
I think I tried everything that can limit memory but still got MLE :/
Andrew Sboev [USU] Re: Why this taks can not be solved with Trie? :@@ [1] // Problem 1414. Astronomical Database 8 Mar 2013 19:58
It's just brute-force task :) There 36 lines in my AC code versus yours 165 lines :)

Edited by author 08.03.2013 19:59
thanks, now AC with set :/
It can actually be solved with trie. My solution uses 0.4s (cin) and 20MB.
Just store a map in every node.
Solved with C++ with tree of static arrays of links, without any STL structures
Same here. 0.062 sec, 1.8Mb