## Search found 131 matches

Sun Aug 12, 2007 7:17 pm
Forum: Volume 102 (10200-10299)
Topic: 10282 - Babelfish
Replies: 48
Views: 20023
two ways to do it
1) qsort then binary search
2) binary search tree is also an option
think about it ... you will get the idea
Mon May 14, 2007 12:19 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8680
thanx man. you are a great helper
Fri May 11, 2007 1:38 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8680
http://riyad13783.googlepages.com/pack.gif i forgot to give the picture of the 6 basic layouts. i wrote all the formulas in one of my previous post. could some one check those and tell me weither my formulas are correct or not. i will remove all my post as soon as i get accepted in this problem. by...
Fri May 11, 2007 1:31 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8680
bye
Fri May 11, 2007 1:22 pm
Forum: Volume 105 (10500-10599)
Topic: 10581 - Partitioning for fun and profit
Replies: 15
Views: 8495

### I/O

Code: Select all

``````1
1
1
1
1
1
52
3
1
1
1
1
1
1
64
31
1
1
1
1
66
41
``````
what is ur output for

Code: Select all

``````10 4 10
``````
i get

Code: Select all

``````1
2
3
4
``````
is it right????
Tue May 08, 2007 11:45 am
Forum: Volume 105 (10500-10599)
Topic: 10581 - Partitioning for fun and profit
Replies: 15
Views: 8495
can't get AC still :( can anyone please help. below is my code # include <stdio.h> # include <assert.h> typedef long long i64 ; i64 memo[250][20]; i64 go( int sum , int n ){ i64& ret = memo[sum][n]; if(ret !=-1) return ret ; if( !sum && !n ) return ret = 1 ; ret = 0 ; int i ; for( i = 1 ; i <= sum &...
Mon May 07, 2007 5:31 am
Forum: Volume 105 (10500-10599)
Topic: 10581 - Partitioning for fun and profit
Replies: 15
Views: 8495

### some more test cases

i am getting WA in this problem. could anyone provide more testcases. boundary cases would be very nice. i got correct results for all the above i/o. please help....
Sat Mar 31, 2007 4:03 am
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8680

### Help on packing rectangle.........

hello, thank you for the help. im not good at geometry. so i am not confident about finding the height and width of the different scenarios case 1 : 1 2 3 4 H = max4(h1,h2,h3,h4); W = w1+w2+w3+w4 ; case 2: (1 2 3) 4 H = max3(h1,h2,h3)+h4; W = max2( w4,w1+w2+w3); case 3 : ( 1 2 ) 4 3 H = max2( h4, ma...
Tue Mar 27, 2007 6:04 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8680

### USACO, Section : 1.4 , Packing Rectangles

Four rectangles are given. Find the smallest enclosing (new) rectangle into which these four may be fitted without overlapping. By smallest rectangle, we mean the one with the smallest area. All four rectangles should have their sides parallel to the corresponding sides of the enclosing rectangle. ...
Tue Sep 05, 2006 4:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10051 - Tower of Cubes
Replies: 19
Views: 8963
luison9999 is right . the output for case 4 and case 7 is wrong . the output should be 5 and 17 respectively ...it did make me confused but i submitted before matching these given outputs with mine
Sat Sep 02, 2006 8:10 pm
Forum: Volume 110 (11000-11099)
Topic: 11081 - Strings
Replies: 35
Views: 19657
would u care to tell us your DP solution which runs in O(n^3) iLL be really glad to know one if u dont want to give a spoiler u can PM me ur idea , anywayz thanx for ur reply ...
Sat Sep 02, 2006 7:50 pm
Forum: Volume 110 (11000-11099)
Topic: 11077 - Find the Permutations
Replies: 14
Views: 7147

### algorithm of 101077

is dp the obvious choice to go for this problem ?? and can some one tell me whats the complexity of the DP .....
is it O(nk) ???????????????
Sat Sep 02, 2006 7:41 pm
Forum: Volume 110 (11000-11099)
Topic: 11081 - Strings
Replies: 35
Views: 19657
is there any O(n^3 ) dp for this problem . i used O(n^4) dp to get accepted during the contest which is getting TLE in the judge now . so can some one point out the O(n^3) algorithm or O(n^4) is way to go .........
Sat Sep 02, 2006 7:38 pm
Forum: Volume 110 (11000-11099)
Replies: 34
Views: 16563