Search found 13 matches

by wjomlex
Thu Jun 24, 2010 4:14 am
Forum: Volume 115 (11500-11599)
Topic: 11560 - Fixing the Bugs
Replies: 2
Views: 2856

11560 - Fixing the Bugs

I've tested this against over 2000 randomly generated test cases using uvatoolkit.com, and my answers are digit-for-digit exactly the same, but I still get WA. Any ideas would be great :D #include <stdio.h> int b; int t; double f; double a[1024][101][101]; double p[10]; int s[10]; int fails[10]; dou...
by wjomlex
Sun Jan 24, 2010 12:55 am
Forum: Volume 6 (600-699)
Topic: 658 - It's not a Bug, it's a Feature!
Replies: 15
Views: 7961

Re: 658 - It's not a Bug, it's a Feature! (WA)

I'm getting WA, though I've tested it quite thoroughly. If someone has some good test cases, I'd greatly appreciate it. My code works with the ones already given in this thread. The integers bp, bm, fp, and fm correspond to B+, B-, F+, and F-, as per the problem description. I've overloaded Point to...
by wjomlex
Tue Jan 27, 2009 10:36 pm
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20867

Re: 11504 - Dominos

I see I was just using too much stack space for the topple(i) method. I've changed it to a Stack implementation, and now I've improved from RE to WA. I'll have to redo my algorithm because it doesn't work on one of the Waterloo cases and I see why...
by wjomlex
Tue Jan 27, 2009 8:49 pm
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 17797

Re: 11503 - Virtual Friends

I'm getting RE, and I don't see why. My arrays are much larger than necessary, and I can't find any infinite loops or anything. Is the input formatting different from what the problem says? Can things be split across lines? //UVa Problem 11503 - Virtual Friends //Wesley May - Jan 27 2009 (RE... Arra...
by wjomlex
Tue Jan 27, 2009 8:46 pm
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20867

Re: 11504 - Dominos

I'm getting RE, and I really don't see where that would be except in input formatting: import java.util.*; import java.io.*; public class Main { static Node[] a; static StringTokenizer st; static BufferedReader scan; public static void main(String args[]) throws IOException { scan = new BufferedRead...
by wjomlex
Thu Jan 15, 2009 9:40 pm
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 20419

Re: 10432 - Polygon Inside A Circle

I'm having the same sort of precision issue, but in Java. I'm assuming that Math.PI is the closest value to PI that a double can hold. I've tried acos(-1.0) and 2*acos(0.0) and I've tried three different ways of calculating the answer (as you can see). None of them are good enough for the judge. Doe...
by wjomlex
Fri Jan 09, 2009 4:44 am
Forum: Volume 5 (500-599)
Topic: 540 - Team Queue
Replies: 37
Views: 16268

Re: 540- Team Queue, RTE

Yeah... is there any particularly tricky input? I'm assuming I have just a simple error. I'm also getting WA and would appreciate some input/output import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int cases = 0; while(true) { cas...
by wjomlex
Wed Jan 07, 2009 10:58 pm
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 27663

Re: 10344 - 23 Out of 5

I'm getting TLE, and given that some of the C++ people are getting TLE, I expect that the test input is just really massive and this problem can't be done in Java, even with BufferedReader and StringBuffer. import java.util.*; import java.io.*; public class Main { static int[] a, b; public static vo...
by wjomlex
Sat Dec 27, 2008 11:52 am
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 7998

263 - TLE in Java

I'm getting TLE, but I've tried to optimize my code as much as is reasonable. The only meaningful improvement I can see is that when I search for previous numbers in the chain I could use a binary search, but then I'd have to sort the array, and that would take even longer than doing a linear search...
by wjomlex
Mon Dec 22, 2008 9:26 am
Forum: Volume 102 (10200-10299)
Topic: 10205 - Stack 'em Up
Replies: 60
Views: 23203

Re: 10205 - Stack 'em Up

I'm getting WA, and I've tested it with quite a few different cases. I imagine it's a problem with tokenizing the input. If anyone's got a thought, or a test case that it fails on, please post it ^_^ import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new ...
by wjomlex
Fri Dec 19, 2008 8:43 pm
Forum: Volume 101 (10100-10199)
Topic: 10104 - Euclid Problem
Replies: 29
Views: 10156

Re: 10104 - Euclid Problem

What do you know? It works with BufferedReader in 2.870s. That's really pushing it.
by wjomlex
Fri Dec 19, 2008 7:37 pm
Forum: Volume 101 (10100-10199)
Topic: 10104 - Euclid Problem
Replies: 29
Views: 10156

Re: 10104 - Euclid Problem

I know that Scanner's slow, but somehow I doubt that it's the bottleneck in this problem. Usually Scanner is only an issue in problems that have a lot of input per case, like graph or map problems. But, I'll give it a shot ^_^ I wish I didnt' have to though. In any real contest, Scanner works just f...
by wjomlex
Fri Dec 19, 2008 1:59 am
Forum: Volume 101 (10100-10199)
Topic: 10104 - Euclid Problem
Replies: 29
Views: 10156

Re: 10104 - Euclid Problem

Code: Select all

Removed after ACC
I'm getting TLE. I thought it might be because of the iterative form of Euclid's algorithm, but it shouldn't be any slower than the recursive form. Does this problem have a really large input that isn't kind to Java users?

Go to advanced search