Search found 10 matches

by Izmunuti
Sat Mar 15, 2003 6:31 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 56240

You might want to consider illegal inputs. Think about what your program would do if you added these lines to your input:

Code: Select all

move 0 ontopof 6 
relocate 6 before 3 
Iz
by Izmunuti
Wed Mar 12, 2003 4:40 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 56240

Try this input

Here's an input that breaks your program in two ways: 10 move 9 onto 1 move 8 over 1 move 7 over 1 move 6 over 1 pile 8 over 6 pile 8 over 5 move 2 over 1 move 4 over 9 move 9 over 9 move 1 over 9 move 0 over 5 move 0 ontopof 6 relocate 6 before 3 quit My code returns: 0: 1: 1 9 2 4 2: 3: 3 4: 5: 5 ...
by Izmunuti
Tue Mar 11, 2003 6:23 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

[quote]By the way, what did you use "iomanip.h" for? Do you know that compiler ignores
by Izmunuti
Thu Mar 06, 2003 7:35 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

minskcity, you've been very, very helpful! :D Your AC solution is much more robust than the one I found on the web. The bug is in my program. It is not handling the colinear points (498,9), (498,91), and (498,312) properly. It gets confused and leaves (498,312) outside the hull. When you deleted two...
by Izmunuti
Wed Mar 05, 2003 6:16 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

Tried a couple of email servers. No difference. Made sure I wasn't using any C++ style comments. Pre-wrapped my source to 72 chars/line before mailing. Still WA. Matched over 7000 random kingdoms vs. AC code and then the AC prog messed up. Compiled on a x86 linux box which ought to be more "Jud...
by Izmunuti
Mon Mar 03, 2003 8:06 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

Sorry if I was not clear where the problem sets came from. The problems I refer to occur earlier in the thread. The "Seolv #2" problem came from seolv's post above. Here I've reduced it to the relevant part: 10 100 101 200 195 143 199 111 200 107 154 132 102 101 223 110 155 118 107 102 148...
by Izmunuti
Mon Mar 03, 2003 7:30 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

minskcity wrote:Make sure your program prints those zeros.
Thanks for pointing this out. I was sloppy :oops: in my original posting and only typed "0.0". My program does it correctly:
  • >./p109 < test.in
    0.00
by Izmunuti
Mon Mar 03, 2003 6:22 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

Answers?

I know this thread is old but I'm stumped, so what the heck. I have my program (WA) which to my eyes seems fine. To help figure out what's wrong with it, I found some AC code and have been using it as a black box for comparison. Seolv problem #1: WA and AC = 7961.00 Seolv problem #2: WA = 7961.0, AC...
by Izmunuti
Mon Mar 03, 2003 4:57 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 27369

P109 May Cause Embolism

I have been struggling with this problem for far too long. My program seems correct but still gets WA. My program is based around: [cpp] inline long triangle_area2x (Point P0, Point P1, Point P2) { long area; area = P0.x * (P1.y - P2.y) - P1.x * (P0.y - P2.y) + P2.x * (P0.y - P1.y); return area; } [...
by Izmunuti
Mon Feb 10, 2003 7:29 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 56240

"Is this a correct interpretation?" The problem description states that "Any command in which a=b or in which a and b are in the same stack of blocks is an illegal command. All illegal commands should be ingored..." So you must ignore it, whether the command is workable or not do...

Go to advanced search