## Search found 429 matches

Mon Jul 14, 2003 5:21 pm
Forum: Volume 105 (10500-10599)
Replies: 41
Views: 4525
Dominik: In general, there is no faster method than Gauss-Jordan elimination. For special cases (such as tridiagonal matrixes) it is possible to calculate the inverse in O(n^2). For I/O, you could try the following: 10 9.5013 6.1543 0.5789 0.1527 8.3812 1.9343 4.9655 7.2711 7.9482 1.3652 2.3114 7.91...
Mon Jul 14, 2003 5:03 pm
Forum: Volume 105 (10500-10599)
Topic: 10525 - New to Bangladesh?
Replies: 50
Views: 20116
The spacing seems fine.

On your last test case, my program outputs 5 & 3, so I guess there are no such test cases in judge's input.
(The last cost given in input is the one my program uses.)

If you have the time and energy, try generating a big file of random inputs and I'll run my program on it.
Mon Jul 14, 2003 4:51 pm
Forum: Volume 6 (600-699)
Topic: 659 - Reflections
Replies: 12
Views: 5654
If I read my code correctly, I used out=2*v-in (the equation in+out=2*v makes sense, so I think it's right), where out is the outgoing angle, in is the incoming angle, and v is the angle of the tangent of the circle. I find the intersection the same way as you do (be careful to choose the right inte...
Mon Jul 14, 2003 4:25 pm
Forum: Volume 6 (600-699)
Topic: 650 - Bowl
Replies: 5
Views: 3944
Names can't contain spaces, but I see no reason why it shouldn't be possible for them to contain digits. (I just used scanf to read all input) You could try this input: Chuck 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Solly 0 0 0 0 0 0 0 0 0 0 0 8 Lothar 10 0 10 0 10 0 Brutus 5 1 2 0 6 0 9 McGillicud...
Sun Jul 13, 2003 10:30 am
Forum: Volume 103 (10300-10399)
Topic: 10312 - Expression Bracketing
Replies: 22
Views: 4846
I never get annoyed at problems that explain terms used in the problem statement (except if this makes the problem statement 10 pages long or if it is explained what a square root is or any similar very basic knowledge). If a term that I know (like complete graph) is explained I can just parse throu...
Sun Jul 13, 2003 10:11 am
Forum: Volume 105 (10500-10599)
Topic: 10525 - New to Bangladesh?
Replies: 50
Views: 20116
Carneiro: you could try the following input 1 6 8 1 2 50 100 1 3 50 100 1 4 50 100 2 6 50 100 3 6 51 100 4 6 49 101 1 5 50 100 5 6 49 100 7 1 6 6 1 5 6 5 2 5 3 5 4 4 5 The answer is: Distance and time to reach destination is 200 & 99. Distance and time to reach destination is 200 & 99. Distance and ...
Sun Jul 06, 2003 10:02 pm
Forum: Volume 105 (10500-10599)
Topic: 10526 - Intellectual Property
Replies: 10
Views: 5343
Thanks! I handled that test case OK, but with the judges' data I was able to find a nasty bug in my suffix array implementation, so I guess it wasn't nearly as well-tested as I thought. I'll take the fact that your elegant sample solution which just use qsort to create the suffix array was faster th...
Sun Jul 06, 2003 6:30 pm
Forum: Volume 105 (10500-10599)
Topic: 10526 - Intellectual Property
Replies: 10
Views: 5343

### 10526 - Intellectual Property

I keep getting WA, and before I go about checking my loops for off-by-one errors yet again, I would like to be certain that my input is correct (most of my solution is based on well-tested code, so I suspect I might be doing some mistake with the input). How weird input can one expect? Can there be ...
Sun Jul 06, 2003 4:42 pm
Forum: Volume 105 (10500-10599)
Topic: 10521 - Continuously Growing Fractions
Replies: 17
Views: 6274
Alexander: Apart from output formatting, there are actual errors in your output. For instance, floor(34/-64) != 0. (Read the problem statement very carefully)
Tue Jul 01, 2003 3:21 pm
Forum: Volume 6 (600-699)
Topic: 659 - Reflections
Replies: 12
Views: 5654
It could be, but I'm too tired at the moment to check. :( If it was in a book it's probably right. I didn't use vector algebra at all to calculate the reflected ray. My approach was to simply draw the circle and the rays on a piece of paper and derive a formula for the outgoing angle in terms of the...
Tue Jul 01, 2003 2:06 pm
Forum: Volume 105 (10500-10599)
Topic: 10511 - Councilling
Replies: 26
Views: 11814
The problem is bipartite matching with some extra constraints. I solved it the common way to solve bipartite matching, i.e. I build a network (but have to add some pieces to incorporate the constraints in the network) and find a maximum flow.
Sun Jun 29, 2003 11:49 pm
Forum: Volume 6 (600-699)
Topic: 659 - Reflections
Replies: 12
Views: 5654
Pasq: My accepted program outputs

Code: Select all

``1 2 1 3 inf``

(After hitting 1, the ray goes from (3.79,4.84) and hits 2 in (6.32, 6.26).)
Wed Jun 25, 2003 11:57 am
Forum: Volume 2 (200-299)
Topic: 276 - Egyptian Multiplication
Replies: 22
Views: 5812
I use int, and just print the final result as (a*b)%100000, so when the input is 90000*90000 I get an overflow (and that's why my answer was not 0)

In such cases I would get overflow in the process as well.

So I'm guessing there are no test cases in judge's input where a*b >= 2^31
Sun Jun 22, 2003 2:56 pm
Forum: Volume 2 (200-299)
Topic: 276 - Egyptian Multiplication
Replies: 22
Views: 5812
My solution outputs: | r || * rr |||| rrrr |||||||| * rrrrrrrr The solution is: | | n 9 8 r || || nn 99 88 rr |||| |||| nnnn 9999 8888 rrrr |||||||| |||||||| nnnnnnnn 99999999 88888888 rrrrrrrr |||||| n * |||||| nnnnnnn 9999999 8888888 rrrrrrr || nnn || nnnnn 99999 88888 rrrrr |||| nnnnnn |||| 9 8 r...
Tue Jun 10, 2003 11:24 am
Forum: Volume 100 (10000-10099)
Topic: 10096 - The Richest Man of the Universe
Replies: 42
Views: 16597

### 10096 - Richest Man of the Universe

This problem is giving me lots of trouble. Could someone give me the output for the following input? 16 S 10 10 4.5 M 5 5 9.98 M 5 5 9.99 M 5 0.05005 5 M 5 0.05006 5 M 1999 1999 1999 M 2000 2000 2000 M 1000 1500 2000 S 0.0 0 0.0 S 0.00005001 0.0 0.0 S 1 1 0.00 S 1 1 0.01 S 0.02 0.02 0.0082842 S 0.02...