Search found 151 matches

by stubbscroll
Tue Apr 24, 2007 1:35 am
Forum: Algorithms
Topic: Traveling Salesman Problem .. MST or not?
Replies: 5
Views: 2916

Actually, MST can be used (as part of the algorithm) to approximately solve TSP when the triangle inequality holds for the graph.

http://en.wikipedia.org/wiki/Travelling ... cial_cases
by stubbscroll
Tue Apr 17, 2007 9:28 pm
Forum: Bugs and suggestions
Topic: 356: unclear statement
Replies: 1
Views: 2000

356: unclear statement

Follow this with a blank line to separate your output for successive inputs.
I found it unclear whether I should print a blank line after the last case (which I shouldn't, in this case). Maybe this sentence should be rephrased to "Print a blank line between successive outputs".
by stubbscroll
Tue Apr 17, 2007 8:51 pm
Forum: Volume 2 (200-299)
Topic: 207 - PGA Tour Prize Money
Replies: 30
Views: 7236

Now that P.E.'s no longer count as AC, I'm going back and fixing all P.E.'s. In case some people have the same problems as me, I'll tell about my error. I misprinted total scores lower than 100. Wrong: Player Name Place RD1 RD2 RD3 RD4 TOTAL Money Won ------------------------------------------------...
by stubbscroll
Mon Apr 09, 2007 12:06 am
Forum: Volume 2 (200-299)
Topic: 203 - Running Lights Visibility Calculator
Replies: 22
Views: 5991

I get the following output for the set above: RerjFKtJfZFdIlCkUHdZURQUQuYKehbmhOQXvmWi 1 Ownship 21.8 17.0 113.0 82.3 QpFKCqEMBUZo 23.5 17.5 48.1 91.9 Here's some input I have lying around, which I used to solve the problem. Some of these cases are random-generated, and might be less useful (for ins...
by stubbscroll
Mon Feb 19, 2007 10:30 am
Forum: Volume 111 (11100-11199)
Topic: 11170 - Cos(NA)
Replies: 22
Views: 13548

Thanks for the tip! I am actually using Dev-C++, and it works fine. (Now comes the potential headache of remembering to change it to %lld when I submit to UVa.)
by stubbscroll
Sun Feb 18, 2007 2:03 pm
Forum: Volume 111 (11100-11199)
Topic: 11170 - Cos(NA)
Replies: 22
Views: 13548

Ah, thanks. I'll try to avoid llabs in the future, then.

The reason why I use my own routine to print long long variables, is that "%lld" somehow does not work on my computer.
by stubbscroll
Sun Feb 18, 2007 1:09 pm
Forum: Volume 111 (11100-11199)
Topic: 11170 - Cos(NA)
Replies: 22
Views: 13548

Hmm, I don't get it either. I'm sure it is an obvious bug that I can't see because I've stared me blind. I'm temporarily posting my code so that others can try it and compare the output. I hope I can figure it out with your help, thanks in advance.

Code: Select all

Accepted
by stubbscroll
Sun Feb 18, 2007 12:33 pm
Forum: Volume 111 (11100-11199)
Topic: 11170 - Cos(NA)
Replies: 22
Views: 13548

My output for 1 is:

Code: Select all

Cos(A)
by stubbscroll
Sun Feb 18, 2007 12:00 pm
Forum: Volume 111 (11100-11199)
Topic: 11170 - Cos(NA)
Replies: 22
Views: 13548

11170 - Cos(NA)

During competition I got WA, although my algorithm seemed correct. Can anybody confirm if this is the correct answer for 49? Linebreaks are added to avoid a too long line. 281474976710656Cos^49(A) -3448068464705536Cos^47(A) +19826393672056832Cos^45(A) -71116412084551680Cos^43(A) +178383666978750464C...
by stubbscroll
Sun Dec 31, 2006 2:10 am
Forum: Other words
Topic: Prime number tasks
Replies: 1
Views: 1781

by stubbscroll
Sun Nov 05, 2006 3:00 pm
Forum: Volume 111 (11100-11199)
Topic: 11116 - Babel Towers
Replies: 12
Views: 6079

The point (9,9) is not inside a circle of radius 10, which means the top block's centre of mass does not rest on the bottom block.
by stubbscroll
Fri Nov 03, 2006 10:30 am
Forum: Volume 9 (900-999)
Topic: 967 - Circular
Replies: 23
Views: 12928

Your answer is correct, but there are many valid numbers containing 9 (and none containing 5).

Did you remember to output Prime without an ending s when the answer is one? It's the only trap I can think of.
by stubbscroll
Fri Oct 27, 2006 2:59 pm
Forum: Volume 111 (11100-11199)
Topic: 11140 - Little Ali's Little Brother!
Replies: 28
Views: 14178

From the problem statement: "select the pieces that can fit in the board without any rotation". So, the output is No.
by stubbscroll
Wed Oct 25, 2006 3:29 pm
Forum: Volume 9 (900-999)
Topic: Generating test cases for volume IX
Replies: 4
Views: 5770

I'm currently working on 929 - Number maze.
by stubbscroll
Sun Oct 01, 2006 2:56 pm
Forum: Bugs and suggestions
Topic: 907: missing picture
Replies: 1
Views: 1664

907: missing picture

The picture is missing from the problem statement. The picture can be found here: http://acm.up.pt/local/Historial/2003/I ... miup-c.jpg

Go to advanced search