Search found 80 matches

by jjtse
Thu May 18, 2006 7:24 am
Forum: Algorithms
Topic: Thinking in Dynamic Programming
Replies: 12
Views: 3518

hey smilitude, thanks for the response. I had exams too. I'm actually going to be a little busy until the weekend. I'll check it out again during the weekeend and tell you how everything went.
by jjtse
Tue May 16, 2006 7:29 am
Forum: Volume 109 (10900-10999)
Topic: 10931 - Parity
Replies: 18
Views: 10066

This is a simple problem actually. Since 1 ≤ I ≤ 2147483647 integers will not be big enough to hold that. Take a look at this: http://home.att.net/~jackklein/c/inttypes.html#limits I guess for a quick fix, just replace all your "int" types with "long" or "unsigned long" Either of those will work.
by jjtse
Sun May 14, 2006 3:38 am
Forum: Algorithms
Topic: Thinking in Dynamic Programming
Replies: 12
Views: 3518

I actually found a similar piece of code in several places. But I don't understand what its trying to do. Can you explain it in words? For example: for 1,2,3,4, the number of combinations is trivially 1, because only pennies can make up that value. For 5, the number of combinations becomes 2: using ...
by jjtse
Sat May 13, 2006 3:21 am
Forum: Algorithms
Topic: Thinking in Dynamic Programming
Replies: 12
Views: 3518

hey, congratulations for solving the coin change problem. Can you show me how you build your table? Because I can't seem to find the relationship between the coins and the sum value.
by jjtse
Sat May 13, 2006 3:17 am
Forum: Algorithms
Topic: I don't understand Dynamic Programming
Replies: 11
Views: 6226

yeah, I'm a newbie to DP as well. The shortest path and string editing problems we did in class looked easy. Then when I tried some of these acm problems, I'm having a hard time. I can definitely see how 674 - coin change problem is dynamic programming, but I don't see the relationship between coins...
by jjtse
Sun May 07, 2006 11:46 pm
Forum: Volume 109 (10900-10999)
Topic: 10931 - Parity
Replies: 18
Views: 10066

hey scidong,

your posts was a long time ago. I recently solved that problem. If you still need help on that problem, post a reply and I'll help you out. Otherwise I'll assume you already figured it out.
by jjtse
Tue Apr 25, 2006 8:59 am
Forum: Other words
Topic: Input-Lines
Replies: 5
Views: 2921

Thanks Darko, I tried your method and it solved the platform issue. Now it works for both windows and linux. I still get TLE error though. The problem I'm working on is 10317, so I'm guessing it's an algorithm issue. I wish the reason for TLE is that my program is waiting for input even though EOF i...
by jjtse
Tue Apr 25, 2006 4:57 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 42463

another problem with java. I've wrote java codes that run on windows and wouldn't run correctly on linux. Then I did some changes for it to work on linux, but now it wouldn't work on windows. The basic discrepancy between the two lies IO. If we choose to read a line of input by reading one character...
by jjtse
Tue Apr 25, 2006 4:46 am
Forum: Other words
Topic: Input-Lines
Replies: 5
Views: 2921

Hey did you ever found a solution to your problem? I think I'm in the same situation as you, and perhaps I can redefine the problem a little bit better. Since BufferedReader is a restricted function in java, we have to use System.in for our input. I use System.in.read(), and read a character at a ti...
by jjtse
Thu Dec 15, 2005 2:44 pm
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 30251

Thanks Bud. That explains the compile error. You got any ideas on why it's WA?
by jjtse
Wed Dec 14, 2005 10:45 pm
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 30251

Hey guys, I'm having a problem with this problem. And I don't think the problem is trivial. I used the basic well known idea of getting last digit in m and last 2 digit in n. I tried all the possible inputs I can find, and works fine. i submitted my C program as a c++ program. got WA. I submitted my...
by jjtse
Sat Dec 10, 2005 11:26 pm
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 31606

Thanks. I got AC.
by jjtse
Sat Dec 10, 2005 11:26 pm
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 31606

Thanks, you are correct from the other topic. I fixed it and got AC. Thanks
by jjtse
Sat Dec 10, 2005 9:21 am
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 31606

does anyone know what was wrong with watershed's code? Apparently, I'm having the same problem he used to have. I compared the output produce by my codes with the output produced by his codes, and it looks exactly the same. Mine, however, has presentation error instead of wrong answer, and I can't s...
by jjtse
Fri Dec 09, 2005 11:54 pm
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 31606

10815 Presentation Error (PE)

Hey fellas, I've been working on this problem for a while now. Finally got it to work correctly. The only problem now is that it's getting a presentation error. I bet it's something trivial, it's just that I can't see it. I tried putting/removing the newline at the end of the output file. That didn'...

Go to advanced search