Search found 4 matches

by skulty
Sat Dec 08, 2007 3:02 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 20617

Yep, StreamTokenizer got me an Accepted in 0.9 seconds, unbelievable, I never would've thought that scanning the input could make such a difference, but from now on, whenever I see a problem where the input might be enormous, I'll use StreamTokenizer instead of Scanner... For the last time (in this ...
by skulty
Sat Dec 08, 2007 1:39 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 20617

Can't believe it... You were right, I used a BufferedReader, made splits in the Strings and used parseInt's instead of simply using a Scanner and I got Accepted with 1.6 seconds... :o It's not a marvelous timing, but for Java it's good enough... Thanks, it's really boring when you're sure you're ...
by skulty
Fri Dec 07, 2007 8:36 pm
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 20617

Oh, :oops: sorry about that, first time in this forum... But thanks about the advise, I'll try that, it makes sense... :D
by skulty
Fri Dec 07, 2007 6:12 pm
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 20617

10583 -> Union Find -> TLE?!?!

It doesn't makes sense... I'm using Union Find to solve this problem, I use both union by rank and path compression, I tried to optimize the algorithm as much as I could, but I still get TLE! The only thing I can see that's making this slower is Java, but there have been some Accepted's with Java ...

Go to advanced search