## Search found 47 matches

Fri Aug 16, 2002 4:25 pm
Forum: Volume 1 (100-199)
Topic: 130 - Roman Roulette
Replies: 25
Views: 2572

### 130: WA

OK, I briefly gave a description of how this might be solved in the combined 130 / 131 list but since that topic is mostly dominated by 131, I'm creating the new topic. First, let me say that the example data should have been reserved as some of the tricky data. I would have failed with my original ...
Fri Aug 16, 2002 4:19 pm
Forum: Volume 1 (100-199)
Topic: 131 - The Psychic Poker Player
Replies: 34
Views: 5629
Oops! I goofed again. (Sorry!) Actually it looks like your test for Straight Flush only allows for a Royal Straight, not a Royal Flush. A Straight is any sequence of consecutively ranked cards, regardless of suit. Because of how they've defined the hands, an A, 2, 3, 4, 5 would count as a straight, ...
Fri Aug 16, 2002 4:02 pm
Forum: Volume 1 (100-199)
Topic: 111 - History Grading
Replies: 135
Views: 23018

### 111: WA

OK, first I'm confused by the sample input/output on 111. Sample 1 looks correct. Sample output 2 does not match the sample input. At least assuming that the problem description can be trusted. Here's the 2nd sample input: 10 3 1 2 4 9 5 10 6 8 7 1 2 3 4 5 6 7 8 9 10 4 7 2 3 10 6 9 1 5 8 3 1 2 4 9 5...
Fri Aug 16, 2002 3:36 pm
Forum: Volume 1 (100-199)
Topic: 131 - The Psychic Poker Player
Replies: 34
Views: 5629
I stand corrected. Yes, I would go with the order they used in the introduction. This problem obviously needs review because they call it *poker* but don't follow the rules of *poker*. Back to square one. Strangely, the introduction indicates that an 'A'ce should be considered less than a two, but t...
Thu Aug 15, 2002 3:25 pm
Forum: Volume 1 (100-199)
Topic: 131 - The Psychic Poker Player
Replies: 34
Views: 5629
According to http://www.poker-rulez.com/poker-basics.html, Aces are always high. They can never be considered lower than a 2. Yes, a straight could contain a 2, 3, 4, 5, 6 or 10, J, Q, K, A. But not A, 2, 3, 4, 5. Any series of consecutive numbers can be a straight. But since the Ace is always high,...
Wed Aug 14, 2002 5:52 pm
Forum: Volume 1 (100-199)
Topic: 131 - The Psychic Poker Player
Replies: 34
Views: 5629
As far as problem 130 goes, try this for an idea. Take the input data, start your counting at position 1 with the number of people listed, killing and shifting people as described. When your simulation gets down to one person, determine that person's starting position. Now you want to shift the calc...
Wed Aug 14, 2002 5:31 pm
Forum: Volume 1 (100-199)
Topic: 131 - The Psychic Poker Player
Replies: 34
Views: 5629
I haven't looked through your entire code, but the following snippet seems wrong: case 'A' : hand [0] = 'a' ; break ; case '2' : hand [0] = 'b' ; break ; case '3' : hand [0] = 'c' ; break ; case '4' : hand [0] = 'd' ; break ; case '5' : hand [0] = 'e' ; break ; case '6' : hand [0] = 'f' ; break ; ca...
Wed Aug 14, 2002 4:00 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 193092
I think this is your issue: for ( ; i<=j; i++) { if ( hesapla(i+1) > max ) max = hesapla(i+1); } This goes through the loop for every number from i through j, but it calculates the cycle on the i+1 value. So when i = j, it will calculate the cycle for j+1! Change the loop control to only process whi...
Wed Aug 14, 2002 3:51 pm
Forum: Volume 1 (100-199)
Topic: 168 - Theseus and the Minotaur
Replies: 64
Views: 8174
I received one direct e-mail saying that there was a student that was supposed to be looking at it. But as yet, (s)he hadn't reported back. They've recognized that there is an issue, but the person assigned to it has not had much progress yet.

David
Mon Aug 12, 2002 5:44 pm
Forum: General
Topic: Solutions for the problems
Replies: 8
Views: 3112
In general, its pretty easy to tell whether your code is as good as the first place code. In the problem set listing -- click on the percentage inside the parenthesis for the problem in question. This will provide a ranking of everyone who solved the problem sorted by time spent, memory spent, and d...
Wed Aug 07, 2002 12:59 pm
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 8451
Doh! I apologize -- and stand corrected. Now that mine was also rejected with a WA, I closely read the multiple input description and found that I misspoke earlier. It looks like you're handling the multiple input correctly. On the other hand -- I see for the base case (where n = 1), your code inclu...
Mon Jul 29, 2002 2:11 pm
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 8451
OK, it's been college since I did any pascal programming. Still, your main routine seems wrong to me. I count three separate readln statements (outside of quotes of course). The problem description is quite clear that the input consists only of a single integer on a line by itself. Once you read tha...
Tue Jul 23, 2002 3:43 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 29578
I agree, this is a very easy problem. The description has changed some since I solved this, though. At the time, the trick was that some of the coordinates could be less than 0, but always with an absolute value less than 10000. Even though they now promise positive integers, I would allow for 0 as ...
Thu Jul 18, 2002 4:03 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 193092
Sorry, I haven't looked closely at your program to help with the compile error. But I can help on this: The judge doesn't care when you output your data -- as long as your output matches the solution. So you are perfectly free to process each test case and output the answer for each test case before...
Tue Jul 16, 2002 3:30 am
Forum: General
Topic: where to find the answers or source codes of problemssets
Replies: 8
Views: 2350
But that would kill the fun! No, seriously! That's the whole point of this website -- programming practice. The website gives the problems, with some sample input / output. Meanwhile, the judge withholds the most devious, conniving inputs and outputs. You are tasked with writing programs that not on...