Search found 215 matches

by ImLazy
Wed Oct 11, 2006 11:47 am
Forum: C++
Topic: ANSI C++ Manual
Replies: 5
Views: 3278

In Windows, I use MinGW as command line compiler. which is almost identical as gcc in Linux (It has a little bug on printf("%lld")).
Dev C++ is a good IDE in Windows, which is free and small in size. And it is also based on MinGW.
by ImLazy
Thu Sep 14, 2006 4:55 am
Forum: Volume 106 (10600-10699)
Topic: 10690 - Expression Again
Replies: 23
Views: 9661

Who can answer me?
by ImLazy
Sat Sep 09, 2006 5:29 pm
Forum: Volume 106 (10600-10699)
Topic: 10690 - Expression Again
Replies: 23
Views: 9661

How to DP? Could you tell it more detailedly? I've solved 10664, but keep getting TLE on 10690. Let me describe my algorithm: Use an array of set, named "reach". reach[i] stores the sums that can be reached by i numbers. for every number n { for every count of number c (from greater to lower) { With...
by ImLazy
Thu Sep 07, 2006 1:21 pm
Forum: Volume 106 (10600-10699)
Topic: 10664 - Luggage
Replies: 20
Views: 14054

For Eduard:
My program's output for an empty line is "YES", and I got AC.
by ImLazy
Thu Sep 07, 2006 11:23 am
Forum: Volume 106 (10600-10699)
Topic: 10664 - Luggage
Replies: 20
Views: 14054

Eduard wrote:Input

Code: Select all

1
               <-----Blank line
Output

Code: Select all

NO
Why NO for empty line. If there is nothing to load, two boots certainly load the same weight, 0.

By the way, what means "1
by ImLazy
Mon Aug 28, 2006 11:01 am
Forum: Volume 106 (10600-10699)
Topic: 10690 - Expression Again
Replies: 23
Views: 9661

OK.
Sorry.
by ImLazy
Sun Aug 27, 2006 10:21 am
Forum: Volume 106 (10600-10699)
Topic: 10690 - Expression Again
Replies: 23
Views: 9661

10690

To maximize the expression, I think I should divide the numbers into two parts and make their difference minimum. But how to do it? Some one says DP. But I still have no idea how to DP. Who can give more hints.
by ImLazy
Thu Aug 17, 2006 11:19 am
Forum: C++
Topic: Why compile error?
Replies: 2
Views: 1688

Thank you.
by ImLazy
Thu Aug 17, 2006 10:42 am
Forum: C++
Topic: Why compile error?
Replies: 2
Views: 1688

Why compile error?

#include <iostream> #include <string> #include <map> #include <cctype> using namespace std; map<string, int> g_dict; int main() { string strIn; while (cin >> strIn) { string temp; for(int i = 0; i < strIn.size(); i++) { temp += (char)tolower(strIn[i]); if (!isalpha(temp[i])) { temp[i] = ' '; } } st...
by ImLazy
Wed Jul 26, 2006 3:26 pm
Forum: Volume 110 (11000-11099)
Topic: 11052 - Economic phone calls
Replies: 26
Views: 11474

Oh, I misunderstood the problem. The last log in the input is the latest. I used to think the first one is.
by ImLazy
Wed Jul 26, 2006 2:56 pm
Forum: Volume 110 (11000-11099)
Topic: 11052 - Economic phone calls
Replies: 26
Views: 11474

11052 - Economic phone calls

I find the offical I/O, and for this input:

Code: Select all

3
06:06:05:06 641037712 -
04:13:06:36 17 -
10:25:14:37 793127405919586 +
The output is:

Code: Select all

1
But I think the output should be "2". The first or the second log must be kept, otherwise the third log will come to the current year.
by ImLazy
Sun May 28, 2006 3:31 pm
Forum: Java
Topic: Why does all the clone() method return Object type?
Replies: 4
Views: 3520

I think I've found the reason. It's very simple: in java 1.4 or earliear versions, overridden methods can not change the return type. So all the clone() methods, which are overridden from Object, must be Object type.
by ImLazy
Sat May 27, 2006 9:29 am
Forum: Java
Topic: Why does all the clone() method return Object type?
Replies: 4
Views: 3520

Every clone() method provided by JDK are overriden methods except the one in Object class, because the clone() method in Object is protected. If one class want to provide clone() method, it must override it. And my question is why don't the provide clone() methods which return explicit types.
by ImLazy
Sat May 27, 2006 8:15 am
Forum: Java
Topic: Why does all the clone() method return Object type?
Replies: 4
Views: 3520

Why does all the clone() method return Object type?

As I know, every clone() method provided by JDK returns Object. Why don't they return explicit type? I have to convert the type every time I use their clone().
What's the benefit of returning Object?
by ImLazy
Sat May 27, 2006 5:43 am
Forum: Java
Topic: Why does this code get warning?
Replies: 10
Views: 5642

Because in my code, I will show the Vector in JTable by invoke the constructor of JTable. I'm not familiar with ArrayList. Could you tell me what's the difference between Vector and ArrayList? In the Java API document, it is said :"This class is roughly equivalent to Vector, except that it is unsync...

Go to advanced search