Search found 10 matches

by Smeagol '_'
Tue Feb 18, 2003 6:00 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318272

i'm sorry, i'm new to this.... but , if i get rid of the array statements it's going to take a lot of cpu time this i used to store the already computed values... what should i use for caching then?
thank you for your comments :D
by Smeagol '_'
Mon Feb 17, 2003 4:44 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318272

I gives me a wrong answer if i take off that line and doen't reduce de memory :cry:
by Smeagol '_'
Fri Feb 14, 2003 11:27 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318272

maybe it's because you're using signed integers and when it tests for large numbers it's not calculating right. I tested the program and it didn't work.
You should use unsigned ints and i believe the compiler complains when not using that
int main()
{
return 0;
}
format. I haven't looked at the ...
by Smeagol '_'
Wed Feb 12, 2003 8:12 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318272

hi,
i just got my code accepted but i'm wasting too much memory... I don't know how to reduce it. I tried allocating memory for each case depending on the range given , but this increases cpu time.... can somebody help me out.
This is the code i have.

[cpp]
#include <iostream>
#include <cstdlib ...
by Smeagol '_'
Wed Feb 12, 2003 6:46 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108923

how bout ....

25
move 3 onto 3
move -1 over -900
pile 25 over 5
quit
by Smeagol '_'
Wed Feb 12, 2003 6:33 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108923

I got AC , you were right !! :D thanks!!
by Smeagol '_'
Wed Feb 12, 2003 6:30 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108923

mmm.. but i thought strcmp didn't work with the string class... i've always used it without that cstring ( iguess :-? )
by Smeagol '_'
Tue Feb 11, 2003 9:42 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108923

Compile Error on problem 101

Hi, i wanted to know if somebody could tell me what's wrong with this code... it compiles fine in my computer but the judge won't take it...
thanks! :D
[cpp]
#include <iostream>
#include <cstdio>

using namespace std;

struct action{
unsigned int block1;
unsigned int block2;
char instruction[5 ...
by Smeagol '_'
Wed Feb 05, 2003 12:47 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318272

ok forget it , my bad!! LOL :D
by Smeagol '_'
Tue Feb 04, 2003 11:55 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318272

Wrong Answer on p100 '_'

hi guys, i know you get a lot of postings on problem 100 ... but i've tried everything on this problem and i still get a wrong answer!!! : ( and lots of memory used, i know is because of the array but... Can anybody take a look at it and help me a little bit :D
[cpp]

#include <iostream>
#include ...

Go to advanced search