Search found 11 matches

by Jorge Pinto
Thu Oct 10, 2002 6:10 pm
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 15034

My accepted solution gives this output on these tests: Input: 1E1 1e1 1E 1EE1 1 E1 .1E1 1E.1 1E1.1 ++1E1 1E--1 1.1.1E1 abcd 1 1.1 0e-0 * Output: 1E1 is legal. 1e1 is legal. 1E is illegal. 1EE1 is illegal. 1 E1 is illegal. .1E1 is illegal. 1E.1 is illegal. 1E1.1 is illegal. ++1E1 is illegal. 1E--1 is...
by Jorge Pinto
Fri Feb 22, 2002 4:58 pm
Forum: Volume 1 (100-199)
Topic: 180 - Eeny Meeny
Replies: 34
Views: 9854

Accepted,

Yeap, <=(min/2)

the tricky part was that - the problem doesn't give a clue about it, but it makes sense.

Thanks Ivan
by Jorge Pinto
Thu Feb 21, 2002 8:34 pm
Forum: Volume 1 (100-199)
Topic: 180 - Eeny Meeny
Replies: 34
Views: 9854

Oops, a missplaced printf was giving that output, but my final answer wasn't being afected.

made new ouput, this time, complety equal to paulhryu.

I'm sending in the code Ivan, thanks..

(it must be really just 1 case)
by Jorge Pinto
Thu Feb 21, 2002 7:43 am
Forum: Volume 1 (100-199)
Topic: 180 - Eeny Meeny
Replies: 34
Views: 9854

made myoutput from 1 to 500 just like you this is the result of "diff myout yourout" so you see: (line)c(col) myout --- yourout 1c1 < 1: 0 1 --- > 1: 0 0 4,5c4,5 < 4: 0 4 < 5: 0 5 --- > 4: 0 0 > 5: 0 0 9c9 < 9: 0 9 --- > 9: 0 0 12c12 < 12: 0 12 --- > 12: 0 0 17c17 < 17: 0 17 --- > 17: 0 0 21c21 < 21...
by Jorge Pinto
Thu Feb 14, 2002 8:36 pm
Forum: Volume 1 (100-199)
Topic: 180 - Eeny Meeny
Replies: 34
Views: 9854

well, every value you have in your post, is an exact match with my solution.. so it gives me 65 too, and the chief's give equal to me.

i still don't know what's wrong, it must be a small particular case..
by Jorge Pinto
Fri Jan 25, 2002 2:00 am
Forum: Volume 1 (100-199)
Topic: 180 - Eeny Meeny
Replies: 34
Views: 9854

my output is equal...
any tricks?
really don't know

thanks Ivan
by Jorge Pinto
Thu Jan 24, 2002 9:05 pm
Forum: Volume 1 (100-199)
Topic: 180 - Eeny Meeny
Replies: 34
Views: 9854

simple problem, don't know what's wrong i'm just checking the solutions to the lower value because if i check to the higher value, i can't get the "Better estimate needed" with my solution. anyway.. just need the results for these input cases thank you in advance 130 500 200 500 11 38 26 34 10 30 80...
by Jorge Pinto
Fri Jan 11, 2002 11:45 am
Forum: Volume 7 (700-799)
Topic: 787 - Maximum Sub-sequence Product
Replies: 39
Views: 19275

i agree with ilham the sort of dynamic program you are thinking is fine for int types, trying to do the multiplication just one time. still, its * and / not + and - put some big numbers multiplying and dividing the implementation would be much harder and longer (time).. maybe just maybe you could wi...
by Jorge Pinto
Thu Jan 10, 2002 6:24 pm
Forum: Volume 102 (10200-10299)
Topic: 10215 - The Largest/Smallest Box ...
Replies: 55
Views: 29584

just solved it, got accepted
used C and doubles

if your using functions like pow or sqrt
use 2.0 and divide by 6.0 in the arguments

when using constants with doubles, use x.0

that should work
by Jorge Pinto
Thu Jan 10, 2002 5:05 pm
Forum: Volume 7 (700-799)
Topic: 787 - Maximum Sub-sequence Product
Replies: 39
Views: 19275

well.. you just have to do it once in a life time, the next time you need it, just copy/paste or adapt the code.

you don't have to reinvent the wheel everytime :smile:

anyway, shoot the ideia, i would like to know what you think about it
by Jorge Pinto
Thu Jan 10, 2002 2:14 pm
Forum: Volume 7 (700-799)
Topic: 787 - Maximum Sub-sequence Product
Replies: 39
Views: 19275

just solved the problem, got 320ms .. hmm.. big time i tried with long long, but got WA so i used strings got AC (i wonder if anyone used just doubles or long llong, someone has a hint of "floats" in the solved rank list in pascal) i think my algorithm is pretty fast using strings... still got big 3...

Go to advanced search