Search found 80 matches

by jjtse
Thu Sep 08, 2005 8:37 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 62599

thanks,

I already solved it.
by jjtse
Thu Sep 08, 2005 12:28 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 62599

sohel's idea sounds good, and exactly what I implemented. I created an array of size 11000 that holds prime numbers up to 11000. (the array doesn't get filled up all the way because not every number is prime). However, I still get time limit exceeded. I'm thinking just enumerating prime numbesr from...
by jjtse
Wed Sep 07, 2005 10:55 pm
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 62599

dumb dan wrote: (in this case up to sqrt(10000^2+10000+41)).

That's a good idea, but where are you going to find an array big enough to hold a bazillion prime numbers?
by jjtse
Tue Sep 06, 2005 7:11 pm
Forum: C
Topic: are threads allowed?
Replies: 2
Views: 1947

are threads allowed?

Hi,

Does anyone know if we're allowed to use threads? If we are, then that can potentially solve a lot of the "time limit exceeded" errors.


jjtse
by jjtse
Sun Sep 04, 2005 6:14 pm
Forum: C
Topic: how to read a blank line?
Replies: 2
Views: 2838

how to read a blank line?

Hi, A lot of these input files have more than one "cases" and they are usually separated by a blank line. In C++, if we're reading integers in a loop(i.e. cin>>num;) and it approached that blank line, it will simply skip the blank line and reads the number after that. Is there a way to take into acc...
by jjtse
Fri Aug 26, 2005 10:04 pm
Forum: Other words
Topic: precion problem float Vs double
Replies: 5
Views: 1395

precion problem float Vs double

Hi, I declare my variables with 'long double' to hold the real numbers, because that's the most accurate method to represent them. However, even with 'long double' sometimes I'll get a number that is 1.238382e-30. Which is ridiculously close to zero. It should've just printed out zero, Do you know h...
by jjtse
Fri Aug 26, 2005 10:00 pm
Forum: Volume 106 (10600-10699)
Topic: 10676 - Grid Points
Replies: 4
Views: 2119

Hi, I declare my variables with 'long double' to hold the real numbers, because that's the most accurate method to represent them. However, even with 'long double' sometimes I'll get a number that is 1.238382e-30. Which is ridiculously close to zero. It should've just printed out zero, Do you know h...
by jjtse
Wed Aug 24, 2005 10:49 pm
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 11286

ahh...I got that corrected.

we still could use "fixed" but just in a different way.

the correct usage, is this:

cout<<setiosflags(ios::fixed | ios::showpoint);


that will give no compiling error.
by jjtse
Wed Aug 24, 2005 9:35 pm
Forum: Other words
Topic: compiler version and how judges compile codes
Replies: 1
Views: 1073

compiler version and how judges compile codes

Can anyone tell me what version compiler the judges have and how they compile .cpp codes?
by jjtse
Wed Aug 24, 2005 9:23 pm
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 11286

I wish I get e-mail notifications. I registered for a new account like 10 days ago. The account ID they assigned me doesn't even show up as mine! It's someone elses. So whenever I submit codes with that ID, I'm building up someone else's statistics. But I don't care. As long as I know my code works ...
by jjtse
Wed Aug 24, 2005 8:58 pm
Forum: C
Topic: Compiler version
Replies: 7
Views: 4051

This topic's over a year old. I'm wondering what verion compiler they use now. Cause I'm using 3.2 and it compiles fine. The judges say compiling error.
by jjtse
Wed Aug 24, 2005 8:27 pm
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 11286

guys check this out. This is very standard. I didn't use any strings this time. No getlines and stuff like that. Just the good'o cin>>. All I used are floats, ints, 2-D character arrays, cin and couts, a bunch of if statements and for loops. The judge still says it doesn't compile. I use g++ -Wall -...
by jjtse
Tue Aug 23, 2005 8:10 pm
Forum: Volume 5 (500-599)
Topic: 549 - Evaluating an Equations Board
Replies: 13
Views: 5002

haha, you misunderstood me. I'm not here to search for other people's codes. I'm here to write my own codes. I believe I'm 90% done. All the test cases I used have worked with my program, yet the judge keeps on saying 'wrong answer'. So I'm kind of stuck and don't know what can go wrong. I'm just lo...
by jjtse
Tue Aug 23, 2005 8:00 pm
Forum: Volume 5 (500-599)
Topic: 549 - Evaluating an Equations Board
Replies: 13
Views: 5002

I didn't use recursion either. What I did was try every single possible combination. But the problem with that is, trying combinations doesn't solve this problem: 9-(5-4) = 8 VS (9-5)-4 = 0. With multiplication and addition, you don't run into this problem, as they are associative and commutative. S...
by jjtse
Tue Aug 23, 2005 7:35 pm
Forum: Volume 5 (500-599)
Topic: 549 - Evaluating an Equations Board
Replies: 13
Views: 5002

did you use recursion?

Go to advanced search