Search found 131 matches

by Riyad
Sun Aug 12, 2007 7:17 pm
Forum: Volume 102 (10200-10299)
Topic: 10282 - Babelfish
Replies: 48
Views: 18978

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
by Riyad
Mon May 14, 2007 12:19 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8542

thanx man. you are a great helper :)
by Riyad
Fri May 11, 2007 1:38 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8542

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...
by Riyad
Fri May 11, 2007 1:31 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8542

any one please help me with this problem. i am still stuck in this section. please help.thanx in advance
bye
Riyad
by Riyad
Fri May 11, 2007 1:22 pm
Forum: Volume 105 (10500-10599)
Topic: 10581 - Partitioning for fun and profit
Replies: 15
Views: 8308

I/O

but i get this output for your input. could you tell what am i doing wrong?please help.....

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????
by Riyad
Tue May 08, 2007 11:45 am
Forum: Volume 105 (10500-10599)
Topic: 10581 - Partitioning for fun and profit
Replies: 15
Views: 8308

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 &...
by Riyad
Mon May 07, 2007 5:31 am
Forum: Volume 105 (10500-10599)
Topic: 10581 - Partitioning for fun and profit
Replies: 15
Views: 8308

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....
by Riyad
Sat Mar 31, 2007 4:03 am
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8542

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...
by Riyad
Tue Mar 27, 2007 6:04 pm
Forum: Algorithms
Topic: USACO, Section : 1.4 , Packing Rectangles
Replies: 7
Views: 8542

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. ...
by Riyad
Tue Sep 05, 2006 4:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10051 - Tower of Cubes
Replies: 19
Views: 8637

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 :wink: but i submitted before matching these given outputs with mine :P
by Riyad
Sat Sep 02, 2006 8:10 pm
Forum: Volume 110 (11000-11099)
Topic: 11081 - Strings
Replies: 35
Views: 19127

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 ...
by Riyad
Sat Sep 02, 2006 7:50 pm
Forum: Volume 110 (11000-11099)
Topic: 11077 - Find the Permutations
Replies: 14
Views: 6917

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) ???????????????
thanx in advance
by Riyad
Sat Sep 02, 2006 7:41 pm
Forum: Volume 110 (11000-11099)
Topic: 11081 - Strings
Replies: 35
Views: 19127

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 .........
thanx in advance
by Riyad
Sat Sep 02, 2006 7:38 pm
Forum: Volume 110 (11000-11099)
Topic: 11076 - Add Again
Replies: 34
Views: 16054

about 11076

try to find some formula for this problem ..... no backtracking needed ...
by Riyad
Sun Aug 27, 2006 5:39 am
Forum: Volume 109 (10900-10999)
Topic: 10920 - Spiral Tap
Replies: 12
Views: 6945

about 10920

i cant find any suitable way to solve this problem . can some one give me some hints ??? is there formula needed or simulation is the way to go ???
please help
Thanx in advance

Go to advanced search