Search found 136 matches

by jan_holmes
Sun Jun 24, 2007 9:41 pm
Forum: Volume 109 (10900-10999)
Topic: 10912 - Simple Minded Hashing
Replies: 24
Views: 14845

argggh... yes... got several WA and TLE because of my stupid DP implementation :oops: thx asif_rahman0 :D
by jan_holmes
Sun Jun 24, 2007 9:06 pm
Forum: Volume 109 (10900-10999)
Topic: 10912 - Simple Minded Hashing
Replies: 24
Views: 14845

length is the current length, right ? and what is level ? Thx
by jan_holmes
Sun Jun 24, 2007 7:39 pm
Forum: Volume 109 (10900-10999)
Topic: 10912 - Simple Minded Hashing
Replies: 24
Views: 14845

I still do not understand about the recurrence relation for this problem. Is it 3-d array ?
by jan_holmes
Mon Jun 18, 2007 8:02 pm
Forum: Volume 104 (10400-10499)
Topic: 10400 - Game Show Math
Replies: 32
Views: 17604

Hi, I got TLE for this code :

Code: Select all

ACed...
Is it because of using STL vector ? or is it because of wrong DP implementation ? Thx. :)
by jan_holmes
Sun Jun 10, 2007 11:28 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33555

Hmmm.... Check this also :

Code: Select all

1

02/02/2031
03/01/2031

Output :

Code: Select all


Case #1: 0

by jan_holmes
Sun Jun 10, 2007 11:06 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33555

How 'bout this one :

Code: Select all

1

02/02/2031
03/02/2031

Output :

Code: Select all

Case #1: Invalid birth date
by jan_holmes
Sun Jun 10, 2007 10:50 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33555

Now, Try :

Code: Select all


1

01/02/2031
01/02/2031

Should be :

Code: Select all


Case #1: 0

by jan_holmes
Sun Jun 10, 2007 10:27 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33555

Then, check for this one :

Code: Select all

1

02/02/2031
02/02/1900

The output should be :

Code: Select all


Case #1: Check birth date

EDIT : Sorry, It should be "Check birth date"
by jan_holmes
Sun Jun 10, 2007 9:26 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33555

Try this input :

Code: Select all

1

01/01/2031
02/01/1900
The output should be :

Code: Select all

Case #1: 130
by jan_holmes
Sun Jun 10, 2007 9:14 pm
Forum: Volume 109 (10900-10999)
Topic: 10910 - Marks Distribution
Replies: 26
Views: 13129

ic... :oops: Thx for the correction :wink:
by jan_holmes
Sun Jun 10, 2007 8:56 pm
Forum: Volume 109 (10900-10999)
Topic: 10910 - Marks Distribution
Replies: 26
Views: 13129

I don't know whether this is the problem but you might use "long long" instead of "long long int".
by jan_holmes
Sun Jun 10, 2007 8:48 pm
Forum: C++
Topic: reading words from input...
Replies: 7
Views: 3121

you can use something like :

Code: Select all

if (line.length() == 0) // do something
by jan_holmes
Sun Jun 10, 2007 12:53 pm
Forum: Java
Topic: Is There Vector Support?
Replies: 10
Views: 6632

I just submitted a solution to a problem in the currently running contest, which contains this line:
Code:
System.out.printf("Case %d: %d\n", tc++, best);

I just hope they switch to the new system completely as soon as possible
Did it work ?
by jan_holmes
Sun Jun 10, 2007 12:50 pm
Forum: C++
Topic: reading words from input...
Replies: 7
Views: 3121

The easy implementation of stringstream is like this :

Code: Select all

vector< string > str;
string s = "word1 word2 word3";
string p;
istringstream ss(s);
while (ss >> p) str.push_back(p);
Hope it helps :wink: [/code]
by jan_holmes
Sun Jun 10, 2007 9:36 am
Forum: Volume 112 (11200-11299)
Topic: 11226 - Reaching the fix-point.
Replies: 23
Views: 10223

Yes, it is correct.

Go to advanced search