## Search found 158 matches

Thu May 31, 2007 5:24 am
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 45705

Basically this is my algorithm. First find out what the average amount is, rounded down. Then I cycle through all of the amounts, and if the amount is less than the average, I add the difference to the LESS pile, and if the amount is more than the average, then I add the difference to the MORE pile...
Wed May 23, 2007 3:55 pm
Forum: Volume 112 (11200-11299)
Topic: 11203 - Can you decide it for ME?
Replies: 21
Views: 10910
Any idea? Can you help me? Thanks! Hello. I think your code has some really really small mistakes. Look at this line: if (s[1] <> 'M') then //if next char is not an M What if s is an empty string? What do you think will happen? I think in that case a runtime error would produce, although that code ...
Mon May 21, 2007 7:20 pm
Forum: Volume 112 (11200-11299)
Topic: 11203 - Can you decide it for ME?
Replies: 21
Views: 10910
STEP 6 & 7 :: if( x + y == z ) yes; else no; Thanks. I'm using this approach now but still can't get accepted. I'm beginning to beleive there is some sort of special case that i'm not considering. :( I'm going a little desperate now so I will post my Pascal code; Just in case some of you people wou...
Mon May 21, 2007 6:31 pm
Forum: Volume 112 (11200-11299)
Topic: 11203 - Can you decide it for ME?
Replies: 21
Views: 10910
Thanks for your answers. Your alogrithm seems to be right (Actually, step 6, 7 could be done more simply). How? There can be M & E more than 1. What do you mean with this? Do you mean that M and E can appear in the string more than once? If that's what you mean, then they wouldn't be correct theorem...
Mon May 21, 2007 8:46 am
Forum: Volume 112 (11200-11299)
Topic: 11203 - Can you decide it for ME?
Replies: 21
Views: 10910

### 11203 - Can you decide it for ME?

Hello all, nice people: I don't know why I am getting wrong answer at this problem. Here's the input i'm trying: 49 ??M?E??? xM?Ex? ??M??E???? M?E? ??m?e??? ?M?E?? 12M12E???? ME M?E ?M?E? ?ME? ME? ???ME??? ???M?E???? ??????????M?E??????????? ??????????M?E?????????? ????????????????????M?E???????????...
Sun Apr 29, 2007 4:43 am
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 10542
Try with this input: 1T1b5T!1T2b1T1b2T!1T1b1T2b2T!1T3b1T1b1T!3T3b1T!1T3b1T1b1T!5T1*1T! 11X21b1X! 4X1b1X! My AC code outputs this: T TTTTT T T TT T T TT T T T TTT T T T T TTTTT*T XX X XXXX X By the way, here's a fancy test case: Input: 3X3b3X1b1X5b1X1b1X2b1X3b1X2b1X1b4X1b4X1b1X3b3X 1b1X4b1X1b1X1b1X2...
Mon Apr 23, 2007 8:13 am
Forum: Volume 1 (100-199)
Topic: 151 - Power Crisis
Replies: 56
Views: 5017

### Re: Two answers

If I'm not mistaken, there are at least to possible answers for N=13, which are 1 and 7. I think the wording should say something like "If there's more than one solution, print the lowest possible m." In fact, that's exactly what it says: Write a program that will read in the number of regions and ...
Sun Feb 04, 2007 7:52 pm
Forum: Pascal
Topic: Does Online Judge's FPC support dynamic arrays?
Replies: 0
Views: 4000

### Does Online Judge's FPC support dynamic arrays?

Hello all. I have a code that perfectly compiles on my machine (WinXP - FPC 2.0.4) but when I send it to the judge I receive: Free Pascal Compiler version 1.0.6 [2002/05/23] for i386 Copyright (c) 1993-2002 by Florian Klaempfl Target OS: Linux for i386 Compiling 05310609_24.p 05310609_24.p(10,18) Fa...