Search found 27 matches

by zero_cool
Wed Aug 22, 2007 11:56 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 39638

Thanks for your reply. I try to delete all the code and just have the main method to return 0. It doesn't return memory limit exceeded that way. But, when I put some code, it returns memory limit exceeded. Can anyone explain to me why this is happening? Is the way the compiler work ignored unused de...
by zero_cool
Wed Aug 22, 2007 1:11 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 39638

weird memory limit exceeded

Hi guys, I got the message memory limit exceeded which I don't understand why. Can you guys please help me out? Thanks. #include <iostream> #include <cstdio> #include <cctype> #include <cstring> using namespace std; const int MAX=6000; const int MAXC=200; int connection[MAX][MAX]; char authors[MAX][...
by zero_cool
Sun Jun 18, 2006 1:18 am
Forum: Algorithms
Topic: Thinking in Dynamic Programming
Replies: 12
Views: 3474

coin system problem

f[0]=1; for(j=0;j<V;j++) { for(i=1;i<=N;i++) { if(i<elem[j]) continue; f[i]+=f[i-elem[j]]; } } Here V is the number of elements, and N is the sum; I use the same code but it doesn't work for some kind of weird coin system example: {11...26}. Is there any other dp to compute the number of ways? Forg...
by zero_cool
Sat Mar 11, 2006 9:49 am
Forum: Volume 100 (10000-10099)
Topic: 10074 - Take the Land
Replies: 21
Views: 3608

I think it is impossible to change this code to

for (k=1;k<=i;k++)
for (l=1;l<=j;l++) {

for (k=i;k<=i;k++)
for (l=j;l<=j;l++) {

because it means deleting the last two for (l from j to j and k from i to i means nothing) and also if I change that code it will produce wrong answer
by zero_cool
Sun Jan 22, 2006 5:19 pm
Forum: Volume 100 (10000-10099)
Topic: 10074 - Take the Land
Replies: 21
Views: 3608

I don't know what's wrong with my code but I kept getting WA. Could somebody give me critical test case or check my program? _____________________________________________________________ #include <iostream> using namespace std; const int maxSize=101; const int MIN=-999999; int main() { int a,b,tmp,m...
by zero_cool
Sat Jan 21, 2006 5:29 pm
Forum: C++
Topic: need help + good compiler?
Replies: 2
Views: 1900

thx for your suggestion. btw, I've fixed my program thx to you.
by zero_cool
Sat Jan 21, 2006 5:26 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20445

I've got accepted already. I think so, too Mamun. Thx for helping me.
by zero_cool
Sat Jan 21, 2006 5:17 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 43820

thx man. I got AC. I wonder why as a global or static make any difference.
by zero_cool
Wed Jan 18, 2006 3:40 am
Forum: Volume 100 (10000-10099)
Topic: 10074 - Take the Land
Replies: 21
Views: 3608

10074 take the land: need test case

can anybody give me some critical test cases for problem 10074? Thank you.
by zero_cool
Mon Jan 16, 2006 8:52 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 43820

623 why RE

I don't know what's wrong with my code. I kept getting RE. It work perfectly in my compiler except that the maximum size can not exceed 200 in my compiler (maybe because of memory limit). Someone please help me. ___________________________________________________ code removed _______________________...
by zero_cool
Fri Jan 13, 2006 12:37 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20445

how can I get 199 for 100 1. can anyone explain it to me? because I get 197. It's a very weird problem. I think the judge should change the test case.
by zero_cool
Wed Oct 19, 2005 4:44 am
Forum: C++
Topic: need help + good compiler?
Replies: 2
Views: 1900

need help + good compiler?

Can somebody help me with my program. My program run normally in my compiler but it said compile error. Is there any suggestion to what compiler should I use? Right now I use visual c++ 6.0. This is my code _____________________________________________________________ #include <iostream> #include <s...
by zero_cool
Tue Oct 04, 2005 10:42 pm
Forum: Volume 104 (10400-10499)
Topic: 10499 - The Land of Justice
Replies: 51
Views: 19436

I use div because I've already use double as a data type and i got compile error because of error in output manipulation (i think). And then I changed my code to that. I use long and divide it by 4. and add '25' or '50' or '75' or '00' depend on the remainder. my compiler can't use long long data ty...
by zero_cool
Sun Oct 02, 2005 7:26 am
Forum: Volume 104 (10400-10499)
Topic: 10499 - The Land of Justice
Replies: 51
Views: 19436

10499 WA need help

I don't know what's wrong with my code. Could anyone give me a critical input???

_____________________________________________________________
code removed
_____________________________________________________________
by zero_cool
Tue Sep 13, 2005 7:59 pm
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 17240

i need input for problem 10719

The input is like this

_____________________________________________________________
3
1

Go to advanced search