Search found 105 matches

by Maniac
Thu Sep 16, 2004 8:52 pm
Forum: Volume 105 (10500-10599)
Topic: 10513 - Bangladesh Sequences
Replies: 15
Views: 8300

TLE

I keep getting an unfortunate TLE :-( Can somebody give me some advice? This is my approach: - store the number of possible letters for position i - store the possible letters for position i - start counting all possible non-bangla-sequences - search complete tree of possible non-bangla-sequences - ...
by Maniac
Thu Sep 16, 2004 5:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10040 - Ouroboros Snake
Replies: 20
Views: 4404

I got AC with an Euler-circuit-algorithm in Java in 1.8 sec, but I also got AC with a backtrack-algorithm in C++ in 1.0 sec. So less intelligent solutions can also work very well here :-)

Both first compute all ouro-strings and then start handling test cases by the way....
by Maniac
Thu Sep 16, 2004 5:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10039 - Railroads
Replies: 20
Views: 8140

For the needy, here some input with tricky or non-tricky cases: 14 3 A B C 3 2 1200 B 1300 C 2 0800 A 0900 B 2 1000 A 1100 B 0700 A C 4 D C A B 3 3 0800 A 1400 D 1500 C 2 0700 A 0800 B 3 0810 B 0850 C 1423 D 0600 A D 4 A B C D 2 2 1349 A 1423 B 2 1745 C 1857 D 0800 A D 4 A B C D 2 3 0859 A 1200 C 13...
by Maniac
Thu Sep 16, 2004 3:17 pm
Forum: Java
Topic: Memory usage in Java
Replies: 1
Views: 1779

Memory usage in Java

Hi all, I was wondering about something: I got a MLE reply from the judge after sending in a solution something like this: [java] class Main { // other stuff without using a lot of memory static Node[] node; static int nodes; public static void main(String[] args) throws Exception { nodes = 1<<20; n...
by Maniac
Mon Sep 13, 2004 4:25 pm
Forum: Algorithms
Topic: A number problem
Replies: 14
Views: 3557

*krijg nou wat* I'm startled but you're right, it's not memorization but memoization for some weird unlogical reason....
by Maniac
Mon Sep 13, 2004 11:35 am
Forum: Algorithms
Topic: A number problem
Replies: 14
Views: 3557

I think little joey's right: even if 1000000 is an upperbound of the max. number needed (and how do we know this without calculating everything in another way?), it might not even be very fast.... little joey, you say you use DFS with memorization. Do you memorize till a certain max number than, i.e...
by Maniac
Fri Sep 10, 2004 3:01 pm
Forum: Volume 100 (10000-10099)
Topic: 10045 - Echo
Replies: 11
Views: 2401

OK, I think I get it now. IMHO it would have been nice if this was explicitely stated in the problem, or clear from one of the examples....

*zucht* I'll have to change my algorithm pretty much then I'm afraid :-(
Thanks .. and little joey
by Maniac
Fri Sep 10, 2004 2:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10045 - Echo
Replies: 11
Views: 2401

and what about this sentence in the problem statement: 'The ``buffer size ten'' means, that a character in s1 is not separated by more than nine characters from its echo in s2.' Clearly, the b is surely separated by more than nine characters from it's echo, whatever is put after the c. Am I missing ...
by Maniac
Fri Sep 10, 2004 1:24 pm
Forum: Algorithms
Topic: A number problem
Replies: 14
Views: 3557

Minilek, there is a simple bound: keep on dividing and you'll always get 1. For n<=20000, this means that the number of operations is always smaller than 15. So iterative deepening is an option, but if you need 13 operations it's still a very large search-space... (maybe not too large though!) Misof...
by Maniac
Fri Sep 10, 2004 10:33 am
Forum: Volume 100 (10000-10099)
Topic: 10045 - Echo
Replies: 11
Views: 2401

I see two differences between our outputs. For the input 2 aaaaaaaaabaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaa...
by Maniac
Thu Sep 09, 2004 11:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10045 - Echo
Replies: 11
Views: 2401

Hmmm, I'm pretty sure my solution is correct but apparently it's not, cause I keep getting WA. Can anyone help me with tricky and non-tricky input to test my solution? Here are some test cases I created myself 47 a ABBBBBBACCCCC ABACADABACAD ABACADAABACADA ABBACC ABBACC012345012345 ABACCB ABACCB0123...
by Maniac
Thu Sep 09, 2004 4:02 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 39470

after finally getting this problem AC, here's some information that could be useful: - maximal number of different persons in all papers together of one scenario is less than 5001 - maximal length of input lines is less than 10001 - maximal length of person names is less than 101 - maximal number of...
by Maniac
Thu Sep 09, 2004 10:42 am
Forum: Algorithms
Topic: A number problem
Replies: 14
Views: 3557

A number problem

I'm looking at this problem but don't see a very elegant or fast solution. Does anybody have a good idea for an algorithm solving this problem?

It's problem B of
http://www.acm.inf.ethz.ch/ProblemSetAr ... 7/ek97.pdf
by Maniac
Fri Sep 03, 2004 10:33 am
Forum: Volume 103 (10300-10399)
Topic: 10358 - Matrix
Replies: 9
Views: 3382

sorry about the extra dots. I took your second output and it matched with my output. So I still haven't found an error :-( Could somebody perhaps have a look at my code? Any help is welcome! Thanx, Erik [java]got AC. What I corrected: - set turns to zero for the situations where Neo can escape in 0 ...
by Maniac
Fri Sep 03, 2004 12:58 am
Forum: Volume 103 (10300-10399)
Topic: 10358 - Matrix
Replies: 9
Views: 3382

Could somebody please post the correct results for the following test cases? Thanks, Erik 30 ######## #...A..# #.####.# #.#M.#.# #P#..#P# #.####.# #...A..# ######## #######A ####M### ###...## #......# #......# #...A..# #PPPPPP# ######## #######A ####M### ####.### #......# #......# #...A..# #PPPPPP# ...

Go to advanced search