## Search found 42 matches

Fri Apr 17, 2009 5:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10091 - The Valentine's Day
Replies: 12
Views: 3678

### Re: 10091 - The Valentine's Day

I got the following output:

Code: Select all

``````0.34694
0.34694
0.03127``````
I was talking to crip121 and maybe my calculated number of iterations is wrong. I had a bad time trying to get AC on this, and i tried many ways to find the number of months.
Tue Mar 17, 2009 7:01 pm
Forum: Volume 100 (10000-10099)
Topic: 10091 - The Valentine's Day
Replies: 12
Views: 3678

### Re: 10091 - The Valentine's Day

crip121 wrote:what is the output for following input

Code: Select all

``````1
460 2 1
20
A B
B C
C D
D E
E F
F G
G H
H I
I J
J K
K L
L M
M N
N O
O P
P Q
Q R
R S
S T
T U
A U
``````
i WA code gives

Code: Select all

``0.03419``
My AC code gives 0.03127.
Tue Aug 05, 2008 1:29 am
Forum: Volume 9 (900-999)
Topic: 930 - Polynomial Roots
Replies: 1
Views: 2905

### Re: 930 - Polynomial Roots

Code: Select all

``````#include <stdio.h>
#include <assert.h>

int main() {
char s[150];
assert(gets(s) != NULL);
return 0;
}
``````
This gives runtime error, so this problem has no test data.
Tue Feb 19, 2008 3:28 am
Forum: Volume 102 (10200-10299)
Topic: 10209 - Is This Integration ?
Replies: 37
Views: 12089

### Re: y m i getting WA

fR0D wrote:here's my code
can sum1 help

Code: Select all

``````REMOVED
``````
I don't know if your expressions are right, but you'd better use double instead of float for real type.
Sun Sep 09, 2007 7:06 pm
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 21771
In this situation, you just count the number of nested loops.

http://www.topcoder.com/tc?module=Stati ... omplexity1
Fri Aug 03, 2007 5:45 am
Forum: Volume 102 (10200-10299)
Topic: 10209 - Is This Integration ?
Replies: 37
Views: 12089
Since there are codes for this problem on the board, I guess I'm not giving too much with this post, so these are the areas I used to find the formulas.

http://www.ee.furg.br/~thiago/10209.jpg
Sat Jul 28, 2007 12:04 am
Forum: Volume 100 (10000-10099)
Topic: 10024 - Curling up the cube
Replies: 13
Views: 3836

this input is possible?

Code: Select all

``````......
.***..
......
....*.
....*.
....*.
``````
No gaps allowed.
Wed Jul 25, 2007 12:02 am
Forum: C
Topic: C question
Replies: 2
Views: 5263
I know how it works. My question is if the new system requires the "return 0", since the current one doesn't.

But thank you anyway.
Tue Jul 24, 2007 8:38 am
Forum: C
Topic: C question
Replies: 2
Views: 5263

### C question

At Waterloo's contest, I submitted 3 problems and all of them got RE. I had no idea why that was happening, so I just waited the problems to be available on the OJ and submitted again, and 2 got AC and the other WA, so here is my question... Did this happen because I didn't put a *return 0;* on the ...
Sat Jul 14, 2007 7:06 pm
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 12023
Try these:

Code: Select all

``````1 1 1 1 1.1 1.1
99.00001 99.00001 99.99999 99.99999 99.99999 99.99999
0 0  0 0  0 0``````

Code: Select all

``````   1
0``````
Thu Jul 05, 2007 1:43 pm
Forum: Volume 100 (10000-10099)
Topic: 10033 - Interpreter
Replies: 88
Views: 24523
Using your notation: 456 - 1st instruction 789 - 2nd instruction 234 - 3rd instruction 453 - 4th instruction 125 - 5th instruction (halt) 175(skip) 183(skip) 256(skip) 012(skip) 100(skip) That's why i'm telling you, this input is wrong. You don't need to verify if the instruction is valid. In my pro...
Thu Jul 05, 2007 5:08 am
Forum: Volume 100 (10000-10099)
Topic: 10033 - Interpreter
Replies: 88
Views: 24523
It doesn't even get passed the 125, it stops right there and just skips the following lines.

If you want to make sure the other two digits are zeroes I guess you won't have any problems, since 125 isn't supposed to appear anyway... Keep in mind that this input is wrong according to the description.
Thu Jul 05, 2007 4:28 am
Forum: Volume 100 (10000-10099)
Topic: 10033 - Interpreter
Replies: 88
Views: 24523
Actually, my program stops when 125 is reached. It is the halt instruction, so the program finishes there, and the subsequent lines should be ignored. This way we have 5 instructions executed, including the 125. Why does your program stop when 125 is reached tgoulart? Isn't 100 mean to be the halt ...
Thu Jun 28, 2007 10:11 pm
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 12023
Actually, it is possible to get AC with a brute force method, but you must use a simpler way to see if the point is in the triangle. This one above is too slow.
Wed Jun 27, 2007 8:51 pm
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 12023