Search found 112 matches

by epsilon0
Sat Jul 08, 2006 8:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10012 - How Big Is It?
Replies: 26
Views: 14531

changing my floats to doubles solved it!! if anyone has the same pb, take this hint!

nice problem.
by epsilon0
Sat Jul 08, 2006 7:34 pm
Forum: Volume 100 (10000-10099)
Topic: 10012 - How Big Is It?
Replies: 26
Views: 14531

my program produces exactly the same output (with the indicated corrections) and it get WA! :(

could anymore post more test I/O please!

thx
by epsilon0
Tue Aug 16, 2005 10:56 am
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 36739

i got your program accepted with just a little modification:

consider (x * -y) is a legal operation like + - and *

just a little comment on your coding style... you should REALLY chose between C and C++ they are 2 different languages.
by epsilon0
Sun Aug 14, 2005 6:30 pm
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 36739

you can't do that, those 2 expressions are not of the required form...

though, i modified my code accordingly and got AC.. but this is so wrong!
by epsilon0
Sun Aug 14, 2005 10:52 am
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 36739

hey helloneo,

whose code did you modify? also what do you mean about negative i/o? i think the operators % and / work fine with negative integers...

can you post test cases where your output differs from ours to help us spot the problem? thanks.
by epsilon0
Sat Aug 13, 2005 3:44 pm
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 36739

hello frankhuhu, i have compiled your code and compared its output with mine or 10,000 random test cases. both programs produce exactly the same output. also i tested with 0's and they still behave the same. i have also modified my code to print the operation (when possible) and check it, and found ...
by epsilon0
Sat Aug 13, 2005 11:28 am
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 36739

i don't know if it's of any interest, but take a look at this case: 1 2 3 4 35 (((1 - 4) - 3) * 2) + 35 = 23 here you get negative numbers along the way. also, if you add the restriction that all results must be positive, then there is no solution. unfortunately, i submitted the modified code and st...
by epsilon0
Sat Aug 13, 2005 10:52 am
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 36739

hello, i'm having trouble with this problem as well. i use recursion, so i work things in reverse order from you. my code is much shorter too but i cant see where the problem is. #include <stdio.h> int possible(int *t, int len, int res) { int i, j, tmp; if (len == 1) return (*t == res); len--; for (...
by epsilon0
Tue Jul 27, 2004 2:34 pm
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 20933

hello, i solved this problem a long time ago. someone suggested your string should not exceed the maximum length (20 i think) at any moment. this might be true. some other people talked about the judge only accepting backtracking in a certain order (DCI or whatever). i dont think so. maybe their bac...
by epsilon0
Tue Jul 27, 2004 2:11 pm
Forum: Volume 2 (200-299)
Topic: 256 - Quirksome Squares
Replies: 30
Views: 8186

err sorry i was wrong... its not 19998 but 9999. i just coded that problem again last night
by epsilon0
Mon Jul 26, 2004 8:41 pm
Forum: Volume 2 (200-299)
Topic: 256 - Quirksome Squares
Replies: 30
Views: 8186

NO NO NO

NO NO NO precomputation is lame, and you may have noticed that NO problem here requires it. about this one, i have lost my sources unfortunately, but i just remembered how i solved it. there is indeed a very easy and fast solution that doesnt require brute force. or rather, yes, you might call it a ...
by epsilon0
Fri Apr 16, 2004 5:54 am
Forum: Volume 106 (10600-10699)
Topic: 10626 - Buying Coke
Replies: 23
Views: 17675

haha i just got accepted, that was a silly mistake!!! i'm glad i finally solved this problem. miras: 2 1 0 0 is not a valid input, you cannot encounter such an input, because it is guaranteed that you have enough money to buy to cokes... so for 2 cokes you'd have at least 16 units. on a side note, i...
by epsilon0
Fri Apr 16, 2004 5:30 am
Forum: Volume 106 (10600-10699)
Topic: 10626 - Buying Coke
Replies: 23
Views: 17675

i have an O(1) solution, like .. but it got WA, i must have done an error somewhere.

what i would like to help me spot my error, is lots of input/output test cases. if someone with AC can please give me some... thanx

this problem seems very simple, but its tricky :/
by epsilon0
Wed Nov 05, 2003 6:30 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 60353

try reading from stdin and writing to stdout.
by epsilon0
Sun Oct 26, 2003 8:02 pm
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 33127

this problem is a bit harder than it seems. you have a test different possibilities (not all though) it might be a good idea to first color nodes that have a lot of connections. i found the following: 1) if a node is connected to a black node, it has to be white. otherwise: 2) if a node is connected...

Go to advanced search