## Search found 69 matches

Sun Feb 18, 2018 8:39 pm
Forum: Volume 2 (200-299)
Topic: 212 - Use of Hospital Facilities
Replies: 6
Views: 3512

### Re: 212 - Use of Hospital Facilities

Are there multiple runs? So, what is the input format? What is the exact format if numPatients = 100? 100 won't fit into two columns, but two columns for patient ID number is what is shown in sample I/O. I have the same questions. The problem description states expressly that there is only one inpu...
Thu Feb 15, 2018 5:13 am
Forum: Volume 2 (200-299)
Topic: 284 - Logic
Replies: 4
Views: 2451

### Re: 284 - Logic

Once you have all of the basic gates set up properly, the thing to check is to make sure you handle chained outputs. Input: 1 12i 22 .. 22! 33 .. 33& 53 .. 16i 33 .. 53o 63 .. 63o .. end 3 01 11 00 Output: 11 00 00 If you don't chain outputs properly, you'll wind up with 10 as an answer ot the first...
Sat Feb 03, 2018 8:08 am
Forum: Volume 4 (400-499)
Topic: 453 - Intersecting Circles
Replies: 84
Views: 14092

### Re: 453 - Intersecting Circles

I think the test cases for this problem actually uncover literally every precision problem that you can have with floating point numbers. NaNs from subtracting two non-NaN floats, negative 0's...this was quite a party! Also, remember that a point is a degenerate circle. So, you have to cover the cas...
Thu Feb 01, 2018 5:42 am
Forum: Volume 8 (800-899)
Topic: 885 - Telephone Directory Alphabetization
Replies: 21
Views: 12374

### Re: 885 - Telephone Directory Alphabetization

I was certain that the test data was improperly formatted on this one. SURPRISE, it's not! When you expand the numbers to text, don't use any 'ands' between the numbers. So, 101 is ONE HUNDRED ONE, and NOT ONE HUNDRED AND ONE And even though the number to text expansion seems easy, I had to write a ...
Mon Sep 18, 2017 12:34 am
Forum: Volume 121 (12100-12199)
Topic: 12184 - Transcribed Books
Replies: 1
Views: 872

### Re: 12184 - Transcribed Books

I'm confused on this one.
Couldn't the answer to the first input be any number greater than 90?

1 1 1 1 1 1 1 1 1 9
2 4 6 8 10 12 14 16 18 90

9 = 9 % N
90 = 90 % N

Doesn't every integer greater than 90 satisfy both of these?
So why is the expected output for this one "impossible"?
Sat Oct 08, 2016 10:23 pm
Forum: Volume 4 (400-499)
Topic: 425 - Enigmatic Encryption
Replies: 6
Views: 1891

### Re: 425 - Enigmatic Encryption

If anyone wants to try this one in Java, there is a Java implementation of the crypt() function here : https://cseweb.ucsd.edu/classes/wi14/cse130-a/homeworks/hw5/Crypt.java Just in case that link breaks, it's also below. (Note that C/C++ users are allowed to link to the library with the crypt comma...
Wed Oct 05, 2016 4:42 pm
Forum: Volume 12 (1200-1299)
Topic: 1280 - Curvy Little Bottles
Replies: 1
Views: 1209

### Re: 1280 - Curvy Little Bottles

In:

Code: Select all

``````4
0 0 .00125 .00025 .000025
-15.9 15 1
``````
Out:

Code: Select all

``````Case 1: 39.27
0.43 1.01 1.90 4.15 24.84 25.95 26.59 27.05
``````
Wed Jun 08, 2016 6:20 pm
Forum: Volume 12 (1200-1299)
Topic: 1219 - Team Arrangement
Replies: 1
Views: 2937

### Re: 1219 - Team Arrangement

The tricky ( annoying ) thing about this one is that how to compute "longest record with team" is underspecified. Is it total years across all stints with team, or player with the longest spread of years ( possibly not continuous ) in his history with team? I tried it both ways - figure out total ye...
Thu Jun 02, 2016 6:22 am
Forum: Volume 127 (12700-12799)
Topic: 12725 - Fat and Orial
Replies: 1
Views: 3440

### Re: 12725 - Fat and Orial

In Java, BigDecimal can make some computations easier, but it's incredibly slow. So, use native doubles on this one. Also, you will be tempted to use String.format( ) to output your native double results. However, in Java, String.format() is incredibly slow. So, try writing your own custom formatter...
Sat May 28, 2016 10:59 pm
Forum: Volume 108 (10800-10899)
Topic: 10865 - Brownie Points
Replies: 5
Views: 2984

### Re: 10865 - Brownie Points

What in the problem statement allows us to assume that the lines are drawn through the middle point of the input sequence?
Sat May 28, 2016 10:25 pm
Forum: Volume 12 (1200-1299)
Topic: 1233 - USHER
Replies: 4
Views: 1759

### Re: 1233 - USHER

How can this possibly be done with Floyd Warshall?
That has a cubic big-O run time, so with up to 500 vertices, that could amount to 125,000,000 iterations for a single problem instance.
Sat Mar 26, 2016 5:29 am
Forum: Volume 15 (1500-1599)
Topic: 1502 - GRE Words
Replies: 1
Views: 1749

### Re: 1502 - GRE Words

Does the judge input not match the problem spec? I've tried parsing the input numerous ways: 1) multiple words and scores can appear on the same line 2) word on one line and score one next 3) word on line only ( assume score is 0 ) 4) number on line only ( assume word is empty string ). I can't get ...
Fri Mar 25, 2016 5:16 pm
Forum: Volume 105 (10500-10599)
Topic: 10582 - ASCII Labyrinth
Replies: 18
Views: 10395

### Re: 10582 - ASCII Labyrinth

Some I/O In: 125 5 7 +---+---+---+---+---+---+---+ + + + * + + + + + +** +** + * + + **+ + **+ + * + * + * + + * + + * + +---+---+---+---+---+---+---+ + + + + * + + * + * + + + +** +** +** +** +** + + + + * + + * + + + +---+---+---+---+---+---+---+ + + * + + + + + + +** +** + **+***+ **+ **+***+ + *...
Thu Mar 17, 2016 6:41 am
Forum: Volume 2 (200-299)
Topic: 276 - Egyptian Multiplication
Replies: 22
Views: 5473

### Re: 276 - Egyptian Multiplication

If you use the UHunt cached version of the pdf, it directs you to fill to the 40th column and start the double of the multiplicand in the 41st.
The actual statement at UVA directs you to fill to 34 and start in 35 for multiplicand.
Use the UVA version of the statement!!!!
Wed Mar 16, 2016 3:59 am
Forum: Volume 4 (400-499)
Topic: 413 - Up and Down Sequences
Replies: 22
Views: 5096

### Re: 413 - Up and Down Sequences

How can the answer to the 4th test case: 2 2 2 2 3 0 possibly be: Nr values = 5: 4.000000 0.000000 Since there are 4 2's followed by a three, I see 5 "up" series of length 1, 2, 3, 4, 5. So, given that there are 5, shouldn't the average length be 3?? Since so many have gotten this one, and no one is...