Search found 1332 matches

by Jan
Mon Mar 02, 2009 1:50 am
Forum: Volume 115 (11500-11599)
Topic: 11502 - Rocket Stages
Replies: 4
Views: 2628

Re: 11502 - Rocket Stages

You are taking the first stage (The first input) surely. Why?
by Jan
Sat Feb 28, 2009 4:35 pm
Forum: Volume 115 (11500-11599)
Topic: 11569 - Lovely Hint
Replies: 8
Views: 1832

Re: 11569 - Lovely Hint

First, take all the uppercase letters and sort them. Suppose a[] is the string now. 1. the length of the longest string can be found using greedy. Try to pick the smaller letter that can be placed. So, you will find the length of the longest lovely string. 2. This part can be found using dp. rec( i,...
by Jan
Fri Feb 27, 2009 2:42 pm
Forum: Volume 115 (11500-11599)
Topic: 11579 - Triangle Trouble
Replies: 20
Views: 10192

Re: 11579 - Triangle Trouble

Spoiler: Read the problem again. The sides can be too long. So, rewrite the equation as sqrt ( s * (s-a) * (s-b) * (s*c) ) = sqrt(s) * sqrt(s-a) * sqrt(s-b) * sqrt(s-c) The left part contains long multiplications, so, fractional problems can occur easily. So, use the right part :) Hope it helps.
by Jan
Fri Feb 27, 2009 12:58 pm
Forum: Volume 115 (11500-11599)
Topic: 11582 - Colossal Fibonacci Numbers!
Replies: 8
Views: 1802

Re: 11582 - Colossal Fibonacci Numbers!

Yes it returns backs to 0 1 1 .. But that observation can mislead. From your AC solution looks like it doesn't in this case. If we are given a sequence of numbers like 0,1,1,2,3,5,6,7,0,1,1,2,0,1,1,2,3,5,6,7,0,1,1,2 how do you find the period of this ? Any thing easier than KMP. If the values were ...
by Jan
Fri Feb 27, 2009 12:49 pm
Forum: Volume 112 (11200-11299)
Topic: 11270 - Tiling Dominoes
Replies: 6
Views: 3557

Re: 11270 - Tiling Dominoes

Pre generate the values and store the result in a file. Then store the values in an array. Finally, print the values from the array. That's what I did.
by Jan
Fri Feb 27, 2009 12:43 pm
Forum: Volume 113 (11300-11399)
Topic: 11347 - Multifactorials
Replies: 7
Views: 3755

Re: 11347 - Multifactorials

5! = 120.

The dividers are..
1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120.

So, there are 16 dividers, thus the result is 16.
by Jan
Fri Feb 27, 2009 12:39 pm
Forum: Volume 113 (11300-11399)
Topic: 11354 - Bond
Replies: 13
Views: 6655

Re: 11354 - Bond

by Jan
Fri Feb 27, 2009 12:37 pm
Forum: Volume 112 (11200-11299)
Topic: 11283 - Playing Boggle
Replies: 19
Views: 8240

Re: 11283 - Playing Boggle

Try the cases. Input: 3 TNXO AAEI IOSR BFRH 8 OATS TAXES RISE ANNEX BOAT FROSH HAT TRASH FNEI OBCN EERI VSIR 1 BEER ABCD HGFE IJKL PONM 20 ABCDEFGHIJKLMNOP ABCDEFGHIJKLMNO ABCDEFGHIJKLMN ABCDEFGHIJKLM ABCDEFGHIJKL ABCDEFGHIJK ABCDEFGHIJ ABCDEFGHI ABCDEFGH ABCDEFG ABCDEF ABCDE ABCD ABC AHIPOJGBCFKNML...
by Jan
Fri Feb 27, 2009 12:28 pm
Forum: Volume 115 (11500-11599)
Topic: 11581 - Grid Successors
Replies: 8
Views: 3271

Re: 11581 - Grid Successors

Check the first sample.. 111 100 001 Its f0(g). We can find f1(g) easily. f1(g) = f( f0(g) ) This way we can construct all. So, f0(g) = 111 100 001 f1(g) = 001 100 110 f2(g) = 110 101 011 f3(g) = 010 101 010 f4(g) = 000 000 000 f5(g) = 000 000 000 ... f I (g) = f4(g). Here 'I' stands for infinity. S...
by Jan
Fri Feb 27, 2009 12:16 pm
Forum: Volume 115 (11500-11599)
Topic: 11579 - Triangle Trouble
Replies: 20
Views: 10192

Re: 11579 - Triangle Trouble

The identifier for long double is '%Lf'.
by Jan
Thu Feb 26, 2009 10:14 pm
Forum: Volume 115 (11500-11599)
Topic: 11582 - Colossal Fibonacci Numbers!
Replies: 8
Views: 1802

Re: 11582 - Colossal Fibonacci Numbers!

Check the case.

Input:

Code: Select all

126 121 111
Output:

Code: Select all

33
Hope it helps.
by Jan
Thu Feb 26, 2009 5:07 pm
Forum: Volume 115 (11500-11599)
Topic: 11526 - H(n)
Replies: 49
Views: 16874

Re: 11526 - H(n)

Read the previous posts, please.
by Jan
Thu Feb 26, 2009 4:49 pm
Forum: Volume 115 (11500-11599)
Topic: 11576 - Scrolling Sign
Replies: 9
Views: 4761

Re: 11576 - Scrolling Sign

Check the case.

Input:

Code: Select all

1
8 2
qghumeay
lnlfdxfi
Output:

Code: Select all

16
by Jan
Thu Feb 26, 2009 4:32 pm
Forum: Volume 115 (11500-11599)
Topic: 11578 - Situp Benches
Replies: 8
Views: 2225

Re: 11578 - Situp Benches

The sample is 3 2 40 2 50 1 40 So, there are 3 students who want to use the situp benches. Because the student whose time slot is smaller, comes first. So, the actual order is. 1 40 2 40 2 50 Initially both the situp benches have a 10 degree incline. Now assign the first person in the first bench. S...
by Jan
Fri Feb 20, 2009 10:25 pm
Forum: Volume 115 (11500-11599)
Topic: 11572 - Unique Snowflakes
Replies: 36
Views: 12535

Re: 11572 - Unique Snowflakes

Try the following case..

Input:

Code: Select all

1

12
7
4
0
9
4
8
8
2
4
5
5
1
Output:

Code: Select all

4
Hope it helps.

Go to advanced search