Search found 80 matches

by Zhao Le
Sun Feb 01, 2004 1:05 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

Sorry, I'm so stupid......||||

0! = 1 ...>"<
There is nothing to blame.

Practice more you will get the problem solved quick.
by Zhao Le
Sat Jan 31, 2004 4:04 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

who can tell me why TLE???? why you got TLE, it is obvious.( though I got that TLE not very long time ago.) hint: you should use DP to solve the problem. Do a single test : i=0; while(i<1000)//even larger I guess in OJ calculate(1000);//calculate 1000! see how long it will get you out. :P and delet...
by Zhao Le
Thu Jan 29, 2004 4:16 pm
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 54049

Thanks all who replies.
I really have not noticed that.
by Zhao Le
Thu Jan 29, 2004 4:06 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 75809

I have occurred to the same question.

I can solve when using
first gets();
then atoi();

but it is C like.

I hate to both include iostream and stdio
my question is how can I turn it to C++ iostream when occurred to the multiply input.
by Zhao Le
Thu Jan 29, 2004 4:01 pm
Forum: Volume 6 (600-699)
Topic: 668 - Parliament
Replies: 12
Views: 5807

you need other methods to solve this problem (maths / smart brute force search / etc)?
It has an very very easy way to solve,but needs prove.
It takes O(n) time.

hint:
write down several solution of the number.
like 5=2+3 and so on.
31=2+3+5+6+7+8;

try to find out what common they have.
by Zhao Le
Thu Jan 29, 2004 2:12 pm
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 54049

It looks like you're not handling multiple inputs.
how should I understand this sentense?
The input file contains only one infix expression
by Zhao Le
Thu Jan 29, 2004 10:59 am
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 54049

727

I know and I also hate to post my code here.
BUT I don't know how to get rid of Runtime ERROR(SISIGIV)

The code is deleted.
by Zhao Le
Thu Jan 29, 2004 6:49 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

Thanks for CDiMa's reply.
Now I know much about the OJ.
by Zhao Le
Wed Jan 28, 2004 3:24 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

I think memory usage is depending on how much Matrix you used,
Not depending how fast the program running.

I use S[1000][2570] so the memory is large and I wanna figure out why others in the top list could use so little memory.

Maybe they use better algorithm,like DP I don't know.
by Zhao Le
Wed Jan 28, 2004 9:38 am
Forum: Volume 6 (600-699)
Topic: 668 - Parliament
Replies: 12
Views: 5807

From what I see, there is no special checker for this problem, but for the sample input (31) why is the output 2 3 5 6 7 8? Can't it be 1 3 5 6 7 9 as well? Well first the number must count from 2. you may find the result 2*3*5*6*7*8 is bigger than 1*3*5*6*7*9 this is why should output 2 3 5 6 7 8
by Zhao Le
Wed Jan 28, 2004 9:35 am
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 30993

by Zhao Le
Wed Jan 28, 2004 6:42 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

Thanks all guy who replied to me.
I got AC now.
:P :P :P

But one more thing how should I reduce the Memory Usage?
My Memory use is 10488

And time running is 0:00.668

how can I reduce the memory?

Thanks
by Zhao Le
Tue Jan 27, 2004 4:16 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

So who should I trust?

Maybe I just trust myself?

Thanks for anupam & Ivan Golubev and also others who replys to me.

I think the one came here have high educated not just juys around the street.
So calm down ok?
by Zhao Le
Tue Jan 27, 2004 9:07 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

Precalculation works fine. Of course you shouldn't calculate each n! alone, you should compute n! as n*(n-1)! (the value (n-1)! is already stored in your precomputation table). I think it surely will get MLE(Memory Limit Execeeded). as I memtioned above. I know you will get as I hope here are all h...
by Zhao Le
Mon Jan 26, 2004 8:52 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67629

I used precalucation while using Matrix to store but only to find TLE.
I did not make any more progress these days.

Go to advanced search