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

Why this taks can not be solved with Trie? :@@
Posted by Giorgi Pataraia [Tbilisi SU] 8 Mar 2013 19:24
http://pastebin.com/Cr6m0rw7
I think I tried everything that can limit memory but still got MLE :/
Re: Why this taks can not be solved with Trie? :@@
Posted by Andrew Sboev [USU] 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
Re: Why this taks can not be solved with Trie? :@@
Posted by Giorgi Pataraia [Tbilisi SU] 9 Mar 2013 03:41
thanks, now AC with set :/
Re: Why this taks can not be solved with Trie? :@@
Posted by HUECTRUM 18 Feb 2017 08:18
It can actually be solved with trie. My solution uses 0.4s (cin) and 20MB.
Just store a map in every node.
Re: Why this taks can not be solved with Trie? :@@
Posted by Keworker `~ 28 Jun 2024 18:19
Solved with C++ with tree of static arrays of links, without any STL structures